diff --git a/.github/workflows/cf-preview.yml b/.github/workflows/cf-preview.yml index a5014420..ffc5c7f0 100644 --- a/.github/workflows/cf-preview.yml +++ b/.github/workflows/cf-preview.yml @@ -40,7 +40,8 @@ jobs: - name: Install dependencies - run: pnpm install --loglevel verbose --no-frozen-lockfile + run: pnpm install + # run: pnpm install --loglevel verbose --no-frozen-lockfile # - name: deploy on lattice testnet # run: cd packages/contracts; pnpm run deploy:testnet diff --git a/packages/client/dist/assets/PressStart2P-566bb63d.woff b/packages/client/dist/assets/PressStart2P-566bb63d.woff new file mode 100644 index 00000000..281bd651 Binary files /dev/null and b/packages/client/dist/assets/PressStart2P-566bb63d.woff differ diff --git a/packages/client/dist/assets/bg-46b5266f.png b/packages/client/dist/assets/bg-46b5266f.png new file mode 100644 index 00000000..4babfcca Binary files /dev/null and b/packages/client/dist/assets/bg-46b5266f.png differ diff --git a/packages/client/dist/assets/bg-4e25658d.jpg b/packages/client/dist/assets/bg-4e25658d.jpg new file mode 100644 index 00000000..89e40272 Binary files /dev/null and b/packages/client/dist/assets/bg-4e25658d.jpg differ diff --git a/packages/client/dist/assets/browser-3852a342.js b/packages/client/dist/assets/browser-3852a342.js new file mode 100644 index 00000000..17f4d115 --- /dev/null +++ b/packages/client/dist/assets/browser-3852a342.js @@ -0,0 +1,2 @@ +var e=null;typeof WebSocket<"u"?e=WebSocket:typeof MozWebSocket<"u"?e=MozWebSocket:typeof global<"u"?e=global.WebSocket||global.MozWebSocket:typeof window<"u"?e=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(e=self.WebSocket||self.MozWebSocket);const o=e;export{o as default}; +//# sourceMappingURL=browser-3852a342.js.map diff --git a/packages/client/dist/assets/browser-3852a342.js.map b/packages/client/dist/assets/browser-3852a342.js.map new file mode 100644 index 00000000..533b6a60 --- /dev/null +++ b/packages/client/dist/assets/browser-3852a342.js.map @@ -0,0 +1 @@ +{"version":3,"file":"browser-3852a342.js","sources":["../../../../node_modules/.pnpm/isomorphic-ws@5.0.0_ws@8.12.0/node_modules/isomorphic-ws/browser.js"],"sourcesContent":["// https://github.com/maxogden/websocket-stream/blob/48dc3ddf943e5ada668c31ccd94e9186f02fafbd/ws-fallback.js\n\nvar ws = null\n\nif (typeof WebSocket !== 'undefined') {\n ws = WebSocket\n} else if (typeof MozWebSocket !== 'undefined') {\n ws = MozWebSocket\n} else if (typeof global !== 'undefined') {\n ws = global.WebSocket || global.MozWebSocket\n} else if (typeof window !== 'undefined') {\n ws = window.WebSocket || window.MozWebSocket\n} else if (typeof self !== 'undefined') {\n ws = self.WebSocket || self.MozWebSocket\n}\n\nexport default ws\n"],"names":["ws","ws$1"],"mappings":"AAEA,IAAIA,EAAK,KAEL,OAAO,UAAc,IACvBA,EAAK,UACI,OAAO,aAAiB,IACjCA,EAAK,aACI,OAAO,OAAW,IAC3BA,EAAK,OAAO,WAAa,OAAO,aACvB,OAAO,OAAW,IAC3BA,EAAK,OAAO,WAAa,OAAO,aACvB,OAAO,KAAS,MACzBA,EAAK,KAAK,WAAa,KAAK,cAG9B,MAAeC,EAAAD","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/packages/client/dist/assets/btn_5-377b24f9.png b/packages/client/dist/assets/btn_5-377b24f9.png new file mode 100644 index 00000000..bdeccdd7 Binary files /dev/null and b/packages/client/dist/assets/btn_5-377b24f9.png differ diff --git a/packages/client/dist/assets/ccip-1c16130d.js b/packages/client/dist/assets/ccip-1c16130d.js new file mode 100644 index 00000000..3a3f2178 --- /dev/null +++ b/packages/client/dist/assets/ccip-1c16130d.js @@ -0,0 +1,2 @@ +import{B as l,g as w,s as y,i as p,I as h,b as g,e as k,h as O,j as L,H as m,k as E}from"./index-87f2e809.js";class x extends l{constructor({callbackSelector:e,cause:t,data:o,extraData:c,sender:s,urls:n}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",n&&[" Gateway URL(s):",...n.map(d=>` ${w(d)}`)],` Sender: ${s}`,` Data: ${o}`,` Callback selector: ${e}`,` Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class M extends l{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(t)}`,`Response: ${y(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class R extends l{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function $(a,e){if(!p(a))throw new h({address:a});if(!p(e))throw new h({address:e});return a.toLowerCase()===e.toLowerCase()}const v="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function C(a,{blockNumber:e,blockTag:t,data:o,to:c}){const{args:s}=g({data:o,abi:[S]}),[n,d,r,i,f]=s;try{if(!$(c,n))throw new R({sender:n,to:c});const u=await A({data:r,sender:n,urls:d}),{data:b}=await k(a,{blockNumber:e,blockTag:t,data:O([i,L([{type:"bytes"},{type:"bytes"}],[u,f])]),to:c});return b}catch(u){throw new x({callbackSelector:i,cause:u,data:o,extraData:f,sender:n,urls:d})}}async function A({data:a,sender:e,urls:t}){let o=new Error("An unknown error occurred.");for(let c=0;c ` ${getUrl(url)}`),\n ],\n ` Sender: ${sender}`,\n ` Data: ${data}`,\n ` Callback selector: ${callbackSelector}`,\n ` Extra data: ${extraData}`,\n ].flat(),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupError'\n });\n }\n}\nexport class OffchainLookupResponseMalformedError extends BaseError {\n constructor({ result, url }) {\n super('Offchain gateway response is malformed. Response data must be a hex value.', {\n metaMessages: [\n `Gateway URL: ${getUrl(url)}`,\n `Response: ${stringify(result)}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupResponseMalformedError'\n });\n }\n}\nexport class OffchainLookupSenderMismatchError extends BaseError {\n constructor({ sender, to }) {\n super('Reverted sender address does not match target contract address (`to`).', {\n metaMessages: [\n `Contract address: ${to}`,\n `OffchainLookup sender address: ${sender}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffchainLookupSenderMismatchError'\n });\n }\n}\n//# sourceMappingURL=ccip.js.map","import { InvalidAddressError } from '../../errors/address.js';\nimport { isAddress } from './isAddress.js';\nexport function isAddressEqual(a, b) {\n if (!isAddress(a))\n throw new InvalidAddressError({ address: a });\n if (!isAddress(b))\n throw new InvalidAddressError({ address: b });\n return a.toLowerCase() === b.toLowerCase();\n}\n//# sourceMappingURL=isAddressEqual.js.map","import { call } from '../actions/public/call.js';\nimport {} from '../errors/base.js';\nimport { OffchainLookupError, OffchainLookupResponseMalformedError, OffchainLookupSenderMismatchError, } from '../errors/ccip.js';\nimport { HttpRequestError } from '../errors/request.js';\nimport { decodeErrorResult } from './abi/decodeErrorResult.js';\nimport { encodeAbiParameters } from './abi/encodeAbiParameters.js';\nimport { isAddressEqual } from './address/isAddressEqual.js';\nimport { concat } from './data/concat.js';\nimport { isHex } from './data/isHex.js';\nimport { stringify } from './stringify.js';\nexport const offchainLookupSignature = '0x556f1830';\nexport const offchainLookupAbiItem = {\n name: 'OffchainLookup',\n type: 'error',\n inputs: [\n {\n name: 'sender',\n type: 'address',\n },\n {\n name: 'urls',\n type: 'string[]',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n {\n name: 'callbackFunction',\n type: 'bytes4',\n },\n {\n name: 'extraData',\n type: 'bytes',\n },\n ],\n};\nexport async function offchainLookup(client, { blockNumber, blockTag, data, to, }) {\n const { args } = decodeErrorResult({\n data,\n abi: [offchainLookupAbiItem],\n });\n const [sender, urls, callData, callbackSelector, extraData] = args;\n try {\n if (!isAddressEqual(to, sender))\n throw new OffchainLookupSenderMismatchError({ sender, to });\n const result = await ccipFetch({ data: callData, sender, urls });\n const { data: data_ } = await call(client, {\n blockNumber,\n blockTag,\n data: concat([\n callbackSelector,\n encodeAbiParameters([{ type: 'bytes' }, { type: 'bytes' }], [result, extraData]),\n ]),\n to,\n });\n return data_;\n }\n catch (err) {\n throw new OffchainLookupError({\n callbackSelector,\n cause: err,\n data,\n extraData,\n sender,\n urls,\n });\n }\n}\nexport async function ccipFetch({ data, sender, urls, }) {\n let error = new Error('An unknown error occurred.');\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n const method = url.includes('{sender}') || url.includes('{data}') ? 'GET' : 'POST';\n const body = method === 'POST' ? { data, sender } : undefined;\n try {\n const response = await fetch(url.replace('{sender}', sender).replace('{data}', data), {\n body: JSON.stringify(body),\n method,\n });\n let result;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n result = (await response.json()).data;\n }\n else {\n result = (await response.text());\n }\n if (!response.ok) {\n error = new HttpRequestError({\n body,\n details: stringify(result.error) || response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n continue;\n }\n if (!isHex(result)) {\n error = new OffchainLookupResponseMalformedError({\n result,\n url,\n });\n continue;\n }\n return result;\n }\n catch (err) {\n error = new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n }\n throw error;\n}\n//# sourceMappingURL=ccip.js.map"],"names":["OffchainLookupError","BaseError","callbackSelector","cause","data","extraData","sender","urls","url","getUrl","OffchainLookupResponseMalformedError","result","stringify","OffchainLookupSenderMismatchError","to","isAddressEqual","b","isAddress","InvalidAddressError","offchainLookupSignature","offchainLookupAbiItem","offchainLookup","client","blockNumber","blockTag","args","decodeErrorResult","callData","ccipFetch","data_","call","concat","encodeAbiParameters","err","error","i","method","body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J,CACL,CACO,eAAeqB,EAAU,CAAE,KAAAxB,EAAM,OAAAE,EAAQ,KAAAC,CAAI,EAAK,CACrD,IAAI2B,EAAQ,IAAI,MAAM,4BAA4B,EAClD,QAASC,EAAI,EAAGA,EAAI5B,EAAK,OAAQ4B,IAAK,CAClC,MAAM3B,EAAMD,EAAK4B,CAAC,EACZC,EAAS5B,EAAI,SAAS,UAAU,GAAKA,EAAI,SAAS,QAAQ,EAAI,MAAQ,OACtE6B,EAAOD,IAAW,OAAS,CAAE,KAAAhC,EAAM,OAAAE,CAAQ,EAAG,OACpD,GAAI,CACA,MAAMgC,EAAW,MAAM,MAAM9B,EAAI,QAAQ,WAAYF,CAAM,EAAE,QAAQ,SAAUF,CAAI,EAAG,CAClF,KAAM,KAAK,UAAUiC,CAAI,EACzB,OAAAD,CAChB,CAAa,EACD,IAAIzB,EAOJ,GANI2B,EAAS,QAAQ,IAAI,cAAc,GAAG,WAAW,kBAAkB,EACnE3B,GAAU,MAAM2B,EAAS,KAAI,GAAI,KAGjC3B,EAAU,MAAM2B,EAAS,KAAI,EAE7B,CAACA,EAAS,GAAI,CACdJ,EAAQ,IAAIK,EAAiB,CACzB,KAAAF,EACA,QAASzB,EAAUD,EAAO,KAAK,GAAK2B,EAAS,WAC7C,QAASA,EAAS,QAClB,OAAQA,EAAS,OACjB,IAAA9B,CACpB,CAAiB,EACD,QACH,CACD,GAAI,CAACgC,EAAM7B,CAAM,EAAG,CAChBuB,EAAQ,IAAIxB,EAAqC,CAC7C,OAAAC,EACA,IAAAH,CACpB,CAAiB,EACD,QACH,CACD,OAAOG,CACV,OACMsB,EAAK,CACRC,EAAQ,IAAIK,EAAiB,CACzB,KAAAF,EACA,QAASJ,EAAI,QACb,IAAAzB,CAChB,CAAa,CACJ,CACJ,CACD,MAAM0B,CACV","x_google_ignoreList":[0,1,2]} \ No newline at end of file diff --git a/packages/client/dist/assets/delivery-96624733.png b/packages/client/dist/assets/delivery-96624733.png new file mode 100644 index 00000000..316302f8 Binary files /dev/null and b/packages/client/dist/assets/delivery-96624733.png differ diff --git a/packages/client/dist/assets/dialog-a8050dd3.png b/packages/client/dist/assets/dialog-a8050dd3.png new file mode 100644 index 00000000..674fa920 Binary files /dev/null and b/packages/client/dist/assets/dialog-a8050dd3.png differ diff --git a/packages/client/dist/assets/duck_index-627ed778.svg b/packages/client/dist/assets/duck_index-627ed778.svg new file mode 100644 index 00000000..c8c65780 --- /dev/null +++ b/packages/client/dist/assets/duck_index-627ed778.svg @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/client/dist/assets/elephant-6d8f2afb.png b/packages/client/dist/assets/elephant-6d8f2afb.png new file mode 100644 index 00000000..9c4fdcc7 Binary files /dev/null and b/packages/client/dist/assets/elephant-6d8f2afb.png differ diff --git a/packages/client/dist/assets/gem-71e0d154.png b/packages/client/dist/assets/gem-71e0d154.png new file mode 100644 index 00000000..0844494e Binary files /dev/null and b/packages/client/dist/assets/gem-71e0d154.png differ diff --git a/packages/client/dist/assets/giraffe-07ffa2bd.png b/packages/client/dist/assets/giraffe-07ffa2bd.png new file mode 100644 index 00000000..f1802c21 Binary files /dev/null and b/packages/client/dist/assets/giraffe-07ffa2bd.png differ diff --git a/packages/client/dist/assets/hippo-4d315718.png b/packages/client/dist/assets/hippo-4d315718.png new file mode 100644 index 00000000..c72481a2 Binary files /dev/null and b/packages/client/dist/assets/hippo-4d315718.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Chain Mail.png b/packages/client/dist/assets/img/duck/Clothes/Chain Mail.png new file mode 100644 index 00000000..c0560323 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Chain Mail.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Demon Husk.png b/packages/client/dist/assets/img/duck/Clothes/Demon Husk.png new file mode 100644 index 00000000..2a7bdd11 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Demon Husk.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Divine Robe.png b/packages/client/dist/assets/img/duck/Clothes/Divine Robe.png new file mode 100644 index 00000000..d1902d70 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Divine Robe.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Dragonskin Armor.png b/packages/client/dist/assets/img/duck/Clothes/Dragonskin Armor.png new file mode 100644 index 00000000..4b685328 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Dragonskin Armor.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Hard Leather Armor.png b/packages/client/dist/assets/img/duck/Clothes/Hard Leather Armor.png new file mode 100644 index 00000000..e490f555 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Hard Leather Armor.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Holy Chestplate.png b/packages/client/dist/assets/img/duck/Clothes/Holy Chestplate.png new file mode 100644 index 00000000..82a01a7b Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Holy Chestplate.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Leather Armor.png b/packages/client/dist/assets/img/duck/Clothes/Leather Armor.png new file mode 100644 index 00000000..cf967f7f Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Leather Armor.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Linen Robe.png b/packages/client/dist/assets/img/duck/Clothes/Linen Robe.png new file mode 100644 index 00000000..a85185ad Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Linen Robe.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Ornate Chestplate.png b/packages/client/dist/assets/img/duck/Clothes/Ornate Chestplate.png new file mode 100644 index 00000000..8d1485ee Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Ornate Chestplate.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Plate Mail.png b/packages/client/dist/assets/img/duck/Clothes/Plate Mail.png new file mode 100644 index 00000000..55e2b9b8 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Plate Mail.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Ring Mail.png b/packages/client/dist/assets/img/duck/Clothes/Ring Mail.png new file mode 100644 index 00000000..cc24e9af Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Ring Mail.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Robe.png b/packages/client/dist/assets/img/duck/Clothes/Robe.png new file mode 100644 index 00000000..b45a496b Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Robe.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Shirt.png b/packages/client/dist/assets/img/duck/Clothes/Shirt.png new file mode 100644 index 00000000..924ffa43 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Shirt.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Silk Robe.png b/packages/client/dist/assets/img/duck/Clothes/Silk Robe.png new file mode 100644 index 00000000..f31b97c5 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Silk Robe.png differ diff --git a/packages/client/dist/assets/img/duck/Clothes/Studded Leather Armor.png b/packages/client/dist/assets/img/duck/Clothes/Studded Leather Armor.png new file mode 100644 index 00000000..b47c60ff Binary files /dev/null and b/packages/client/dist/assets/img/duck/Clothes/Studded Leather Armor.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Bone Wand.png b/packages/client/dist/assets/img/duck/Handheld/Bone Wand.png new file mode 100644 index 00000000..c89cf9fd Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Bone Wand.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Book.png b/packages/client/dist/assets/img/duck/Handheld/Book.png new file mode 100644 index 00000000..2a9c627e Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Book.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Chronicle.png b/packages/client/dist/assets/img/duck/Handheld/Chronicle.png new file mode 100644 index 00000000..c89cf9fd Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Chronicle.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Club.png b/packages/client/dist/assets/img/duck/Handheld/Club.png new file mode 100644 index 00000000..d9350582 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Club.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Falchion.png b/packages/client/dist/assets/img/duck/Handheld/Falchion.png new file mode 100644 index 00000000..490b2db6 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Falchion.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Ghost Wand.png b/packages/client/dist/assets/img/duck/Handheld/Ghost Wand.png new file mode 100644 index 00000000..e4934cb1 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Ghost Wand.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Grave Wand.png b/packages/client/dist/assets/img/duck/Handheld/Grave Wand.png new file mode 100644 index 00000000..f2547b78 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Grave Wand.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Grimoire.png b/packages/client/dist/assets/img/duck/Handheld/Grimoire.png new file mode 100644 index 00000000..c4109be4 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Grimoire.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Katana.png b/packages/client/dist/assets/img/duck/Handheld/Katana.png new file mode 100644 index 00000000..1f95421e Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Katana.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Long Sword.png b/packages/client/dist/assets/img/duck/Handheld/Long Sword.png new file mode 100644 index 00000000..69ed8a6e Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Long Sword.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Mace.png b/packages/client/dist/assets/img/duck/Handheld/Mace.png new file mode 100644 index 00000000..0fcbbe29 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Mace.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Maul.png b/packages/client/dist/assets/img/duck/Handheld/Maul.png new file mode 100644 index 00000000..203357ec Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Maul.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Quarterstaff.png b/packages/client/dist/assets/img/duck/Handheld/Quarterstaff.png new file mode 100644 index 00000000..6b1b146c Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Quarterstaff.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Scimitar.png b/packages/client/dist/assets/img/duck/Handheld/Scimitar.png new file mode 100644 index 00000000..aecf1a84 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Scimitar.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Short Sword.png b/packages/client/dist/assets/img/duck/Handheld/Short Sword.png new file mode 100644 index 00000000..a7b4f95d Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Short Sword.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Tome.png b/packages/client/dist/assets/img/duck/Handheld/Tome.png new file mode 100644 index 00000000..542db41b Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Tome.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Wand.png b/packages/client/dist/assets/img/duck/Handheld/Wand.png new file mode 100644 index 00000000..c4109be4 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Wand.png differ diff --git a/packages/client/dist/assets/img/duck/Handheld/Warhammer.png b/packages/client/dist/assets/img/duck/Handheld/Warhammer.png new file mode 100644 index 00000000..ab89d145 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Handheld/Warhammer.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Ancient Helm.png b/packages/client/dist/assets/img/duck/Head/Ancient Helm.png new file mode 100644 index 00000000..a476a612 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Ancient Helm.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Cap.png b/packages/client/dist/assets/img/duck/Head/Cap.png new file mode 100644 index 00000000..bcde1b63 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Cap.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Crown.png b/packages/client/dist/assets/img/duck/Head/Crown.png new file mode 100644 index 00000000..b37f192b Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Crown.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Demon Crown.png b/packages/client/dist/assets/img/duck/Head/Demon Crown.png new file mode 100644 index 00000000..54320e1e Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Demon Crown.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Divine Hood.png b/packages/client/dist/assets/img/duck/Head/Divine Hood.png new file mode 100644 index 00000000..158a9a44 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Divine Hood.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Dragon's Crown.png b/packages/client/dist/assets/img/duck/Head/Dragon's Crown.png new file mode 100644 index 00000000..e54a1464 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Dragon's Crown.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Full Helm.png b/packages/client/dist/assets/img/duck/Head/Full Helm.png new file mode 100644 index 00000000..823cf89b Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Full Helm.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Great Helm.png b/packages/client/dist/assets/img/duck/Head/Great Helm.png new file mode 100644 index 00000000..03cea7cf Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Great Helm.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Helm.png b/packages/client/dist/assets/img/duck/Head/Helm.png new file mode 100644 index 00000000..d1c04ff3 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Helm.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Hood.png b/packages/client/dist/assets/img/duck/Head/Hood.png new file mode 100644 index 00000000..c7bf316e Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Hood.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Leather Cap.png b/packages/client/dist/assets/img/duck/Head/Leather Cap.png new file mode 100644 index 00000000..ea003815 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Leather Cap.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Linen Hood.png b/packages/client/dist/assets/img/duck/Head/Linen Hood.png new file mode 100644 index 00000000..0e0aec41 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Linen Hood.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Ornate Helm.png b/packages/client/dist/assets/img/duck/Head/Ornate Helm.png new file mode 100644 index 00000000..23e8f599 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Ornate Helm.png differ diff --git a/packages/client/dist/assets/img/duck/Head/Silk Hood.png b/packages/client/dist/assets/img/duck/Head/Silk Hood.png new file mode 100644 index 00000000..f1357b42 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/Silk Hood.png differ diff --git a/packages/client/dist/assets/img/duck/Head/War Cap.png b/packages/client/dist/assets/img/duck/Head/War Cap.png new file mode 100644 index 00000000..574ac1b9 Binary files /dev/null and b/packages/client/dist/assets/img/duck/Head/War Cap.png differ diff --git a/packages/client/dist/assets/img/duck/default.png b/packages/client/dist/assets/img/duck/default.png new file mode 100644 index 00000000..659ee2ac Binary files /dev/null and b/packages/client/dist/assets/img/duck/default.png differ diff --git a/packages/client/dist/assets/index-145930cc.css b/packages/client/dist/assets/index-145930cc.css new file mode 100644 index 00000000..21a6bfad --- /dev/null +++ b/packages/client/dist/assets/index-145930cc.css @@ -0,0 +1 @@ +.mi-app{position:relative;height:100vh}.mi-map-cell{position:relative}.mi-map-cell .cell-map-box{display:grid;height:100%;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr}.mi-map-cell .cell-map-delivery{position:absolute;z-index:1;left:0;top:0;width:100%;height:100%;background:url(/assets/delivery-96624733.png) no-repeat center 100%/cover}.mi-map-cell .mi-wall-1{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAABGdBTUEAALGPC/xhBQAAAAxQTFRFPyYxwMvcUmB8i5u0A2AS2QAAACZJREFUCNdjYN21ahUD6+7Q90Di/3sGPjABFtv/OxRE/IcSxKkDAMw5JlE7jsSVAAAAAElFTkSuQmCC) no-repeat center 100%/cover}.mi-map-cell .mi-wall-2{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAABGdBTUEAALGPC/xhBQAAAAlQTFRFwMvcUmB8i5u0Ok/JaAAAACJJREFUCNdjCAUChlXLGGYBiVVQAizGCRRkWAnkQwgi1QEA9oIgs6OaBGAAAAAASUVORK5CYII=) no-repeat center 100%/cover}.mi-map-cell .mi-wall-3{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAABGdBTUEAALGPC/xhBQAAAAxQTFRFwMvcPyYxUmB8i5u0KCnw8QAAACVJREFUCNdjWLVqHSvD/998IOIfmNjKABTbysD3H8j9ByeIVAcAooArCwfNJVoAAAAASUVORK5CYII=) no-repeat center 100%/cover}.mi-map-cell .mi-wall-4{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAABGdBTUEAALGPC/xhBQAAAAlQTFRFwMvcPyYxdjs2IEVGgwAAABBJREFUCNdjCIhatYqBegQA8Jwf4cvcQkcAAAAASUVORK5CYII=) no-repeat center 100%/cover}.mi-map-cell .mi-wall-5{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAB1JREFUOI1jLLM2+89AAWCiRPOoAaMGjBowmAwAAPZPAgZ7bKDkAAAAAElFTkSuQmCC) no-repeat center 100%/cover}.mi-map-cell .mi-wall-6{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAABGdBTUEAALGPC/xhBQAAAAlQTFRFwMvcPyYxdjs2IEVGgwAAABBJREFUCNdjWLVqKSsD9QgACzsf4d0g9YwAAAAASUVORK5CYII=) no-repeat center 100%/cover}.mi-map-cell .mi-wall-7{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAAA9QTFRFUmB8i5u0wMvcPyYxdjs2CtrBhgAAAC9JREFUCNdjMFYydgEBBsoZxsYmIIagMRgwGAspKSnBGUCMxGAUFBRkgjGAGM4AAKebFwig5D4AAAAAAElFTkSuQmCC) no-repeat center 100%/cover}.mi-map-cell .mi-wall-8{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAABVQTFRFvWxK6qVsUmB8i5u0wMvcdjs2PyYxS8DnkAAAAEhJREFUCNdjEEwDgkRBQQaxNAhgSEtxcXEBM0yADCBGYigbGxurwBhAjMRQggCGNJe0YGPj0FAoI4AVxAgFAQgjgCEUTQSZAQD+CiRl95l3hgAAAABJRU5ErkJggg==) no-repeat center 100%/cover}.mi-map-cell .mi-wall-9{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAAA9QTFRFUmB8i5u0wMvcPyYxdjs2CtrBhgAAACdJREFUCNdjMFYydgEBBkyGEiZDEcoQFIQxBEwgDAYWFwjDxYUSBgBKoB7DNZ90rQAAAABJRU5ErkJggg==) no-repeat center 100%/cover}.mi-map-cell .mi-wall-10{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAAA9QTFRFUmB8PyYxi5u0wMvcdjs2SCwPBQAAADJJREFUCNdjcIECBkoZgkAgAmQIQgGDoLCxsTGIYawMZAAxEoNJSUmJGchQAjGAGM4AAFXEGTF6hXfuAAAAAElFTkSuQmCC) no-repeat center 100%/cover}.mi-map-cell .mi-wall-11{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAAA9QTFRFUmB8i5u0wMvcPyYxdjs2CtrBhgAAAEBJREFUCNd9y8ERgDAMA0HTAUoHqAWlg6T/mpBtZuDFvfZzsZ/iD0tuGqoSg7wKdF+ooRds0KgrAWegAeMATuEG3JEXx35HyukAAAAASUVORK5CYII=) no-repeat center 100%/cover}.mi-map-cell .mi-wall-12{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAABVQTFRF6qVsvWxKUmB8PyYxwMvci5u0djs2VP5nEwAAAE9JREFUCNdNyMENgDAMQ1Gv0AsDILgjlREyAh6gB7z/CHWqCvqlJE8BqruAcTPUOyIS8RieBSfJw2DC82OfQdJLSlApRtsSyjB2KxPfZ0UH8RcknA2RBgEAAAAASUVORK5CYII=) no-repeat center 100%/cover}.mi-map-cell .mi-wall-13{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAABVQTFRFvWxK6qVsUmB8i5u0wMvcdjs2PyYxS8DnkAAAAEtJREFUCNdjEEwDgkRBQYY0CEhkSEtxcXEBshhcTIAMExdkhrKxsbEKkGEMYigbIzGUICCNITQ01Ng0DagmgIEVzggNBTFCQQA/AwD31iQTgF9wtwAAAABJRU5ErkJggg==) no-repeat center 100%/cover}.mi-map-cell .mi-wall-14{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAAA9QTFRFUmB8i5u0wMvcPyYxdjs2CtrBhgAAADRJREFUCNelxjEBACAMA7ANB52ESqAW8K+J9QF+ciWWiYrfyDo6mSQFBatTfJMARgdO4mYDr9cXBZcPJvgAAAAASUVORK5CYII=) no-repeat center 100%/cover}.mi-map-cell .mi-wall-15{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAAA9QTFRFUmB8i5u0wMvcPyYxdjs2CtrBhgAAACdJREFUCNdjcAEBYyVjBpwMJXSGEIwhKAhhODNCGS4ODFCGiwt5DABmNR7wWp4E4wAAAABJRU5ErkJggg==) no-repeat center 100%/cover}.mi-map-cell .mi-wall-16{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAABGdBTUEAALGPC/xhBQAAAAxQTFRFi5u0wMvcPyYxdjs2+rEOaAAAAB1JREFUCNdj+A8EDMQSq/aDiPVAIgREhMIJVhgBAIn4OQQsndsDAAAAAElFTkSuQmCC) no-repeat center 100%/cover}.mi-map-cell .mi-wall-17{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAABGdBTUEAALGPC/xhBQAAAAxQTFRFi5u0wMvcPyYxdjs2+rEOaAAAAB1JREFUCNdj+A8EDMQT/1YBiV9gQhREhMKJADABALguO1woLYvNAAAAAElFTkSuQmCC) no-repeat center 100%/cover}.mi-map-cell .mi-wall-18{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAABGdBTUEAALGPC/xhBQAAAAlQTFRFz4JUwMvc6qVs8jebrAAAADBJREFUCNdjWAUEDEhE2NQoCNEEJphA3FVAYmlYAxeQACpZGja1CU6sYljA1IBkAABxwiKiQj8X7AAAAABJRU5ErkJggg==) no-repeat center 100%/cover}.mi-map-cell .mi-wall-19{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABGdBTUEAALGPC/xhBQAAAAZQTFRFz4JU6qVs+ZFeAAAAABJJREFUCNdjYEACD+wZ/v/HjwCQ0hcKtZtzkAAAAABJRU5ErkJggg==) no-repeat center 100%/cover}.mi-map-cell .mi-wall-20{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAABGdBTUEAALGPC/xhBQAAAAlQTFRF/smcz4JU6qVszCBWUwAAACdJREFUCNdjCAUCBjRiZWjUKoZVq1ZoMcxaCiRWLl0F4naBiFUECADQdiNMtC9+SwAAAABJRU5ErkJggg==) no-repeat center 100%/cover}.mi-map-cell .mi-wall-21{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABGdBTUEAALGPC/xhBQAAAAZQTFRF6qVsz4JUJM9nLwAAAB9JREFUCNdj+P+fAY74/zMw/mdgqGdgsAcjeRjihyMAsmoLnS/gwwQAAAAASUVORK5CYII=) no-repeat center 100%/cover}.mi-map-cell .mi-wall-22{background:url(/assets/wall_22-d66cf3dc.png) no-repeat center 100%/cover}.mi-map-cell .mi-wall-23{background:url(/src/assets/wall/wall_23.png) no-repeat center 100%/cover}.mi-map-cell .mi-wall-24{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAB1JREFUOI1jfLU05z8DBYCJEs2jBowaMGrAYDIAAFXwAxr14JwoAAAAAElFTkSuQmCC) no-repeat center 100%/cover}.mi-map-cell .mi-wall-25{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAABGdBTUEAALGPC/xhBQAAAAlQTFRF/smcz4JU6qVszCBWUwAAACRJREFUCNdjWAUEDGCiCUwsg3FXgiWWwolV6EQWjNUF5naBuQCFaSmi6lH99AAAAABJRU5ErkJggg==) no-repeat center 100%/cover}.mi-map-cell .mi-wall-26{background:url(/assets/wall_26-bbde22bc.png) no-repeat center 100%/cover}.mi-map-cell .mi-wall-27{background:url(/assets/wall_27-04507ed5.png) no-repeat center 100%/cover}.mi-map-cell .mi-wall-28{background:url(/assets/wall_28-7a1135fa.png) no-repeat center 100%/cover}.mi-map-cell .mi-cell-user-menu{position:absolute;z-index:20;left:100%;top:0;display:flex}.mi-map-cell .mi-cell-user-menu li{margin-bottom:4px}.mi-map-cell .mi-cell-user-menu .mi-cell-username-list{margin-right:10px}.mi-map-cell .mi-cell-user-menu .mi-cell-username-list li{padding-left:10px;width:144px;height:44px;font-size:24px;line-height:42px;color:#fff;background:rgba(0,0,0,.8);border-radius:5px}.mi-map-cell .mi-cell-user-menu .mi-cell-username-list li.active{text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;border:1px solid #000;background:#FED982}.mi-map-cell .mi-cell-user-menu .mi-btn{font-size:16px;width:136px;height:46px}.mi-map-cell .render-preview-path{position:absolute;inset:0;pointer-events:none;border:1px solid #f00;background:rgba(255,0,0,.2)}.mi-map-cell .render-preview-path.movable{border:1px solid #4EBFFF;background:rgba(78,191,255,.2)}.mi-player{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column}.mi-player .player-info{position:absolute;display:flex;font-size:16px;font-family:MISS,sans-serif;left:0;bottom:100%;width:100%}.mi-player .mi-appearance-wrapper{transform:scale(1.8)}.mi-player .mi-appearance-wrapper.appearance-right{transform:rotateY(180deg) scale(1.8)}.mi-player .gem-num{margin-right:10px;color:red;text-shadow:#fff 1px 0 0,#fff 0 1px 0,#fff -1px 0 0,#fff 0 -1px 0}.mi-player .player-username{flex:1;font-size:20px;zoom:.5;color:#000;text-align:center;text-shadow:#fff 1px 0 0,#fff 0 1px 0,#fff -1px 0 0,#fff 0 -1px 0}.mi-player .waiting-tip{position:absolute;z-index:1;display:flex;font-size:12px;font-family:MISS,sans-serif;left:0;top:100%;width:100%;color:#000;white-space:nowrap;text-align:center;text-shadow:#fff 1px 0 0,#fff 0 1px 0,#fff -1px 0 0,#fff 0 -1px 0}.mi-map-fog{position:absolute;z-index:10;left:-150vw;top:-150vh;width:300vw;height:300vh;background:radial-gradient(circle closest-side at 50% 50%,rgba(0,0,0,0) 300px,black 64%);pointer-events:none}.mi-appearance-wrapper{position:relative;width:100%;height:100%;z-index:1}.mi-appearance-wrapper img{position:absolute;left:0;top:0;width:100%;height:100%}.mi-treasure-chest{position:absolute;left:0;top:0;width:100%;height:100%;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAABACAYAAACTDsCFAAAH2klEQVR4Xu2ba2xTVRzA2z3bru3ajW0ZG2v3BCaPwcLiYE8UWWAQHgJhhrUwgQEK2xAj4laCiUQTWUBDRMXyxSAYISiRxAjzi4+AZtEECQTSDyLRLw6NREZwx/s/t+f09J5b+7p9bNyT/JLmnnv+5/x/tz333Ec1msgKUvEjbkXa8aNOTEuNgBNwrtGiQKxYrKUDqnmMr2+p99WX5hrQnOLspEeXloLHa5/C5wMQL15HiheXxisM/ZIaEM834iABV6+Wqx867atfVVOIXl02PemxGNLxeOFLI80HIPl4HSleVPFxFG8RcANd67TD7jdTEOBYo+G4ccqI7l8yo98+M+F9ABBP6kduH0bo3gk0cucEcrvdGOfqJdzPOhkhU43F7Mt36PxGnA9A8unq6homvrzuIi52jcy3l2xjudBvRX+fzEf3zubS/aANqfd4PEhaHA4HF2e8AKKlxeVysfvYNFEUu8YbSBXvT6zEDwkge7FvPmclbphVzFGQlYnrbHmp+AAAo18baXtbsdg22DzZWjWJm2NjzZZ5NpzDprklXF0gYAoiY5bmwubrdRlyUcUHIabibYUp6MH3BszAFvHMDhDZMNDn6ksxhSZe/P0vLLS9rVA8cC11KWjsuk7Ekxa2+L2LqtALreUYaV2k9DWX4xx2Lijj6gLBiqf53EpXSDwj8eXVWZx4GCwZiF24GJK2YYHtUN88Nw09/C4bM3Y9M2zxO+rttH9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7KDjxa5wbMDkdYBJXnRPYghvPR0FvrzVEFYQBtpnHDwfKoXDqDBD0e7zKpGFZ+k4nP0GfTefKhAG9I+GvFwl1QaOxilVgOabNRj1s2Hk6M5LKANaV9q4ePLwearmHj2CVSoQBslxBcYM7nYweiYUYQW2fIxZZbwv73QhrSHWNL4crD5quLHu/j5pTloT2sFhnS0pc5Gt8kBbUj7YOJHh60c8Aoh1JUIP+O+hZVh0dtaibY1lGFWC+IWFE8Ki1VCG9K+t6UC9QnxAiErfigNoRv+OFbJPAgJJp59IkM6Cvb8lX0iE0z82B0Lh61YFG+flIX2L6+OmF2NFahzpi0sdgptXMuqQ0JW/LfwRM8f+EODKj4ISSM+WoKJR5eNHEo9CEkEnnPCHH/Z4EdEc3y0qOIjFF+YHcHD32zfLYFoxMO/7qSxWWYUmulaenaRmauPNbLreKXER/u6QzTi4fWOA+3TAgJ/UiDz7N5FlVx9rJGd41XxsSeh4nsay9EOYZXzPPN3lniJ72/z/T1noG0qVy/H3icr8XiBUNsEIqHi5f7AFS/xkaDkr0QVHwbjRny0RCN+PKKKTxCKiU/mdXy8YK8X5Hjk1vHxAlZCZD6XIyZzvCo+QeLrpljoulcqOBBKiYf3zknfkLxUSLzYv2QqvV5gial49gmUVHAglBLPPoGCByxSIYlGFZ8gYio+WqIRPx5RxSeIkMWvXaBDd97P9+Pa4Ty0slavCBBLGh/6JP2PXszl2N5uFA5O1rjk93NWIYccPza0+b5oVHyi350cOVUy4Vnf7PeaiSo+XkjFO4DqonQ3iIgnk62+N3JhUBOdmrJ0N/EN4klxEgkqMcOhkSlODb+jirI4NN7yH5EqFbdOh1gyAAAAAElFTkSuQmCC) no-repeat center/100%}.mi-treasure-chest .open-loading{position:absolute;bottom:100%;width:100%;height:10px;border:2px solid;visibility:hidden}.mi-treasure-chest .open-loading .progress{width:0;height:100%;background:#f00;transition:width 2s}.mi-treasure-chest .open-loading.opening{visibility:visible}.mi-treasure-chest .open-loading.opening .progress{width:90%}.mi-map-wrapper{display:flex;justify-content:center;align-items:center;height:100%}.mi-map-wrapper .mi-map-content{width:1728px}.mi-map-wrapper .mi-map-row{display:flex}.mi-map-wrapper .mi-map-cell{width:72px;height:72px}.mi-c-user-avatar{position:relative;padding-left:80px;height:80px}.mi-c-user-avatar .avatar-box{position:absolute;left:0;top:0;width:80px;height:80px;border:4px solid #5D2E1C;border-radius:10px;background-color:#fcbd80;box-sizing:border-box}.mi-c-user-avatar .hp{background:red}.mi-c-user-avatar .ap{background:yellow}.mi-c-user-avatar .hp-wrapper,.mi-c-user-avatar .ap-wrapper{border:2px solid}.mi-c-user-avatar .hp-wrapper>div,.mi-c-user-avatar .ap-wrapper>div{height:16px}.mi-c-user-avatar .user-address-wrapper{padding:10px}.user-address-wrapper{position:relative;display:flex;padding:0 30px;align-items:center;height:56px;font-size:16px;color:#5d2e1c;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaIAAACECAYAAADSiS/wAAAGfklEQVR4Xu3dQWxcRx3A4VyQrDiRfCBpYid0C4c2ahDtoQ3iEqu2RQSVaKuQBBLHbhKoBKhJgRaiVm5acJMURCqBkJAQUKmqEKolEHVdx618Kz0ghUOvkdVLDzmQQzkiLR7D2zzP2wZvYvu/3v1G+g7ew9vZy/z0dsZvN21ahTFY6+sbGegdB6B7DPb19eU9CBsHdvTUFidVB6B7PLSz5868B2FDiAC6jxABEEqIAAi17iE6UOtLsalsViWH79155vsje+sAdI+v773jdN6DwpocZBjetWUwr2Hh4J7t9Xd+/jgAXeTgnm2VHjTs6Nmfd+S2hxABUCZEAIQSIgBCrUuIhnZvfWTkfxtPpx787PP5RlXh7MP3VyYIQGdLa3/eg8Jjd3/6UtGPof6tj+R9WfEY6e9dKOp2ct9dlUm0Yu5n4/XLF44D0ObmLo5V1vBWndhXu3F31L95Ie/Lisdqhmj2pdH6m88dBqDNvXXum5U1vFVCBMAtEyIAQoWGKP2cQzodVxi9f/f1FKDkdg8kzJ4frU9PHAGgzc28cLSyhrfq7MP3LbUj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w5ebTRleS7+++ZL7dnU3kslmm8XKmpidZqd/nC8WWlLEubWvmHBaD9pAMJ+RpeWGl8yqYmDi27Axoa6B1bFp/yECIAhAiAUBs7RBfHlh5018zff/mt+rWpZwBoc1dfPV1Zwwuzkyv7p9WylkI0vHvr14YHeucLv33yK9d/d+ar9eT1Hz1auXgr0qGGvKwAtJ+bPTl7pV5/5tGldiTpgEK5LYO7tgzm/fnEMdLfu1AU7OS+uypv1AohAtgYViNEJ/bVbtwF9W9eyPuy4iFEAN2nc0N0frQ+PXEEgDY380LrBxJybRkiALrHqoVoeNfmPxebS+MP1K4UG0/N5JMAoLOVDyTkxh/4zJWiH5WnJ9zqGN61ZbBRt8zBPdsrEwSgsx3cs63Sg4YdPfvzjtz2ECIAyoQIgFBCBECodQ/RSK33vvJ/xpYd+fzO+fQIBwC6x6G9dzQOJOS+vP1TX8g7sqbjwI6eWqWGAHS0h3b23Jn3IGwIEUD3ESIAQgkRAKHaL0TpcUAAdI3VCtF/AGaHjfr2Nm+9AAAAAElFTkSuQmCC) no-repeat center/100% 100%}.user-address-wrapper .user-account{position:relative;padding-right:20px}.user-address-wrapper .user-account:after{content:"";position:absolute;top:3px;right:0;height:14px;width:4px;background:#5D2E1C}.user-address-wrapper .user-address{padding:0 20px;padding-right:unset;cursor:pointer}.user-address-wrapper .copy-icon{position:absolute;top:10px;right:10px;width:17px;height:19px}.mi-leaderboard{position:fixed;right:40px;top:100px;color:#fff;z-index:999;font-family:MISS}.mi-leaderboard .boxes{font-size:12px}.mi-leaderboard .section-title{font-size:20px;margin:14px 0}.mi-leaderboard .leaderboard-item{font-size:12px;display:flex;margin-top:8px}.mi-leaderboard .player-score{margin-right:8px}.mi-leaderboard .player-name{margin-right:8px;flex:1}.mi-game{position:relative;display:flex;height:100vh;align-items:center;justify-content:center;overflow:hidden;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAB1JREFUOI1jLLM2+89AAWCiRPOoAaMGjBowmAwAAPZPAgZ7bKDkAAAAAElFTkSuQmCC)}.mi-game .mi-game-user-avatar{position:absolute;z-index:100;left:6px;top:6px}.mi-game .opt-wrapper{position:absolute;z-index:11;padding:20px;bottom:0;right:0;display:flex;align-items:center}.mi-game .opt-wrapper .mi-btn{margin:0 10px;width:128px;height:128px;font-size:16px;background-image:url(/assets/btn_5-377b24f9.png)}.mi-battle-wrap{width:100vw;height:100vh;position:fixed;overflow:hidden;display:flex;align-items:center;justify-content:center;z-index:9999}.mi-battle-content{display:flex;align-items:flex-start;font-family:MISS}.mi-battle{border-radius:8px;width:897px}.mi-battle .mi-battle-main{border-radius:7px;background-color:#dcc7aff2;box-shadow:5px 4px 4px -1px #00000040;padding:24px 20px;box-sizing:border-box}.mi-battle .mi-battle-character{height:380px;background:#fff;display:flex;align-items:flex-end;position:relative;justify-content:space-between;background:url(/assets/bg-46b5266f.png) no-repeat;background-size:100% 100%}.mi-battle .mi-battle-character .mi-battle-info-icon{position:absolute}.mi-battle .mi-battle-character .mi-battle-character-card{display:flex;flex-direction:column;position:relative;align-items:center;width:319px;height:319px;transition:all .3s}.mi-battle .mi-battle-character .mi-battle-character-card.battle-1.attack{transform:translate(300px)}.mi-battle .mi-battle-character .mi-battle-character-card.battle-1.back{transform:translate(-30px)}.mi-battle .mi-battle-character .mi-battle-character-card.battle-1 img{transform:scaleX(-1)}.mi-battle .mi-battle-character .mi-battle-character-card.battle-2.attack{transform:translate(-300px)}.mi-battle .mi-battle-character .mi-battle-character-card.battle-2.back{transform:translate(30px)}.mi-battle .mi-battle-character .mi-battle-character-card img{width:280px}.mi-battle .mi-battle-character .mi-battle-character-card .mi-battle-character-card-hp{border-radius:10px;border:5px solid #6F391E;background:#DDC9B2;padding:7px 5px;box-sizing:border-box;position:relative;width:300px}.mi-battle .mi-battle-character .mi-battle-character-card .mi-battle-character-card-hp .user-info{display:flex;align-items:center;justify-content:space-between;color:#000;font-family:MISS;font-size:15px;font-style:normal;font-weight:400;line-height:normal;margin-bottom:8px}.mi-battle .mi-battle-character .mi-battle-character-card .mi-battle-character-card-hp .hp-wrap{border:4px solid #2d2d2d;height:30px;overflow:hidden;border-radius:6px;width:280px;position:relative;box-sizing:border-box}.mi-battle .mi-battle-character .mi-battle-character-card .mi-battle-character-card-hp .hp-wrap .hp-text{display:flex;align-items:center;justify-content:center;white-space:nowrap;position:relative;z-index:2;height:100%;width:100%;line-height:1;box-sizing:border-box}.mi-battle .mi-battle-character .mi-battle-character-card .mi-battle-character-card-hp .hp-loss{position:absolute;right:-60px;top:-40px;color:#fff;font-family:Inter;font-size:28px;font-style:normal;font-weight:700;line-height:normal;transform:rotate(-10.07deg);-webkit-text-stroke:1px #000}.mi-battle .mi-battle-character .mi-battle-character-card .mi-battle-character-card-hp .confirm-info{position:absolute;top:-50px;left:0;right:0;display:flex;align-items:center;justify-content:center}.mi-battle .mi-battle-character .mi-battle-character-card .mi-battle-character-card-hp .confirm-info img{margin-right:12px;width:36px;height:36px}.mi-battle .mi-battle-character .mi-battle-character-card .dark-attacker{position:relative;top:50px;right:30px;width:280px;height:236px}.mi-battle .mi-battle-character .mi-battle-character-card .dark-defender{position:relative;top:50px;left:30px;width:280px;height:236px}.mi-battle .mi-battle-character .mi-battle-character-info{display:flex;justify-content:space-between;position:absolute;bottom:0;width:100%;padding:0 12px 12px;font-size:16px;font-style:normal;font-weight:400;line-height:26px}.mi-battle .mi-battle-character .mi-battle-character-info .character-info{color:#000}.mi-battle .battle-action{margin-top:14px;font-family:MISS;display:flex;align-items:center;justify-content:space-between;color:#fff;font-size:15px;font-style:normal;font-weight:400;line-height:normal;position:relative;z-index:9}.mi-battle .battle-action .action-step{width:510px;flex:0 0 510px;height:108px;border-radius:10px;background:#6F391E;padding:22px;box-sizing:border-box;line-height:2}.mi-battle .battle-action .battle-tactics{flex:1;height:108px;border-radius:10px;background:#6F391E;padding:22px;box-sizing:border-box;margin-left:20px}.mi-battle .battle-action .battle-tactics .tactics-item{width:130px;flex:0 0 130px;height:26px;margin-bottom:15px;cursor:pointer;display:flex;align-items:center}.mi-battle .battle-action .battle-tactics .tactics-item.bag{color:#d9d9d994;cursor:default}.mi-battle .mi-battle-action{display:flex;justify-content:space-between;border-radius:7px;background:rgba(220,199,175,.95);box-shadow:5px 4px 4px -1px #00000040;padding:6px 20px 60px;box-sizing:border-box;height:142px}.mi-battle .mi-battle-action .action .icon{position:relative;width:64px;height:64px;margin-right:39px;cursor:pointer}.mi-battle .mi-battle-action .action .icon .icon-bg{width:64px;height:64px}.mi-battle .mi-battle-action .action .icon .icon-btn{width:64px;height:64px;position:absolute;inset:0;margin:auto}.mi-battle .mi-battle-action .action .icon.icon-r{margin-left:17px;margin-right:0}.mi-battle .mi-battle-action .action .icon.icon-r .icon-btn,.mi-battle .mi-battle-action .action img{width:64px;height:64px}.mi-battle .mi-battle-action .action .action-title{background:#fff;text-align:center;width:193px;height:28px;color:#000;font-size:16px;font-style:normal;font-weight:400;margin-bottom:7px;border:1px solid #B47C57;background:#E9D2B8;display:flex;align-items:center;justify-content:center}.mi-battle .mi-battle-action .action .action-hint{color:#fff;text-align:center;text-shadow:4px 4px 4px rgba(0,0,0,.25);-webkit-text-stroke:1px #000;font-size:14px;font-style:normal;font-weight:400;margin-top:-1px}.mi-battle .mi-battle-action .action .confirm-btn{width:179px;height:59px;margin:16px auto;position:relative;cursor:pointer}.mi-battle .mi-battle-action .action .confirm-btn img{width:179px;height:59px}.mi-battle .mi-battle-action .action .confirm-btn .confirm-text{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;text-shadow:4px 4px 4px rgba(0,0,0,.25);-webkit-text-stroke:1px #000;font-size:18px;font-style:normal;font-weight:400;line-height:normal}.mi-battle-info{margin-left:9px;width:220px;height:559px;border-radius:7px;background:#DCC7AF;box-shadow:5px 4px 4px -1px #00000040}.mi-battle-info .info-title{padding:25px 18px 0;box-sizing:border-box;color:#000;font-family:MISS;font-size:22px;font-style:normal;font-weight:400;line-height:normal}.mi-battle-info .action-section{margin-top:48px;padding:0 18px;box-sizing:border-box}.mi-battle-info .action-section .section-title{margin-bottom:8px;font-family:MISS;color:#000;font-size:16px;font-weight:400;text-transform:capitalize}.mi-battle-info .action-section .action-item{margin-bottom:16px;display:flex;align-items:center}.mi-battle-info .action-section .action-item img{width:42px;height:42px}.mi-battle-info .action-section .action-item p{margin-left:25px;font-family:MISS;color:#000;font-size:14px;font-weight:400;text-transform:capitalize}.mi-battle-info .tactic-section{padding:0 9px;box-sizing:border-box;margin-top:55px}.mi-battle-info .tactic-section .section-title{margin-bottom:4px;font-family:MISS;color:#000;font-size:16px;font-weight:400;text-transform:capitalize}.mi-battle-info .tactic-section img{width:26px;height:26px}.mi-battle-info .tactic-section p{color:#000;font-family:Inter;font-size:26px;font-style:normal;font-weight:400;line-height:normal;width:16px;display:flex;align-items:center;margin:0 7px}.mi-userinfo-wrapper{display:flex;justify-content:space-between}.mi-userinfo-wrapper h3{font-size:14px;margin-bottom:8px}.mi-userinfo-wrapper .left-main-content{width:768px}.mi-userinfo-wrapper .user-detail-wrapper{height:378px}.mi-userinfo-wrapper .user-detail-wrapper{display:flex;justify-content:space-between}.mi-userinfo-wrapper .user-appearance-wrapper{display:flex;justify-content:center;align-items:center;width:338px;height:100%;background:url(/assets/user_bg-7a1ed0db.png) no-repeat center/100% 100%}.mi-userinfo-wrapper .user-appearance-wrapper .user-appearance-box{width:256px;height:256px}.mi-userinfo-wrapper .loot-wrapper{display:flex;justify-content:space-between;flex-direction:column;height:100%}.mi-userinfo-wrapper .loot-detail{width:180px;height:180px;border:1px solid #FFF5E9;background:#000;color:#fff5e9}.mi-userinfo-wrapper .user-attr-wrapper{width:213px;font-size:13px;line-height:2}.mi-userinfo-wrapper .user-attr-wrapper dl{display:flex}.mi-userinfo-wrapper .user-attr-wrapper dt{margin-right:10px}.mi-userinfo-wrapper .user-attr-wrapper .base-attr{margin-right:10px;color:#fff}.mi-userinfo-wrapper .user-attr-wrapper.loaded .extra-attr{visibility:visible}.mi-userinfo-wrapper .user-attr-wrapper .extra-attr{visibility:hidden;color:red}.mi-userinfo-wrapper .user-attr-wrapper .extra-attr:before{content:"+"}.mi-userinfo-wrapper .mi-user-package{margin-bottom:24px}.mi-user-package{width:366px}.mi-user-package .package-items-wrapper{display:flex;justify-content:space-between;flex-wrap:wrap}.mi-user-package .package-item{position:relative;margin-bottom:14px;width:62px;height:62px;background:#FFF5E9;border:6px solid transparent}.mi-user-package .package-item:nth-child(-n+3){border-color:#dcc7af}.mi-user-package .package-item .package-item-gem{display:block;width:100%;height:100%}.mi-user-package .package-item .package-item-count{position:absolute;bottom:0;right:0;font-family:Arial,Microsoft YaHei UI,sans-serif}.mi-userinfo-dialog{position:fixed;z-index:1000;width:1298px;height:585px;padding:36px 66px;left:50%;top:50%;transform:translate3d(-50%,-50%,0);font-family:MISS,sans-serif;color:#bc8c61;border:6px solid #451B0B;background:#000}.mi-userinfo-dialog.hidden{display:none}.mi-userinfo-dialog .close-btn{display:block;margin:32px auto 0;width:158px;height:42px}.content{width:100vw;height:100vh;overflow-y:auto;overflow-x:hidden;padding:24px;box-sizing:border-box}.nav{display:flex;align-items:center;justify-content:space-between;font-size:14px}.hd{border:1px solid #f9f9fa;padding:12px;border-radius:10px;margin-top:24px;font-size:12px;display:flex;align-items:flex-start;justify-content:space-between;min-height:67px;flex-wrap:wrap}.main{display:flex;align-items:center;flex-wrap:wrap}.section{margin-top:24px;border:1px solid #f9f9fa;border-radius:10px;font-size:12px;flex:0 0 200px;width:200px;padding:12px;box-sizing:border-box;margin-right:24px;margin-bottom:24px}.section .title{font-size:12px}.section .input{height:32px;margin-top:12px;display:flex;align-items:center;justify-content:space-between}.section .input input{border:1px solid #f9f9fa;background:none;width:48%!important;height:32px;border-radius:4px;padding:0 8px;box-sizing:border-box;outline:none}.section .input select{border:1px solid #f9f9fa;background:none;width:48%!important;height:32px;border-radius:4px;padding:0 8px;box-sizing:border-box;outline:none;box-shadow:none}.section .btn{margin-top:12px;width:100%;height:32px;display:flex;align-items:center;justify-content:center;border-radius:4px;background:rgb(166,173,178);color:#f9f9fa;font-size:12px;cursor:pointer}.battle-item{margin-top:24px;border:1px solid #f9f9fa;border-radius:10px;padding:12px;box-sizing:border-box}.battle-item .info-w{display:flex;align-items:center;justify-content:space-between;margin-top:12px}.battle-item .battle-section{font-size:12px}.battle-item .battle-section p{font-weight:600}.battle-item .battle-section div{margin-top:8px}h6{font-size:14px}.home-header{position:fixed;z-index:2;display:flex;align-items:center;top:0;left:0;right:0;height:80px;padding:8px 30px 8px 8px;font-family:MISS,sans-serif;background:#020202}.home-header .header-logo{height:80px}.home-header .play-btn{padding:0 30px;height:55px;font-size:16px}.home-header .header-nav{flex:1}.home-header .header-nav .menu-lv1{display:flex}.home-header .header-nav .menu-lv1>li{position:relative}.home-header .header-nav .menu-lv1 .menu-socials:after{content:"";position:absolute;top:18px;right:0;width:21px;height:12px;transform:rotate(180deg);transition:all .3s;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAMCAYAAACNzvbFAAAAQElEQVQokWP8//8/AxEAWREjIeVMxJhIKqCJoSx45HCFC8GgGLrex+VlRhxqsAbF0PI+MV7GJY41KIaI9xkYGAB+3wwYFD/PwQAAAABJRU5ErkJggg==)}.home-header .header-nav .menu-lv1 .menu-socials:hover:after{transform:rotate(0)}.home-header .header-nav .menu-lv1 .menu-socials:hover .menu-lv2{display:block}.home-header .header-nav .menu-lv2{display:none;position:absolute;left:32px;top:99%;padding:10px;width:384px;border-radius:8px;background:#412f50}.home-header .header-nav .menu-lv2 li{position:relative}.home-header .header-nav .menu-lv2 li img{position:absolute;right:8px;top:50%;transform:translateY(-50%);pointer-events:none}.home-header .header-nav .menu-lv2 a{padding:0 14px;line-height:60px;border-radius:8px}.home-header .header-nav .menu-lv2 a:hover{background:#543f66}.home-header .header-nav a{display:block;padding:0 32px;font-size:14px;line-height:46px;color:#fff}.mi-home-page{height:100vh;background:url(/assets/bg-4e25658d.jpg) no-repeat center/100% 100%}.mi-home-page .mi-section{position:relative;padding-top:116px;height:100%}.mi-home-page .index-section .duck-index{position:absolute;bottom:0;right:20px;width:670px}.mi-home-page .index-section .intro-box{font-family:MISS,sans-serif;width:600px;color:#fff}.mi-home-page .index-section .intro-box h1{margin:60px auto 40px;text-align:center;font-size:28px}.mi-home-page .index-section .intro-box p{font-size:16px;line-height:2}.mi-home-page .index-section .intro-box .play-btn{display:block;margin:40px auto;width:210px;height:66px;font-size:16px}.mi-home-page .index-section .section-box{position:relative;width:1280px;margin:0 auto}.mi-home-page .mint-section{font-family:MISS,Arial,Microsoft YaHei UI,sans-serif;color:#bc8c61;background:rgba(0,0,0,.6)}.mi-home-page .mint-section .mint-box{padding-top:24px;width:1200px;margin:0 auto}.mi-home-page .mint-section .mint-title{margin-bottom:18px;font-size:16px;font-weight:700;line-height:40px}.mi-home-page .mint-section .mi-btn{display:block;margin:36px auto;width:238px;height:66px;font-size:16px}.create-wallet-wrapper{padding:40px;display:flex;justify-content:space-between;flex-direction:column;height:100%}.create-wallet-wrapper .create-wallet-content{padding:20px;font-size:16px;line-height:2;font-family:MISS,sans-serif;text-align:center;color:#5d2e1c}.create-wallet-wrapper .mint-name{display:flex;justify-content:space-between}.create-wallet-wrapper .mint-name input{width:245px;height:45px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaIAAACECAYAAADSiS/wAAAGfklEQVR4Xu3dQWxcRx3A4VyQrDiRfCBpYid0C4c2ahDtoQ3iEqu2RQSVaKuQBBLHbhKoBKhJgRaiVm5acJMURCqBkJAQUKmqEKolEHVdx618Kz0ghUOvkdVLDzmQQzkiLR7D2zzP2wZvYvu/3v1G+g7ew9vZy/z0dsZvN21ahTFY6+sbGegdB6B7DPb19eU9CBsHdvTUFidVB6B7PLSz5868B2FDiAC6jxABEEqIAAi17iE6UOtLsalsViWH79155vsje+sAdI+v773jdN6DwpocZBjetWUwr2Hh4J7t9Xd+/jgAXeTgnm2VHjTs6Nmfd+S2hxABU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Of88UYn5i6OVVpyWyHKle+OPnztTGVizQgRQOcp92D2pdFKL5oRIgBWjRABECosROnNCu+/cmppgyq5+ocnK5MsCBHAxnftjacba35S7sHcy+OVXjSzKiEqm3nxaKOGabMqn3RBiAA2vvQtWPkuKG/CSggRALdMiAAItSYhGhrY/PvC9wbvmb/0+GC9MD15rHKBXPpeMMUomb8wtjTJZj760w8rHwiA9vPx9LOVNbzwj18/0Vjzk7wJzbw5ebTRleS7+++ZL7dnU3kslmm8XKmpidZqd/nC8WWlLEubWvmHBaD9pAMJ+RpeWGl8yqYmDi27Axoa6B1bFp/yECIAhAiAUBs7RBfHlh5018zff/mt+rWpZwBoc1dfPV1Zwwuzkyv7p9WylkI0vHvr14YHeucLv33yK9d/d+ar9eT1Hz1auXgr0qGGvKwAtJ+bPTl7pV5/5tGldiTpgEK5LYO7tgzm/fnEMdLfu1AU7OS+uypv1AohAtgYViNEJ/bVbtwF9W9eyPuy4iFEAN2nc0N0frQ+PXEEgDY380LrBxJybRkiALrHqoVoeNfmPxebS+MP1K4UG0/N5JMAoLOVDyTkxh/4zJWiH5WnJ9zqGN61ZbBRt8zBPdsrEwSgsx3cs63Sg4YdPfvzjtz2ECIAyoQIgFBCBECodQ/RSK33vvJ/xpYd+fzO+fQIBwC6x6G9dzQOJOS+vP1TX8g7sqbjwI6eWqWGAHS0h3b23Jn3IGwIEUD3ESIAQgkRAKHaL0TpcUAAdI3VCtF/AGaHjfr2Nm+9AAAAAElFTkSuQmCC) no-repeat center/100% 100%}.create-wallet-wrapper .mint-name button{font-size:16px;width:170px;height:45px}.create-wallet-successful-wrapper{display:flex;justify-content:space-around;align-items:center;flex-direction:column;padding:20px}.create-wallet-successful-wrapper .create-wallet-successful-content{font-size:24px;font-family:MISS,sans-serif;color:#e16f39}.create-wallet-successful-wrapper button{width:220px;height:70px;font-size:16px}.mi-hero-page{display:flex;justify-content:center;align-items:center;width:100vw;height:100vh}.mi-hero-page .hero-preview-wrap{display:flex;justify-content:center;align-items:center;width:256px;height:256px}.mi-hero-page .hero-preview{position:relative;width:64px;height:64px;transform:scale(4)}.mi-hero-page .hero-preview .hero-comp{position:absolute;left:0;top:0;width:100%;height:100%;image-rendering:pixelated;background-repeat:no-repeat;animation-duration:1s;animation-timing-function:steps(1,end);animation-iteration-count:infinite}.mi-hero-page .hero-preview.action-block .Shield{z-index:1}.mi-hero-page .hero-preview.action-idle .hero-comp{animation-name:idle}.mi-hero-page .hero-preview.action-ready .hero-comp{animation-name:ready}.mi-hero-page .hero-preview.action-run .hero-comp{animation-name:run}.mi-hero-page .hero-preview.action-jump .hero-comp{animation-name:jump}.mi-hero-page .hero-preview.action-jab .hero-comp{animation-name:jab}.mi-hero-page .hero-preview.action-slash .hero-comp{animation-name:slash}.mi-hero-page .hero-preview.action-shot .hero-comp{animation-name:shot}.mi-hero-page .hero-preview.action-climb .hero-comp{animation-name:climb}.mi-hero-page .hero-preview.action-die .hero-comp{animation-name:die}.mi-hero-page .hero-preview.action-crawl .hero-comp{animation-name:crawl}.mi-hero-page .hero-preview.action-push .hero-comp{animation-name:push}.mi-hero-page .hero-preview.action-block .hero-comp{animation-name:block}@keyframes idle{0%{background-position:0 -32px}50%{background-position:-64px -32px}to{background-position:0 -32px}}@keyframes ready{0%{background-position:0 -96px}50%{background-position:-64px -96px}to{background-position:0 -96px}}@keyframes run{0%{background-position:0 -160px}25%{background-position:-64px -160px}50%{background-position:-128px -160px}75%{background-position:-192px -160px}to{background-position:0 -160px}}@keyframes crawl{0%{background-position:0 -224px}25%{background-position:-64px -224px}50%{background-position:-128px -224px}75%{background-position:-192px -224px}to{background-position:0 -224px}}@keyframes climb{0%{background-position:0 -288px}50%{background-position:-64px -288px}to{background-position:0 -288px}}@keyframes jump{0%{background-position:0 -352px}33.33%{background-position:-64px -352px}66.66%{background-position:-128px -352px}to{background-position:0 -352px}}@keyframes push{0%{background-position:0 -416px}33.33%{background-position:-64px -416px}66.66%{background-position:-128px -416px}to{background-position:0 -416px}}@keyframes jab{0%{background-position:0 -480px}33.33%{background-position:-64px -480px}66.66%{background-position:-128px -480px}to{background-position:0 -480px}}@keyframes slash{0%{background-position:0 -544px}25%{background-position:-64px -544px}50%{background-position:-128px -544px}75%{background-position:-192px -544px}to{background-position:0 -544px}}@keyframes block{0%{background-position:0 -800px}50%{background-position:-64px -800px}to{background-position:0 -800px}}@keyframes die{0%{background-position:0 -864px}33.33%{background-position:-64px -864px}66.66%{background-position:-128px -864px}to{background-position:0 -864px}}@keyframes shot{0%{background-position:0 -320px}25%{background-position:-64px -320px}50%{background-position:-128px -320px}75%{background-position:-192px -320px}to{background-position:0 -320px}}.avatar-elephant{background-image:url(/assets/elephant-6d8f2afb.png)}.avatar-hippo{background-image:url(/assets/hippo-4d315718.png)}.avatar-panda{background-image:url(/assets/panda-4cb7a0ff.png)}.avatar-penguin{background-image:url(/assets/penguin-a7346f15.png)}.avatar-rabbit{background-image:url(/assets/rabbit-61a42949.png)}.avatar-giraffe{background-image:url(/assets/giraffe-07ffa2bd.png)}.avatar-monkey{background-image:url(/assets/monkey-db84835f.png)}.avatar-parrot{background-image:url(/assets/parrot-789beaf6.png)}.avatar-pig{background-image:url(/assets/pig-b27b0c0f.png)}.avatar-snake{background-image:url(/assets/snake-fa3dbad5.png)}.avatar-box{background-size:contain;background-position:center;background-repeat:no-repeat}*{margin:0;padding:0;box-sizing:border-box}body{min-width:1280px;background:#dfc380}ul,li,ol{list-style:none}a{text-decoration:none}button{border:0;outline:0;cursor:pointer}.mi-modal.ant-modal .ant-modal-content{width:562px;height:392px;background:url(/assets/dialog-a8050dd3.png) no-repeat center/100% 100%}.mi-modal.ant-modal .ant-modal-content .ant-modal-body{height:100%}@font-face{font-family:MISS;src:url(/assets/PressStart2P-566bb63d.woff) format("woff");font-style:normal;font-weight:400;unicode-range:U+0025-00FF}button[disabled]{cursor:not-allowed}.mi-btn{position:relative;font-family:MISS,sans-serif;color:#5d2e1c;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaIAAAC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GwIEUD3ESIAQgkRAKHaL0TpcUAAdI3VCtF/AGaHjfr2Nm+9AAAAAElFTkSuQmCC) no-repeat center/100% 100%}.mi-input{padding:0 20px;font-size:20px;border:0;outline:0;color:#5d2e1c;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaIAAACECAYAAADSiS/wAAAGfklEQVR4Xu3dQWxcRx3A4VyQrDiRfCBpYid0C4c2ahDtoQ3iEqu2RQSVaKuQBBLHbhKoBKhJgRaiVm5acJMURCqBkJAQUKmqEKolEHVdx618Kz0ghUOvkdVLDzmQQzkiLR7D2zzP2wZvYvu/3v1G+g7ew9vZy/z0dsZvN21ahTFY6+sbGegdB6B7DPb19eU9CBsHdvTUFidVB6B7PLSz5868B2FDiAC6jxABEEqIAAi17iE6UOtLsalsViWH79155vsje+sAdI+v773jdN6DwpocZBjetWUwr2Hh4J7t9Xd+/jgAXeTgnm2VHjTs6Nmfd+S2hxABUCZEAIQSIgBCrUuIhnZvfWTkfxtPpx787PP5RlXh7MP3VyYIQGdLa3/eg8Jjd3/6UtGPof6tj+R9WfEY6e9dKOp2ct9dlUm0Yu5n4/XLF44D0ObmLo5V1vBWndhXu3F31L95Ie/Lisdqhmj2pdH6m88dBqDNvXXum5U1vFVCBMAtEyIAQoWGKP2cQzodVxi9f/f1FKDkdg8kzJ4frU9PHAGgzc28cLSyhrfq7MP3LbUjeeJLn1sot+VAraeW96cxRv57wqFRsamJw5WL30za5MrLWrjyq2/X//3uOQDa3LU3nq6s4YWZF1uP1NTEoRt3R4uGBnrH8v40hhABIEQAhBIiAEKte4jKG0iP3b3tUrG5lExPHqtcMPf2T442Nrj+9ouT9Y+nn23q+l/PVj4sAO0pX8MLV189vexgQ96EZlKIym058cXa8+X2pLugRqWeGtlbucD/k+pYlPK9xb/zD1P418xzldcA2Fg+fO3MsjukvAkr8dTIvcvukIQIgBUTIgBCtU2I3jr3jYYPfvOdpY2t5J9/+XFl0gUhAtj40j5RseYn5R5cPn+80otmViVE5RqmO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N5JMAoLOVDyTkxh/4zJWiH5WnJ9zqGN61ZbBRt8zBPdsrEwSgsx3cs63Sg4YdPfvzjtz2ECIAyoQIgFBCBECodQ/RSK33vvJ/xpYd+fzO+fQIBwC6x6G9dzQOJOS+vP1TX8g7sqbjwI6eWqWGAHS0h3b23Jn3IGwIEUD3ESIAQgkRAKHaL0TpcUAAdI3VCtF/AGaHjfr2Nm+9AAAAAElFTkSuQmCC) no-repeat center/100% 100%}.mi-modal-content-wrapper{padding:40px;display:flex;justify-content:space-between;flex-direction:column;height:100%}.mi-modal-content-wrapper .mi-modal-content{padding:20px;font-size:16px;line-height:2;font-family:MISS,sans-serif;text-align:center;color:#5d2e1c}.mi-modal-content-wrapper .mi-modal-content .mi-treasure-chest-wrapper{position:relative;margin:20px auto;width:116px;height:116px}.mi-modal-content-wrapper .mi-modal-footer{display:flex;justify-content:space-around}.mi-modal-content-wrapper .mi-modal-footer .mi-btn{min-width:170px;height:45px} diff --git a/packages/client/dist/assets/index-87f2e809.js b/packages/client/dist/assets/index-87f2e809.js new file mode 100644 index 00000000..6a896b71 --- /dev/null +++ b/packages/client/dist/assets/index-87f2e809.js @@ -0,0 +1,333 @@ +function _mergeNamespaces(_e,et){for(var tt=0;ttrt[nt]})}}}return Object.freeze(Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"}))}(function(){const et=document.createElement("link").relList;if(et&&et.supports&&et.supports("modulepreload"))return;for(const nt of document.querySelectorAll('link[rel="modulepreload"]'))rt(nt);new MutationObserver(nt=>{for(const it of nt)if(it.type==="childList")for(const at of it.addedNodes)at.tagName==="LINK"&&at.rel==="modulepreload"&&rt(at)}).observe(document,{childList:!0,subtree:!0});function tt(nt){const it={};return nt.integrity&&(it.integrity=nt.integrity),nt.referrerPolicy&&(it.referrerPolicy=nt.referrerPolicy),nt.crossOrigin==="use-credentials"?it.credentials="include":nt.crossOrigin==="anonymous"?it.credentials="omit":it.credentials="same-origin",it}function rt(nt){if(nt.ep)return;nt.ep=!0;const it=tt(nt);fetch(nt.href,it)}})();const scriptRel="modulepreload",assetsURL=function(_e){return"/"+_e},seen={},__vitePreload=function(et,tt,rt){if(!tt||tt.length===0)return et();const nt=document.getElementsByTagName("link");return Promise.all(tt.map(it=>{if(it=assetsURL(it),it in seen)return;seen[it]=!0;const at=it.endsWith(".css"),st=at?'[rel="stylesheet"]':"";if(!!rt)for(let ht=nt.length-1;ht>=0;ht--){const pt=nt[ht];if(pt.href===it&&(!at||pt.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${it}"]${st}`))return;const dt=document.createElement("link");if(dt.rel=at?"stylesheet":scriptRel,at||(dt.as="script",dt.crossOrigin=""),dt.href=it,document.head.appendChild(dt),at)return new Promise((ht,pt)=>{dt.addEventListener("load",ht),dt.addEventListener("error",()=>pt(new Error(`Unable to preload CSS for ${it}`)))})})).then(()=>et()).catch(it=>{const at=new Event("vite:preloadError",{cancelable:!0});if(at.payload=it,window.dispatchEvent(at),!at.defaultPrevented)throw it})};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(_e){return _e&&_e.__esModule&&Object.prototype.hasOwnProperty.call(_e,"default")?_e.default:_e}function getAugmentedNamespace(_e){if(_e.__esModule)return _e;var et=_e.default;if(typeof et=="function"){var tt=function rt(){return this instanceof rt?Reflect.construct(et,arguments,this.constructor):et.apply(this,arguments)};tt.prototype=et.prototype}else tt={};return Object.defineProperty(tt,"__esModule",{value:!0}),Object.keys(_e).forEach(function(rt){var nt=Object.getOwnPropertyDescriptor(_e,rt);Object.defineProperty(tt,rt,nt.get?nt:{enumerable:!0,get:function(){return _e[rt]}})}),tt}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={},react={exports:{}},react_production_min={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var l$5=Symbol.for("react.element"),n$4=Symbol.for("react.portal"),p$6=Symbol.for("react.fragment"),q$5=Symbol.for("react.strict_mode"),r$6=Symbol.for("react.profiler"),t$5=Symbol.for("react.provider"),u$4=Symbol.for("react.context"),v$7=Symbol.for("react.forward_ref"),w$3=Symbol.for("react.suspense"),x$9=Symbol.for("react.memo"),y$4=Symbol.for("react.lazy"),z$6=Symbol.iterator;function A$6(_e){return _e===null||typeof _e!="object"?null:(_e=z$6&&_e[z$6]||_e["@@iterator"],typeof _e=="function"?_e:null)}var B$5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C$3=Object.assign,D$3={};function E$4(_e,et,tt){this.props=_e,this.context=et,this.refs=D$3,this.updater=tt||B$5}E$4.prototype.isReactComponent={};E$4.prototype.setState=function(_e,et){if(typeof _e!="object"&&typeof _e!="function"&&_e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_e,et,"setState")};E$4.prototype.forceUpdate=function(_e){this.updater.enqueueForceUpdate(this,_e,"forceUpdate")};function F$3(){}F$3.prototype=E$4.prototype;function G$5(_e,et,tt){this.props=_e,this.context=et,this.refs=D$3,this.updater=tt||B$5}var H$2=G$5.prototype=new F$3;H$2.constructor=G$5;C$3(H$2,E$4.prototype);H$2.isPureReactComponent=!0;var I$7=Array.isArray,J$3=Object.prototype.hasOwnProperty,K$4={current:null},L$2={key:!0,ref:!0,__self:!0,__source:!0};function M$8(_e,et,tt){var rt,nt={},it=null,at=null;if(et!=null)for(rt in et.ref!==void 0&&(at=et.ref),et.key!==void 0&&(it=""+et.key),et)J$3.call(et,rt)&&!L$2.hasOwnProperty(rt)&&(nt[rt]=et[rt]);var st=arguments.length-2;if(st===1)nt.children=tt;else if(11?et-1:0),rt=1;rt_e.length)&&(et=_e.length);for(var tt=0,rt=new Array(et);tt=_e.length?{done:!0}:{done:!1,value:_e[rt++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toPrimitive$1(_e,et){if(typeof _e!="object"||_e===null)return _e;var tt=_e[Symbol.toPrimitive];if(tt!==void 0){var rt=tt.call(_e,et||"default");if(typeof rt!="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(_e)}function _toPropertyKey$1(_e){var et=_toPrimitive$1(_e,"string");return typeof et=="symbol"?et:String(et)}var storedAnnotationsSymbol=Symbol("mobx-stored-annotations");function createDecoratorAnnotation(_e){function et(tt,rt){storeAnnotation(tt,rt,_e)}return Object.assign(et,_e)}function storeAnnotation(_e,et,tt){hasProp(_e,storedAnnotationsSymbol)||addHiddenProp(_e,storedAnnotationsSymbol,_extends$4({},_e[storedAnnotationsSymbol])),isOverride(tt)||(_e[storedAnnotationsSymbol][et]=tt)}var $mobx=Symbol("mobx administration"),Atom=function(){function _e(tt){tt===void 0&&(tt="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.batchId_=void 0,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=IDerivationState_.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=tt,this.batchId_=globalState.inBatch?globalState.batchId:NaN}var et=_e.prototype;return et.onBO=function(){this.onBOL&&this.onBOL.forEach(function(rt){return rt()})},et.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(rt){return rt()})},et.reportObserved=function(){return reportObserved(this)},et.reportChanged=function(){(!globalState.inBatch||this.batchId_!==globalState.batchId)&&(globalState.stateVersion=globalState.stateVersionrt&&(rt=st.dependenciesState_)}for(tt.length=nt,_e.newObserving_=null,it=et.length;it--;){var lt=et[it];lt.diffValue_===0&&removeObserver(lt,_e),lt.diffValue_=0}for(;nt--;){var dt=tt[nt];dt.diffValue_===1&&(dt.diffValue_=0,addObserver(dt,_e))}rt!==IDerivationState_.UP_TO_DATE_&&(_e.dependenciesState_=rt,_e.onBecomeStale_())}function clearObserving(_e){var et=_e.observing_;_e.observing_=[];for(var tt=et.length;tt--;)removeObserver(et[tt],_e);_e.dependenciesState_=IDerivationState_.NOT_TRACKING_}function untracked(_e){var et=untrackedStart();try{return _e()}finally{untrackedEnd(et)}}function untrackedStart(){var _e=globalState.trackingDerivation;return globalState.trackingDerivation=null,_e}function untrackedEnd(_e){globalState.trackingDerivation=_e}function allowStateReadsStart(_e){var et=globalState.allowStateReads;return globalState.allowStateReads=_e,et}function allowStateReadsEnd(_e){globalState.allowStateReads=_e}function changeDependenciesStateTo0(_e){if(_e.dependenciesState_!==IDerivationState_.UP_TO_DATE_){_e.dependenciesState_=IDerivationState_.UP_TO_DATE_;for(var et=_e.observing_,tt=et.length;tt--;)et[tt].lowestObserverState_=IDerivationState_.UP_TO_DATE_}}var MobXGlobals=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.batchId=Number.MIN_SAFE_INTEGER,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0,this.stateVersion=Number.MIN_SAFE_INTEGER},canMergeGlobalState=!0,globalState=function(){var _e=getGlobal$1();return _e.__mobxInstanceCount>0&&!_e.__mobxGlobals&&(canMergeGlobalState=!1),_e.__mobxGlobals&&_e.__mobxGlobals.version!==new MobXGlobals().version&&(canMergeGlobalState=!1),canMergeGlobalState?_e.__mobxGlobals?(_e.__mobxInstanceCount+=1,_e.__mobxGlobals.UNCHANGED||(_e.__mobxGlobals.UNCHANGED={}),_e.__mobxGlobals):(_e.__mobxInstanceCount=1,_e.__mobxGlobals=new MobXGlobals):(setTimeout(function(){die(35)},1),new MobXGlobals)}();function addObserver(_e,et){_e.observers_.add(et),_e.lowestObserverState_>et.dependenciesState_&&(_e.lowestObserverState_=et.dependenciesState_)}function removeObserver(_e,et){_e.observers_.delete(et),_e.observers_.size===0&&queueForUnobservation(_e)}function queueForUnobservation(_e){_e.isPendingUnobservation_===!1&&(_e.isPendingUnobservation_=!0,globalState.pendingUnobservations.push(_e))}function startBatch(){globalState.inBatch===0&&(globalState.batchId=globalState.batchId0&&queueForUnobservation(_e),!1)}function propagateChanged(_e){_e.lowestObserverState_!==IDerivationState_.STALE_&&(_e.lowestObserverState_=IDerivationState_.STALE_,_e.observers_.forEach(function(et){et.dependenciesState_===IDerivationState_.UP_TO_DATE_&&et.onBecomeStale_(),et.dependenciesState_=IDerivationState_.STALE_}))}function propagateChangeConfirmed(_e){_e.lowestObserverState_!==IDerivationState_.STALE_&&(_e.lowestObserverState_=IDerivationState_.STALE_,_e.observers_.forEach(function(et){et.dependenciesState_===IDerivationState_.POSSIBLY_STALE_?et.dependenciesState_=IDerivationState_.STALE_:et.dependenciesState_===IDerivationState_.UP_TO_DATE_&&(_e.lowestObserverState_=IDerivationState_.UP_TO_DATE_)}))}function propagateMaybeChanged(_e){_e.lowestObserverState_===IDerivationState_.UP_TO_DATE_&&(_e.lowestObserverState_=IDerivationState_.POSSIBLY_STALE_,_e.observers_.forEach(function(et){et.dependenciesState_===IDerivationState_.UP_TO_DATE_&&(et.dependenciesState_=IDerivationState_.POSSIBLY_STALE_,et.onBecomeStale_())}))}var Reaction=function(){function _e(tt,rt,nt,it){tt===void 0&&(tt="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=IDerivationState_.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=TraceMode.NONE,this.name_=tt,this.onInvalidate_=rt,this.errorHandler_=nt,this.requiresObservable_=it}var et=_e.prototype;return et.onBecomeStale_=function(){this.schedule_()},et.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,globalState.pendingReactions.push(this),runReactions())},et.isScheduled=function(){return this.isScheduled_},et.runReaction_=function(){if(!this.isDisposed_){startBatch(),this.isScheduled_=!1;var rt=globalState.trackingContext;if(globalState.trackingContext=this,shouldCompute(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(nt){this.reportExceptionInDerivation_(nt)}}globalState.trackingContext=rt,endBatch()}},et.track=function(rt){if(!this.isDisposed_){startBatch(),this.isRunning_=!0;var nt=globalState.trackingContext;globalState.trackingContext=this;var it=trackDerivedFunction(this,rt,void 0);globalState.trackingContext=nt,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&clearObserving(this),isCaughtException(it)&&this.reportExceptionInDerivation_(it.cause),endBatch()}},et.reportExceptionInDerivation_=function(rt){var nt=this;if(this.errorHandler_){this.errorHandler_(rt,this);return}if(globalState.disableErrorBoundaries)throw rt;var it="[mobx] uncaught error in '"+this+"'";globalState.suppressReactionErrors||console.error(it,rt),globalState.globalReactionErrorHandlers.forEach(function(at){return at(rt,nt)})},et.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(startBatch(),clearObserving(this),endBatch()))},et.getDisposer_=function(rt){var nt=this,it=function at(){nt.dispose(),rt==null||rt.removeEventListener==null||rt.removeEventListener("abort",at)};return rt==null||rt.addEventListener==null||rt.addEventListener("abort",it),it[$mobx]=this,it},et.toString=function(){return"Reaction["+this.name_+"]"},et.trace=function(rt){},_e}(),MAX_REACTION_ITERATIONS=100,reactionScheduler=function(et){return et()};function runReactions(){globalState.inBatch>0||globalState.isRunningReactions||reactionScheduler(runReactionsHelper)}function runReactionsHelper(){globalState.isRunningReactions=!0;for(var _e=globalState.pendingReactions,et=0;_e.length>0;){++et===MAX_REACTION_ITERATIONS&&(console.error("[mobx] cycle in reaction: "+_e[0]),_e.splice(0));for(var tt=_e.splice(0),rt=0,nt=tt.length;rt",it=function(){var st=this,lt=arguments,dt=++generatorId,ht=action(nt+" - runid: "+dt+" - init",rt).apply(st,lt),pt,mt=void 0,gt=new Promise(function(vt,xt){var yt=0;pt=xt;function bt($t){mt=void 0;var Pt;try{Pt=action(nt+" - runid: "+dt+" - yield "+yt++,ht.next).call(ht,$t)}catch(kt){return xt(kt)}Et(Pt)}function wt($t){mt=void 0;var Pt;try{Pt=action(nt+" - runid: "+dt+" - yield "+yt++,ht.throw).call(ht,$t)}catch(kt){return xt(kt)}Et(Pt)}function Et($t){if(isFunction$3($t?.then)){$t.then(Et,xt);return}return $t.done?vt($t.value):(mt=Promise.resolve($t.value),mt.then(bt,wt))}bt(void 0)});return gt.cancel=action(nt+" - runid: "+dt+" - cancel",function(){try{mt&&cancelPromise(mt);var vt=ht.return(void 0),xt=Promise.resolve(vt.value);xt.then(noop$4,noop$4),cancelPromise(xt),pt(new FlowCancellationError)}catch(yt){pt(yt)}}),gt};return it.isMobXFlow=!0,it},flowAnnotation);flow.bound=createDecoratorAnnotation(flowBoundAnnotation);function cancelPromise(_e){isFunction$3(_e.cancel)&&_e.cancel()}function isFlow(_e){return _e?.isMobXFlow===!0}function _isObservable(_e,et){return _e?et!==void 0?isObservableObject(_e)?_e[$mobx].values_.has(et):!1:isObservableObject(_e)||!!_e[$mobx]||isAtom(_e)||isReaction(_e)||isComputedValue(_e):!1}function isObservable(_e){return _isObservable(_e)}function transaction(_e,et){et===void 0&&(et=void 0),startBatch();try{return _e.apply(et)}finally{endBatch()}}function getAdm(_e){return _e[$mobx]}var objectProxyTraps={has:function(et,tt){return getAdm(et).has_(tt)},get:function(et,tt){return getAdm(et).get_(tt)},set:function(et,tt,rt){var nt;return isStringish(tt)?(nt=getAdm(et).set_(tt,rt,!0))!=null?nt:!0:!1},deleteProperty:function(et,tt){var rt;return isStringish(tt)?(rt=getAdm(et).delete_(tt,!0))!=null?rt:!0:!1},defineProperty:function(et,tt,rt){var nt;return(nt=getAdm(et).defineProperty_(tt,rt))!=null?nt:!0},ownKeys:function(et){return getAdm(et).ownKeys_()},preventExtensions:function(et){die(13)}};function asDynamicObservableObject(_e,et){var tt,rt;return assertProxies(),_e=asObservableObject(_e,et),(rt=(tt=_e[$mobx]).proxy_)!=null?rt:tt.proxy_=new Proxy(_e,objectProxyTraps)}function hasInterceptors(_e){return _e.interceptors_!==void 0&&_e.interceptors_.length>0}function registerInterceptor(_e,et){var tt=_e.interceptors_||(_e.interceptors_=[]);return tt.push(et),once(function(){var rt=tt.indexOf(et);rt!==-1&&tt.splice(rt,1)})}function interceptChange(_e,et){var tt=untrackedStart();try{for(var rt=[].concat(_e.interceptors_||[]),nt=0,it=rt.length;nt0}function registerListener(_e,et){var tt=_e.changeListeners_||(_e.changeListeners_=[]);return tt.push(et),once(function(){var rt=tt.indexOf(et);rt!==-1&&tt.splice(rt,1)})}function notifyListeners(_e,et){var tt=untrackedStart(),rt=_e.changeListeners_;if(rt){rt=rt.slice();for(var nt=0,it=rt.length;nt0?rt.map(this.dehancer):rt},et.intercept_=function(rt){return registerInterceptor(this,rt)},et.observe_=function(rt,nt){return nt===void 0&&(nt=!1),nt&&rt({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),registerListener(this,rt)},et.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},et.setArrayLength_=function(rt){(typeof rt!="number"||isNaN(rt)||rt<0)&&die("Out of range: "+rt);var nt=this.values_.length;if(rt!==nt)if(rt>nt){for(var it=new Array(rt-nt),at=0;at0&&reserveArrayBuffer(rt+nt+1)},et.spliceWithArray_=function(rt,nt,it){var at=this;this.atom_;var st=this.values_.length;if(rt===void 0?rt=0:rt>st?rt=st:rt<0&&(rt=Math.max(0,st+rt)),arguments.length===1?nt=st-rt:nt==null?nt=0:nt=Math.max(0,Math.min(nt,st-rt)),it===void 0&&(it=EMPTY_ARRAY),hasInterceptors(this)){var lt=interceptChange(this,{object:this.proxy_,type:SPLICE,index:rt,removedCount:nt,added:it});if(!lt)return EMPTY_ARRAY;nt=lt.removedCount,it=lt.added}if(it=it.length===0?it:it.map(function(pt){return at.enhancer_(pt,void 0)}),this.legacyMode_){var dt=it.length-nt;this.updateArrayLength_(st,dt)}var ht=this.spliceItemsIntoValues_(rt,nt,it);return(nt!==0||it.length!==0)&&this.notifyArraySplice_(rt,it,ht),this.dehanceValues_(ht)},et.spliceItemsIntoValues_=function(rt,nt,it){if(it.length=this.values_.length){console.warn("[mobx] Out of bounds read: "+rt);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[rt])},et.set_=function(rt,nt){var it=this.values_;if(this.legacyMode_&&rt>it.length&&die(17,rt,it.length),rt2?rt-2:0),it=2;it-1?(this.splice(rt,1),!0):!1}};addArrayExtension("concat",simpleFunc);addArrayExtension("flat",simpleFunc);addArrayExtension("includes",simpleFunc);addArrayExtension("indexOf",simpleFunc);addArrayExtension("join",simpleFunc);addArrayExtension("lastIndexOf",simpleFunc);addArrayExtension("slice",simpleFunc);addArrayExtension("toString",simpleFunc);addArrayExtension("toLocaleString",simpleFunc);addArrayExtension("every",mapLikeFunc);addArrayExtension("filter",mapLikeFunc);addArrayExtension("find",mapLikeFunc);addArrayExtension("findIndex",mapLikeFunc);addArrayExtension("flatMap",mapLikeFunc);addArrayExtension("forEach",mapLikeFunc);addArrayExtension("map",mapLikeFunc);addArrayExtension("some",mapLikeFunc);addArrayExtension("reduce",reduceLikeFunc);addArrayExtension("reduceRight",reduceLikeFunc);function addArrayExtension(_e,et){typeof Array.prototype[_e]=="function"&&(arrayExtensions[_e]=et(_e))}function simpleFunc(_e){return function(){var et=this[$mobx];et.atom_.reportObserved();var tt=et.dehanceValues_(et.values_);return tt[_e].apply(tt,arguments)}}function mapLikeFunc(_e){return function(et,tt){var rt=this,nt=this[$mobx];nt.atom_.reportObserved();var it=nt.dehanceValues_(nt.values_);return it[_e](function(at,st){return et.call(tt,at,st,rt)})}}function reduceLikeFunc(_e){return function(){var et=this,tt=this[$mobx];tt.atom_.reportObserved();var rt=tt.dehanceValues_(tt.values_),nt=arguments[0];return arguments[0]=function(it,at,st){return nt(it,at,st,et)},rt[_e].apply(rt,arguments)}}var isObservableArrayAdministration=createInstanceofPredicate("ObservableArrayAdministration",ObservableArrayAdministration);function isObservableArray(_e){return isObject$2(_e)&&isObservableArrayAdministration(_e[$mobx])}var _Symbol$iterator,_Symbol$toStringTag,ObservableMapMarker={},ADD="add",DELETE="delete";_Symbol$iterator=Symbol.iterator;_Symbol$toStringTag=Symbol.toStringTag;var ObservableMap=function(){function _e(tt,rt,nt){var it=this;rt===void 0&&(rt=deepEnhancer),nt===void 0&&(nt="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[$mobx]=ObservableMapMarker,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=rt,this.name_=nt,isFunction$3(Map)||die(18),initObservable(function(){it.keysAtom_=createAtom("ObservableMap.keys()"),it.data_=new Map,it.hasMap_=new Map,tt&&it.merge(tt)})}var et=_e.prototype;return et.has_=function(rt){return this.data_.has(rt)},et.has=function(rt){var nt=this;if(!globalState.trackingDerivation)return this.has_(rt);var it=this.hasMap_.get(rt);if(!it){var at=it=new ObservableValue(this.has_(rt),referenceEnhancer,"ObservableMap.key?",!1);this.hasMap_.set(rt,at),onBecomeUnobserved(at,function(){return nt.hasMap_.delete(rt)})}return it.get()},et.set=function(rt,nt){var it=this.has_(rt);if(hasInterceptors(this)){var at=interceptChange(this,{type:it?UPDATE:ADD,object:this,newValue:nt,name:rt});if(!at)return this;nt=at.newValue}return it?this.updateValue_(rt,nt):this.addValue_(rt,nt),this},et.delete=function(rt){var nt=this;if(this.keysAtom_,hasInterceptors(this)){var it=interceptChange(this,{type:DELETE,object:this,name:rt});if(!it)return!1}if(this.has_(rt)){var at=isSpyEnabled(),st=hasListeners(this),lt=st||at?{observableKind:"map",debugObjectName:this.name_,type:DELETE,object:this,oldValue:this.data_.get(rt).value_,name:rt}:null;return transaction(function(){var dt;nt.keysAtom_.reportChanged(),(dt=nt.hasMap_.get(rt))==null||dt.setNewValue_(!1);var ht=nt.data_.get(rt);ht.setNewValue_(void 0),nt.data_.delete(rt)}),st&¬ifyListeners(this,lt),!0}return!1},et.updateValue_=function(rt,nt){var it=this.data_.get(rt);if(nt=it.prepareNewValue_(nt),nt!==globalState.UNCHANGED){var at=isSpyEnabled(),st=hasListeners(this),lt=st||at?{observableKind:"map",debugObjectName:this.name_,type:UPDATE,object:this,oldValue:it.value_,name:rt,newValue:nt}:null;it.setNewValue_(nt),st&¬ifyListeners(this,lt)}},et.addValue_=function(rt,nt){var it=this;this.keysAtom_,transaction(function(){var dt,ht=new ObservableValue(nt,it.enhancer_,"ObservableMap.key",!1);it.data_.set(rt,ht),nt=ht.value_,(dt=it.hasMap_.get(rt))==null||dt.setNewValue_(!0),it.keysAtom_.reportChanged()});var at=isSpyEnabled(),st=hasListeners(this),lt=st||at?{observableKind:"map",debugObjectName:this.name_,type:ADD,object:this,name:rt,newValue:nt}:null;st&¬ifyListeners(this,lt)},et.get=function(rt){return this.has(rt)?this.dehanceValue_(this.data_.get(rt).get()):this.dehanceValue_(void 0)},et.dehanceValue_=function(rt){return this.dehancer!==void 0?this.dehancer(rt):rt},et.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},et.values=function(){var rt=this,nt=this.keys();return makeIterable({next:function(){var at=nt.next(),st=at.done,lt=at.value;return{done:st,value:st?void 0:rt.get(lt)}}})},et.entries=function(){var rt=this,nt=this.keys();return makeIterable({next:function(){var at=nt.next(),st=at.done,lt=at.value;return{done:st,value:st?void 0:[lt,rt.get(lt)]}}})},et[_Symbol$iterator]=function(){return this.entries()},et.forEach=function(rt,nt){for(var it=_createForOfIteratorHelperLoose(this),at;!(at=it()).done;){var st=at.value,lt=st[0],dt=st[1];rt.call(nt,dt,lt,this)}},et.merge=function(rt){var nt=this;return isObservableMap(rt)&&(rt=new Map(rt)),transaction(function(){isPlainObject$2(rt)?getPlainObjectKeys(rt).forEach(function(it){return nt.set(it,rt[it])}):Array.isArray(rt)?rt.forEach(function(it){var at=it[0],st=it[1];return nt.set(at,st)}):isES6Map(rt)?(rt.constructor!==Map&&die(19,rt),rt.forEach(function(it,at){return nt.set(at,it)})):rt!=null&&die(20,rt)}),this},et.clear=function(){var rt=this;transaction(function(){untracked(function(){for(var nt=_createForOfIteratorHelperLoose(rt.keys()),it;!(it=nt()).done;){var at=it.value;rt.delete(at)}})})},et.replace=function(rt){var nt=this;return transaction(function(){for(var it=convertToMap(rt),at=new Map,st=!1,lt=_createForOfIteratorHelperLoose(nt.data_.keys()),dt;!(dt=lt()).done;){var ht=dt.value;if(!it.has(ht)){var pt=nt.delete(ht);if(pt)st=!0;else{var mt=nt.data_.get(ht);at.set(ht,mt)}}}for(var gt=_createForOfIteratorHelperLoose(it.entries()),vt;!(vt=gt()).done;){var xt=vt.value,yt=xt[0],bt=xt[1],wt=nt.data_.has(yt);if(nt.set(yt,bt),nt.data_.has(yt)){var Et=nt.data_.get(yt);at.set(yt,Et),wt||(st=!0)}}if(!st)if(nt.data_.size!==at.size)nt.keysAtom_.reportChanged();else for(var $t=nt.data_.keys(),Pt=at.keys(),kt=$t.next(),Lt=Pt.next();!kt.done;){if(kt.value!==Lt.value){nt.keysAtom_.reportChanged();break}kt=$t.next(),Lt=Pt.next()}nt.data_=at}),this},et.toString=function(){return"[object ObservableMap]"},et.toJSON=function(){return Array.from(this)},et.observe_=function(rt,nt){return registerListener(this,rt)},et.intercept_=function(rt){return registerInterceptor(this,rt)},_createClass$2(_e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:_Symbol$toStringTag,get:function(){return"Map"}}]),_e}(),isObservableMap=createInstanceofPredicate("ObservableMap",ObservableMap);function convertToMap(_e){if(isES6Map(_e)||isObservableMap(_e))return _e;if(Array.isArray(_e))return new Map(_e);if(isPlainObject$2(_e)){var et=new Map;for(var tt in _e)et.set(tt,_e[tt]);return et}else return die(21,_e)}var _Symbol$iterator$1,_Symbol$toStringTag$1,ObservableSetMarker={};_Symbol$iterator$1=Symbol.iterator;_Symbol$toStringTag$1=Symbol.toStringTag;var ObservableSet=function(){function _e(tt,rt,nt){var it=this;rt===void 0&&(rt=deepEnhancer),nt===void 0&&(nt="ObservableSet"),this.name_=void 0,this[$mobx]=ObservableSetMarker,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=nt,isFunction$3(Set)||die(22),this.enhancer_=function(at,st){return rt(at,st,nt)},initObservable(function(){it.atom_=createAtom(it.name_),tt&&it.replace(tt)})}var et=_e.prototype;return et.dehanceValue_=function(rt){return this.dehancer!==void 0?this.dehancer(rt):rt},et.clear=function(){var rt=this;transaction(function(){untracked(function(){for(var nt=_createForOfIteratorHelperLoose(rt.data_.values()),it;!(it=nt()).done;){var at=it.value;rt.delete(at)}})})},et.forEach=function(rt,nt){for(var it=_createForOfIteratorHelperLoose(this),at;!(at=it()).done;){var st=at.value;rt.call(nt,st,st,this)}},et.add=function(rt){var nt=this;if(this.atom_,hasInterceptors(this)){var it=interceptChange(this,{type:ADD,object:this,newValue:rt});if(!it)return this}if(!this.has(rt)){transaction(function(){nt.data_.add(nt.enhancer_(rt,void 0)),nt.atom_.reportChanged()});var at=!1,st=hasListeners(this),lt=st||at?{observableKind:"set",debugObjectName:this.name_,type:ADD,object:this,newValue:rt}:null;st&¬ifyListeners(this,lt)}return this},et.delete=function(rt){var nt=this;if(hasInterceptors(this)){var it=interceptChange(this,{type:DELETE,object:this,oldValue:rt});if(!it)return!1}if(this.has(rt)){var at=!1,st=hasListeners(this),lt=st||at?{observableKind:"set",debugObjectName:this.name_,type:DELETE,object:this,oldValue:rt}:null;return transaction(function(){nt.atom_.reportChanged(),nt.data_.delete(rt)}),st&¬ifyListeners(this,lt),!0}return!1},et.has=function(rt){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(rt))},et.entries=function(){var rt=0,nt=Array.from(this.keys()),it=Array.from(this.values());return makeIterable({next:function(){var st=rt;return rt+=1,stOBSERVABLE_ARRAY_BUFFER_SIZE){for(var et=OBSERVABLE_ARRAY_BUFFER_SIZE;et<_e+100;et++)createArrayBufferItem(et);OBSERVABLE_ARRAY_BUFFER_SIZE=_e}}reserveArrayBuffer(1e3);function createLegacyArray(_e,et,tt){return new LegacyObservableArray(_e,et,tt)}function getAtom(_e,et){if(typeof _e=="object"&&_e!==null){if(isObservableArray(_e))return et!==void 0&&die(23),_e[$mobx].atom_;if(isObservableSet(_e))return _e.atom_;if(isObservableMap(_e)){if(et===void 0)return _e.keysAtom_;var tt=_e.data_.get(et)||_e.hasMap_.get(et);return tt||die(25,et,getDebugName(_e)),tt}if(isObservableObject(_e)){if(!et)return die(26);var rt=_e[$mobx].values_.get(et);return rt||die(27,et,getDebugName(_e)),rt}if(isAtom(_e)||isComputedValue(_e)||isReaction(_e))return _e}else if(isFunction$3(_e)&&isReaction(_e[$mobx]))return _e[$mobx];die(28)}function getAdministration(_e,et){if(_e||die(29),et!==void 0)return getAdministration(getAtom(_e,et));if(isAtom(_e)||isComputedValue(_e)||isReaction(_e)||isObservableMap(_e)||isObservableSet(_e))return _e;if(_e[$mobx])return _e[$mobx];die(24,_e)}function getDebugName(_e,et){var tt;if(et!==void 0)tt=getAtom(_e,et);else{if(isAction(_e))return _e.name;isObservableObject(_e)||isObservableMap(_e)||isObservableSet(_e)?tt=getAdministration(_e):tt=getAtom(_e)}return tt.name_}function initObservable(_e){var et=untrackedStart(),tt=allowStateChangesStart(!0);startBatch();try{return _e()}finally{endBatch(),allowStateChangesEnd(tt),untrackedEnd(et)}}var toString=objectPrototype.toString;function deepEqual(_e,et,tt){return tt===void 0&&(tt=-1),eq(_e,et,tt)}function eq(_e,et,tt,rt,nt){if(_e===et)return _e!==0||1/_e===1/et;if(_e==null||et==null)return!1;if(_e!==_e)return et!==et;var it=typeof _e;if(it!=="function"&&it!=="object"&&typeof et!="object")return!1;var at=toString.call(_e);if(at!==toString.call(et))return!1;switch(at){case"[object RegExp]":case"[object String]":return""+_e==""+et;case"[object Number]":return+_e!=+_e?+et!=+et:+_e==0?1/+_e===1/et:+_e==+et;case"[object Date]":case"[object Boolean]":return+_e==+et;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(_e)===Symbol.valueOf.call(et);case"[object Map]":case"[object Set]":tt>=0&&tt++;break}_e=unwrap(_e),et=unwrap(et);var st=at==="[object Array]";if(!st){if(typeof _e!="object"||typeof et!="object")return!1;var lt=_e.constructor,dt=et.constructor;if(lt!==dt&&!(isFunction$3(lt)&< instanceof lt&&isFunction$3(dt)&&dt instanceof dt)&&"constructor"in _e&&"constructor"in et)return!1}if(tt===0)return!1;tt<0&&(tt=-1),rt=rt||[],nt=nt||[];for(var ht=rt.length;ht--;)if(rt[ht]===_e)return nt[ht]===et;if(rt.push(_e),nt.push(et),st){if(ht=_e.length,ht!==et.length)return!1;for(;ht--;)if(!eq(_e[ht],et[ht],tt-1,rt,nt))return!1}else{var pt=Object.keys(_e),mt;if(ht=pt.length,Object.keys(et).length!==ht)return!1;for(;ht--;)if(mt=pt[ht],!(hasProp(et,mt)&&eq(_e[mt],et[mt],tt-1,rt,nt)))return!1}return rt.pop(),nt.pop(),!0}function unwrap(_e){return isObservableArray(_e)?_e.slice():isES6Map(_e)||isObservableMap(_e)||isES6Set(_e)||isObservableSet(_e)?Array.from(_e.entries()):_e}function makeIterable(_e){return _e[Symbol.iterator]=getSelf,_e}function getSelf(){return this}["Symbol","Map","Set"].forEach(function(_e){var et=getGlobal$1();typeof et[_e]>"u"&&die("MobX requires global '"+_e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy,extras:{getDebugName},$mobx});var extendStatics=function(_e,et){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(tt,rt){tt.__proto__=rt}||function(tt,rt){for(var nt in rt)Object.prototype.hasOwnProperty.call(rt,nt)&&(tt[nt]=rt[nt])},extendStatics(_e,et)};function __extends$1(_e,et){if(typeof et!="function"&&et!==null)throw new TypeError("Class extends value "+String(et)+" is not a constructor or null");extendStatics(_e,et);function tt(){this.constructor=_e}_e.prototype=et===null?Object.create(et):(tt.prototype=et.prototype,new tt)}function __awaiter$b(_e,et,tt,rt){function nt(it){return it instanceof tt?it:new tt(function(at){at(it)})}return new(tt||(tt=Promise))(function(it,at){function st(ht){try{dt(rt.next(ht))}catch(pt){at(pt)}}function lt(ht){try{dt(rt.throw(ht))}catch(pt){at(pt)}}function dt(ht){ht.done?it(ht.value):nt(ht.value).then(st,lt)}dt((rt=rt.apply(_e,et||[])).next())})}function __generator(_e,et){var tt={label:0,sent:function(){if(it[0]&1)throw it[1];return it[1]},trys:[],ops:[]},rt,nt,it,at;return at={next:st(0),throw:st(1),return:st(2)},typeof Symbol=="function"&&(at[Symbol.iterator]=function(){return this}),at;function st(dt){return function(ht){return lt([dt,ht])}}function lt(dt){if(rt)throw new TypeError("Generator is already executing.");for(;at&&(at=0,dt[0]&&(tt=0)),tt;)try{if(rt=1,nt&&(it=dt[0]&2?nt.return:dt[0]?nt.throw||((it=nt.return)&&it.call(nt),0):nt.next)&&!(it=it.call(nt,dt[1])).done)return it;switch(nt=0,it&&(dt=[dt[0]&2,it.value]),dt[0]){case 0:case 1:it=dt;break;case 4:return tt.label++,{value:dt[1],done:!1};case 5:tt.label++,nt=dt[1],dt=[0];continue;case 7:dt=tt.ops.pop(),tt.trys.pop();continue;default:if(it=tt.trys,!(it=it.length>0&&it[it.length-1])&&(dt[0]===6||dt[0]===2)){tt=0;continue}if(dt[0]===3&&(!it||dt[1]>it[0]&&dt[1]=_e.length&&(_e=void 0),{value:_e&&_e[rt++],done:!_e}}};throw new TypeError(et?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read$4(_e,et){var tt=typeof Symbol=="function"&&_e[Symbol.iterator];if(!tt)return _e;var rt=tt.call(_e),nt,it=[],at;try{for(;(et===void 0||et-- >0)&&!(nt=rt.next()).done;)it.push(nt.value)}catch(st){at={error:st}}finally{try{nt&&!nt.done&&(tt=rt.return)&&tt.call(rt)}finally{if(at)throw at.error}}return it}function __spreadArray$3(_e,et,tt){if(tt||arguments.length===2)for(var rt=0,nt=et.length,it;rt1||st(mt,gt)})})}function st(mt,gt){try{lt(rt[mt](gt))}catch(vt){pt(it[0][3],vt)}}function lt(mt){mt.value instanceof __await?Promise.resolve(mt.value.v).then(dt,ht):pt(it[0][2],mt)}function dt(mt){st("next",mt)}function ht(mt){st("throw",mt)}function pt(mt,gt){mt(gt),it.shift(),it.length&&st(it[0][0],it[0][1])}}function __asyncValues(_e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var et=_e[Symbol.asyncIterator],tt;return et?et.call(_e):(_e=typeof __values=="function"?__values(_e):_e[Symbol.iterator](),tt={},rt("next"),rt("throw"),rt("return"),tt[Symbol.asyncIterator]=function(){return this},tt);function rt(it){tt[it]=_e[it]&&function(at){return new Promise(function(st,lt){at=_e[it](at),nt(st,lt,at.done,at.value)})}}function nt(it,at,st,lt){Promise.resolve(lt).then(function(dt){it({value:dt,done:st})},at)}}typeof SuppressedError=="function"&&SuppressedError;function isFunction$2(_e){return typeof _e=="function"}function createErrorClass(_e){var et=function(rt){Error.call(rt),rt.stack=new Error().stack},tt=_e(et);return tt.prototype=Object.create(Error.prototype),tt.prototype.constructor=tt,tt}var UnsubscriptionError=createErrorClass(function(_e){return function(tt){_e(this),this.message=tt?tt.length+` errors occurred during unsubscription: +`+tt.map(function(rt,nt){return nt+1+") "+rt.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=tt}});function arrRemove(_e,et){if(_e){var tt=_e.indexOf(et);0<=tt&&_e.splice(tt,1)}}var Subscription=function(){function _e(et){this.initialTeardown=et,this.closed=!1,this._parentage=null,this._finalizers=null}return _e.prototype.unsubscribe=function(){var et,tt,rt,nt,it;if(!this.closed){this.closed=!0;var at=this._parentage;if(at)if(this._parentage=null,Array.isArray(at))try{for(var st=__values(at),lt=st.next();!lt.done;lt=st.next()){var dt=lt.value;dt.remove(this)}}catch(xt){et={error:xt}}finally{try{lt&&!lt.done&&(tt=st.return)&&tt.call(st)}finally{if(et)throw et.error}}else at.remove(this);var ht=this.initialTeardown;if(isFunction$2(ht))try{ht()}catch(xt){it=xt instanceof UnsubscriptionError?xt.errors:[xt]}var pt=this._finalizers;if(pt){this._finalizers=null;try{for(var mt=__values(pt),gt=mt.next();!gt.done;gt=mt.next()){var vt=gt.value;try{execFinalizer(vt)}catch(xt){it=it??[],xt instanceof UnsubscriptionError?it=__spreadArray$3(__spreadArray$3([],__read$4(it)),__read$4(xt.errors)):it.push(xt)}}}catch(xt){rt={error:xt}}finally{try{gt&&!gt.done&&(nt=mt.return)&&nt.call(mt)}finally{if(rt)throw rt.error}}}if(it)throw new UnsubscriptionError(it)}},_e.prototype.add=function(et){var tt;if(et&&et!==this)if(this.closed)execFinalizer(et);else{if(et instanceof _e){if(et.closed||et._hasParent(this))return;et._addParent(this)}(this._finalizers=(tt=this._finalizers)!==null&&tt!==void 0?tt:[]).push(et)}},_e.prototype._hasParent=function(et){var tt=this._parentage;return tt===et||Array.isArray(tt)&&tt.includes(et)},_e.prototype._addParent=function(et){var tt=this._parentage;this._parentage=Array.isArray(tt)?(tt.push(et),tt):tt?[tt,et]:et},_e.prototype._removeParent=function(et){var tt=this._parentage;tt===et?this._parentage=null:Array.isArray(tt)&&arrRemove(tt,et)},_e.prototype.remove=function(et){var tt=this._finalizers;tt&&arrRemove(tt,et),et instanceof _e&&et._removeParent(this)},_e.EMPTY=function(){var et=new _e;return et.closed=!0,et}(),_e}(),EMPTY_SUBSCRIPTION=Subscription.EMPTY;function isSubscription(_e){return _e instanceof Subscription||_e&&"closed"in _e&&isFunction$2(_e.remove)&&isFunction$2(_e.add)&&isFunction$2(_e.unsubscribe)}function execFinalizer(_e){isFunction$2(_e)?_e():_e.unsubscribe()}var config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},timeoutProvider={setTimeout:function(_e,et){for(var tt=[],rt=2;rt0},enumerable:!1,configurable:!0}),et.prototype._trySubscribe=function(tt){return this._throwIfClosed(),_e.prototype._trySubscribe.call(this,tt)},et.prototype._subscribe=function(tt){return this._throwIfClosed(),this._checkFinalizedStatuses(tt),this._innerSubscribe(tt)},et.prototype._innerSubscribe=function(tt){var rt=this,nt=this,it=nt.hasError,at=nt.isStopped,st=nt.observers;return it||at?EMPTY_SUBSCRIPTION:(this.currentObservers=null,st.push(tt),new Subscription(function(){rt.currentObservers=null,arrRemove(st,tt)}))},et.prototype._checkFinalizedStatuses=function(tt){var rt=this,nt=rt.hasError,it=rt.thrownError,at=rt.isStopped;nt?tt.error(it):at&&tt.complete()},et.prototype.asObservable=function(){var tt=new Observable;return tt.source=this,tt},et.create=function(tt,rt){return new AnonymousSubject(tt,rt)},et}(Observable),AnonymousSubject=function(_e){__extends$1(et,_e);function et(tt,rt){var nt=_e.call(this)||this;return nt.destination=tt,nt.source=rt,nt}return et.prototype.next=function(tt){var rt,nt;(nt=(rt=this.destination)===null||rt===void 0?void 0:rt.next)===null||nt===void 0||nt.call(rt,tt)},et.prototype.error=function(tt){var rt,nt;(nt=(rt=this.destination)===null||rt===void 0?void 0:rt.error)===null||nt===void 0||nt.call(rt,tt)},et.prototype.complete=function(){var tt,rt;(rt=(tt=this.destination)===null||tt===void 0?void 0:tt.complete)===null||rt===void 0||rt.call(tt)},et.prototype._subscribe=function(tt){var rt,nt;return(nt=(rt=this.source)===null||rt===void 0?void 0:rt.subscribe(tt))!==null&&nt!==void 0?nt:EMPTY_SUBSCRIPTION},et}(Subject),dateTimestampProvider={now:function(){return(dateTimestampProvider.delegate||Date).now()},delegate:void 0},ReplaySubject=function(_e){__extends$1(et,_e);function et(tt,rt,nt){tt===void 0&&(tt=1/0),rt===void 0&&(rt=1/0),nt===void 0&&(nt=dateTimestampProvider);var it=_e.call(this)||this;return it._bufferSize=tt,it._windowTime=rt,it._timestampProvider=nt,it._buffer=[],it._infiniteTimeWindow=!0,it._infiniteTimeWindow=rt===1/0,it._bufferSize=Math.max(1,tt),it._windowTime=Math.max(1,rt),it}return et.prototype.next=function(tt){var rt=this,nt=rt.isStopped,it=rt._buffer,at=rt._infiniteTimeWindow,st=rt._timestampProvider,lt=rt._windowTime;nt||(it.push(tt),!at&&it.push(st.now()+lt)),this._trimBuffer(),_e.prototype.next.call(this,tt)},et.prototype._subscribe=function(tt){this._throwIfClosed(),this._trimBuffer();for(var rt=this._innerSubscribe(tt),nt=this,it=nt._infiniteTimeWindow,at=nt._buffer,st=at.slice(),lt=0;lt0?_t:At},it.min=function(_t,At){return _t.cmp(At)<0?_t:At},it.prototype._init=function(_t,At,Tt){if(typeof _t=="number")return this._initNumber(_t,At,Tt);if(typeof _t=="object")return this._initArray(_t,At,Tt);At==="hex"&&(At=16),rt(At===(At|0)&&At>=2&&At<=36),_t=_t.toString().replace(/\s+/g,"");var Bt=0;_t[0]==="-"&&(Bt++,this.negative=1),Bt<_t.length&&(At===16?this._parseHex(_t,Bt,Tt):(this._parseBase(_t,At,Bt),Tt==="le"&&this._initArray(this.toArray(),At,Tt)))},it.prototype._initNumber=function(_t,At,Tt){_t<0&&(this.negative=1,_t=-_t),_t<67108864?(this.words=[_t&67108863],this.length=1):_t<4503599627370496?(this.words=[_t&67108863,_t/67108864&67108863],this.length=2):(rt(_t<9007199254740992),this.words=[_t&67108863,_t/67108864&67108863,1],this.length=3),Tt==="le"&&this._initArray(this.toArray(),At,Tt)},it.prototype._initArray=function(_t,At,Tt){if(rt(typeof _t.length=="number"),_t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(_t.length/3),this.words=new Array(this.length);for(var Bt=0;Bt=0;Bt-=3)Ut=_t[Bt]|_t[Bt-1]<<8|_t[Bt-2]<<16,this.words[Ot]|=Ut<>>26-Wt&67108863,Wt+=24,Wt>=26&&(Wt-=26,Ot++);else if(Tt==="le")for(Bt=0,Ot=0;Bt<_t.length;Bt+=3)Ut=_t[Bt]|_t[Bt+1]<<8|_t[Bt+2]<<16,this.words[Ot]|=Ut<>>26-Wt&67108863,Wt+=24,Wt>=26&&(Wt-=26,Ot++);return this._strip()};function st(Mt,_t){var At=Mt.charCodeAt(_t);if(At>=48&&At<=57)return At-48;if(At>=65&&At<=70)return At-55;if(At>=97&&At<=102)return At-87;rt(!1,"Invalid character in "+Mt)}function lt(Mt,_t,At){var Tt=st(Mt,At);return At-1>=_t&&(Tt|=st(Mt,At-1)<<4),Tt}it.prototype._parseHex=function(_t,At,Tt){this.length=Math.ceil((_t.length-At)/6),this.words=new Array(this.length);for(var Bt=0;Bt=At;Bt-=2)Wt=lt(_t,At,Bt)<=18?(Ot-=18,Ut+=1,this.words[Ut]|=Wt>>>26):Ot+=8;else{var Ct=_t.length-At;for(Bt=Ct%2===0?At+1:At;Bt<_t.length;Bt+=2)Wt=lt(_t,At,Bt)<=18?(Ot-=18,Ut+=1,this.words[Ut]|=Wt>>>26):Ot+=8}this._strip()};function dt(Mt,_t,At,Tt){for(var Bt=0,Ot=0,Ut=Math.min(Mt.length,At),Wt=_t;Wt=49?Ot=Ct-49+10:Ct>=17?Ot=Ct-17+10:Ot=Ct,rt(Ct>=0&&Ot1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},it.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{it.prototype[Symbol.for("nodejs.util.inspect.custom")]=pt}catch{it.prototype.inspect=pt}else it.prototype.inspect=pt;function pt(){return(this.red?""}var mt=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],gt=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],vt=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];it.prototype.toString=function(_t,At){_t=_t||10,At=At|0||1;var Tt;if(_t===16||_t==="hex"){Tt="";for(var Bt=0,Ot=0,Ut=0;Ut>>24-Bt&16777215,Bt+=2,Bt>=26&&(Bt-=26,Ut--),Ot!==0||Ut!==this.length-1?Tt=mt[6-Ct.length]+Ct+Tt:Tt=Ct+Tt}for(Ot!==0&&(Tt=Ot.toString(16)+Tt);Tt.length%At!==0;)Tt="0"+Tt;return this.negative!==0&&(Tt="-"+Tt),Tt}if(_t===(_t|0)&&_t>=2&&_t<=36){var St=gt[_t],Ft=vt[_t];Tt="";var Vt=this.clone();for(Vt.negative=0;!Vt.isZero();){var Rt=Vt.modrn(Ft).toString(_t);Vt=Vt.idivn(Ft),Vt.isZero()?Tt=Rt+Tt:Tt=mt[St-Rt.length]+Rt+Tt}for(this.isZero()&&(Tt="0"+Tt);Tt.length%At!==0;)Tt="0"+Tt;return this.negative!==0&&(Tt="-"+Tt),Tt}rt(!1,"Base should be between 2 and 36")},it.prototype.toNumber=function(){var _t=this.words[0];return this.length===2?_t+=this.words[1]*67108864:this.length===3&&this.words[2]===1?_t+=4503599627370496+this.words[1]*67108864:this.length>2&&rt(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-_t:_t},it.prototype.toJSON=function(){return this.toString(16,2)},at&&(it.prototype.toBuffer=function(_t,At){return this.toArrayLike(at,_t,At)}),it.prototype.toArray=function(_t,At){return this.toArrayLike(Array,_t,At)};var xt=function(_t,At){return _t.allocUnsafe?_t.allocUnsafe(At):new _t(At)};it.prototype.toArrayLike=function(_t,At,Tt){this._strip();var Bt=this.byteLength(),Ot=Tt||Math.max(1,Bt);rt(Bt<=Ot,"byte array longer than desired length"),rt(Ot>0,"Requested array length <= 0");var Ut=xt(_t,Ot),Wt=At==="le"?"LE":"BE";return this["_toArrayLike"+Wt](Ut,Bt),Ut},it.prototype._toArrayLikeLE=function(_t,At){for(var Tt=0,Bt=0,Ot=0,Ut=0;Ot>8&255),Tt<_t.length&&(_t[Tt++]=Wt>>16&255),Ut===6?(Tt<_t.length&&(_t[Tt++]=Wt>>24&255),Bt=0,Ut=0):(Bt=Wt>>>24,Ut+=2)}if(Tt<_t.length)for(_t[Tt++]=Bt;Tt<_t.length;)_t[Tt++]=0},it.prototype._toArrayLikeBE=function(_t,At){for(var Tt=_t.length-1,Bt=0,Ot=0,Ut=0;Ot=0&&(_t[Tt--]=Wt>>8&255),Tt>=0&&(_t[Tt--]=Wt>>16&255),Ut===6?(Tt>=0&&(_t[Tt--]=Wt>>24&255),Bt=0,Ut=0):(Bt=Wt>>>24,Ut+=2)}if(Tt>=0)for(_t[Tt--]=Bt;Tt>=0;)_t[Tt--]=0},Math.clz32?it.prototype._countBits=function(_t){return 32-Math.clz32(_t)}:it.prototype._countBits=function(_t){var At=_t,Tt=0;return At>=4096&&(Tt+=13,At>>>=13),At>=64&&(Tt+=7,At>>>=7),At>=8&&(Tt+=4,At>>>=4),At>=2&&(Tt+=2,At>>>=2),Tt+At},it.prototype._zeroBits=function(_t){if(_t===0)return 26;var At=_t,Tt=0;return At&8191||(Tt+=13,At>>>=13),At&127||(Tt+=7,At>>>=7),At&15||(Tt+=4,At>>>=4),At&3||(Tt+=2,At>>>=2),At&1||Tt++,Tt},it.prototype.bitLength=function(){var _t=this.words[this.length-1],At=this._countBits(_t);return(this.length-1)*26+At};function yt(Mt){for(var _t=new Array(Mt.bitLength()),At=0;At<_t.length;At++){var Tt=At/26|0,Bt=At%26;_t[At]=Mt.words[Tt]>>>Bt&1}return _t}it.prototype.zeroBits=function(){if(this.isZero())return 0;for(var _t=0,At=0;At_t.length?this.clone().ior(_t):_t.clone().ior(this)},it.prototype.uor=function(_t){return this.length>_t.length?this.clone().iuor(_t):_t.clone().iuor(this)},it.prototype.iuand=function(_t){var At;this.length>_t.length?At=_t:At=this;for(var Tt=0;Tt_t.length?this.clone().iand(_t):_t.clone().iand(this)},it.prototype.uand=function(_t){return this.length>_t.length?this.clone().iuand(_t):_t.clone().iuand(this)},it.prototype.iuxor=function(_t){var At,Tt;this.length>_t.length?(At=this,Tt=_t):(At=_t,Tt=this);for(var Bt=0;Bt_t.length?this.clone().ixor(_t):_t.clone().ixor(this)},it.prototype.uxor=function(_t){return this.length>_t.length?this.clone().iuxor(_t):_t.clone().iuxor(this)},it.prototype.inotn=function(_t){rt(typeof _t=="number"&&_t>=0);var At=Math.ceil(_t/26)|0,Tt=_t%26;this._expand(At),Tt>0&&At--;for(var Bt=0;Bt0&&(this.words[Bt]=~this.words[Bt]&67108863>>26-Tt),this._strip()},it.prototype.notn=function(_t){return this.clone().inotn(_t)},it.prototype.setn=function(_t,At){rt(typeof _t=="number"&&_t>=0);var Tt=_t/26|0,Bt=_t%26;return this._expand(Tt+1),At?this.words[Tt]=this.words[Tt]|1<_t.length?(Tt=this,Bt=_t):(Tt=_t,Bt=this);for(var Ot=0,Ut=0;Ut>>26;for(;Ot!==0&&Ut>>26;if(this.length=Tt.length,Ot!==0)this.words[this.length]=Ot,this.length++;else if(Tt!==this)for(;Ut_t.length?this.clone().iadd(_t):_t.clone().iadd(this)},it.prototype.isub=function(_t){if(_t.negative!==0){_t.negative=0;var At=this.iadd(_t);return _t.negative=1,At._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(_t),this.negative=1,this._normSign();var Tt=this.cmp(_t);if(Tt===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Bt,Ot;Tt>0?(Bt=this,Ot=_t):(Bt=_t,Ot=this);for(var Ut=0,Wt=0;Wt>26,this.words[Wt]=At&67108863;for(;Ut!==0&&Wt>26,this.words[Wt]=At&67108863;if(Ut===0&&Wt>>26,Vt=Ct&67108863,Rt=Math.min(St,_t.length-1),Kt=Math.max(0,St-Mt.length+1);Kt<=Rt;Kt++){var Zt=St-Kt|0;Bt=Mt.words[Zt]|0,Ot=_t.words[Kt]|0,Ut=Bt*Ot+Vt,Ft+=Ut/67108864|0,Vt=Ut&67108863}At.words[St]=Vt|0,Ct=Ft|0}return Ct!==0?At.words[St]=Ct|0:At.length--,At._strip()}var wt=function(_t,At,Tt){var Bt=_t.words,Ot=At.words,Ut=Tt.words,Wt=0,Ct,St,Ft,Vt=Bt[0]|0,Rt=Vt&8191,Kt=Vt>>>13,Zt=Bt[1]|0,Jt=Zt&8191,rr=Zt>>>13,or=Bt[2]|0,ar=or&8191,ir=or>>>13,pr=Bt[3]|0,nr=pr&8191,hr=pr>>>13,Ar=Bt[4]|0,ur=Ar&8191,vr=Ar>>>13,wr=Bt[5]|0,gr=wr&8191,yr=wr>>>13,Er=Bt[6]|0,_r=Er&8191,$r=Er>>>13,Dr=Bt[7]|0,kr=Dr&8191,zt=Dr>>>13,It=Bt[8]|0,Nt=It&8191,Gt=It>>>13,er=Bt[9]|0,Yt=er&8191,tr=er>>>13,dr=Ot[0]|0,br=dr&8191,Qt=dr>>>13,sr=Ot[1]|0,cr=sr&8191,xr=sr>>>13,Sr=Ot[2]|0,Pr=Sr&8191,Nr=Sr>>>13,Or=Ot[3]|0,Tr=Or&8191,Ir=Or>>>13,Ur=Ot[4]|0,Br=Ur&8191,Mr=Ur>>>13,Kr=Ot[5]|0,Lr=Kr&8191,Fr=Kr>>>13,Zr=Ot[6]|0,Rr=Zr&8191,jr=Zr>>>13,Yr=Ot[7]|0,Hr=Yr&8191,zr=Yr>>>13,nn=Ot[8]|0,Vr=nn&8191,qr=nn>>>13,on=Ot[9]|0,Wr=on&8191,Gr=on>>>13;Tt.negative=_t.negative^At.negative,Tt.length=19,Ct=Math.imul(Rt,br),St=Math.imul(Rt,Qt),St=St+Math.imul(Kt,br)|0,Ft=Math.imul(Kt,Qt);var Xr=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,Ct=Math.imul(Jt,br),St=Math.imul(Jt,Qt),St=St+Math.imul(rr,br)|0,Ft=Math.imul(rr,Qt),Ct=Ct+Math.imul(Rt,cr)|0,St=St+Math.imul(Rt,xr)|0,St=St+Math.imul(Kt,cr)|0,Ft=Ft+Math.imul(Kt,xr)|0;var Qr=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,Ct=Math.imul(ar,br),St=Math.imul(ar,Qt),St=St+Math.imul(ir,br)|0,Ft=Math.imul(ir,Qt),Ct=Ct+Math.imul(Jt,cr)|0,St=St+Math.imul(Jt,xr)|0,St=St+Math.imul(rr,cr)|0,Ft=Ft+Math.imul(rr,xr)|0,Ct=Ct+Math.imul(Rt,Pr)|0,St=St+Math.imul(Rt,Nr)|0,St=St+Math.imul(Kt,Pr)|0,Ft=Ft+Math.imul(Kt,Nr)|0;var en=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(en>>>26)|0,en&=67108863,Ct=Math.imul(nr,br),St=Math.imul(nr,Qt),St=St+Math.imul(hr,br)|0,Ft=Math.imul(hr,Qt),Ct=Ct+Math.imul(ar,cr)|0,St=St+Math.imul(ar,xr)|0,St=St+Math.imul(ir,cr)|0,Ft=Ft+Math.imul(ir,xr)|0,Ct=Ct+Math.imul(Jt,Pr)|0,St=St+Math.imul(Jt,Nr)|0,St=St+Math.imul(rr,Pr)|0,Ft=Ft+Math.imul(rr,Nr)|0,Ct=Ct+Math.imul(Rt,Tr)|0,St=St+Math.imul(Rt,Ir)|0,St=St+Math.imul(Kt,Tr)|0,Ft=Ft+Math.imul(Kt,Ir)|0;var tn=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(tn>>>26)|0,tn&=67108863,Ct=Math.imul(ur,br),St=Math.imul(ur,Qt),St=St+Math.imul(vr,br)|0,Ft=Math.imul(vr,Qt),Ct=Ct+Math.imul(nr,cr)|0,St=St+Math.imul(nr,xr)|0,St=St+Math.imul(hr,cr)|0,Ft=Ft+Math.imul(hr,xr)|0,Ct=Ct+Math.imul(ar,Pr)|0,St=St+Math.imul(ar,Nr)|0,St=St+Math.imul(ir,Pr)|0,Ft=Ft+Math.imul(ir,Nr)|0,Ct=Ct+Math.imul(Jt,Tr)|0,St=St+Math.imul(Jt,Ir)|0,St=St+Math.imul(rr,Tr)|0,Ft=Ft+Math.imul(rr,Ir)|0,Ct=Ct+Math.imul(Rt,Br)|0,St=St+Math.imul(Rt,Mr)|0,St=St+Math.imul(Kt,Br)|0,Ft=Ft+Math.imul(Kt,Mr)|0;var rn=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(rn>>>26)|0,rn&=67108863,Ct=Math.imul(gr,br),St=Math.imul(gr,Qt),St=St+Math.imul(yr,br)|0,Ft=Math.imul(yr,Qt),Ct=Ct+Math.imul(ur,cr)|0,St=St+Math.imul(ur,xr)|0,St=St+Math.imul(vr,cr)|0,Ft=Ft+Math.imul(vr,xr)|0,Ct=Ct+Math.imul(nr,Pr)|0,St=St+Math.imul(nr,Nr)|0,St=St+Math.imul(hr,Pr)|0,Ft=Ft+Math.imul(hr,Nr)|0,Ct=Ct+Math.imul(ar,Tr)|0,St=St+Math.imul(ar,Ir)|0,St=St+Math.imul(ir,Tr)|0,Ft=Ft+Math.imul(ir,Ir)|0,Ct=Ct+Math.imul(Jt,Br)|0,St=St+Math.imul(Jt,Mr)|0,St=St+Math.imul(rr,Br)|0,Ft=Ft+Math.imul(rr,Mr)|0,Ct=Ct+Math.imul(Rt,Lr)|0,St=St+Math.imul(Rt,Fr)|0,St=St+Math.imul(Kt,Lr)|0,Ft=Ft+Math.imul(Kt,Fr)|0;var an=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(an>>>26)|0,an&=67108863,Ct=Math.imul(_r,br),St=Math.imul(_r,Qt),St=St+Math.imul($r,br)|0,Ft=Math.imul($r,Qt),Ct=Ct+Math.imul(gr,cr)|0,St=St+Math.imul(gr,xr)|0,St=St+Math.imul(yr,cr)|0,Ft=Ft+Math.imul(yr,xr)|0,Ct=Ct+Math.imul(ur,Pr)|0,St=St+Math.imul(ur,Nr)|0,St=St+Math.imul(vr,Pr)|0,Ft=Ft+Math.imul(vr,Nr)|0,Ct=Ct+Math.imul(nr,Tr)|0,St=St+Math.imul(nr,Ir)|0,St=St+Math.imul(hr,Tr)|0,Ft=Ft+Math.imul(hr,Ir)|0,Ct=Ct+Math.imul(ar,Br)|0,St=St+Math.imul(ar,Mr)|0,St=St+Math.imul(ir,Br)|0,Ft=Ft+Math.imul(ir,Mr)|0,Ct=Ct+Math.imul(Jt,Lr)|0,St=St+Math.imul(Jt,Fr)|0,St=St+Math.imul(rr,Lr)|0,Ft=Ft+Math.imul(rr,Fr)|0,Ct=Ct+Math.imul(Rt,Rr)|0,St=St+Math.imul(Rt,jr)|0,St=St+Math.imul(Kt,Rr)|0,Ft=Ft+Math.imul(Kt,jr)|0;var sn=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(sn>>>26)|0,sn&=67108863,Ct=Math.imul(kr,br),St=Math.imul(kr,Qt),St=St+Math.imul(zt,br)|0,Ft=Math.imul(zt,Qt),Ct=Ct+Math.imul(_r,cr)|0,St=St+Math.imul(_r,xr)|0,St=St+Math.imul($r,cr)|0,Ft=Ft+Math.imul($r,xr)|0,Ct=Ct+Math.imul(gr,Pr)|0,St=St+Math.imul(gr,Nr)|0,St=St+Math.imul(yr,Pr)|0,Ft=Ft+Math.imul(yr,Nr)|0,Ct=Ct+Math.imul(ur,Tr)|0,St=St+Math.imul(ur,Ir)|0,St=St+Math.imul(vr,Tr)|0,Ft=Ft+Math.imul(vr,Ir)|0,Ct=Ct+Math.imul(nr,Br)|0,St=St+Math.imul(nr,Mr)|0,St=St+Math.imul(hr,Br)|0,Ft=Ft+Math.imul(hr,Mr)|0,Ct=Ct+Math.imul(ar,Lr)|0,St=St+Math.imul(ar,Fr)|0,St=St+Math.imul(ir,Lr)|0,Ft=Ft+Math.imul(ir,Fr)|0,Ct=Ct+Math.imul(Jt,Rr)|0,St=St+Math.imul(Jt,jr)|0,St=St+Math.imul(rr,Rr)|0,Ft=Ft+Math.imul(rr,jr)|0,Ct=Ct+Math.imul(Rt,Hr)|0,St=St+Math.imul(Rt,zr)|0,St=St+Math.imul(Kt,Hr)|0,Ft=Ft+Math.imul(Kt,zr)|0;var cn=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(cn>>>26)|0,cn&=67108863,Ct=Math.imul(Nt,br),St=Math.imul(Nt,Qt),St=St+Math.imul(Gt,br)|0,Ft=Math.imul(Gt,Qt),Ct=Ct+Math.imul(kr,cr)|0,St=St+Math.imul(kr,xr)|0,St=St+Math.imul(zt,cr)|0,Ft=Ft+Math.imul(zt,xr)|0,Ct=Ct+Math.imul(_r,Pr)|0,St=St+Math.imul(_r,Nr)|0,St=St+Math.imul($r,Pr)|0,Ft=Ft+Math.imul($r,Nr)|0,Ct=Ct+Math.imul(gr,Tr)|0,St=St+Math.imul(gr,Ir)|0,St=St+Math.imul(yr,Tr)|0,Ft=Ft+Math.imul(yr,Ir)|0,Ct=Ct+Math.imul(ur,Br)|0,St=St+Math.imul(ur,Mr)|0,St=St+Math.imul(vr,Br)|0,Ft=Ft+Math.imul(vr,Mr)|0,Ct=Ct+Math.imul(nr,Lr)|0,St=St+Math.imul(nr,Fr)|0,St=St+Math.imul(hr,Lr)|0,Ft=Ft+Math.imul(hr,Fr)|0,Ct=Ct+Math.imul(ar,Rr)|0,St=St+Math.imul(ar,jr)|0,St=St+Math.imul(ir,Rr)|0,Ft=Ft+Math.imul(ir,jr)|0,Ct=Ct+Math.imul(Jt,Hr)|0,St=St+Math.imul(Jt,zr)|0,St=St+Math.imul(rr,Hr)|0,Ft=Ft+Math.imul(rr,zr)|0,Ct=Ct+Math.imul(Rt,Vr)|0,St=St+Math.imul(Rt,qr)|0,St=St+Math.imul(Kt,Vr)|0,Ft=Ft+Math.imul(Kt,qr)|0;var ln=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(ln>>>26)|0,ln&=67108863,Ct=Math.imul(Yt,br),St=Math.imul(Yt,Qt),St=St+Math.imul(tr,br)|0,Ft=Math.imul(tr,Qt),Ct=Ct+Math.imul(Nt,cr)|0,St=St+Math.imul(Nt,xr)|0,St=St+Math.imul(Gt,cr)|0,Ft=Ft+Math.imul(Gt,xr)|0,Ct=Ct+Math.imul(kr,Pr)|0,St=St+Math.imul(kr,Nr)|0,St=St+Math.imul(zt,Pr)|0,Ft=Ft+Math.imul(zt,Nr)|0,Ct=Ct+Math.imul(_r,Tr)|0,St=St+Math.imul(_r,Ir)|0,St=St+Math.imul($r,Tr)|0,Ft=Ft+Math.imul($r,Ir)|0,Ct=Ct+Math.imul(gr,Br)|0,St=St+Math.imul(gr,Mr)|0,St=St+Math.imul(yr,Br)|0,Ft=Ft+Math.imul(yr,Mr)|0,Ct=Ct+Math.imul(ur,Lr)|0,St=St+Math.imul(ur,Fr)|0,St=St+Math.imul(vr,Lr)|0,Ft=Ft+Math.imul(vr,Fr)|0,Ct=Ct+Math.imul(nr,Rr)|0,St=St+Math.imul(nr,jr)|0,St=St+Math.imul(hr,Rr)|0,Ft=Ft+Math.imul(hr,jr)|0,Ct=Ct+Math.imul(ar,Hr)|0,St=St+Math.imul(ar,zr)|0,St=St+Math.imul(ir,Hr)|0,Ft=Ft+Math.imul(ir,zr)|0,Ct=Ct+Math.imul(Jt,Vr)|0,St=St+Math.imul(Jt,qr)|0,St=St+Math.imul(rr,Vr)|0,Ft=Ft+Math.imul(rr,qr)|0,Ct=Ct+Math.imul(Rt,Wr)|0,St=St+Math.imul(Rt,Gr)|0,St=St+Math.imul(Kt,Wr)|0,Ft=Ft+Math.imul(Kt,Gr)|0;var un=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(un>>>26)|0,un&=67108863,Ct=Math.imul(Yt,cr),St=Math.imul(Yt,xr),St=St+Math.imul(tr,cr)|0,Ft=Math.imul(tr,xr),Ct=Ct+Math.imul(Nt,Pr)|0,St=St+Math.imul(Nt,Nr)|0,St=St+Math.imul(Gt,Pr)|0,Ft=Ft+Math.imul(Gt,Nr)|0,Ct=Ct+Math.imul(kr,Tr)|0,St=St+Math.imul(kr,Ir)|0,St=St+Math.imul(zt,Tr)|0,Ft=Ft+Math.imul(zt,Ir)|0,Ct=Ct+Math.imul(_r,Br)|0,St=St+Math.imul(_r,Mr)|0,St=St+Math.imul($r,Br)|0,Ft=Ft+Math.imul($r,Mr)|0,Ct=Ct+Math.imul(gr,Lr)|0,St=St+Math.imul(gr,Fr)|0,St=St+Math.imul(yr,Lr)|0,Ft=Ft+Math.imul(yr,Fr)|0,Ct=Ct+Math.imul(ur,Rr)|0,St=St+Math.imul(ur,jr)|0,St=St+Math.imul(vr,Rr)|0,Ft=Ft+Math.imul(vr,jr)|0,Ct=Ct+Math.imul(nr,Hr)|0,St=St+Math.imul(nr,zr)|0,St=St+Math.imul(hr,Hr)|0,Ft=Ft+Math.imul(hr,zr)|0,Ct=Ct+Math.imul(ar,Vr)|0,St=St+Math.imul(ar,qr)|0,St=St+Math.imul(ir,Vr)|0,Ft=Ft+Math.imul(ir,qr)|0,Ct=Ct+Math.imul(Jt,Wr)|0,St=St+Math.imul(Jt,Gr)|0,St=St+Math.imul(rr,Wr)|0,Ft=Ft+Math.imul(rr,Gr)|0;var fn=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(fn>>>26)|0,fn&=67108863,Ct=Math.imul(Yt,Pr),St=Math.imul(Yt,Nr),St=St+Math.imul(tr,Pr)|0,Ft=Math.imul(tr,Nr),Ct=Ct+Math.imul(Nt,Tr)|0,St=St+Math.imul(Nt,Ir)|0,St=St+Math.imul(Gt,Tr)|0,Ft=Ft+Math.imul(Gt,Ir)|0,Ct=Ct+Math.imul(kr,Br)|0,St=St+Math.imul(kr,Mr)|0,St=St+Math.imul(zt,Br)|0,Ft=Ft+Math.imul(zt,Mr)|0,Ct=Ct+Math.imul(_r,Lr)|0,St=St+Math.imul(_r,Fr)|0,St=St+Math.imul($r,Lr)|0,Ft=Ft+Math.imul($r,Fr)|0,Ct=Ct+Math.imul(gr,Rr)|0,St=St+Math.imul(gr,jr)|0,St=St+Math.imul(yr,Rr)|0,Ft=Ft+Math.imul(yr,jr)|0,Ct=Ct+Math.imul(ur,Hr)|0,St=St+Math.imul(ur,zr)|0,St=St+Math.imul(vr,Hr)|0,Ft=Ft+Math.imul(vr,zr)|0,Ct=Ct+Math.imul(nr,Vr)|0,St=St+Math.imul(nr,qr)|0,St=St+Math.imul(hr,Vr)|0,Ft=Ft+Math.imul(hr,qr)|0,Ct=Ct+Math.imul(ar,Wr)|0,St=St+Math.imul(ar,Gr)|0,St=St+Math.imul(ir,Wr)|0,Ft=Ft+Math.imul(ir,Gr)|0;var dn=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(dn>>>26)|0,dn&=67108863,Ct=Math.imul(Yt,Tr),St=Math.imul(Yt,Ir),St=St+Math.imul(tr,Tr)|0,Ft=Math.imul(tr,Ir),Ct=Ct+Math.imul(Nt,Br)|0,St=St+Math.imul(Nt,Mr)|0,St=St+Math.imul(Gt,Br)|0,Ft=Ft+Math.imul(Gt,Mr)|0,Ct=Ct+Math.imul(kr,Lr)|0,St=St+Math.imul(kr,Fr)|0,St=St+Math.imul(zt,Lr)|0,Ft=Ft+Math.imul(zt,Fr)|0,Ct=Ct+Math.imul(_r,Rr)|0,St=St+Math.imul(_r,jr)|0,St=St+Math.imul($r,Rr)|0,Ft=Ft+Math.imul($r,jr)|0,Ct=Ct+Math.imul(gr,Hr)|0,St=St+Math.imul(gr,zr)|0,St=St+Math.imul(yr,Hr)|0,Ft=Ft+Math.imul(yr,zr)|0,Ct=Ct+Math.imul(ur,Vr)|0,St=St+Math.imul(ur,qr)|0,St=St+Math.imul(vr,Vr)|0,Ft=Ft+Math.imul(vr,qr)|0,Ct=Ct+Math.imul(nr,Wr)|0,St=St+Math.imul(nr,Gr)|0,St=St+Math.imul(hr,Wr)|0,Ft=Ft+Math.imul(hr,Gr)|0;var hn=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(hn>>>26)|0,hn&=67108863,Ct=Math.imul(Yt,Br),St=Math.imul(Yt,Mr),St=St+Math.imul(tr,Br)|0,Ft=Math.imul(tr,Mr),Ct=Ct+Math.imul(Nt,Lr)|0,St=St+Math.imul(Nt,Fr)|0,St=St+Math.imul(Gt,Lr)|0,Ft=Ft+Math.imul(Gt,Fr)|0,Ct=Ct+Math.imul(kr,Rr)|0,St=St+Math.imul(kr,jr)|0,St=St+Math.imul(zt,Rr)|0,Ft=Ft+Math.imul(zt,jr)|0,Ct=Ct+Math.imul(_r,Hr)|0,St=St+Math.imul(_r,zr)|0,St=St+Math.imul($r,Hr)|0,Ft=Ft+Math.imul($r,zr)|0,Ct=Ct+Math.imul(gr,Vr)|0,St=St+Math.imul(gr,qr)|0,St=St+Math.imul(yr,Vr)|0,Ft=Ft+Math.imul(yr,qr)|0,Ct=Ct+Math.imul(ur,Wr)|0,St=St+Math.imul(ur,Gr)|0,St=St+Math.imul(vr,Wr)|0,Ft=Ft+Math.imul(vr,Gr)|0;var pn=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(pn>>>26)|0,pn&=67108863,Ct=Math.imul(Yt,Lr),St=Math.imul(Yt,Fr),St=St+Math.imul(tr,Lr)|0,Ft=Math.imul(tr,Fr),Ct=Ct+Math.imul(Nt,Rr)|0,St=St+Math.imul(Nt,jr)|0,St=St+Math.imul(Gt,Rr)|0,Ft=Ft+Math.imul(Gt,jr)|0,Ct=Ct+Math.imul(kr,Hr)|0,St=St+Math.imul(kr,zr)|0,St=St+Math.imul(zt,Hr)|0,Ft=Ft+Math.imul(zt,zr)|0,Ct=Ct+Math.imul(_r,Vr)|0,St=St+Math.imul(_r,qr)|0,St=St+Math.imul($r,Vr)|0,Ft=Ft+Math.imul($r,qr)|0,Ct=Ct+Math.imul(gr,Wr)|0,St=St+Math.imul(gr,Gr)|0,St=St+Math.imul(yr,Wr)|0,Ft=Ft+Math.imul(yr,Gr)|0;var mn=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(mn>>>26)|0,mn&=67108863,Ct=Math.imul(Yt,Rr),St=Math.imul(Yt,jr),St=St+Math.imul(tr,Rr)|0,Ft=Math.imul(tr,jr),Ct=Ct+Math.imul(Nt,Hr)|0,St=St+Math.imul(Nt,zr)|0,St=St+Math.imul(Gt,Hr)|0,Ft=Ft+Math.imul(Gt,zr)|0,Ct=Ct+Math.imul(kr,Vr)|0,St=St+Math.imul(kr,qr)|0,St=St+Math.imul(zt,Vr)|0,Ft=Ft+Math.imul(zt,qr)|0,Ct=Ct+Math.imul(_r,Wr)|0,St=St+Math.imul(_r,Gr)|0,St=St+Math.imul($r,Wr)|0,Ft=Ft+Math.imul($r,Gr)|0;var gn=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(gn>>>26)|0,gn&=67108863,Ct=Math.imul(Yt,Hr),St=Math.imul(Yt,zr),St=St+Math.imul(tr,Hr)|0,Ft=Math.imul(tr,zr),Ct=Ct+Math.imul(Nt,Vr)|0,St=St+Math.imul(Nt,qr)|0,St=St+Math.imul(Gt,Vr)|0,Ft=Ft+Math.imul(Gt,qr)|0,Ct=Ct+Math.imul(kr,Wr)|0,St=St+Math.imul(kr,Gr)|0,St=St+Math.imul(zt,Wr)|0,Ft=Ft+Math.imul(zt,Gr)|0;var yn=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(yn>>>26)|0,yn&=67108863,Ct=Math.imul(Yt,Vr),St=Math.imul(Yt,qr),St=St+Math.imul(tr,Vr)|0,Ft=Math.imul(tr,qr),Ct=Ct+Math.imul(Nt,Wr)|0,St=St+Math.imul(Nt,Gr)|0,St=St+Math.imul(Gt,Wr)|0,Ft=Ft+Math.imul(Gt,Gr)|0;var xn=(Wt+Ct|0)+((St&8191)<<13)|0;Wt=(Ft+(St>>>13)|0)+(xn>>>26)|0,xn&=67108863,Ct=Math.imul(Yt,Wr),St=Math.imul(Yt,Gr),St=St+Math.imul(tr,Wr)|0,Ft=Math.imul(tr,Gr);var vn=(Wt+Ct|0)+((St&8191)<<13)|0;return Wt=(Ft+(St>>>13)|0)+(vn>>>26)|0,vn&=67108863,Ut[0]=Xr,Ut[1]=Qr,Ut[2]=en,Ut[3]=tn,Ut[4]=rn,Ut[5]=an,Ut[6]=sn,Ut[7]=cn,Ut[8]=ln,Ut[9]=un,Ut[10]=fn,Ut[11]=dn,Ut[12]=hn,Ut[13]=pn,Ut[14]=mn,Ut[15]=gn,Ut[16]=yn,Ut[17]=xn,Ut[18]=vn,Wt!==0&&(Ut[19]=Wt,Tt.length++),Tt};Math.imul||(wt=bt);function Et(Mt,_t,At){At.negative=_t.negative^Mt.negative,At.length=Mt.length+_t.length;for(var Tt=0,Bt=0,Ot=0;Ot>>26)|0,Bt+=Ut>>>26,Ut&=67108863}At.words[Ot]=Wt,Tt=Ut,Ut=Bt}return Tt!==0?At.words[Ot]=Tt:At.length--,At._strip()}function $t(Mt,_t,At){return Et(Mt,_t,At)}it.prototype.mulTo=function(_t,At){var Tt,Bt=this.length+_t.length;return this.length===10&&_t.length===10?Tt=wt(this,_t,At):Bt<63?Tt=bt(this,_t,At):Bt<1024?Tt=Et(this,_t,At):Tt=$t(this,_t,At),Tt},it.prototype.mul=function(_t){var At=new it(null);return At.words=new Array(this.length+_t.length),this.mulTo(_t,At)},it.prototype.mulf=function(_t){var At=new it(null);return At.words=new Array(this.length+_t.length),$t(this,_t,At)},it.prototype.imul=function(_t){return this.clone().mulTo(_t,this)},it.prototype.imuln=function(_t){var At=_t<0;At&&(_t=-_t),rt(typeof _t=="number"),rt(_t<67108864);for(var Tt=0,Bt=0;Bt>=26,Tt+=Ot/67108864|0,Tt+=Ut>>>26,this.words[Bt]=Ut&67108863}return Tt!==0&&(this.words[Bt]=Tt,this.length++),At?this.ineg():this},it.prototype.muln=function(_t){return this.clone().imuln(_t)},it.prototype.sqr=function(){return this.mul(this)},it.prototype.isqr=function(){return this.imul(this.clone())},it.prototype.pow=function(_t){var At=yt(_t);if(At.length===0)return new it(1);for(var Tt=this,Bt=0;Bt=0);var At=_t%26,Tt=(_t-At)/26,Bt=67108863>>>26-At<<26-At,Ot;if(At!==0){var Ut=0;for(Ot=0;Ot>>26-At}Ut&&(this.words[Ot]=Ut,this.length++)}if(Tt!==0){for(Ot=this.length-1;Ot>=0;Ot--)this.words[Ot+Tt]=this.words[Ot];for(Ot=0;Ot=0);var Bt;At?Bt=(At-At%26)/26:Bt=0;var Ot=_t%26,Ut=Math.min((_t-Ot)/26,this.length),Wt=67108863^67108863>>>Ot<Ut)for(this.length-=Ut,St=0;St=0&&(Ft!==0||St>=Bt);St--){var Vt=this.words[St]|0;this.words[St]=Ft<<26-Ot|Vt>>>Ot,Ft=Vt&Wt}return Ct&&Ft!==0&&(Ct.words[Ct.length++]=Ft),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},it.prototype.ishrn=function(_t,At,Tt){return rt(this.negative===0),this.iushrn(_t,At,Tt)},it.prototype.shln=function(_t){return this.clone().ishln(_t)},it.prototype.ushln=function(_t){return this.clone().iushln(_t)},it.prototype.shrn=function(_t){return this.clone().ishrn(_t)},it.prototype.ushrn=function(_t){return this.clone().iushrn(_t)},it.prototype.testn=function(_t){rt(typeof _t=="number"&&_t>=0);var At=_t%26,Tt=(_t-At)/26,Bt=1<=0);var At=_t%26,Tt=(_t-At)/26;if(rt(this.negative===0,"imaskn works only with positive numbers"),this.length<=Tt)return this;if(At!==0&&Tt++,this.length=Math.min(Tt,this.length),At!==0){var Bt=67108863^67108863>>>At<=67108864;At++)this.words[At]-=67108864,At===this.length-1?this.words[At+1]=1:this.words[At+1]++;return this.length=Math.max(this.length,At+1),this},it.prototype.isubn=function(_t){if(rt(typeof _t=="number"),rt(_t<67108864),_t<0)return this.iaddn(-_t);if(this.negative!==0)return this.negative=0,this.iaddn(_t),this.negative=1,this;if(this.words[0]-=_t,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var At=0;At>26)-(Ct/67108864|0),this.words[Ot+Tt]=Ut&67108863}for(;Ot>26,this.words[Ot+Tt]=Ut&67108863;if(Wt===0)return this._strip();for(rt(Wt===-1),Wt=0,Ot=0;Ot>26,this.words[Ot]=Ut&67108863;return this.negative=1,this._strip()},it.prototype._wordDiv=function(_t,At){var Tt=this.length-_t.length,Bt=this.clone(),Ot=_t,Ut=Ot.words[Ot.length-1]|0,Wt=this._countBits(Ut);Tt=26-Wt,Tt!==0&&(Ot=Ot.ushln(Tt),Bt.iushln(Tt),Ut=Ot.words[Ot.length-1]|0);var Ct=Bt.length-Ot.length,St;if(At!=="mod"){St=new it(null),St.length=Ct+1,St.words=new Array(St.length);for(var Ft=0;Ft=0;Rt--){var Kt=(Bt.words[Ot.length+Rt]|0)*67108864+(Bt.words[Ot.length+Rt-1]|0);for(Kt=Math.min(Kt/Ut|0,67108863),Bt._ishlnsubmul(Ot,Kt,Rt);Bt.negative!==0;)Kt--,Bt.negative=0,Bt._ishlnsubmul(Ot,1,Rt),Bt.isZero()||(Bt.negative^=1);St&&(St.words[Rt]=Kt)}return St&&St._strip(),Bt._strip(),At!=="div"&&Tt!==0&&Bt.iushrn(Tt),{div:St||null,mod:Bt}},it.prototype.divmod=function(_t,At,Tt){if(rt(!_t.isZero()),this.isZero())return{div:new it(0),mod:new it(0)};var Bt,Ot,Ut;return this.negative!==0&&_t.negative===0?(Ut=this.neg().divmod(_t,At),At!=="mod"&&(Bt=Ut.div.neg()),At!=="div"&&(Ot=Ut.mod.neg(),Tt&&Ot.negative!==0&&Ot.iadd(_t)),{div:Bt,mod:Ot}):this.negative===0&&_t.negative!==0?(Ut=this.divmod(_t.neg(),At),At!=="mod"&&(Bt=Ut.div.neg()),{div:Bt,mod:Ut.mod}):this.negative&_t.negative?(Ut=this.neg().divmod(_t.neg(),At),At!=="div"&&(Ot=Ut.mod.neg(),Tt&&Ot.negative!==0&&Ot.isub(_t)),{div:Ut.div,mod:Ot}):_t.length>this.length||this.cmp(_t)<0?{div:new it(0),mod:this}:_t.length===1?At==="div"?{div:this.divn(_t.words[0]),mod:null}:At==="mod"?{div:null,mod:new it(this.modrn(_t.words[0]))}:{div:this.divn(_t.words[0]),mod:new it(this.modrn(_t.words[0]))}:this._wordDiv(_t,At)},it.prototype.div=function(_t){return this.divmod(_t,"div",!1).div},it.prototype.mod=function(_t){return this.divmod(_t,"mod",!1).mod},it.prototype.umod=function(_t){return this.divmod(_t,"mod",!0).mod},it.prototype.divRound=function(_t){var At=this.divmod(_t);if(At.mod.isZero())return At.div;var Tt=At.div.negative!==0?At.mod.isub(_t):At.mod,Bt=_t.ushrn(1),Ot=_t.andln(1),Ut=Tt.cmp(Bt);return Ut<0||Ot===1&&Ut===0?At.div:At.div.negative!==0?At.div.isubn(1):At.div.iaddn(1)},it.prototype.modrn=function(_t){var At=_t<0;At&&(_t=-_t),rt(_t<=67108863);for(var Tt=(1<<26)%_t,Bt=0,Ot=this.length-1;Ot>=0;Ot--)Bt=(Tt*Bt+(this.words[Ot]|0))%_t;return At?-Bt:Bt},it.prototype.modn=function(_t){return this.modrn(_t)},it.prototype.idivn=function(_t){var At=_t<0;At&&(_t=-_t),rt(_t<=67108863);for(var Tt=0,Bt=this.length-1;Bt>=0;Bt--){var Ot=(this.words[Bt]|0)+Tt*67108864;this.words[Bt]=Ot/_t|0,Tt=Ot%_t}return this._strip(),At?this.ineg():this},it.prototype.divn=function(_t){return this.clone().idivn(_t)},it.prototype.egcd=function(_t){rt(_t.negative===0),rt(!_t.isZero());var At=this,Tt=_t.clone();At.negative!==0?At=At.umod(_t):At=At.clone();for(var Bt=new it(1),Ot=new it(0),Ut=new it(0),Wt=new it(1),Ct=0;At.isEven()&&Tt.isEven();)At.iushrn(1),Tt.iushrn(1),++Ct;for(var St=Tt.clone(),Ft=At.clone();!At.isZero();){for(var Vt=0,Rt=1;!(At.words[0]&Rt)&&Vt<26;++Vt,Rt<<=1);if(Vt>0)for(At.iushrn(Vt);Vt-- >0;)(Bt.isOdd()||Ot.isOdd())&&(Bt.iadd(St),Ot.isub(Ft)),Bt.iushrn(1),Ot.iushrn(1);for(var Kt=0,Zt=1;!(Tt.words[0]&Zt)&&Kt<26;++Kt,Zt<<=1);if(Kt>0)for(Tt.iushrn(Kt);Kt-- >0;)(Ut.isOdd()||Wt.isOdd())&&(Ut.iadd(St),Wt.isub(Ft)),Ut.iushrn(1),Wt.iushrn(1);At.cmp(Tt)>=0?(At.isub(Tt),Bt.isub(Ut),Ot.isub(Wt)):(Tt.isub(At),Ut.isub(Bt),Wt.isub(Ot))}return{a:Ut,b:Wt,gcd:Tt.iushln(Ct)}},it.prototype._invmp=function(_t){rt(_t.negative===0),rt(!_t.isZero());var At=this,Tt=_t.clone();At.negative!==0?At=At.umod(_t):At=At.clone();for(var Bt=new it(1),Ot=new it(0),Ut=Tt.clone();At.cmpn(1)>0&&Tt.cmpn(1)>0;){for(var Wt=0,Ct=1;!(At.words[0]&Ct)&&Wt<26;++Wt,Ct<<=1);if(Wt>0)for(At.iushrn(Wt);Wt-- >0;)Bt.isOdd()&&Bt.iadd(Ut),Bt.iushrn(1);for(var St=0,Ft=1;!(Tt.words[0]&Ft)&&St<26;++St,Ft<<=1);if(St>0)for(Tt.iushrn(St);St-- >0;)Ot.isOdd()&&Ot.iadd(Ut),Ot.iushrn(1);At.cmp(Tt)>=0?(At.isub(Tt),Bt.isub(Ot)):(Tt.isub(At),Ot.isub(Bt))}var Vt;return At.cmpn(1)===0?Vt=Bt:Vt=Ot,Vt.cmpn(0)<0&&Vt.iadd(_t),Vt},it.prototype.gcd=function(_t){if(this.isZero())return _t.abs();if(_t.isZero())return this.abs();var At=this.clone(),Tt=_t.clone();At.negative=0,Tt.negative=0;for(var Bt=0;At.isEven()&&Tt.isEven();Bt++)At.iushrn(1),Tt.iushrn(1);do{for(;At.isEven();)At.iushrn(1);for(;Tt.isEven();)Tt.iushrn(1);var Ot=At.cmp(Tt);if(Ot<0){var Ut=At;At=Tt,Tt=Ut}else if(Ot===0||Tt.cmpn(1)===0)break;At.isub(Tt)}while(!0);return Tt.iushln(Bt)},it.prototype.invm=function(_t){return this.egcd(_t).a.umod(_t)},it.prototype.isEven=function(){return(this.words[0]&1)===0},it.prototype.isOdd=function(){return(this.words[0]&1)===1},it.prototype.andln=function(_t){return this.words[0]&_t},it.prototype.bincn=function(_t){rt(typeof _t=="number");var At=_t%26,Tt=(_t-At)/26,Bt=1<>>26,Wt&=67108863,this.words[Ut]=Wt}return Ot!==0&&(this.words[Ut]=Ot,this.length++),this},it.prototype.isZero=function(){return this.length===1&&this.words[0]===0},it.prototype.cmpn=function(_t){var At=_t<0;if(this.negative!==0&&!At)return-1;if(this.negative===0&&At)return 1;this._strip();var Tt;if(this.length>1)Tt=1;else{At&&(_t=-_t),rt(_t<=67108863,"Number is too big");var Bt=this.words[0]|0;Tt=Bt===_t?0:Bt<_t?-1:1}return this.negative!==0?-Tt|0:Tt},it.prototype.cmp=function(_t){if(this.negative!==0&&_t.negative===0)return-1;if(this.negative===0&&_t.negative!==0)return 1;var At=this.ucmp(_t);return this.negative!==0?-At|0:At},it.prototype.ucmp=function(_t){if(this.length>_t.length)return 1;if(this.length<_t.length)return-1;for(var At=0,Tt=this.length-1;Tt>=0;Tt--){var Bt=this.words[Tt]|0,Ot=_t.words[Tt]|0;if(Bt!==Ot){BtOt&&(At=1);break}}return At},it.prototype.gtn=function(_t){return this.cmpn(_t)===1},it.prototype.gt=function(_t){return this.cmp(_t)===1},it.prototype.gten=function(_t){return this.cmpn(_t)>=0},it.prototype.gte=function(_t){return this.cmp(_t)>=0},it.prototype.ltn=function(_t){return this.cmpn(_t)===-1},it.prototype.lt=function(_t){return this.cmp(_t)===-1},it.prototype.lten=function(_t){return this.cmpn(_t)<=0},it.prototype.lte=function(_t){return this.cmp(_t)<=0},it.prototype.eqn=function(_t){return this.cmpn(_t)===0},it.prototype.eq=function(_t){return this.cmp(_t)===0},it.red=function(_t){return new Ht(_t)},it.prototype.toRed=function(_t){return rt(!this.red,"Already a number in reduction context"),rt(this.negative===0,"red works only with positives"),_t.convertTo(this)._forceRed(_t)},it.prototype.fromRed=function(){return rt(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},it.prototype._forceRed=function(_t){return this.red=_t,this},it.prototype.forceRed=function(_t){return rt(!this.red,"Already a number in reduction context"),this._forceRed(_t)},it.prototype.redAdd=function(_t){return rt(this.red,"redAdd works only with red numbers"),this.red.add(this,_t)},it.prototype.redIAdd=function(_t){return rt(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,_t)},it.prototype.redSub=function(_t){return rt(this.red,"redSub works only with red numbers"),this.red.sub(this,_t)},it.prototype.redISub=function(_t){return rt(this.red,"redISub works only with red numbers"),this.red.isub(this,_t)},it.prototype.redShl=function(_t){return rt(this.red,"redShl works only with red numbers"),this.red.shl(this,_t)},it.prototype.redMul=function(_t){return rt(this.red,"redMul works only with red numbers"),this.red._verify2(this,_t),this.red.mul(this,_t)},it.prototype.redIMul=function(_t){return rt(this.red,"redMul works only with red numbers"),this.red._verify2(this,_t),this.red.imul(this,_t)},it.prototype.redSqr=function(){return rt(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},it.prototype.redISqr=function(){return rt(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},it.prototype.redSqrt=function(){return rt(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},it.prototype.redInvm=function(){return rt(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},it.prototype.redNeg=function(){return rt(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},it.prototype.redPow=function(_t){return rt(this.red&&!_t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,_t)};var Pt={k256:null,p224:null,p192:null,p25519:null};function kt(Mt,_t){this.name=Mt,this.p=new it(_t,16),this.n=this.p.bitLength(),this.k=new it(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}kt.prototype._tmp=function(){var _t=new it(null);return _t.words=new Array(Math.ceil(this.n/13)),_t},kt.prototype.ireduce=function(_t){var At=_t,Tt;do this.split(At,this.tmp),At=this.imulK(At),At=At.iadd(this.tmp),Tt=At.bitLength();while(Tt>this.n);var Bt=Tt0?At.isub(this.p):At.strip!==void 0?At.strip():At._strip(),At},kt.prototype.split=function(_t,At){_t.iushrn(this.n,0,At)},kt.prototype.imulK=function(_t){return _t.imul(this.k)};function Lt(){kt.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}nt(Lt,kt),Lt.prototype.split=function(_t,At){for(var Tt=4194303,Bt=Math.min(_t.length,9),Ot=0;Ot>>22,Ut=Wt}Ut>>>=22,_t.words[Ot-10]=Ut,Ut===0&&_t.length>10?_t.length-=10:_t.length-=9},Lt.prototype.imulK=function(_t){_t.words[_t.length]=0,_t.words[_t.length+1]=0,_t.length+=2;for(var At=0,Tt=0;Tt<_t.length;Tt++){var Bt=_t.words[Tt]|0;At+=Bt*977,_t.words[Tt]=At&67108863,At=Bt*64+(At/67108864|0)}return _t.words[_t.length-1]===0&&(_t.length--,_t.words[_t.length-1]===0&&_t.length--),_t};function jt(){kt.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}nt(jt,kt);function qt(){kt.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}nt(qt,kt);function Dt(){kt.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}nt(Dt,kt),Dt.prototype.imulK=function(_t){for(var At=0,Tt=0;Tt<_t.length;Tt++){var Bt=(_t.words[Tt]|0)*19+At,Ot=Bt&67108863;Bt>>>=26,_t.words[Tt]=Ot,At=Bt}return At!==0&&(_t.words[_t.length++]=At),_t},it._prime=function(_t){if(Pt[_t])return Pt[_t];var At;if(_t==="k256")At=new Lt;else if(_t==="p224")At=new jt;else if(_t==="p192")At=new qt;else if(_t==="p25519")At=new Dt;else throw new Error("Unknown prime "+_t);return Pt[_t]=At,At};function Ht(Mt){if(typeof Mt=="string"){var _t=it._prime(Mt);this.m=_t.p,this.prime=_t}else rt(Mt.gtn(1),"modulus must be greater than 1"),this.m=Mt,this.prime=null}Ht.prototype._verify1=function(_t){rt(_t.negative===0,"red works only with positives"),rt(_t.red,"red works only with red numbers")},Ht.prototype._verify2=function(_t,At){rt((_t.negative|At.negative)===0,"red works only with positives"),rt(_t.red&&_t.red===At.red,"red works only with red numbers")},Ht.prototype.imod=function(_t){return this.prime?this.prime.ireduce(_t)._forceRed(this):(ht(_t,_t.umod(this.m)._forceRed(this)),_t)},Ht.prototype.neg=function(_t){return _t.isZero()?_t.clone():this.m.sub(_t)._forceRed(this)},Ht.prototype.add=function(_t,At){this._verify2(_t,At);var Tt=_t.add(At);return Tt.cmp(this.m)>=0&&Tt.isub(this.m),Tt._forceRed(this)},Ht.prototype.iadd=function(_t,At){this._verify2(_t,At);var Tt=_t.iadd(At);return Tt.cmp(this.m)>=0&&Tt.isub(this.m),Tt},Ht.prototype.sub=function(_t,At){this._verify2(_t,At);var Tt=_t.sub(At);return Tt.cmpn(0)<0&&Tt.iadd(this.m),Tt._forceRed(this)},Ht.prototype.isub=function(_t,At){this._verify2(_t,At);var Tt=_t.isub(At);return Tt.cmpn(0)<0&&Tt.iadd(this.m),Tt},Ht.prototype.shl=function(_t,At){return this._verify1(_t),this.imod(_t.ushln(At))},Ht.prototype.imul=function(_t,At){return this._verify2(_t,At),this.imod(_t.imul(At))},Ht.prototype.mul=function(_t,At){return this._verify2(_t,At),this.imod(_t.mul(At))},Ht.prototype.isqr=function(_t){return this.imul(_t,_t.clone())},Ht.prototype.sqr=function(_t){return this.mul(_t,_t)},Ht.prototype.sqrt=function(_t){if(_t.isZero())return _t.clone();var At=this.m.andln(3);if(rt(At%2===1),At===3){var Tt=this.m.add(new it(1)).iushrn(2);return this.pow(_t,Tt)}for(var Bt=this.m.subn(1),Ot=0;!Bt.isZero()&&Bt.andln(1)===0;)Ot++,Bt.iushrn(1);rt(!Bt.isZero());var Ut=new it(1).toRed(this),Wt=Ut.redNeg(),Ct=this.m.subn(1).iushrn(1),St=this.m.bitLength();for(St=new it(2*St*St).toRed(this);this.pow(St,Ct).cmp(Wt)!==0;)St.redIAdd(Wt);for(var Ft=this.pow(St,Bt),Vt=this.pow(_t,Bt.addn(1).iushrn(1)),Rt=this.pow(_t,Bt),Kt=Ot;Rt.cmp(Ut)!==0;){for(var Zt=Rt,Jt=0;Zt.cmp(Ut)!==0;Jt++)Zt=Zt.redSqr();rt(Jt=0;Ot--){for(var Ft=At.words[Ot],Vt=St-1;Vt>=0;Vt--){var Rt=Ft>>Vt&1;if(Ut!==Bt[0]&&(Ut=this.sqr(Ut)),Rt===0&&Wt===0){Ct=0;continue}Wt<<=1,Wt|=Rt,Ct++,!(Ct!==Tt&&(Ot!==0||Vt!==0))&&(Ut=this.mul(Ut,Bt[Wt]),Ct=0,Wt=0)}St=26}return Ut},Ht.prototype.convertTo=function(_t){var At=_t.umod(this.m);return At===_t?At.clone():At},Ht.prototype.convertFrom=function(_t){var At=_t.clone();return At.red=null,At},it.mont=function(_t){return new Xt(_t)};function Xt(Mt){Ht.call(this,Mt),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new it(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}nt(Xt,Ht),Xt.prototype.convertTo=function(_t){return this.imod(_t.ushln(this.shift))},Xt.prototype.convertFrom=function(_t){var At=this.imod(_t.mul(this.rinv));return At.red=null,At},Xt.prototype.imul=function(_t,At){if(_t.isZero()||At.isZero())return _t.words[0]=0,_t.length=1,_t;var Tt=_t.imul(At),Bt=Tt.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Ot=Tt.isub(Bt).iushrn(this.shift),Ut=Ot;return Ot.cmp(this.m)>=0?Ut=Ot.isub(this.m):Ot.cmpn(0)<0&&(Ut=Ot.iadd(this.m)),Ut._forceRed(this)},Xt.prototype.mul=function(_t,At){if(_t.isZero()||At.isZero())return new it(0)._forceRed(this);var Tt=_t.mul(At),Bt=Tt.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Ot=Tt.isub(Bt).iushrn(this.shift),Ut=Ot;return Ot.cmp(this.m)>=0?Ut=Ot.isub(this.m):Ot.cmpn(0)<0&&(Ut=Ot.iadd(this.m)),Ut._forceRed(this)},Xt.prototype.invm=function(_t){var At=this.imod(_t._invmp(this.m).mul(this.r2));return At._forceRed(this)}})(_e,commonjsGlobal)})(bn);var bnExports=bn.exports;const BN$1=getDefaultExportFromCjs(bnExports),version$s="logger/5.7.0";let _permanentCensorErrors=!1,_censorErrors=!1;const LogLevels={debug:1,default:2,info:2,warning:3,error:4,off:5};let _logLevel=LogLevels.default,_globalLogger=null;function _checkNormalize(){try{const _e=[];if(["NFD","NFC","NFKD","NFKC"].forEach(et=>{try{if("test".normalize(et)!=="test")throw new Error("bad normalize")}catch{_e.push(et)}}),_e.length)throw new Error("missing "+_e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(_e){return _e.message}return null}const _normalizeError=_checkNormalize();var LogLevel;(function(_e){_e.DEBUG="DEBUG",_e.INFO="INFO",_e.WARNING="WARNING",_e.ERROR="ERROR",_e.OFF="OFF"})(LogLevel||(LogLevel={}));var ErrorCode;(function(_e){_e.UNKNOWN_ERROR="UNKNOWN_ERROR",_e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",_e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",_e.NETWORK_ERROR="NETWORK_ERROR",_e.SERVER_ERROR="SERVER_ERROR",_e.TIMEOUT="TIMEOUT",_e.BUFFER_OVERRUN="BUFFER_OVERRUN",_e.NUMERIC_FAULT="NUMERIC_FAULT",_e.MISSING_NEW="MISSING_NEW",_e.INVALID_ARGUMENT="INVALID_ARGUMENT",_e.MISSING_ARGUMENT="MISSING_ARGUMENT",_e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",_e.CALL_EXCEPTION="CALL_EXCEPTION",_e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",_e.NONCE_EXPIRED="NONCE_EXPIRED",_e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",_e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",_e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",_e.ACTION_REJECTED="ACTION_REJECTED"})(ErrorCode||(ErrorCode={}));const HEX="0123456789abcdef";class Logger{constructor(et){Object.defineProperty(this,"version",{enumerable:!0,value:et,writable:!1})}_log(et,tt){const rt=et.toLowerCase();LogLevels[rt]==null&&this.throwArgumentError("invalid log level name","logLevel",et),!(_logLevel>LogLevels[rt])&&console.log.apply(console,tt)}debug(...et){this._log(Logger.levels.DEBUG,et)}info(...et){this._log(Logger.levels.INFO,et)}warn(...et){this._log(Logger.levels.WARNING,et)}makeError(et,tt,rt){if(_censorErrors)return this.makeError("censored error",tt,{});tt||(tt=Logger.errors.UNKNOWN_ERROR),rt||(rt={});const nt=[];Object.keys(rt).forEach(lt=>{const dt=rt[lt];try{if(dt instanceof Uint8Array){let ht="";for(let pt=0;pt>4],ht+=HEX[dt[pt]&15];nt.push(lt+"=Uint8Array(0x"+ht+")")}else nt.push(lt+"="+JSON.stringify(dt))}catch{nt.push(lt+"="+JSON.stringify(rt[lt].toString()))}}),nt.push(`code=${tt}`),nt.push(`version=${this.version}`);const it=et;let at="";switch(tt){case ErrorCode.NUMERIC_FAULT:{at="NUMERIC_FAULT";const lt=et;switch(lt){case"overflow":case"underflow":case"division-by-zero":at+="-"+lt;break;case"negative-power":case"negative-width":at+="-unsupported";break;case"unbound-bitwise-result":at+="-unbound-result";break}break}case ErrorCode.CALL_EXCEPTION:case ErrorCode.INSUFFICIENT_FUNDS:case ErrorCode.MISSING_NEW:case ErrorCode.NONCE_EXPIRED:case ErrorCode.REPLACEMENT_UNDERPRICED:case ErrorCode.TRANSACTION_REPLACED:case ErrorCode.UNPREDICTABLE_GAS_LIMIT:at=tt;break}at&&(et+=" [ See: https://links.ethers.org/v5-errors-"+at+" ]"),nt.length&&(et+=" ("+nt.join(", ")+")");const st=new Error(et);return st.reason=it,st.code=tt,Object.keys(rt).forEach(function(lt){st[lt]=rt[lt]}),st}throwError(et,tt,rt){throw this.makeError(et,tt,rt)}throwArgumentError(et,tt,rt){return this.throwError(et,Logger.errors.INVALID_ARGUMENT,{argument:tt,value:rt})}assert(et,tt,rt,nt){et||this.throwError(tt,rt,nt)}assertArgument(et,tt,rt,nt){et||this.throwArgumentError(tt,rt,nt)}checkNormalize(et){_normalizeError&&this.throwError("platform missing String.prototype.normalize",Logger.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:_normalizeError})}checkSafeUint53(et,tt){typeof et=="number"&&(tt==null&&(tt="value not safe"),(et<0||et>=9007199254740991)&&this.throwError(tt,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:et}),et%1&&this.throwError(tt,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:et}))}checkArgumentCount(et,tt,rt){rt?rt=": "+rt:rt="",ettt&&this.throwError("too many arguments"+rt,Logger.errors.UNEXPECTED_ARGUMENT,{count:et,expectedCount:tt})}checkNew(et,tt){(et===Object||et==null)&&this.throwError("missing new",Logger.errors.MISSING_NEW,{name:tt.name})}checkAbstract(et,tt){et===tt?this.throwError("cannot instantiate abstract class "+JSON.stringify(tt.name)+" directly; use a sub-class",Logger.errors.UNSUPPORTED_OPERATION,{name:et.name,operation:"new"}):(et===Object||et==null)&&this.throwError("missing new",Logger.errors.MISSING_NEW,{name:tt.name})}static globalLogger(){return _globalLogger||(_globalLogger=new Logger(version$s)),_globalLogger}static setCensorship(et,tt){if(!et&&tt&&this.globalLogger().throwError("cannot permanently disable censorship",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),_permanentCensorErrors){if(!et)return;this.globalLogger().throwError("error censorship permanent",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}_censorErrors=!!et,_permanentCensorErrors=!!tt}static setLogLevel(et){const tt=LogLevels[et.toLowerCase()];if(tt==null){Logger.globalLogger().warn("invalid log level - "+et);return}_logLevel=tt}static from(et){return new Logger(et)}}Logger.errors=ErrorCode;Logger.levels=LogLevel;const lib_esm$k=Object.freeze(Object.defineProperty({__proto__:null,get ErrorCode(){return ErrorCode},get LogLevel(){return LogLevel},Logger},Symbol.toStringTag,{value:"Module"})),version$r="bytes/5.7.0",logger$w=new Logger(version$r);function isHexable(_e){return!!_e.toHexString}function addSlice(_e){return _e.slice||(_e.slice=function(){const et=Array.prototype.slice.call(arguments);return addSlice(new Uint8Array(Array.prototype.slice.apply(_e,et)))}),_e}function isBytesLike(_e){return isHexString(_e)&&!(_e.length%2)||isBytes(_e)}function isInteger(_e){return typeof _e=="number"&&_e==_e&&_e%1===0}function isBytes(_e){if(_e==null)return!1;if(_e.constructor===Uint8Array)return!0;if(typeof _e=="string"||!isInteger(_e.length)||_e.length<0)return!1;for(let et=0;et<_e.length;et++){const tt=_e[et];if(!isInteger(tt)||tt<0||tt>=256)return!1}return!0}function arrayify(_e,et){if(et||(et={}),typeof _e=="number"){logger$w.checkSafeUint53(_e,"invalid arrayify value");const tt=[];for(;_e;)tt.unshift(_e&255),_e=parseInt(String(_e/256));return tt.length===0&&tt.push(0),addSlice(new Uint8Array(tt))}if(et.allowMissingPrefix&&typeof _e=="string"&&_e.substring(0,2)!=="0x"&&(_e="0x"+_e),isHexable(_e)&&(_e=_e.toHexString()),isHexString(_e)){let tt=_e.substring(2);tt.length%2&&(et.hexPad==="left"?tt="0"+tt:et.hexPad==="right"?tt+="0":logger$w.throwArgumentError("hex data is odd-length","value",_e));const rt=[];for(let nt=0;ntarrayify(nt)),tt=et.reduce((nt,it)=>nt+it.length,0),rt=new Uint8Array(tt);return et.reduce((nt,it)=>(rt.set(it,nt),nt+it.length),0),addSlice(rt)}function stripZeros(_e){let et=arrayify(_e);if(et.length===0)return et;let tt=0;for(;ttet&&logger$w.throwArgumentError("value out of range","value",arguments[0]);const tt=new Uint8Array(et);return tt.set(_e,et-_e.length),addSlice(tt)}function isHexString(_e,et){return!(typeof _e!="string"||!_e.match(/^0x[0-9A-Fa-f]*$/)||et&&_e.length!==2+2*et)}const HexCharacters="0123456789abcdef";function hexlify(_e,et){if(et||(et={}),typeof _e=="number"){logger$w.checkSafeUint53(_e,"invalid hexlify value");let tt="";for(;_e;)tt=HexCharacters[_e&15]+tt,_e=Math.floor(_e/16);return tt.length?(tt.length%2&&(tt="0"+tt),"0x"+tt):"0x00"}if(typeof _e=="bigint")return _e=_e.toString(16),_e.length%2?"0x0"+_e:"0x"+_e;if(et.allowMissingPrefix&&typeof _e=="string"&&_e.substring(0,2)!=="0x"&&(_e="0x"+_e),isHexable(_e))return _e.toHexString();if(isHexString(_e))return _e.length%2&&(et.hexPad==="left"?_e="0x0"+_e.substring(2):et.hexPad==="right"?_e+="0":logger$w.throwArgumentError("hex data is odd-length","value",_e)),_e.toLowerCase();if(isBytes(_e)){let tt="0x";for(let rt=0;rt<_e.length;rt++){let nt=_e[rt];tt+=HexCharacters[(nt&240)>>4]+HexCharacters[nt&15]}return tt}return logger$w.throwArgumentError("invalid hexlify value","value",_e)}function hexDataLength(_e){if(typeof _e!="string")_e=hexlify(_e);else if(!isHexString(_e)||_e.length%2)return null;return(_e.length-2)/2}function hexDataSlice(_e,et,tt){return typeof _e!="string"?_e=hexlify(_e):(!isHexString(_e)||_e.length%2)&&logger$w.throwArgumentError("invalid hexData","value",_e),et=2+2*et,tt!=null?"0x"+_e.substring(et,2+2*tt):"0x"+_e.substring(et)}function hexConcat(_e){let et="0x";return _e.forEach(tt=>{et+=hexlify(tt).substring(2)}),et}function hexValue(_e){const et=hexStripZeros(hexlify(_e,{hexPad:"left"}));return et==="0x"?"0x0":et}function hexStripZeros(_e){typeof _e!="string"&&(_e=hexlify(_e)),isHexString(_e)||logger$w.throwArgumentError("invalid hex string","value",_e),_e=_e.substring(2);let et=0;for(;et<_e.length&&_e[et]==="0";)et++;return"0x"+_e.substring(et)}function hexZeroPad(_e,et){for(typeof _e!="string"?_e=hexlify(_e):isHexString(_e)||logger$w.throwArgumentError("invalid hex string","value",_e),_e.length>2*et+2&&logger$w.throwArgumentError("value out of range","value",arguments[1]);_e.length<2*et+2;)_e="0x0"+_e.substring(2);return _e}function splitSignature(_e){const et={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(isBytesLike(_e)){let tt=arrayify(_e);tt.length===64?(et.v=27+(tt[32]>>7),tt[32]&=127,et.r=hexlify(tt.slice(0,32)),et.s=hexlify(tt.slice(32,64))):tt.length===65?(et.r=hexlify(tt.slice(0,32)),et.s=hexlify(tt.slice(32,64)),et.v=tt[64]):logger$w.throwArgumentError("invalid signature string","signature",_e),et.v<27&&(et.v===0||et.v===1?et.v+=27:logger$w.throwArgumentError("signature invalid v byte","signature",_e)),et.recoveryParam=1-et.v%2,et.recoveryParam&&(tt[32]|=128),et._vs=hexlify(tt.slice(32,64))}else{if(et.r=_e.r,et.s=_e.s,et.v=_e.v,et.recoveryParam=_e.recoveryParam,et._vs=_e._vs,et._vs!=null){const nt=zeroPad(arrayify(et._vs),32);et._vs=hexlify(nt);const it=nt[0]>=128?1:0;et.recoveryParam==null?et.recoveryParam=it:et.recoveryParam!==it&&logger$w.throwArgumentError("signature recoveryParam mismatch _vs","signature",_e),nt[0]&=127;const at=hexlify(nt);et.s==null?et.s=at:et.s!==at&&logger$w.throwArgumentError("signature v mismatch _vs","signature",_e)}if(et.recoveryParam==null)et.v==null?logger$w.throwArgumentError("signature missing v and recoveryParam","signature",_e):et.v===0||et.v===1?et.recoveryParam=et.v:et.recoveryParam=1-et.v%2;else if(et.v==null)et.v=27+et.recoveryParam;else{const nt=et.v===0||et.v===1?et.v:1-et.v%2;et.recoveryParam!==nt&&logger$w.throwArgumentError("signature recoveryParam mismatch v","signature",_e)}et.r==null||!isHexString(et.r)?logger$w.throwArgumentError("signature missing or invalid r","signature",_e):et.r=hexZeroPad(et.r,32),et.s==null||!isHexString(et.s)?logger$w.throwArgumentError("signature missing or invalid s","signature",_e):et.s=hexZeroPad(et.s,32);const tt=arrayify(et.s);tt[0]>=128&&logger$w.throwArgumentError("signature s out of range","signature",_e),et.recoveryParam&&(tt[0]|=128);const rt=hexlify(tt);et._vs&&(isHexString(et._vs)||logger$w.throwArgumentError("signature invalid _vs","signature",_e),et._vs=hexZeroPad(et._vs,32)),et._vs==null?et._vs=rt:et._vs!==rt&&logger$w.throwArgumentError("signature _vs mismatch v and s","signature",_e)}return et.yParityAndS=et._vs,et.compact=et.r+et.yParityAndS.substring(2),et}function joinSignature(_e){return _e=splitSignature(_e),hexlify(concat$1([_e.r,_e.s,_e.recoveryParam?"0x1c":"0x1b"]))}const lib_esm$j=Object.freeze(Object.defineProperty({__proto__:null,arrayify,concat:concat$1,hexConcat,hexDataLength,hexDataSlice,hexStripZeros,hexValue,hexZeroPad,hexlify,isBytes,isBytesLike,isHexString,joinSignature,splitSignature,stripZeros,zeroPad},Symbol.toStringTag,{value:"Module"})),version$q="bignumber/5.7.0";var BN=BN$1.BN;const logger$v=new Logger(version$q),_constructorGuard$4={},MAX_SAFE=9007199254740991;function isBigNumberish(_e){return _e!=null&&(BigNumber.isBigNumber(_e)||typeof _e=="number"&&_e%1===0||typeof _e=="string"&&!!_e.match(/^-?[0-9]+$/)||isHexString(_e)||typeof _e=="bigint"||isBytes(_e))}let _warnedToStringRadix=!1;class BigNumber{constructor(et,tt){et!==_constructorGuard$4&&logger$v.throwError("cannot call constructor directly; use BigNumber.from",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=tt,this._isBigNumber=!0,Object.freeze(this)}fromTwos(et){return toBigNumber(toBN(this).fromTwos(et))}toTwos(et){return toBigNumber(toBN(this).toTwos(et))}abs(){return this._hex[0]==="-"?BigNumber.from(this._hex.substring(1)):this}add(et){return toBigNumber(toBN(this).add(toBN(et)))}sub(et){return toBigNumber(toBN(this).sub(toBN(et)))}div(et){return BigNumber.from(et).isZero()&&throwFault$1("division-by-zero","div"),toBigNumber(toBN(this).div(toBN(et)))}mul(et){return toBigNumber(toBN(this).mul(toBN(et)))}mod(et){const tt=toBN(et);return tt.isNeg()&&throwFault$1("division-by-zero","mod"),toBigNumber(toBN(this).umod(tt))}pow(et){const tt=toBN(et);return tt.isNeg()&&throwFault$1("negative-power","pow"),toBigNumber(toBN(this).pow(tt))}and(et){const tt=toBN(et);return(this.isNegative()||tt.isNeg())&&throwFault$1("unbound-bitwise-result","and"),toBigNumber(toBN(this).and(tt))}or(et){const tt=toBN(et);return(this.isNegative()||tt.isNeg())&&throwFault$1("unbound-bitwise-result","or"),toBigNumber(toBN(this).or(tt))}xor(et){const tt=toBN(et);return(this.isNegative()||tt.isNeg())&&throwFault$1("unbound-bitwise-result","xor"),toBigNumber(toBN(this).xor(tt))}mask(et){return(this.isNegative()||et<0)&&throwFault$1("negative-width","mask"),toBigNumber(toBN(this).maskn(et))}shl(et){return(this.isNegative()||et<0)&&throwFault$1("negative-width","shl"),toBigNumber(toBN(this).shln(et))}shr(et){return(this.isNegative()||et<0)&&throwFault$1("negative-width","shr"),toBigNumber(toBN(this).shrn(et))}eq(et){return toBN(this).eq(toBN(et))}lt(et){return toBN(this).lt(toBN(et))}lte(et){return toBN(this).lte(toBN(et))}gt(et){return toBN(this).gt(toBN(et))}gte(et){return toBN(this).gte(toBN(et))}isNegative(){return this._hex[0]==="-"}isZero(){return toBN(this).isZero()}toNumber(){try{return toBN(this).toNumber()}catch{throwFault$1("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return logger$v.throwError("this platform does not support BigInt",Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?_warnedToStringRadix||(_warnedToStringRadix=!0,logger$v.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?logger$v.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Logger.errors.UNEXPECTED_ARGUMENT,{}):logger$v.throwError("BigNumber.toString does not accept parameters",Logger.errors.UNEXPECTED_ARGUMENT,{})),toBN(this).toString(10)}toHexString(){return this._hex}toJSON(et){return{type:"BigNumber",hex:this.toHexString()}}static from(et){if(et instanceof BigNumber)return et;if(typeof et=="string")return et.match(/^-?0x[0-9a-f]+$/i)?new BigNumber(_constructorGuard$4,toHex$3(et)):et.match(/^-?[0-9]+$/)?new BigNumber(_constructorGuard$4,toHex$3(new BN(et))):logger$v.throwArgumentError("invalid BigNumber string","value",et);if(typeof et=="number")return et%1&&throwFault$1("underflow","BigNumber.from",et),(et>=MAX_SAFE||et<=-MAX_SAFE)&&throwFault$1("overflow","BigNumber.from",et),BigNumber.from(String(et));const tt=et;if(typeof tt=="bigint")return BigNumber.from(tt.toString());if(isBytes(tt))return BigNumber.from(hexlify(tt));if(tt)if(tt.toHexString){const rt=tt.toHexString();if(typeof rt=="string")return BigNumber.from(rt)}else{let rt=tt._hex;if(rt==null&&tt.type==="BigNumber"&&(rt=tt.hex),typeof rt=="string"&&(isHexString(rt)||rt[0]==="-"&&isHexString(rt.substring(1))))return BigNumber.from(rt)}return logger$v.throwArgumentError("invalid BigNumber value","value",et)}static isBigNumber(et){return!!(et&&et._isBigNumber)}}function toHex$3(_e){if(typeof _e!="string")return toHex$3(_e.toString(16));if(_e[0]==="-")return _e=_e.substring(1),_e[0]==="-"&&logger$v.throwArgumentError("invalid hex","value",_e),_e=toHex$3(_e),_e==="0x00"?_e:"-"+_e;if(_e.substring(0,2)!=="0x"&&(_e="0x"+_e),_e==="0x")return"0x00";for(_e.length%2&&(_e="0x0"+_e.substring(2));_e.length>4&&_e.substring(0,4)==="0x00";)_e="0x"+_e.substring(4);return _e}function toBigNumber(_e){return BigNumber.from(toHex$3(_e))}function toBN(_e){const et=BigNumber.from(_e).toHexString();return et[0]==="-"?new BN("-"+et.substring(3),16):new BN(et.substring(2),16)}function throwFault$1(_e,et,tt){const rt={fault:_e,operation:et};return tt!=null&&(rt.value=tt),logger$v.throwError(_e,Logger.errors.NUMERIC_FAULT,rt)}function _base36To16(_e){return new BN(_e,36).toString(16)}function _base16To36(_e){return new BN(_e,16).toString(36)}const logger$u=new Logger(version$q),_constructorGuard$3={},Zero$2=BigNumber.from(0),NegativeOne$2=BigNumber.from(-1);function throwFault(_e,et,tt,rt){const nt={fault:et,operation:tt};return rt!==void 0&&(nt.value=rt),logger$u.throwError(_e,Logger.errors.NUMERIC_FAULT,nt)}let zeros="0";for(;zeros.length<256;)zeros+=zeros;function getMultiplier(_e){if(typeof _e!="number")try{_e=BigNumber.from(_e).toNumber()}catch{}return typeof _e=="number"&&_e>=0&&_e<=256&&!(_e%1)?"1"+zeros.substring(0,_e):logger$u.throwArgumentError("invalid decimal size","decimals",_e)}function formatFixed(_e,et){et==null&&(et=0);const tt=getMultiplier(et);_e=BigNumber.from(_e);const rt=_e.lt(Zero$2);rt&&(_e=_e.mul(NegativeOne$2));let nt=_e.mod(tt).toString();for(;nt.length2&&logger$u.throwArgumentError("too many decimal points","value",_e);let it=nt[0],at=nt[1];for(it||(it="0"),at||(at="0");at[at.length-1]==="0";)at=at.substring(0,at.length-1);for(at.length>tt.length-1&&throwFault("fractional component exceeds decimals","underflow","parseFixed"),at===""&&(at="0");at.lengthet[at]==null?lt:(typeof et[at]!==st&&logger$u.throwArgumentError("invalid fixed format ("+at+" not "+st+")","format."+at,et[at]),et[at]);tt=it("signed","boolean",tt),rt=it("width","number",rt),nt=it("decimals","number",nt)}return rt%8&&logger$u.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",rt),nt>80&&logger$u.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",nt),new FixedFormat(_constructorGuard$3,tt,rt,nt)}}class FixedNumber{constructor(et,tt,rt,nt){et!==_constructorGuard$3&&logger$u.throwError("cannot use FixedNumber constructor; use FixedNumber.from",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=nt,this._hex=tt,this._value=rt,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(et){this.format.name!==et.format.name&&logger$u.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",et)}addUnsafe(et){this._checkFormat(et);const tt=parseFixed(this._value,this.format.decimals),rt=parseFixed(et._value,et.format.decimals);return FixedNumber.fromValue(tt.add(rt),this.format.decimals,this.format)}subUnsafe(et){this._checkFormat(et);const tt=parseFixed(this._value,this.format.decimals),rt=parseFixed(et._value,et.format.decimals);return FixedNumber.fromValue(tt.sub(rt),this.format.decimals,this.format)}mulUnsafe(et){this._checkFormat(et);const tt=parseFixed(this._value,this.format.decimals),rt=parseFixed(et._value,et.format.decimals);return FixedNumber.fromValue(tt.mul(rt).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(et){this._checkFormat(et);const tt=parseFixed(this._value,this.format.decimals),rt=parseFixed(et._value,et.format.decimals);return FixedNumber.fromValue(tt.mul(this.format._multiplier).div(rt),this.format.decimals,this.format)}floor(){const et=this.toString().split(".");et.length===1&&et.push("0");let tt=FixedNumber.from(et[0],this.format);const rt=!et[1].match(/^(0*)$/);return this.isNegative()&&rt&&(tt=tt.subUnsafe(ONE$1.toFormat(tt.format))),tt}ceiling(){const et=this.toString().split(".");et.length===1&&et.push("0");let tt=FixedNumber.from(et[0],this.format);const rt=!et[1].match(/^(0*)$/);return!this.isNegative()&&rt&&(tt=tt.addUnsafe(ONE$1.toFormat(tt.format))),tt}round(et){et==null&&(et=0);const tt=this.toString().split(".");if(tt.length===1&&tt.push("0"),(et<0||et>80||et%1)&&logger$u.throwArgumentError("invalid decimal count","decimals",et),tt[1].length<=et)return this;const rt=FixedNumber.from("1"+zeros.substring(0,et),this.format),nt=BUMP.toFormat(this.format);return this.mulUnsafe(rt).addUnsafe(nt).floor().divUnsafe(rt)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(et){if(et==null)return this._hex;et%8&&logger$u.throwArgumentError("invalid byte width","width",et);const tt=BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(et).toHexString();return hexZeroPad(tt,et/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(et){return FixedNumber.fromString(this._value,et)}static fromValue(et,tt,rt){return rt==null&&tt!=null&&!isBigNumberish(tt)&&(rt=tt,tt=null),tt==null&&(tt=0),rt==null&&(rt="fixed"),FixedNumber.fromString(formatFixed(et,tt),FixedFormat.from(rt))}static fromString(et,tt){tt==null&&(tt="fixed");const rt=FixedFormat.from(tt),nt=parseFixed(et,rt.decimals);!rt.signed&&nt.lt(Zero$2)&&throwFault("unsigned value cannot be negative","overflow","value",et);let it=null;rt.signed?it=nt.toTwos(rt.width).toHexString():(it=nt.toHexString(),it=hexZeroPad(it,rt.width/8));const at=formatFixed(nt,rt.decimals);return new FixedNumber(_constructorGuard$3,it,at,rt)}static fromBytes(et,tt){tt==null&&(tt="fixed");const rt=FixedFormat.from(tt);if(arrayify(et).length>rt.width/8)throw new Error("overflow");let nt=BigNumber.from(et);rt.signed&&(nt=nt.fromTwos(rt.width));const it=nt.toTwos((rt.signed?0:1)+rt.width).toHexString(),at=formatFixed(nt,rt.decimals);return new FixedNumber(_constructorGuard$3,it,at,rt)}static from(et,tt){if(typeof et=="string")return FixedNumber.fromString(et,tt);if(isBytes(et))return FixedNumber.fromBytes(et,tt);try{return FixedNumber.fromValue(et,0,tt)}catch(rt){if(rt.code!==Logger.errors.INVALID_ARGUMENT)throw rt}return logger$u.throwArgumentError("invalid FixedNumber value","value",et)}static isFixedNumber(et){return!!(et&&et._isFixedNumber)}}const ONE$1=FixedNumber.from(1),BUMP=FixedNumber.from("0.5"),version$p="properties/5.7.0";var __awaiter$a=globalThis&&globalThis.__awaiter||function(_e,et,tt,rt){function nt(it){return it instanceof tt?it:new tt(function(at){at(it)})}return new(tt||(tt=Promise))(function(it,at){function st(ht){try{dt(rt.next(ht))}catch(pt){at(pt)}}function lt(ht){try{dt(rt.throw(ht))}catch(pt){at(pt)}}function dt(ht){ht.done?it(ht.value):nt(ht.value).then(st,lt)}dt((rt=rt.apply(_e,et||[])).next())})};const logger$t=new Logger(version$p);function defineReadOnly(_e,et,tt){Object.defineProperty(_e,et,{enumerable:!0,value:tt,writable:!1})}function getStatic(_e,et){for(let tt=0;tt<32;tt++){if(_e[et])return _e[et];if(!_e.prototype||typeof _e.prototype!="object")break;_e=Object.getPrototypeOf(_e.prototype).constructor}return null}function resolveProperties(_e){return __awaiter$a(this,void 0,void 0,function*(){const et=Object.keys(_e).map(rt=>{const nt=_e[rt];return Promise.resolve(nt).then(it=>({key:rt,value:it}))});return(yield Promise.all(et)).reduce((rt,nt)=>(rt[nt.key]=nt.value,rt),{})})}function checkProperties(_e,et){(!_e||typeof _e!="object")&&logger$t.throwArgumentError("invalid object","object",_e),Object.keys(_e).forEach(tt=>{et[tt]||logger$t.throwArgumentError("invalid object key - "+tt,"transaction:"+tt,_e)})}function shallowCopy(_e){const et={};for(const tt in _e)et[tt]=_e[tt];return et}const opaque={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function _isFrozen(_e){if(_e==null||opaque[typeof _e])return!0;if(Array.isArray(_e)||typeof _e=="object"){if(!Object.isFrozen(_e))return!1;const et=Object.keys(_e);for(let tt=0;ttdeepCopy(et)));if(typeof _e=="object"){const et={};for(const tt in _e){const rt=_e[tt];rt!==void 0&&defineReadOnly(et,tt,deepCopy(rt))}return et}return logger$t.throwArgumentError(`Cannot deepCopy ${typeof _e}`,"object",_e)}function deepCopy(_e){return _deepCopy(_e)}class Description{constructor(et){for(const tt in et)this[tt]=deepCopy(et[tt])}}const lib_esm$i=Object.freeze(Object.defineProperty({__proto__:null,Description,checkProperties,deepCopy,defineReadOnly,getStatic,resolveProperties,shallowCopy},Symbol.toStringTag,{value:"Module"})),version$o="abi/5.7.0",logger$s=new Logger(version$o),_constructorGuard$2={};let ModifiersBytes={calldata:!0,memory:!0,storage:!0},ModifiersNest={calldata:!0,memory:!0};function checkModifier(_e,et){if(_e==="bytes"||_e==="string"){if(ModifiersBytes[et])return!0}else if(_e==="address"){if(et==="payable")return!0}else if((_e.indexOf("[")>=0||_e==="tuple")&&ModifiersNest[et])return!0;return(ModifiersBytes[et]||et==="payable")&&logger$s.throwArgumentError("invalid modifier","name",et),!1}function parseParamType(_e,et){let tt=_e;function rt(st){logger$s.throwArgumentError(`unexpected character at position ${st}`,"param",_e)}_e=_e.replace(/\s/g," ");function nt(st){let lt={type:"",name:"",parent:st,state:{allowType:!0}};return et&&(lt.indexed=!1),lt}let it={type:"",name:"",state:{allowType:!0}},at=it;for(let st=0;st<_e.length;st++){let lt=_e[st];switch(lt){case"(":at.state.allowType&&at.type===""?at.type="tuple":at.state.allowParams||rt(st),at.state.allowType=!1,at.type=verifyType(at.type),at.components=[nt(at)],at=at.components[0];break;case")":delete at.state,at.name==="indexed"&&(et||rt(st),at.indexed=!0,at.name=""),checkModifier(at.type,at.name)&&(at.name=""),at.type=verifyType(at.type);let dt=at;at=at.parent,at||rt(st),delete dt.parent,at.state.allowParams=!1,at.state.allowName=!0,at.state.allowArray=!0;break;case",":delete at.state,at.name==="indexed"&&(et||rt(st),at.indexed=!0,at.name=""),checkModifier(at.type,at.name)&&(at.name=""),at.type=verifyType(at.type);let ht=nt(at.parent);at.parent.components.push(ht),delete at.parent,at=ht;break;case" ":at.state.allowType&&at.type!==""&&(at.type=verifyType(at.type),delete at.state.allowType,at.state.allowName=!0,at.state.allowParams=!0),at.state.allowName&&at.name!==""&&(at.name==="indexed"?(et||rt(st),at.indexed&&rt(st),at.indexed=!0,at.name=""):checkModifier(at.type,at.name)?at.name="":at.state.allowName=!1);break;case"[":at.state.allowArray||rt(st),at.type+=lt,at.state.allowArray=!1,at.state.allowName=!1,at.state.readArray=!0;break;case"]":at.state.readArray||rt(st),at.type+=lt,at.state.readArray=!1,at.state.allowArray=!0,at.state.allowName=!0;break;default:at.state.allowType?(at.type+=lt,at.state.allowParams=!0,at.state.allowArray=!0):at.state.allowName?(at.name+=lt,delete at.state.allowArray):at.state.readArray?at.type+=lt:rt(st)}}return at.parent&&logger$s.throwArgumentError("unexpected eof","param",_e),delete it.state,at.name==="indexed"?(et||rt(tt.length-7),at.indexed&&rt(tt.length-7),at.indexed=!0,at.name=""):checkModifier(at.type,at.name)&&(at.name=""),it.type=verifyType(it.type),it}function populate(_e,et){for(let tt in et)defineReadOnly(_e,tt,et[tt])}const FormatTypes=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),paramTypeArray=new RegExp(/^(.*)\[([0-9]*)\]$/);class ParamType{constructor(et,tt){et!==_constructorGuard$2&&logger$s.throwError("use fromString",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),populate(this,tt);let rt=this.type.match(paramTypeArray);rt?populate(this,{arrayLength:parseInt(rt[2]||"-1"),arrayChildren:ParamType.fromObject({type:rt[1],components:this.components}),baseType:"array"}):populate(this,{arrayLength:null,arrayChildren:null,baseType:this.components!=null?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(et){if(et||(et=FormatTypes.sighash),FormatTypes[et]||logger$s.throwArgumentError("invalid format type","format",et),et===FormatTypes.json){let rt={type:this.baseType==="tuple"?"tuple":this.type,name:this.name||void 0};return typeof this.indexed=="boolean"&&(rt.indexed=this.indexed),this.components&&(rt.components=this.components.map(nt=>JSON.parse(nt.format(et)))),JSON.stringify(rt)}let tt="";return this.baseType==="array"?(tt+=this.arrayChildren.format(et),tt+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(et!==FormatTypes.sighash&&(tt+=this.type),tt+="("+this.components.map(rt=>rt.format(et)).join(et===FormatTypes.full?", ":",")+")"):tt+=this.type,et!==FormatTypes.sighash&&(this.indexed===!0&&(tt+=" indexed"),et===FormatTypes.full&&this.name&&(tt+=" "+this.name)),tt}static from(et,tt){return typeof et=="string"?ParamType.fromString(et,tt):ParamType.fromObject(et)}static fromObject(et){return ParamType.isParamType(et)?et:new ParamType(_constructorGuard$2,{name:et.name||null,type:verifyType(et.type),indexed:et.indexed==null?null:!!et.indexed,components:et.components?et.components.map(ParamType.fromObject):null})}static fromString(et,tt){function rt(nt){return ParamType.fromObject({name:nt.name,type:nt.type,indexed:nt.indexed,components:nt.components})}return rt(parseParamType(et,!!tt))}static isParamType(et){return!!(et!=null&&et._isParamType)}}function parseParams(_e,et){return splitNesting(_e).map(tt=>ParamType.fromString(tt,et))}class Fragment{constructor(et,tt){et!==_constructorGuard$2&&logger$s.throwError("use a static from method",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),populate(this,tt),this._isFragment=!0,Object.freeze(this)}static from(et){return Fragment.isFragment(et)?et:typeof et=="string"?Fragment.fromString(et):Fragment.fromObject(et)}static fromObject(et){if(Fragment.isFragment(et))return et;switch(et.type){case"function":return FunctionFragment.fromObject(et);case"event":return EventFragment.fromObject(et);case"constructor":return ConstructorFragment.fromObject(et);case"error":return ErrorFragment.fromObject(et);case"fallback":case"receive":return null}return logger$s.throwArgumentError("invalid fragment object","value",et)}static fromString(et){return et=et.replace(/\s/g," "),et=et.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),et=et.trim(),et.split(" ")[0]==="event"?EventFragment.fromString(et.substring(5).trim()):et.split(" ")[0]==="function"?FunctionFragment.fromString(et.substring(8).trim()):et.split("(")[0].trim()==="constructor"?ConstructorFragment.fromString(et.trim()):et.split(" ")[0]==="error"?ErrorFragment.fromString(et.substring(5).trim()):logger$s.throwArgumentError("unsupported fragment","value",et)}static isFragment(et){return!!(et&&et._isFragment)}}class EventFragment extends Fragment{format(et){if(et||(et=FormatTypes.sighash),FormatTypes[et]||logger$s.throwArgumentError("invalid format type","format",et),et===FormatTypes.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(rt=>JSON.parse(rt.format(et)))});let tt="";return et!==FormatTypes.sighash&&(tt+="event "),tt+=this.name+"("+this.inputs.map(rt=>rt.format(et)).join(et===FormatTypes.full?", ":",")+") ",et!==FormatTypes.sighash&&this.anonymous&&(tt+="anonymous "),tt.trim()}static from(et){return typeof et=="string"?EventFragment.fromString(et):EventFragment.fromObject(et)}static fromObject(et){if(EventFragment.isEventFragment(et))return et;et.type!=="event"&&logger$s.throwArgumentError("invalid event object","value",et);const tt={name:verifyIdentifier(et.name),anonymous:et.anonymous,inputs:et.inputs?et.inputs.map(ParamType.fromObject):[],type:"event"};return new EventFragment(_constructorGuard$2,tt)}static fromString(et){let tt=et.match(regexParen);tt||logger$s.throwArgumentError("invalid event string","value",et);let rt=!1;return tt[3].split(" ").forEach(nt=>{switch(nt.trim()){case"anonymous":rt=!0;break;case"":break;default:logger$s.warn("unknown modifier: "+nt)}}),EventFragment.fromObject({name:tt[1].trim(),anonymous:rt,inputs:parseParams(tt[2],!0),type:"event"})}static isEventFragment(et){return et&&et._isFragment&&et.type==="event"}}function parseGas(_e,et){et.gas=null;let tt=_e.split("@");return tt.length!==1?(tt.length>2&&logger$s.throwArgumentError("invalid human-readable ABI signature","value",_e),tt[1].match(/^[0-9]+$/)||logger$s.throwArgumentError("invalid human-readable ABI signature gas","value",_e),et.gas=BigNumber.from(tt[1]),tt[0]):_e}function parseModifiers(_e,et){et.constant=!1,et.payable=!1,et.stateMutability="nonpayable",_e.split(" ").forEach(tt=>{switch(tt.trim()){case"constant":et.constant=!0;break;case"payable":et.payable=!0,et.stateMutability="payable";break;case"nonpayable":et.payable=!1,et.stateMutability="nonpayable";break;case"pure":et.constant=!0,et.stateMutability="pure";break;case"view":et.constant=!0,et.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+tt)}})}function verifyState(_e){let et={constant:!1,payable:!0,stateMutability:"payable"};return _e.stateMutability!=null?(et.stateMutability=_e.stateMutability,et.constant=et.stateMutability==="view"||et.stateMutability==="pure",_e.constant!=null&&!!_e.constant!==et.constant&&logger$s.throwArgumentError("cannot have constant function with mutability "+et.stateMutability,"value",_e),et.payable=et.stateMutability==="payable",_e.payable!=null&&!!_e.payable!==et.payable&&logger$s.throwArgumentError("cannot have payable function with mutability "+et.stateMutability,"value",_e)):_e.payable!=null?(et.payable=!!_e.payable,_e.constant==null&&!et.payable&&_e.type!=="constructor"&&logger$s.throwArgumentError("unable to determine stateMutability","value",_e),et.constant=!!_e.constant,et.constant?et.stateMutability="view":et.stateMutability=et.payable?"payable":"nonpayable",et.payable&&et.constant&&logger$s.throwArgumentError("cannot have constant payable function","value",_e)):_e.constant!=null?(et.constant=!!_e.constant,et.payable=!et.constant,et.stateMutability=et.constant?"view":"payable"):_e.type!=="constructor"&&logger$s.throwArgumentError("unable to determine stateMutability","value",_e),et}class ConstructorFragment extends Fragment{format(et){if(et||(et=FormatTypes.sighash),FormatTypes[et]||logger$s.throwArgumentError("invalid format type","format",et),et===FormatTypes.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(rt=>JSON.parse(rt.format(et)))});et===FormatTypes.sighash&&logger$s.throwError("cannot format a constructor for sighash",Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let tt="constructor("+this.inputs.map(rt=>rt.format(et)).join(et===FormatTypes.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(tt+=this.stateMutability+" "),tt.trim()}static from(et){return typeof et=="string"?ConstructorFragment.fromString(et):ConstructorFragment.fromObject(et)}static fromObject(et){if(ConstructorFragment.isConstructorFragment(et))return et;et.type!=="constructor"&&logger$s.throwArgumentError("invalid constructor object","value",et);let tt=verifyState(et);tt.constant&&logger$s.throwArgumentError("constructor cannot be constant","value",et);const rt={name:null,type:et.type,inputs:et.inputs?et.inputs.map(ParamType.fromObject):[],payable:tt.payable,stateMutability:tt.stateMutability,gas:et.gas?BigNumber.from(et.gas):null};return new ConstructorFragment(_constructorGuard$2,rt)}static fromString(et){let tt={type:"constructor"};et=parseGas(et,tt);let rt=et.match(regexParen);return(!rt||rt[1].trim()!=="constructor")&&logger$s.throwArgumentError("invalid constructor string","value",et),tt.inputs=parseParams(rt[2].trim(),!1),parseModifiers(rt[3].trim(),tt),ConstructorFragment.fromObject(tt)}static isConstructorFragment(et){return et&&et._isFragment&&et.type==="constructor"}}class FunctionFragment extends ConstructorFragment{format(et){if(et||(et=FormatTypes.sighash),FormatTypes[et]||logger$s.throwArgumentError("invalid format type","format",et),et===FormatTypes.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(rt=>JSON.parse(rt.format(et))),outputs:this.outputs.map(rt=>JSON.parse(rt.format(et)))});let tt="";return et!==FormatTypes.sighash&&(tt+="function "),tt+=this.name+"("+this.inputs.map(rt=>rt.format(et)).join(et===FormatTypes.full?", ":",")+") ",et!==FormatTypes.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(tt+=this.stateMutability+" "):this.constant&&(tt+="view "),this.outputs&&this.outputs.length&&(tt+="returns ("+this.outputs.map(rt=>rt.format(et)).join(", ")+") "),this.gas!=null&&(tt+="@"+this.gas.toString()+" ")),tt.trim()}static from(et){return typeof et=="string"?FunctionFragment.fromString(et):FunctionFragment.fromObject(et)}static fromObject(et){if(FunctionFragment.isFunctionFragment(et))return et;et.type!=="function"&&logger$s.throwArgumentError("invalid function object","value",et);let tt=verifyState(et);const rt={type:et.type,name:verifyIdentifier(et.name),constant:tt.constant,inputs:et.inputs?et.inputs.map(ParamType.fromObject):[],outputs:et.outputs?et.outputs.map(ParamType.fromObject):[],payable:tt.payable,stateMutability:tt.stateMutability,gas:et.gas?BigNumber.from(et.gas):null};return new FunctionFragment(_constructorGuard$2,rt)}static fromString(et){let tt={type:"function"};et=parseGas(et,tt);let rt=et.split(" returns ");rt.length>2&&logger$s.throwArgumentError("invalid function string","value",et);let nt=rt[0].match(regexParen);if(nt||logger$s.throwArgumentError("invalid function signature","value",et),tt.name=nt[1].trim(),tt.name&&verifyIdentifier(tt.name),tt.inputs=parseParams(nt[2],!1),parseModifiers(nt[3].trim(),tt),rt.length>1){let it=rt[1].match(regexParen);(it[1].trim()!=""||it[3].trim()!="")&&logger$s.throwArgumentError("unexpected tokens","value",et),tt.outputs=parseParams(it[2],!1)}else tt.outputs=[];return FunctionFragment.fromObject(tt)}static isFunctionFragment(et){return et&&et._isFragment&&et.type==="function"}}function checkForbidden(_e){const et=_e.format();return(et==="Error(string)"||et==="Panic(uint256)")&&logger$s.throwArgumentError(`cannot specify user defined ${et} error`,"fragment",_e),_e}class ErrorFragment extends Fragment{format(et){if(et||(et=FormatTypes.sighash),FormatTypes[et]||logger$s.throwArgumentError("invalid format type","format",et),et===FormatTypes.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(rt=>JSON.parse(rt.format(et)))});let tt="";return et!==FormatTypes.sighash&&(tt+="error "),tt+=this.name+"("+this.inputs.map(rt=>rt.format(et)).join(et===FormatTypes.full?", ":",")+") ",tt.trim()}static from(et){return typeof et=="string"?ErrorFragment.fromString(et):ErrorFragment.fromObject(et)}static fromObject(et){if(ErrorFragment.isErrorFragment(et))return et;et.type!=="error"&&logger$s.throwArgumentError("invalid error object","value",et);const tt={type:et.type,name:verifyIdentifier(et.name),inputs:et.inputs?et.inputs.map(ParamType.fromObject):[]};return checkForbidden(new ErrorFragment(_constructorGuard$2,tt))}static fromString(et){let tt={type:"error"},rt=et.match(regexParen);return rt||logger$s.throwArgumentError("invalid error signature","value",et),tt.name=rt[1].trim(),tt.name&&verifyIdentifier(tt.name),tt.inputs=parseParams(rt[2],!1),checkForbidden(ErrorFragment.fromObject(tt))}static isErrorFragment(et){return et&&et._isFragment&&et.type==="error"}}function verifyType(_e){return _e.match(/^uint($|[^1-9])/)?_e="uint256"+_e.substring(4):_e.match(/^int($|[^1-9])/)&&(_e="int256"+_e.substring(3)),_e}const regexIdentifier=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function verifyIdentifier(_e){return(!_e||!_e.match(regexIdentifier))&&logger$s.throwArgumentError(`invalid identifier "${_e}"`,"value",_e),_e}const regexParen=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function splitNesting(_e){_e=_e.trim();let et=[],tt="",rt=0;for(let nt=0;nt<_e.length;nt++){let it=_e[nt];it===","&&rt===0?(et.push(tt),tt=""):(tt+=it,it==="("?rt++:it===")"&&(rt--,rt===-1&&logger$s.throwArgumentError("unbalanced parenthesis","value",_e)))}return tt&&et.push(tt),et}const logger$r=new Logger(version$o);function checkResultErrors(_e){const et=[],tt=function(rt,nt){if(Array.isArray(nt))for(let it in nt){const at=rt.slice();at.push(it);try{tt(at,nt[it])}catch(st){et.push({path:at,error:st})}}};return tt([],_e),et}class Coder{constructor(et,tt,rt,nt){this.name=et,this.type=tt,this.localName=rt,this.dynamic=nt}_throwError(et,tt){logger$r.throwArgumentError(et,this.localName,tt)}}let Writer$2=class{constructor(et){defineReadOnly(this,"wordSize",et||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(et)}get data(){return hexConcat(this._data)}get length(){return this._dataLength}_writeData(et){return this._data.push(et),this._dataLength+=et.length,et.length}appendWriter(et){return this._writeData(concat$1(et._data))}writeBytes(et){let tt=arrayify(et);const rt=tt.length%this.wordSize;return rt&&(tt=concat$1([tt,this._padding.slice(rt)])),this._writeData(tt)}_getValue(et){let tt=arrayify(BigNumber.from(et));return tt.length>this.wordSize&&logger$r.throwError("value out-of-bounds",Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:tt.length}),tt.length%this.wordSize&&(tt=concat$1([this._padding.slice(tt.length%this.wordSize),tt])),tt}writeValue(et){return this._writeData(this._getValue(et))}writeUpdatableValue(){const et=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,tt=>{this._data[et]=this._getValue(tt)}}},Reader$2=class wn{constructor(et,tt,rt,nt){defineReadOnly(this,"_data",arrayify(et)),defineReadOnly(this,"wordSize",tt||32),defineReadOnly(this,"_coerceFunc",rt),defineReadOnly(this,"allowLoose",nt),this._offset=0}get data(){return hexlify(this._data)}get consumed(){return this._offset}static coerce(et,tt){let rt=et.match("^u?int([0-9]+)$");return rt&&parseInt(rt[1])<=48&&(tt=tt.toNumber()),tt}coerce(et,tt){return this._coerceFunc?this._coerceFunc(et,tt):wn.coerce(et,tt)}_peekBytes(et,tt,rt){let nt=Math.ceil(tt/this.wordSize)*this.wordSize;return this._offset+nt>this._data.length&&(this.allowLoose&&rt&&this._offset+tt<=this._data.length?nt=tt:logger$r.throwError("data out-of-bounds",Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+nt})),this._data.slice(this._offset,this._offset+nt)}subReader(et){return new wn(this._data.slice(this._offset+et),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(et,tt){let rt=this._peekBytes(0,et,!!tt);return this._offset+=rt.length,rt.slice(0,et)}readValue(){return BigNumber.from(this.readBytes(this.wordSize))}};var sha3$2={exports:{}};/** + * [js-sha3]{@link https://github.com/emn178/js-sha3} + * + * @version 0.8.0 + * @author Chen, Yi-Cyuan [emn178@gmail.com] + * @copyright Chen, Yi-Cyuan 2015-2018 + * @license MIT + */(function(_e){(function(){var et="input is invalid type",tt="finalize already called",rt=typeof window=="object",nt=rt?window:{};nt.JS_SHA3_NO_WINDOW&&(rt=!1);var it=!rt&&typeof self=="object",at=!nt.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;at?nt=commonjsGlobal:it&&(nt=self);var st=!nt.JS_SHA3_NO_COMMON_JS&&!0&&_e.exports,lt=!nt.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",dt="0123456789abcdef".split(""),ht=[31,7936,2031616,520093696],pt=[4,1024,262144,67108864],mt=[1,256,65536,16777216],gt=[6,1536,393216,100663296],vt=[0,8,16,24],xt=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],yt=[224,256,384,512],bt=[128,256],wt=["hex","buffer","arrayBuffer","array","digest"],Et={128:168,256:136};(nt.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(Rt){return Object.prototype.toString.call(Rt)==="[object Array]"}),lt&&(nt.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(Rt){return typeof Rt=="object"&&Rt.buffer&&Rt.buffer.constructor===ArrayBuffer});for(var $t=function(Rt,Kt,Zt){return function(Jt){return new St(Rt,Kt,Rt).update(Jt)[Zt]()}},Pt=function(Rt,Kt,Zt){return function(Jt,rr){return new St(Rt,Kt,rr).update(Jt)[Zt]()}},kt=function(Rt,Kt,Zt){return function(Jt,rr,or,ar){return _t["cshake"+Rt].update(Jt,rr,or,ar)[Zt]()}},Lt=function(Rt,Kt,Zt){return function(Jt,rr,or,ar){return _t["kmac"+Rt].update(Jt,rr,or,ar)[Zt]()}},jt=function(Rt,Kt,Zt,Jt){for(var rr=0;rr>5,this.byteCount=this.blockCount<<2,this.outputBlocks=Zt>>5,this.extraBytes=(Zt&31)>>3;for(var Jt=0;Jt<50;++Jt)this.s[Jt]=0}St.prototype.update=function(Rt){if(this.finalized)throw new Error(tt);var Kt,Zt=typeof Rt;if(Zt!=="string"){if(Zt==="object"){if(Rt===null)throw new Error(et);if(lt&&Rt.constructor===ArrayBuffer)Rt=new Uint8Array(Rt);else if(!Array.isArray(Rt)&&(!lt||!ArrayBuffer.isView(Rt)))throw new Error(et)}else throw new Error(et);Kt=!0}for(var Jt=this.blocks,rr=this.byteCount,or=Rt.length,ar=this.blockCount,ir=0,pr=this.s,nr,hr;ir>2]|=Rt[ir]<>2]|=hr<>2]|=(192|hr>>6)<>2]|=(128|hr&63)<=57344?(Jt[nr>>2]|=(224|hr>>12)<>2]|=(128|hr>>6&63)<>2]|=(128|hr&63)<>2]|=(240|hr>>18)<>2]|=(128|hr>>12&63)<>2]|=(128|hr>>6&63)<>2]|=(128|hr&63)<=rr){for(this.start=nr-rr,this.block=Jt[ar],nr=0;nr>8,Zt=Rt&255;Zt>0;)rr.unshift(Zt),Rt=Rt>>8,Zt=Rt&255,++Jt;return Kt?rr.push(Jt):rr.unshift(Jt),this.update(rr),rr.length},St.prototype.encodeString=function(Rt){var Kt,Zt=typeof Rt;if(Zt!=="string"){if(Zt==="object"){if(Rt===null)throw new Error(et);if(lt&&Rt.constructor===ArrayBuffer)Rt=new Uint8Array(Rt);else if(!Array.isArray(Rt)&&(!lt||!ArrayBuffer.isView(Rt)))throw new Error(et)}else throw new Error(et);Kt=!0}var Jt=0,rr=Rt.length;if(Kt)Jt=rr;else for(var or=0;or=57344?Jt+=3:(ar=65536+((ar&1023)<<10|Rt.charCodeAt(++or)&1023),Jt+=4)}return Jt+=this.encode(Jt*8),this.update(Rt),Jt},St.prototype.bytepad=function(Rt,Kt){for(var Zt=this.encode(Kt),Jt=0;Jt>2]|=this.padding[Kt&3],this.lastByteIndex===this.byteCount)for(Rt[0]=Rt[Zt],Kt=1;Kt>4&15]+dt[ir&15]+dt[ir>>12&15]+dt[ir>>8&15]+dt[ir>>20&15]+dt[ir>>16&15]+dt[ir>>28&15]+dt[ir>>24&15];or%Rt===0&&(Vt(Kt),rr=0)}return Jt&&(ir=Kt[rr],ar+=dt[ir>>4&15]+dt[ir&15],Jt>1&&(ar+=dt[ir>>12&15]+dt[ir>>8&15]),Jt>2&&(ar+=dt[ir>>20&15]+dt[ir>>16&15])),ar},St.prototype.arrayBuffer=function(){this.finalize();var Rt=this.blockCount,Kt=this.s,Zt=this.outputBlocks,Jt=this.extraBytes,rr=0,or=0,ar=this.outputBits>>3,ir;Jt?ir=new ArrayBuffer(Zt+1<<2):ir=new ArrayBuffer(ar);for(var pr=new Uint32Array(ir);or>8&255,ar[ir+2]=pr>>16&255,ar[ir+3]=pr>>24&255;or%Rt===0&&Vt(Kt)}return Jt&&(ir=or<<2,pr=Kt[rr],ar[ir]=pr&255,Jt>1&&(ar[ir+1]=pr>>8&255),Jt>2&&(ar[ir+2]=pr>>16&255)),ar};function Ft(Rt,Kt,Zt){St.call(this,Rt,Kt,Zt)}Ft.prototype=new St,Ft.prototype.finalize=function(){return this.encode(this.outputBits,!0),St.prototype.finalize.call(this)};var Vt=function(Rt){var Kt,Zt,Jt,rr,or,ar,ir,pr,nr,hr,Ar,ur,vr,wr,gr,yr,Er,_r,$r,Dr,kr,zt,It,Nt,Gt,er,Yt,tr,dr,br,Qt,sr,cr,xr,Sr,Pr,Nr,Or,Tr,Ir,Ur,Br,Mr,Kr,Lr,Fr,Zr,Rr,jr,Yr,Hr,zr,nn,Vr,qr,on,Wr,Gr,Xr,Qr,en,tn,rn;for(Jt=0;Jt<48;Jt+=2)rr=Rt[0]^Rt[10]^Rt[20]^Rt[30]^Rt[40],or=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,Rt[9]=It^~gr&Er,Rt[18]=sr^~Nt&er,Rt[19]=cr^~Gt&Yt,Rt[28]=Br^~xr&Pr,Rt[29]=Mr^~Sr&Nr,Rt[38]=zr^~Kr&Fr,Rt[39]=nn^~Lr&Zr,Rt[48]=tn^~Vr&on,Rt[49]=rn^~qr&Wr,Rt[0]^=xt[Jt],Rt[1]^=xt[Jt+1]};if(st)_e.exports=_t;else for(Tt=0;Tt>=8;return et}function unarrayifyInteger(_e,et,tt){let rt=0;for(let nt=0;ntet+1+rt&&logger$q.throwError("child data too short",Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+rt,result:nt}}function _decode(_e,et){if(_e.length===0&&logger$q.throwError("data too short",Logger.errors.BUFFER_OVERRUN,{}),_e[et]>=248){const tt=_e[et]-247;et+1+tt>_e.length&&logger$q.throwError("data short segment too short",Logger.errors.BUFFER_OVERRUN,{});const rt=unarrayifyInteger(_e,et+1,tt);return et+1+tt+rt>_e.length&&logger$q.throwError("data long segment too short",Logger.errors.BUFFER_OVERRUN,{}),_decodeChildren(_e,et,et+1+tt,tt+rt)}else if(_e[et]>=192){const tt=_e[et]-192;return et+1+tt>_e.length&&logger$q.throwError("data array too short",Logger.errors.BUFFER_OVERRUN,{}),_decodeChildren(_e,et,et+1,tt)}else if(_e[et]>=184){const tt=_e[et]-183;et+1+tt>_e.length&&logger$q.throwError("data array too short",Logger.errors.BUFFER_OVERRUN,{});const rt=unarrayifyInteger(_e,et+1,tt);et+1+tt+rt>_e.length&&logger$q.throwError("data array too short",Logger.errors.BUFFER_OVERRUN,{});const nt=hexlify(_e.slice(et+1+tt,et+1+tt+rt));return{consumed:1+tt+rt,result:nt}}else if(_e[et]>=128){const tt=_e[et]-128;et+1+tt>_e.length&&logger$q.throwError("data too short",Logger.errors.BUFFER_OVERRUN,{});const rt=hexlify(_e.slice(et+1,et+1+tt));return{consumed:1+tt,result:rt}}return{consumed:1,result:hexlify(_e[et])}}function decode$2(_e){const et=arrayify(_e),tt=_decode(et,0);return tt.consumed!==et.length&&logger$q.throwArgumentError("invalid rlp data","data",_e),tt.result}const lib_esm$g=Object.freeze(Object.defineProperty({__proto__:null,decode:decode$2,encode:encode$2},Symbol.toStringTag,{value:"Module"})),version$m="address/5.7.0",logger$p=new Logger(version$m);function getChecksumAddress(_e){isHexString(_e,20)||logger$p.throwArgumentError("invalid address","address",_e),_e=_e.toLowerCase();const et=_e.substring(2).split(""),tt=new Uint8Array(40);for(let nt=0;nt<40;nt++)tt[nt]=et[nt].charCodeAt(0);const rt=arrayify(keccak256$2(tt));for(let nt=0;nt<40;nt+=2)rt[nt>>1]>>4>=8&&(et[nt]=et[nt].toUpperCase()),(rt[nt>>1]&15)>=8&&(et[nt+1]=et[nt+1].toUpperCase());return"0x"+et.join("")}const MAX_SAFE_INTEGER=9007199254740991;function log10(_e){return Math.log10?Math.log10(_e):Math.log(_e)/Math.LN10}const ibanLookup={};for(let _e=0;_e<10;_e++)ibanLookup[String(_e)]=String(_e);for(let _e=0;_e<26;_e++)ibanLookup[String.fromCharCode(65+_e)]=String(10+_e);const safeDigits=Math.floor(log10(MAX_SAFE_INTEGER));function ibanChecksum(_e){_e=_e.toUpperCase(),_e=_e.substring(4)+_e.substring(0,2)+"00";let et=_e.split("").map(rt=>ibanLookup[rt]).join("");for(;et.length>=safeDigits;){let rt=et.substring(0,safeDigits);et=parseInt(rt,10)%97+et.substring(rt.length)}let tt=String(98-parseInt(et,10)%97);for(;tt.length<2;)tt="0"+tt;return tt}function getAddress$1(_e){let et=null;if(typeof _e!="string"&&logger$p.throwArgumentError("invalid address","address",_e),_e.match(/^(0x)?[0-9a-fA-F]{40}$/))_e.substring(0,2)!=="0x"&&(_e="0x"+_e),et=getChecksumAddress(_e),_e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&et!==_e&&logger$p.throwArgumentError("bad address checksum","address",_e);else if(_e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(_e.substring(2,4)!==ibanChecksum(_e)&&logger$p.throwArgumentError("bad icap checksum","address",_e),et=_base36To16(_e.substring(4));et.length<40;)et="0"+et;et=getChecksumAddress("0x"+et)}else logger$p.throwArgumentError("invalid address","address",_e);return et}function isAddress$1(_e){try{return getAddress$1(_e),!0}catch{}return!1}function getIcapAddress(_e){let et=_base16To36(getAddress$1(_e).substring(2)).toUpperCase();for(;et.length<30;)et="0"+et;return"XE"+ibanChecksum("XE00"+et)+et}function getContractAddress$1(_e){let et=null;try{et=getAddress$1(_e.from)}catch{logger$p.throwArgumentError("missing from address","transaction",_e)}const tt=stripZeros(arrayify(BigNumber.from(_e.nonce).toHexString()));return getAddress$1(hexDataSlice(keccak256$2(encode$2([et,tt])),12))}function getCreate2Address(_e,et,tt){return hexDataLength(et)!==32&&logger$p.throwArgumentError("salt must be 32 bytes","salt",et),hexDataLength(tt)!==32&&logger$p.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",tt),getAddress$1(hexDataSlice(keccak256$2(concat$1(["0xff",getAddress$1(_e),et,tt])),12))}const lib_esm$f=Object.freeze(Object.defineProperty({__proto__:null,getAddress:getAddress$1,getContractAddress:getContractAddress$1,getCreate2Address,getIcapAddress,isAddress:isAddress$1},Symbol.toStringTag,{value:"Module"}));class AddressCoder extends Coder{constructor(et){super("address","address",et,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(et,tt){try{tt=getAddress$1(tt)}catch(rt){this._throwError(rt.message,tt)}return et.writeValue(tt)}decode(et){return getAddress$1(hexZeroPad(et.readValue().toHexString(),20))}}class AnonymousCoder extends Coder{constructor(et){super(et.name,et.type,void 0,et.dynamic),this.coder=et}defaultValue(){return this.coder.defaultValue()}encode(et,tt){return this.coder.encode(et,tt)}decode(et){return this.coder.decode(et)}}const logger$o=new Logger(version$o);function pack$1(_e,et,tt){let rt=null;if(Array.isArray(tt))rt=tt;else if(tt&&typeof tt=="object"){let lt={};rt=et.map(dt=>{const ht=dt.localName;return ht||logger$o.throwError("cannot encode object for signature with missing names",Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:dt,value:tt}),lt[ht]&&logger$o.throwError("cannot encode object for signature with duplicate names",Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:dt,value:tt}),lt[ht]=!0,tt[ht]})}else logger$o.throwArgumentError("invalid tuple value","tuple",tt);et.length!==rt.length&&logger$o.throwArgumentError("types/value length mismatch","tuple",tt);let nt=new Writer$2(_e.wordSize),it=new Writer$2(_e.wordSize),at=[];et.forEach((lt,dt)=>{let ht=rt[dt];if(lt.dynamic){let pt=it.length;lt.encode(it,ht);let mt=nt.writeUpdatableValue();at.push(gt=>{mt(gt+pt)})}else lt.encode(nt,ht)}),at.forEach(lt=>{lt(nt.length)});let st=_e.appendWriter(nt);return st+=_e.appendWriter(it),st}function unpack(_e,et){let tt=[],rt=_e.subReader(0);et.forEach(it=>{let at=null;if(it.dynamic){let st=_e.readValue(),lt=rt.subReader(st.toNumber());try{at=it.decode(lt)}catch(dt){if(dt.code===Logger.errors.BUFFER_OVERRUN)throw dt;at=dt,at.baseType=it.name,at.name=it.localName,at.type=it.type}}else try{at=it.decode(_e)}catch(st){if(st.code===Logger.errors.BUFFER_OVERRUN)throw st;at=st,at.baseType=it.name,at.name=it.localName,at.type=it.type}at!=null&&tt.push(at)});const nt=et.reduce((it,at)=>{const st=at.localName;return st&&(it[st]||(it[st]=0),it[st]++),it},{});et.forEach((it,at)=>{let st=it.localName;if(!st||nt[st]!==1||(st==="length"&&(st="_length"),tt[st]!=null))return;const lt=tt[at];lt instanceof Error?Object.defineProperty(tt,st,{enumerable:!0,get:()=>{throw lt}}):tt[st]=lt});for(let it=0;it{throw at}})}return Object.freeze(tt)}class ArrayCoder extends Coder{constructor(et,tt,rt){const nt=et.type+"["+(tt>=0?tt:"")+"]",it=tt===-1||et.dynamic;super("array",nt,rt,it),this.coder=et,this.length=tt}defaultValue(){const et=this.coder.defaultValue(),tt=[];for(let rt=0;rtet._data.length&&logger$o.throwError("insufficient data length",Logger.errors.BUFFER_OVERRUN,{length:et._data.length,count:tt}));let rt=[];for(let nt=0;nt>6===2;at++)it++;return it}return _e===Utf8ErrorReason.OVERRUN?tt.length-et-1:0}function replaceFunc(_e,et,tt,rt,nt){return _e===Utf8ErrorReason.OVERLONG?(rt.push(nt),0):(rt.push(65533),ignoreFunc(_e,et,tt))}const Utf8ErrorFuncs=Object.freeze({error:errorFunc,ignore:ignoreFunc,replace:replaceFunc});function getUtf8CodePoints(_e,et){et==null&&(et=Utf8ErrorFuncs.error),_e=arrayify(_e);const tt=[];let rt=0;for(;rt<_e.length;){const nt=_e[rt++];if(!(nt>>7)){tt.push(nt);continue}let it=null,at=null;if((nt&224)===192)it=1,at=127;else if((nt&240)===224)it=2,at=2047;else if((nt&248)===240)it=3,at=65535;else{(nt&192)===128?rt+=et(Utf8ErrorReason.UNEXPECTED_CONTINUE,rt-1,_e,tt):rt+=et(Utf8ErrorReason.BAD_PREFIX,rt-1,_e,tt);continue}if(rt-1+it>=_e.length){rt+=et(Utf8ErrorReason.OVERRUN,rt-1,_e,tt);continue}let st=nt&(1<<8-it-1)-1;for(let lt=0;lt1114111){rt+=et(Utf8ErrorReason.OUT_OF_RANGE,rt-1-it,_e,tt,st);continue}if(st>=55296&&st<=57343){rt+=et(Utf8ErrorReason.UTF16_SURROGATE,rt-1-it,_e,tt,st);continue}if(st<=at){rt+=et(Utf8ErrorReason.OVERLONG,rt-1-it,_e,tt,st);continue}tt.push(st)}}return tt}function toUtf8Bytes(_e,et=UnicodeNormalizationForm.current){et!=UnicodeNormalizationForm.current&&(logger$n.checkNormalize(),_e=_e.normalize(et));let tt=[];for(let rt=0;rt<_e.length;rt++){const nt=_e.charCodeAt(rt);if(nt<128)tt.push(nt);else if(nt<2048)tt.push(nt>>6|192),tt.push(nt&63|128);else if((nt&64512)==55296){rt++;const it=_e.charCodeAt(rt);if(rt>=_e.length||(it&64512)!==56320)throw new Error("invalid utf-8 string");const at=65536+((nt&1023)<<10)+(it&1023);tt.push(at>>18|240),tt.push(at>>12&63|128),tt.push(at>>6&63|128),tt.push(at&63|128)}else tt.push(nt>>12|224),tt.push(nt>>6&63|128),tt.push(nt&63|128)}return arrayify(tt)}function escapeChar(_e){const et="0000"+_e.toString(16);return"\\u"+et.substring(et.length-4)}function _toEscapedUtf8String(_e,et){return'"'+getUtf8CodePoints(_e,et).map(tt=>{if(tt<256){switch(tt){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(tt>=32&&tt<127)return String.fromCharCode(tt)}return tt<=65535?escapeChar(tt):(tt-=65536,escapeChar((tt>>10&1023)+55296)+escapeChar((tt&1023)+56320))}).join("")+'"'}function _toUtf8String(_e){return _e.map(et=>et<=65535?String.fromCharCode(et):(et-=65536,String.fromCharCode((et>>10&1023)+55296,(et&1023)+56320))).join("")}function toUtf8String(_e,et){return _toUtf8String(getUtf8CodePoints(_e,et))}function toUtf8CodePoints(_e,et=UnicodeNormalizationForm.current){return getUtf8CodePoints(toUtf8Bytes(_e,et))}function formatBytes32String(_e){const et=toUtf8Bytes(_e);if(et.length>31)throw new Error("bytes32 string must be less than 32 bytes");return hexlify(concat$1([et,HashZero]).slice(0,32))}function parseBytes32String(_e){const et=arrayify(_e);if(et.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(et[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let tt=31;for(;et[tt-1]===0;)tt--;return toUtf8String(et.slice(0,tt))}function bytes2(_e){if(_e.length%4!==0)throw new Error("bad data");let et=[];for(let tt=0;tt<_e.length;tt+=4)et.push(parseInt(_e.substring(tt,tt+4),16));return et}function createTable(_e,et){et||(et=function(nt){return[parseInt(nt,16)]});let tt=0,rt={};return _e.split(",").forEach(nt=>{let it=nt.split(":");tt+=parseInt(it[0],16),rt[tt]=et(it[1])}),rt}function createRangeTable(_e){let et=0;return _e.split(",").map(tt=>{let rt=tt.split("-");rt.length===1?rt[1]="0":rt[1]===""&&(rt[1]="1");let nt=et+parseInt(rt[0],16);return et=parseInt(rt[1],16),{l:nt,h:et}})}function matchMap(_e,et){let tt=0;for(let rt=0;rt=tt&&_e<=tt+nt.h&&(_e-tt)%(nt.d||1)===0){if(nt.e&&nt.e.indexOf(_e-tt)!==-1)continue;return nt}}return null}const Table_A_1_ranges=createRangeTable("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Table_B_1_flags="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(_e=>parseInt(_e,16)),Table_B_2_ranges=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],Table_B_2_lut_abs=createTable("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Table_B_2_lut_rel=createTable("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),Table_B_2_complex=createTable("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",bytes2),Table_C_ranges=createRangeTable("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function flatten(_e){return _e.reduce((et,tt)=>(tt.forEach(rt=>{et.push(rt)}),et),[])}function _nameprepTableA1(_e){return!!matchMap(_e,Table_A_1_ranges)}function _nameprepTableB2(_e){let et=matchMap(_e,Table_B_2_ranges);if(et)return[_e+et.s];let tt=Table_B_2_lut_abs[_e];if(tt)return tt;let rt=Table_B_2_lut_rel[_e];if(rt)return[_e+rt[0]];let nt=Table_B_2_complex[_e];return nt||null}function _nameprepTableC(_e){return!!matchMap(_e,Table_C_ranges)}function nameprep(_e){if(_e.match(/^[a-z0-9-]*$/i)&&_e.length<=59)return _e.toLowerCase();let et=toUtf8CodePoints(_e);et=flatten(et.map(rt=>{if(Table_B_1_flags.indexOf(rt)>=0)return[];if(rt>=65024&&rt<=65039)return[];let nt=_nameprepTableB2(rt);return nt||[rt]})),et=toUtf8CodePoints(_toUtf8String(et),UnicodeNormalizationForm.NFKC),et.forEach(rt=>{if(_nameprepTableC(rt))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),et.forEach(rt=>{if(_nameprepTableA1(rt))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let tt=_toUtf8String(et);if(tt.substring(0,1)==="-"||tt.substring(2,4)==="--"||tt.substring(tt.length-1)==="-")throw new Error("invalid hyphen");return tt}const lib_esm$e=Object.freeze(Object.defineProperty({__proto__:null,get UnicodeNormalizationForm(){return UnicodeNormalizationForm},Utf8ErrorFuncs,get Utf8ErrorReason(){return Utf8ErrorReason},_toEscapedUtf8String,formatBytes32String,nameprep,parseBytes32String,toUtf8Bytes,toUtf8CodePoints,toUtf8String},Symbol.toStringTag,{value:"Module"}));class StringCoder extends DynamicBytesCoder{constructor(et){super("string",et)}defaultValue(){return""}encode(et,tt){return super.encode(et,toUtf8Bytes(tt))}decode(et){return toUtf8String(super.decode(et))}}class TupleCoder extends Coder{constructor(et,tt){let rt=!1;const nt=[];et.forEach(at=>{at.dynamic&&(rt=!0),nt.push(at.type)});const it="tuple("+nt.join(",")+")";super("tuple",it,tt,rt),this.coders=et}defaultValue(){const et=[];this.coders.forEach(rt=>{et.push(rt.defaultValue())});const tt=this.coders.reduce((rt,nt)=>{const it=nt.localName;return it&&(rt[it]||(rt[it]=0),rt[it]++),rt},{});return this.coders.forEach((rt,nt)=>{let it=rt.localName;!it||tt[it]!==1||(it==="length"&&(it="_length"),et[it]==null&&(et[it]=et[nt]))}),Object.freeze(et)}encode(et,tt){return pack$1(et,this.coders,tt)}decode(et){return et.coerce(this.name,unpack(et,this.coders))}}const logger$m=new Logger(version$o),paramTypeBytes=new RegExp(/^bytes([0-9]*)$/),paramTypeNumber=new RegExp(/^(u?int)([0-9]*)$/);class AbiCoder{constructor(et){defineReadOnly(this,"coerceFunc",et||null)}_getCoder(et){switch(et.baseType){case"address":return new AddressCoder(et.name);case"bool":return new BooleanCoder(et.name);case"string":return new StringCoder(et.name);case"bytes":return new BytesCoder(et.name);case"array":return new ArrayCoder(this._getCoder(et.arrayChildren),et.arrayLength,et.name);case"tuple":return new TupleCoder((et.components||[]).map(rt=>this._getCoder(rt)),et.name);case"":return new NullCoder(et.name)}let tt=et.type.match(paramTypeNumber);if(tt){let rt=parseInt(tt[2]||"256");return(rt===0||rt>256||rt%8!==0)&&logger$m.throwArgumentError("invalid "+tt[1]+" bit length","param",et),new NumberCoder(rt/8,tt[1]==="int",et.name)}if(tt=et.type.match(paramTypeBytes),tt){let rt=parseInt(tt[1]);return(rt===0||rt>32)&&logger$m.throwArgumentError("invalid bytes length","param",et),new FixedBytesCoder(rt,et.name)}return logger$m.throwArgumentError("invalid type","type",et.type)}_getWordSize(){return 32}_getReader(et,tt){return new Reader$2(et,this._getWordSize(),this.coerceFunc,tt)}_getWriter(){return new Writer$2(this._getWordSize())}getDefaultValue(et){const tt=et.map(nt=>this._getCoder(ParamType.from(nt)));return new TupleCoder(tt,"_").defaultValue()}encode(et,tt){et.length!==tt.length&&logger$m.throwError("types/values length mismatch",Logger.errors.INVALID_ARGUMENT,{count:{types:et.length,values:tt.length},value:{types:et,values:tt}});const rt=et.map(at=>this._getCoder(ParamType.from(at))),nt=new TupleCoder(rt,"_"),it=this._getWriter();return nt.encode(it,tt),it.data}decode(et,tt,rt){const nt=et.map(at=>this._getCoder(ParamType.from(at)));return new TupleCoder(nt,"_").decode(this._getReader(arrayify(tt),rt))}}const defaultAbiCoder=new AbiCoder;function id$2(_e){return keccak256$2(toUtf8Bytes(_e))}const version$k="hash/5.7.0";function decode$1(_e){_e=atob(_e);const et=[];for(let tt=0;tt<_e.length;tt++)et.push(_e.charCodeAt(tt));return arrayify(et)}function encode$1(_e){_e=arrayify(_e);let et="";for(let tt=0;tt<_e.length;tt++)et+=String.fromCharCode(_e[tt]);return btoa(et)}const lib_esm$d=Object.freeze(Object.defineProperty({__proto__:null,decode:decode$1,encode:encode$1},Symbol.toStringTag,{value:"Module"}));function flat(_e,et){et==null&&(et=1);const tt=[],rt=tt.forEach,nt=function(it,at){rt.call(it,function(st){at>0&&Array.isArray(st)?nt(st,at-1):tt.push(st)})};return nt(_e,et),tt}function fromEntries(_e){const et={};for(let tt=0;tt<_e.length;tt++){const rt=_e[tt];et[rt[0]]=rt[1]}return et}function decode_arithmetic(_e){let et=0;function tt(){return _e[et++]<<8|_e[et++]}let rt=tt(),nt=1,it=[0,1];for(let Pt=1;Pt>--lt&1}const pt=31,mt=Math.pow(2,pt),gt=mt>>>1,vt=gt>>1,xt=mt-1;let yt=0;for(let Pt=0;Pt1;){let Dt=kt+Lt>>>1;Pt>>1|ht(),jt=jt<<1^gt,qt=(qt^gt)<<1|gt|1;wt=jt,Et=1+qt-jt}let $t=rt-4;return bt.map(Pt=>{switch(Pt-$t){case 3:return $t+65792+(_e[st++]<<16|_e[st++]<<8|_e[st++]);case 2:return $t+256+(_e[st++]<<8|_e[st++]);case 1:return $t+_e[st++];default:return Pt-1}})}function read_payload(_e){let et=0;return()=>_e[et++]}function read_compressed_payload(_e){return read_payload(decode_arithmetic(_e))}function signed(_e){return _e&1?~_e>>1:_e>>1}function read_counts(_e,et){let tt=Array(_e);for(let rt=0;rt<_e;rt++)tt[rt]=1+et();return tt}function read_ascending(_e,et){let tt=Array(_e);for(let rt=0,nt=-1;rt<_e;rt++)tt[rt]=nt+=1+et();return tt}function read_deltas(_e,et){let tt=Array(_e);for(let rt=0,nt=0;rt<_e;rt++)tt[rt]=nt+=signed(et());return tt}function read_member_array(_e,et){let tt=read_ascending(_e(),_e),rt=_e(),nt=read_ascending(rt,_e),it=read_counts(rt,_e);for(let at=0;atet[at]):tt}function read_mapped_map(_e){let et=[];for(;;){let tt=_e();if(tt==0)break;et.push(read_linear_table(tt,_e))}for(;;){let tt=_e()-1;if(tt<0)break;et.push(read_replacement_table(tt,_e))}return fromEntries(flat(et))}function read_zero_terminated_array(_e){let et=[];for(;;){let tt=_e();if(tt==0)break;et.push(tt)}return et}function read_transposed(_e,et,tt){let rt=Array(_e).fill(void 0).map(()=>[]);for(let nt=0;ntrt[at].push(it));return rt}function read_linear_table(_e,et){let tt=1+et(),rt=et(),nt=read_zero_terminated_array(et),it=read_transposed(nt.length,1+_e,et);return flat(it.map((at,st)=>{const lt=at[0],dt=at.slice(1);return Array(nt[st]).fill(void 0).map((ht,pt)=>{let mt=pt*rt;return[lt+pt*tt,dt.map(gt=>gt+mt)]})}))}function read_replacement_table(_e,et){let tt=1+et();return read_transposed(tt,1+_e,et).map(nt=>[nt[0],nt.slice(1)])}function read_emoji_trie(_e){let et=read_member_array(_e).sort((rt,nt)=>rt-nt);return tt();function tt(){let rt=[];for(;;){let dt=read_member_array(_e,et);if(dt.length==0)break;rt.push({set:new Set(dt),node:tt()})}rt.sort((dt,ht)=>ht.set.size-dt.set.size);let nt=_e(),it=nt%3;nt=nt/3|0;let at=!!(nt&1);nt>>=1;let st=nt==1,lt=nt==2;return{branches:rt,valid:it,fe0f:at,save:st,check:lt}}}function getData(){return read_compressed_payload(decode$1("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoX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leksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}const r$5=getData(),VALID=new Set(read_member_array(r$5)),IGNORED=new Set(read_member_array(r$5)),MAPPED=read_mapped_map(r$5),EMOJI_ROOT=read_emoji_trie(r$5),HYPHEN=45,UNDERSCORE=95;function explode_cp(_e){return toUtf8CodePoints(_e)}function filter_fe0f(_e){return _e.filter(et=>et!=65039)}function ens_normalize_post_check(_e){for(let et of _e.split(".")){let tt=explode_cp(et);try{for(let rt=tt.lastIndexOf(UNDERSCORE)-1;rt>=0;rt--)if(tt[rt]!==UNDERSCORE)throw new Error("underscore only allowed at start");if(tt.length>=4&&tt.every(rt=>rt<128)&&tt[2]===HYPHEN&&tt[3]===HYPHEN)throw new Error("invalid label extension")}catch(rt){throw new Error(`Invalid label "${et}": ${rt.message}`)}}return _e}function ens_normalize(_e){return ens_normalize_post_check(normalize$1(_e,filter_fe0f))}function normalize$1(_e,et){let tt=explode_cp(_e).reverse(),rt=[];for(;tt.length;){let nt=consume_emoji_reversed(tt);if(nt){rt.push(...et(nt));continue}let it=tt.pop();if(VALID.has(it)){rt.push(it);continue}if(IGNORED.has(it))continue;let at=MAPPED[it];if(at){rt.push(...at);continue}throw new Error(`Disallowed codepoint: 0x${it.toString(16).toUpperCase()}`)}return ens_normalize_post_check(nfc(String.fromCodePoint(...rt)))}function nfc(_e){return _e.normalize("NFC")}function consume_emoji_reversed(_e,et){var tt;let rt=EMOJI_ROOT,nt,it,at=[],st=_e.length;for(et&&(et.length=0);st;){let lt=_e[--st];if(rt=(tt=rt.branches.find(dt=>dt.set.has(lt)))===null||tt===void 0?void 0:tt.node,!rt)break;if(rt.save)it=lt;else if(rt.check&<===it)break;at.push(lt),rt.fe0f&&(at.push(65039),st>0&&_e[st-1]==65039&&st--),rt.valid&&(nt=at.slice(),rt.valid==2&&nt.splice(1,1),et&&et.push(..._e.slice(st).reverse()),_e.length=st)}return nt}const logger$l=new Logger(version$k),Zeros$1=new Uint8Array(32);Zeros$1.fill(0);function checkComponent(_e){if(_e.length===0)throw new Error("invalid ENS name; empty component");return _e}function ensNameSplit(_e){const et=toUtf8Bytes(ens_normalize(_e)),tt=[];if(_e.length===0)return tt;let rt=0;for(let nt=0;nt=et.length)throw new Error("invalid ENS name; empty component");return tt.push(checkComponent(et.slice(rt))),tt}function ensNormalize(_e){return ensNameSplit(_e).map(et=>toUtf8String(et)).join(".")}function isValidName(_e){try{return ensNameSplit(_e).length!==0}catch{}return!1}function namehash$1(_e){typeof _e!="string"&&logger$l.throwArgumentError("invalid ENS name; not a string","name",_e);let et=Zeros$1;const tt=ensNameSplit(_e);for(;tt.length;)et=keccak256$2(concat$1([et,keccak256$2(tt.pop())]));return hexlify(et)}function dnsEncode(_e){return hexlify(concat$1(ensNameSplit(_e).map(et=>{if(et.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const tt=new Uint8Array(et.length+1);return tt.set(et,1),tt[0]=tt.length-1,tt})))+"00"}const messagePrefix=`Ethereum Signed Message: +`;function hashMessage$1(_e){return typeof _e=="string"&&(_e=toUtf8Bytes(_e)),keccak256$2(concat$1([toUtf8Bytes(messagePrefix),toUtf8Bytes(String(_e.length)),_e]))}var __awaiter$9=globalThis&&globalThis.__awaiter||function(_e,et,tt,rt){function nt(it){return it instanceof tt?it:new tt(function(at){at(it)})}return new(tt||(tt=Promise))(function(it,at){function st(ht){try{dt(rt.next(ht))}catch(pt){at(pt)}}function lt(ht){try{dt(rt.throw(ht))}catch(pt){at(pt)}}function dt(ht){ht.done?it(ht.value):nt(ht.value).then(st,lt)}dt((rt=rt.apply(_e,et||[])).next())})};const logger$k=new Logger(version$k),padding=new Uint8Array(32);padding.fill(0);const NegativeOne=BigNumber.from(-1),Zero=BigNumber.from(0),One=BigNumber.from(1),MaxUint256=BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function hexPadRight(_e){const et=arrayify(_e),tt=et.length%32;return tt?hexConcat([et,padding.slice(tt)]):hexlify(et)}const hexTrue=hexZeroPad(One.toHexString(),32),hexFalse=hexZeroPad(Zero.toHexString(),32),domainFieldTypes={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},domainFieldNames=["name","version","chainId","verifyingContract","salt"];function checkString(_e){return function(et){return typeof et!="string"&&logger$k.throwArgumentError(`invalid domain value for ${JSON.stringify(_e)}`,`domain.${_e}`,et),et}}const domainChecks={name:checkString("name"),version:checkString("version"),chainId:function(_e){try{return BigNumber.from(_e).toString()}catch{}return logger$k.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",_e)},verifyingContract:function(_e){try{return getAddress$1(_e).toLowerCase()}catch{}return logger$k.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",_e)},salt:function(_e){try{const et=arrayify(_e);if(et.length!==32)throw new Error("bad length");return hexlify(et)}catch{}return logger$k.throwArgumentError('invalid domain value "salt"',"domain.salt",_e)}};function getBaseEncoder(_e){{const et=_e.match(/^(u?)int(\d*)$/);if(et){const tt=et[1]==="",rt=parseInt(et[2]||"256");(rt%8!==0||rt>256||et[2]&&et[2]!==String(rt))&&logger$k.throwArgumentError("invalid numeric width","type",_e);const nt=MaxUint256.mask(tt?rt-1:rt),it=tt?nt.add(One).mul(NegativeOne):Zero;return function(at){const st=BigNumber.from(at);return(st.lt(it)||st.gt(nt))&&logger$k.throwArgumentError(`value out-of-bounds for ${_e}`,"value",at),hexZeroPad(st.toTwos(256).toHexString(),32)}}}{const et=_e.match(/^bytes(\d+)$/);if(et){const tt=parseInt(et[1]);return(tt===0||tt>32||et[1]!==String(tt))&&logger$k.throwArgumentError("invalid bytes width","type",_e),function(rt){return arrayify(rt).length!==tt&&logger$k.throwArgumentError(`invalid length for ${_e}`,"value",rt),hexPadRight(rt)}}}switch(_e){case"address":return function(et){return hexZeroPad(getAddress$1(et),32)};case"bool":return function(et){return et?hexTrue:hexFalse};case"bytes":return function(et){return keccak256$2(et)};case"string":return function(et){return id$2(et)}}return null}function encodeType$1(_e,et){return`${_e}(${et.map(({name:tt,type:rt})=>rt+" "+tt).join(",")})`}class TypedDataEncoder{constructor(et){defineReadOnly(this,"types",Object.freeze(deepCopy(et))),defineReadOnly(this,"_encoderCache",{}),defineReadOnly(this,"_types",{});const tt={},rt={},nt={};Object.keys(et).forEach(st=>{tt[st]={},rt[st]=[],nt[st]={}});for(const st in et){const lt={};et[st].forEach(dt=>{lt[dt.name]&&logger$k.throwArgumentError(`duplicate variable name ${JSON.stringify(dt.name)} in ${JSON.stringify(st)}`,"types",et),lt[dt.name]=!0;const ht=dt.type.match(/^([^\x5b]*)(\x5b|$)/)[1];ht===st&&logger$k.throwArgumentError(`circular type reference to ${JSON.stringify(ht)}`,"types",et),!getBaseEncoder(ht)&&(rt[ht]||logger$k.throwArgumentError(`unknown type ${JSON.stringify(ht)}`,"types",et),rt[ht].push(st),tt[st][ht]=!0)})}const it=Object.keys(rt).filter(st=>rt[st].length===0);it.length===0?logger$k.throwArgumentError("missing primary type","types",et):it.length>1&&logger$k.throwArgumentError(`ambiguous primary types or unused types: ${it.map(st=>JSON.stringify(st)).join(", ")}`,"types",et),defineReadOnly(this,"primaryType",it[0]);function at(st,lt){lt[st]&&logger$k.throwArgumentError(`circular type reference to ${JSON.stringify(st)}`,"types",et),lt[st]=!0,Object.keys(tt[st]).forEach(dt=>{rt[dt]&&(at(dt,lt),Object.keys(lt).forEach(ht=>{nt[ht][dt]=!0}))}),delete lt[st]}at(this.primaryType,{});for(const st in nt){const lt=Object.keys(nt[st]);lt.sort(),this._types[st]=encodeType$1(st,et[st])+lt.map(dt=>encodeType$1(dt,et[dt])).join("")}}getEncoder(et){let tt=this._encoderCache[et];return tt||(tt=this._encoderCache[et]=this._getEncoder(et)),tt}_getEncoder(et){{const nt=getBaseEncoder(et);if(nt)return nt}const tt=et.match(/^(.*)(\x5b(\d*)\x5d)$/);if(tt){const nt=tt[1],it=this.getEncoder(nt),at=parseInt(tt[3]);return st=>{at>=0&&st.length!==at&&logger$k.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",st);let lt=st.map(it);return this._types[nt]&&(lt=lt.map(keccak256$2)),keccak256$2(hexConcat(lt))}}const rt=this.types[et];if(rt){const nt=id$2(this._types[et]);return it=>{const at=rt.map(({name:st,type:lt})=>{const dt=this.getEncoder(lt)(it[st]);return this._types[lt]?keccak256$2(dt):dt});return at.unshift(nt),hexConcat(at)}}return logger$k.throwArgumentError(`unknown type: ${et}`,"type",et)}encodeType(et){const tt=this._types[et];return tt||logger$k.throwArgumentError(`unknown type: ${JSON.stringify(et)}`,"name",et),tt}encodeData(et,tt){return this.getEncoder(et)(tt)}hashStruct(et,tt){return keccak256$2(this.encodeData(et,tt))}encode(et){return this.encodeData(this.primaryType,et)}hash(et){return this.hashStruct(this.primaryType,et)}_visit(et,tt,rt){if(getBaseEncoder(et))return rt(et,tt);const nt=et.match(/^(.*)(\x5b(\d*)\x5d)$/);if(nt){const at=nt[1],st=parseInt(nt[3]);return st>=0&&tt.length!==st&&logger$k.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",tt),tt.map(lt=>this._visit(at,lt,rt))}const it=this.types[et];return it?it.reduce((at,{name:st,type:lt})=>(at[st]=this._visit(lt,tt[st],rt),at),{}):logger$k.throwArgumentError(`unknown type: ${et}`,"type",et)}visit(et,tt){return this._visit(this.primaryType,et,tt)}static from(et){return new TypedDataEncoder(et)}static getPrimaryType(et){return TypedDataEncoder.from(et).primaryType}static hashStruct(et,tt,rt){return TypedDataEncoder.from(tt).hashStruct(et,rt)}static hashDomain(et){const tt=[];for(const rt in et){const nt=domainFieldTypes[rt];nt||logger$k.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(rt)}`,"domain",et),tt.push({name:rt,type:nt})}return tt.sort((rt,nt)=>domainFieldNames.indexOf(rt.name)-domainFieldNames.indexOf(nt.name)),TypedDataEncoder.hashStruct("EIP712Domain",{EIP712Domain:tt},et)}static encode(et,tt,rt){return hexConcat(["0x1901",TypedDataEncoder.hashDomain(et),TypedDataEncoder.from(tt).hash(rt)])}static hash(et,tt,rt){return keccak256$2(TypedDataEncoder.encode(et,tt,rt))}static resolveNames(et,tt,rt,nt){return __awaiter$9(this,void 0,void 0,function*(){et=shallowCopy(et);const it={};et.verifyingContract&&!isHexString(et.verifyingContract,20)&&(it[et.verifyingContract]="0x");const at=TypedDataEncoder.from(tt);at.visit(rt,(st,lt)=>(st==="address"&&!isHexString(lt,20)&&(it[lt]="0x"),lt));for(const st in it)it[st]=yield nt(st);return et.verifyingContract&&it[et.verifyingContract]&&(et.verifyingContract=it[et.verifyingContract]),rt=at.visit(rt,(st,lt)=>st==="address"&&it[lt]?it[lt]:lt),{domain:et,value:rt}})}static getPayload(et,tt,rt){TypedDataEncoder.hashDomain(et);const nt={},it=[];domainFieldNames.forEach(lt=>{const dt=et[lt];dt!=null&&(nt[lt]=domainChecks[lt](dt),it.push({name:lt,type:domainFieldTypes[lt]}))});const at=TypedDataEncoder.from(tt),st=shallowCopy(tt);return st.EIP712Domain?logger$k.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",tt):st.EIP712Domain=it,at.encode(rt),{types:st,domain:nt,primaryType:at.primaryType,message:at.visit(rt,(lt,dt)=>{if(lt.match(/^bytes(\d*)/))return hexlify(arrayify(dt));if(lt.match(/^u?int/))return BigNumber.from(dt).toString();switch(lt){case"address":return dt.toLowerCase();case"bool":return!!dt;case"string":return typeof dt!="string"&&logger$k.throwArgumentError("invalid string","value",dt),dt}return logger$k.throwArgumentError("unsupported type","type",lt)})}}}const lib_esm$c=Object.freeze(Object.defineProperty({__proto__:null,_TypedDataEncoder:TypedDataEncoder,dnsEncode,ensNormalize,hashMessage:hashMessage$1,id:id$2,isValidName,messagePrefix,namehash:namehash$1},Symbol.toStringTag,{value:"Module"})),logger$j=new Logger(version$o);class LogDescription extends Description{}class TransactionDescription extends Description{}class ErrorDescription extends Description{}class Indexed extends Description{static isIndexed(et){return!!(et&&et._isIndexed)}}const BuiltinErrors={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function wrapAccessError(_e,et){const tt=new Error(`deferred error during ABI decoding triggered accessing ${_e}`);return tt.error=et,tt}class Interface{constructor(et){let tt=[];typeof et=="string"?tt=JSON.parse(et):tt=et,defineReadOnly(this,"fragments",tt.map(rt=>Fragment.from(rt)).filter(rt=>rt!=null)),defineReadOnly(this,"_abiCoder",getStatic(new.target,"getAbiCoder")()),defineReadOnly(this,"functions",{}),defineReadOnly(this,"errors",{}),defineReadOnly(this,"events",{}),defineReadOnly(this,"structs",{}),this.fragments.forEach(rt=>{let nt=null;switch(rt.type){case"constructor":if(this.deploy){logger$j.warn("duplicate definition - constructor");return}defineReadOnly(this,"deploy",rt);return;case"function":nt=this.functions;break;case"event":nt=this.events;break;case"error":nt=this.errors;break;default:return}let it=rt.format();if(nt[it]){logger$j.warn("duplicate definition - "+it);return}nt[it]=rt}),this.deploy||defineReadOnly(this,"deploy",ConstructorFragment.from({payable:!1,type:"constructor"})),defineReadOnly(this,"_isInterface",!0)}format(et){et||(et=FormatTypes.full),et===FormatTypes.sighash&&logger$j.throwArgumentError("interface does not support formatting sighash","format",et);const tt=this.fragments.map(rt=>rt.format(et));return et===FormatTypes.json?JSON.stringify(tt.map(rt=>JSON.parse(rt))):tt}static getAbiCoder(){return defaultAbiCoder}static getAddress(et){return getAddress$1(et)}static getSighash(et){return hexDataSlice(id$2(et.format()),0,4)}static getEventTopic(et){return id$2(et.format())}getFunction(et){if(isHexString(et)){for(const rt in this.functions)if(et===this.getSighash(rt))return this.functions[rt];logger$j.throwArgumentError("no matching function","sighash",et)}if(et.indexOf("(")===-1){const rt=et.trim(),nt=Object.keys(this.functions).filter(it=>it.split("(")[0]===rt);return nt.length===0?logger$j.throwArgumentError("no matching function","name",rt):nt.length>1&&logger$j.throwArgumentError("multiple matching functions","name",rt),this.functions[nt[0]]}const tt=this.functions[FunctionFragment.fromString(et).format()];return tt||logger$j.throwArgumentError("no matching function","signature",et),tt}getEvent(et){if(isHexString(et)){const rt=et.toLowerCase();for(const nt in this.events)if(rt===this.getEventTopic(nt))return this.events[nt];logger$j.throwArgumentError("no matching event","topichash",rt)}if(et.indexOf("(")===-1){const rt=et.trim(),nt=Object.keys(this.events).filter(it=>it.split("(")[0]===rt);return nt.length===0?logger$j.throwArgumentError("no matching event","name",rt):nt.length>1&&logger$j.throwArgumentError("multiple matching events","name",rt),this.events[nt[0]]}const tt=this.events[EventFragment.fromString(et).format()];return tt||logger$j.throwArgumentError("no matching event","signature",et),tt}getError(et){if(isHexString(et)){const rt=getStatic(this.constructor,"getSighash");for(const nt in this.errors){const it=this.errors[nt];if(et===rt(it))return this.errors[nt]}logger$j.throwArgumentError("no matching error","sighash",et)}if(et.indexOf("(")===-1){const rt=et.trim(),nt=Object.keys(this.errors).filter(it=>it.split("(")[0]===rt);return nt.length===0?logger$j.throwArgumentError("no matching error","name",rt):nt.length>1&&logger$j.throwArgumentError("multiple matching errors","name",rt),this.errors[nt[0]]}const tt=this.errors[FunctionFragment.fromString(et).format()];return tt||logger$j.throwArgumentError("no matching error","signature",et),tt}getSighash(et){if(typeof et=="string")try{et=this.getFunction(et)}catch(tt){try{et=this.getError(et)}catch{throw tt}}return getStatic(this.constructor,"getSighash")(et)}getEventTopic(et){return typeof et=="string"&&(et=this.getEvent(et)),getStatic(this.constructor,"getEventTopic")(et)}_decodeParams(et,tt){return this._abiCoder.decode(et,tt)}_encodeParams(et,tt){return this._abiCoder.encode(et,tt)}encodeDeploy(et){return this._encodeParams(this.deploy.inputs,et||[])}decodeErrorResult(et,tt){typeof et=="string"&&(et=this.getError(et));const rt=arrayify(tt);return hexlify(rt.slice(0,4))!==this.getSighash(et)&&logger$j.throwArgumentError(`data signature does not match error ${et.name}.`,"data",hexlify(rt)),this._decodeParams(et.inputs,rt.slice(4))}encodeErrorResult(et,tt){return typeof et=="string"&&(et=this.getError(et)),hexlify(concat$1([this.getSighash(et),this._encodeParams(et.inputs,tt||[])]))}decodeFunctionData(et,tt){typeof et=="string"&&(et=this.getFunction(et));const rt=arrayify(tt);return hexlify(rt.slice(0,4))!==this.getSighash(et)&&logger$j.throwArgumentError(`data signature does not match function ${et.name}.`,"data",hexlify(rt)),this._decodeParams(et.inputs,rt.slice(4))}encodeFunctionData(et,tt){return typeof et=="string"&&(et=this.getFunction(et)),hexlify(concat$1([this.getSighash(et),this._encodeParams(et.inputs,tt||[])]))}decodeFunctionResult(et,tt){typeof et=="string"&&(et=this.getFunction(et));let rt=arrayify(tt),nt=null,it="",at=null,st=null,lt=null;switch(rt.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(et.outputs,rt)}catch{}break;case 4:{const dt=hexlify(rt.slice(0,4)),ht=BuiltinErrors[dt];if(ht)at=this._abiCoder.decode(ht.inputs,rt.slice(4)),st=ht.name,lt=ht.signature,ht.reason&&(nt=at[0]),st==="Error"?it=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(at[0])}`:st==="Panic"&&(it=`; VM Exception while processing transaction: reverted with panic code ${at[0]}`);else try{const pt=this.getError(dt);at=this._abiCoder.decode(pt.inputs,rt.slice(4)),st=pt.name,lt=pt.format()}catch{}break}}return logger$j.throwError("call revert exception"+it,Logger.errors.CALL_EXCEPTION,{method:et.format(),data:hexlify(tt),errorArgs:at,errorName:st,errorSignature:lt,reason:nt})}encodeFunctionResult(et,tt){return typeof et=="string"&&(et=this.getFunction(et)),hexlify(this._abiCoder.encode(et.outputs,tt||[]))}encodeFilterTopics(et,tt){typeof et=="string"&&(et=this.getEvent(et)),tt.length>et.inputs.length&&logger$j.throwError("too many arguments for "+et.format(),Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:tt});let rt=[];et.anonymous||rt.push(this.getEventTopic(et));const nt=(it,at)=>it.type==="string"?id$2(at):it.type==="bytes"?keccak256$2(hexlify(at)):(it.type==="bool"&&typeof at=="boolean"&&(at=at?"0x01":"0x00"),it.type.match(/^u?int/)&&(at=BigNumber.from(at).toHexString()),it.type==="address"&&this._abiCoder.encode(["address"],[at]),hexZeroPad(hexlify(at),32));for(tt.forEach((it,at)=>{let st=et.inputs[at];if(!st.indexed){it!=null&&logger$j.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+st.name,it);return}it==null?rt.push(null):st.baseType==="array"||st.baseType==="tuple"?logger$j.throwArgumentError("filtering with tuples or arrays not supported","contract."+st.name,it):Array.isArray(it)?rt.push(it.map(lt=>nt(st,lt))):rt.push(nt(st,it))});rt.length&&rt[rt.length-1]===null;)rt.pop();return rt}encodeEventLog(et,tt){typeof et=="string"&&(et=this.getEvent(et));const rt=[],nt=[],it=[];return et.anonymous||rt.push(this.getEventTopic(et)),tt.length!==et.inputs.length&&logger$j.throwArgumentError("event arguments/values mismatch","values",tt),et.inputs.forEach((at,st)=>{const lt=tt[st];if(at.indexed)if(at.type==="string")rt.push(id$2(lt));else if(at.type==="bytes")rt.push(keccak256$2(lt));else{if(at.baseType==="tuple"||at.baseType==="array")throw new Error("not implemented");rt.push(this._abiCoder.encode([at.type],[lt]))}else nt.push(at),it.push(lt)}),{data:this._abiCoder.encode(nt,it),topics:rt}}decodeEventLog(et,tt,rt){if(typeof et=="string"&&(et=this.getEvent(et)),rt!=null&&!et.anonymous){let mt=this.getEventTopic(et);(!isHexString(rt[0],32)||rt[0].toLowerCase()!==mt)&&logger$j.throwError("fragment/topic mismatch",Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:mt,value:rt[0]}),rt=rt.slice(1)}let nt=[],it=[],at=[];et.inputs.forEach((mt,gt)=>{mt.indexed?mt.type==="string"||mt.type==="bytes"||mt.baseType==="tuple"||mt.baseType==="array"?(nt.push(ParamType.fromObject({type:"bytes32",name:mt.name})),at.push(!0)):(nt.push(mt),at.push(!1)):(it.push(mt),at.push(!1))});let st=rt!=null?this._abiCoder.decode(nt,concat$1(rt)):null,lt=this._abiCoder.decode(it,tt,!0),dt=[],ht=0,pt=0;et.inputs.forEach((mt,gt)=>{if(mt.indexed)if(st==null)dt[gt]=new Indexed({_isIndexed:!0,hash:null});else if(at[gt])dt[gt]=new Indexed({_isIndexed:!0,hash:st[pt++]});else try{dt[gt]=st[pt++]}catch(vt){dt[gt]=vt}else try{dt[gt]=lt[ht++]}catch(vt){dt[gt]=vt}if(mt.name&&dt[mt.name]==null){const vt=dt[gt];vt instanceof Error?Object.defineProperty(dt,mt.name,{enumerable:!0,get:()=>{throw wrapAccessError(`property ${JSON.stringify(mt.name)}`,vt)}}):dt[mt.name]=vt}});for(let mt=0;mt{throw wrapAccessError(`index ${mt}`,gt)}})}return Object.freeze(dt)}parseTransaction(et){let tt=this.getFunction(et.data.substring(0,10).toLowerCase());return tt?new TransactionDescription({args:this._abiCoder.decode(tt.inputs,"0x"+et.data.substring(10)),functionFragment:tt,name:tt.name,signature:tt.format(),sighash:this.getSighash(tt),value:BigNumber.from(et.value||"0")}):null}parseLog(et){let tt=this.getEvent(et.topics[0]);return!tt||tt.anonymous?null:new LogDescription({eventFragment:tt,name:tt.name,signature:tt.format(),topic:this.getEventTopic(tt),args:this.decodeEventLog(tt,et.data,et.topics)})}parseError(et){const tt=hexlify(et);let rt=this.getError(tt.substring(0,10).toLowerCase());return rt?new ErrorDescription({args:this._abiCoder.decode(rt.inputs,"0x"+tt.substring(10)),errorFragment:rt,name:rt.name,signature:rt.format(),sighash:this.getSighash(rt)}):null}static isInterface(et){return!!(et&&et._isInterface)}}const lib_esm$b=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder,ConstructorFragment,ErrorFragment,EventFragment,FormatTypes,Fragment,FunctionFragment,Indexed,Interface,LogDescription,ParamType,TransactionDescription,checkResultErrors,defaultAbiCoder},Symbol.toStringTag,{value:"Module"})),version$j="abstract-provider/5.7.0";var __awaiter$8=globalThis&&globalThis.__awaiter||function(_e,et,tt,rt){function nt(it){return it instanceof tt?it:new tt(function(at){at(it)})}return new(tt||(tt=Promise))(function(it,at){function st(ht){try{dt(rt.next(ht))}catch(pt){at(pt)}}function lt(ht){try{dt(rt.throw(ht))}catch(pt){at(pt)}}function dt(ht){ht.done?it(ht.value):nt(ht.value).then(st,lt)}dt((rt=rt.apply(_e,et||[])).next())})};const logger$i=new Logger(version$j);class ForkEvent extends Description{static isForkEvent(et){return!!(et&&et._isForkEvent)}}class Provider{constructor(){logger$i.checkAbstract(new.target,Provider),defineReadOnly(this,"_isProvider",!0)}getFeeData(){return __awaiter$8(this,void 0,void 0,function*(){const{block:et,gasPrice:tt}=yield resolveProperties({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(at=>null)});let rt=null,nt=null,it=null;return et&&et.baseFeePerGas&&(rt=et.baseFeePerGas,it=BigNumber.from("1500000000"),nt=et.baseFeePerGas.mul(2).add(it)),{lastBaseFeePerGas:rt,maxFeePerGas:nt,maxPriorityFeePerGas:it,gasPrice:tt}})}addListener(et,tt){return this.on(et,tt)}removeListener(et,tt){return this.off(et,tt)}static isProvider(et){return!!(et&&et._isProvider)}}const version$i="abstract-signer/5.7.0";var __awaiter$7=globalThis&&globalThis.__awaiter||function(_e,et,tt,rt){function nt(it){return it instanceof tt?it:new tt(function(at){at(it)})}return new(tt||(tt=Promise))(function(it,at){function st(ht){try{dt(rt.next(ht))}catch(pt){at(pt)}}function lt(ht){try{dt(rt.throw(ht))}catch(pt){at(pt)}}function dt(ht){ht.done?it(ht.value):nt(ht.value).then(st,lt)}dt((rt=rt.apply(_e,et||[])).next())})};const logger$h=new Logger(version$i),allowedTransactionKeys$2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],forwardErrors=[Logger.errors.INSUFFICIENT_FUNDS,Logger.errors.NONCE_EXPIRED,Logger.errors.REPLACEMENT_UNDERPRICED];class Signer{constructor(){logger$h.checkAbstract(new.target,Signer),defineReadOnly(this,"_isSigner",!0)}getBalance(et){return __awaiter$7(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),et)})}getTransactionCount(et){return __awaiter$7(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),et)})}estimateGas(et){return __awaiter$7(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const tt=yield resolveProperties(this.checkTransaction(et));return yield this.provider.estimateGas(tt)})}call(et,tt){return __awaiter$7(this,void 0,void 0,function*(){this._checkProvider("call");const rt=yield resolveProperties(this.checkTransaction(et));return yield this.provider.call(rt,tt)})}sendTransaction(et){return __awaiter$7(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const tt=yield this.populateTransaction(et),rt=yield this.signTransaction(tt);return yield this.provider.sendTransaction(rt)})}getChainId(){return __awaiter$7(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return __awaiter$7(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return __awaiter$7(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(et){return __awaiter$7(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(et)})}checkTransaction(et){for(const rt in et)allowedTransactionKeys$2.indexOf(rt)===-1&&logger$h.throwArgumentError("invalid transaction key: "+rt,"transaction",et);const tt=shallowCopy(et);return tt.from==null?tt.from=this.getAddress():tt.from=Promise.all([Promise.resolve(tt.from),this.getAddress()]).then(rt=>(rt[0].toLowerCase()!==rt[1].toLowerCase()&&logger$h.throwArgumentError("from address mismatch","transaction",et),rt[0])),tt}populateTransaction(et){return __awaiter$7(this,void 0,void 0,function*(){const tt=yield resolveProperties(this.checkTransaction(et));tt.to!=null&&(tt.to=Promise.resolve(tt.to).then(nt=>__awaiter$7(this,void 0,void 0,function*(){if(nt==null)return null;const it=yield this.resolveName(nt);return it==null&&logger$h.throwArgumentError("provided ENS name resolves to null","tx.to",nt),it})),tt.to.catch(nt=>{}));const rt=tt.maxFeePerGas!=null||tt.maxPriorityFeePerGas!=null;if(tt.gasPrice!=null&&(tt.type===2||rt)?logger$h.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",et):(tt.type===0||tt.type===1)&&rt&&logger$h.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",et),(tt.type===2||tt.type==null)&&tt.maxFeePerGas!=null&&tt.maxPriorityFeePerGas!=null)tt.type=2;else if(tt.type===0||tt.type===1)tt.gasPrice==null&&(tt.gasPrice=this.getGasPrice());else{const nt=yield this.getFeeData();if(tt.type==null)if(nt.maxFeePerGas!=null&&nt.maxPriorityFeePerGas!=null)if(tt.type=2,tt.gasPrice!=null){const it=tt.gasPrice;delete tt.gasPrice,tt.maxFeePerGas=it,tt.maxPriorityFeePerGas=it}else tt.maxFeePerGas==null&&(tt.maxFeePerGas=nt.maxFeePerGas),tt.maxPriorityFeePerGas==null&&(tt.maxPriorityFeePerGas=nt.maxPriorityFeePerGas);else nt.gasPrice!=null?(rt&&logger$h.throwError("network does not support EIP-1559",Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),tt.gasPrice==null&&(tt.gasPrice=nt.gasPrice),tt.type=0):logger$h.throwError("failed to get consistent fee data",Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else tt.type===2&&(tt.maxFeePerGas==null&&(tt.maxFeePerGas=nt.maxFeePerGas),tt.maxPriorityFeePerGas==null&&(tt.maxPriorityFeePerGas=nt.maxPriorityFeePerGas))}return tt.nonce==null&&(tt.nonce=this.getTransactionCount("pending")),tt.gasLimit==null&&(tt.gasLimit=this.estimateGas(tt).catch(nt=>{if(forwardErrors.indexOf(nt.code)>=0)throw nt;return logger$h.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:nt,tx:tt})})),tt.chainId==null?tt.chainId=this.getChainId():tt.chainId=Promise.all([Promise.resolve(tt.chainId),this.getChainId()]).then(nt=>(nt[1]!==0&&nt[0]!==nt[1]&&logger$h.throwArgumentError("chainId address mismatch","transaction",et),nt[0])),yield resolveProperties(tt)})}_checkProvider(et){this.provider||logger$h.throwError("missing provider",Logger.errors.UNSUPPORTED_OPERATION,{operation:et||"_checkProvider"})}static isSigner(et){return!!(et&&et._isSigner)}}class VoidSigner extends Signer{constructor(et,tt){super(),defineReadOnly(this,"address",et),defineReadOnly(this,"provider",tt||null)}getAddress(){return Promise.resolve(this.address)}_fail(et,tt){return Promise.resolve().then(()=>{logger$h.throwError(et,Logger.errors.UNSUPPORTED_OPERATION,{operation:tt})})}signMessage(et){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(et){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(et,tt,rt){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(et){return new VoidSigner(this.address,et)}}var hash$4={},utils$a={},minimalisticAssert$1=assert$b;function assert$b(_e,et){if(!_e)throw new Error(et||"Assertion failed")}assert$b.equal=function(et,tt,rt){if(et!=tt)throw new Error(rt||"Assertion failed: "+et+" != "+tt)};var inherits_browser$1={exports:{}};typeof Object.create=="function"?inherits_browser$1.exports=function(et,tt){tt&&(et.super_=tt,et.prototype=Object.create(tt.prototype,{constructor:{value:et,enumerable:!1,writable:!0,configurable:!0}}))}:inherits_browser$1.exports=function(et,tt){if(tt){et.super_=tt;var rt=function(){};rt.prototype=tt.prototype,et.prototype=new rt,et.prototype.constructor=et}};var inherits_browserExports=inherits_browser$1.exports,assert$a=minimalisticAssert$1,inherits=inherits_browserExports;utils$a.inherits=inherits;function isSurrogatePair(_e,et){return(_e.charCodeAt(et)&64512)!==55296||et<0||et+1>=_e.length?!1:(_e.charCodeAt(et+1)&64512)===56320}function toArray$2(_e,et){if(Array.isArray(_e))return _e.slice();if(!_e)return[];var tt=[];if(typeof _e=="string")if(et){if(et==="hex")for(_e=_e.replace(/[^a-z0-9]+/ig,""),_e.length%2!==0&&(_e="0"+_e),nt=0;nt<_e.length;nt+=2)tt.push(parseInt(_e[nt]+_e[nt+1],16))}else for(var rt=0,nt=0;nt<_e.length;nt++){var it=_e.charCodeAt(nt);it<128?tt[rt++]=it:it<2048?(tt[rt++]=it>>6|192,tt[rt++]=it&63|128):isSurrogatePair(_e,nt)?(it=65536+((it&1023)<<10)+(_e.charCodeAt(++nt)&1023),tt[rt++]=it>>18|240,tt[rt++]=it>>12&63|128,tt[rt++]=it>>6&63|128,tt[rt++]=it&63|128):(tt[rt++]=it>>12|224,tt[rt++]=it>>6&63|128,tt[rt++]=it&63|128)}else for(nt=0;nt<_e.length;nt++)tt[nt]=_e[nt]|0;return tt}utils$a.toArray=toArray$2;function toHex$2(_e){for(var et="",tt=0;tt<_e.length;tt++)et+=zero2(_e[tt].toString(16));return et}utils$a.toHex=toHex$2;function htonl(_e){var et=_e>>>24|_e>>>8&65280|_e<<8&16711680|(_e&255)<<24;return et>>>0}utils$a.htonl=htonl;function toHex32(_e,et){for(var tt="",rt=0;rt<_e.length;rt++){var nt=_e[rt];et==="little"&&(nt=htonl(nt)),tt+=zero8(nt.toString(16))}return tt}utils$a.toHex32=toHex32;function zero2(_e){return _e.length===1?"0"+_e:_e}utils$a.zero2=zero2;function zero8(_e){return _e.length===7?"0"+_e:_e.length===6?"00"+_e:_e.length===5?"000"+_e:_e.length===4?"0000"+_e:_e.length===3?"00000"+_e:_e.length===2?"000000"+_e:_e.length===1?"0000000"+_e:_e}utils$a.zero8=zero8;function join32(_e,et,tt,rt){var nt=tt-et;assert$a(nt%4===0);for(var it=new Array(nt/4),at=0,st=et;at>>0}return it}utils$a.join32=join32;function split32(_e,et){for(var tt=new Array(_e.length*4),rt=0,nt=0;rt<_e.length;rt++,nt+=4){var it=_e[rt];et==="big"?(tt[nt]=it>>>24,tt[nt+1]=it>>>16&255,tt[nt+2]=it>>>8&255,tt[nt+3]=it&255):(tt[nt+3]=it>>>24,tt[nt+2]=it>>>16&255,tt[nt+1]=it>>>8&255,tt[nt]=it&255)}return tt}utils$a.split32=split32;function rotr32$1(_e,et){return _e>>>et|_e<<32-et}utils$a.rotr32=rotr32$1;function rotl32$2(_e,et){return _e<>>32-et}utils$a.rotl32=rotl32$2;function sum32$3(_e,et){return _e+et>>>0}utils$a.sum32=sum32$3;function sum32_3$1(_e,et,tt){return _e+et+tt>>>0}utils$a.sum32_3=sum32_3$1;function sum32_4$2(_e,et,tt,rt){return _e+et+tt+rt>>>0}utils$a.sum32_4=sum32_4$2;function sum32_5$2(_e,et,tt,rt,nt){return _e+et+tt+rt+nt>>>0}utils$a.sum32_5=sum32_5$2;function sum64$1(_e,et,tt,rt){var nt=_e[et],it=_e[et+1],at=rt+it>>>0,st=(at>>0,_e[et+1]=at}utils$a.sum64=sum64$1;function sum64_hi$1(_e,et,tt,rt){var nt=et+rt>>>0,it=(nt>>0}utils$a.sum64_hi=sum64_hi$1;function sum64_lo$1(_e,et,tt,rt){var nt=et+rt;return nt>>>0}utils$a.sum64_lo=sum64_lo$1;function sum64_4_hi$1(_e,et,tt,rt,nt,it,at,st){var lt=0,dt=et;dt=dt+rt>>>0,lt+=dt>>0,lt+=dt>>0,lt+=dt>>0}utils$a.sum64_4_hi=sum64_4_hi$1;function sum64_4_lo$1(_e,et,tt,rt,nt,it,at,st){var lt=et+rt+it+st;return lt>>>0}utils$a.sum64_4_lo=sum64_4_lo$1;function sum64_5_hi$1(_e,et,tt,rt,nt,it,at,st,lt,dt){var ht=0,pt=et;pt=pt+rt>>>0,ht+=pt>>0,ht+=pt>>0,ht+=pt>>0,ht+=pt>>0}utils$a.sum64_5_hi=sum64_5_hi$1;function sum64_5_lo$1(_e,et,tt,rt,nt,it,at,st,lt,dt){var ht=et+rt+it+st+dt;return ht>>>0}utils$a.sum64_5_lo=sum64_5_lo$1;function rotr64_hi$1(_e,et,tt){var rt=et<<32-tt|_e>>>tt;return rt>>>0}utils$a.rotr64_hi=rotr64_hi$1;function rotr64_lo$1(_e,et,tt){var rt=_e<<32-tt|et>>>tt;return rt>>>0}utils$a.rotr64_lo=rotr64_lo$1;function shr64_hi$1(_e,et,tt){return _e>>>tt}utils$a.shr64_hi=shr64_hi$1;function shr64_lo$1(_e,et,tt){var rt=_e<<32-tt|et>>>tt;return rt>>>0}utils$a.shr64_lo=shr64_lo$1;var common$7={},utils$9=utils$a,assert$9=minimalisticAssert$1;function BlockHash$4(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}common$7.BlockHash=BlockHash$4;BlockHash$4.prototype.update=function(et,tt){if(et=utils$9.toArray(et,tt),this.pending?this.pending=this.pending.concat(et):this.pending=et,this.pendingTotal+=et.length,this.pending.length>=this._delta8){et=this.pending;var rt=et.length%this._delta8;this.pending=et.slice(et.length-rt,et.length),this.pending.length===0&&(this.pending=null),et=utils$9.join32(et,0,et.length-rt,this.endian);for(var nt=0;nt>>24&255,nt[it++]=et>>>16&255,nt[it++]=et>>>8&255,nt[it++]=et&255}else for(nt[it++]=et&255,nt[it++]=et>>>8&255,nt[it++]=et>>>16&255,nt[it++]=et>>>24&255,nt[it++]=0,nt[it++]=0,nt[it++]=0,nt[it++]=0,at=8;at>>3}common$6.g0_256=g0_256$1;function g1_256$1(_e){return rotr32(_e,17)^rotr32(_e,19)^_e>>>10}common$6.g1_256=g1_256$1;var utils$7=utils$a,common$5=common$7,shaCommon$1=common$6,rotl32$1=utils$7.rotl32,sum32$2=utils$7.sum32,sum32_5$1=utils$7.sum32_5,ft_1=shaCommon$1.ft_1,BlockHash$3=common$5.BlockHash,sha1_K=[1518500249,1859775393,2400959708,3395469782];function SHA1(){if(!(this instanceof SHA1))return new SHA1;BlockHash$3.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}utils$7.inherits(SHA1,BlockHash$3);var _1=SHA1;SHA1.blockSize=512;SHA1.outSize=160;SHA1.hmacStrength=80;SHA1.padLength=64;SHA1.prototype._update=function(et,tt){for(var rt=this.W,nt=0;nt<16;nt++)rt[nt]=et[tt+nt];for(;ntthis.blockSize&&(et=new this.Hash().update(et).digest()),assert$6(et.length<=this.blockSize);for(var tt=et.length;tt>8,mt=ht&255;pt?lt.push(pt,mt):lt.push(mt)}return lt}tt.toArray=rt;function nt(at){return at.length===1?"0"+at:at}tt.zero2=nt;function it(at){for(var st="",lt=0;lt(mt>>1)-1?xt=(mt>>1)-yt:xt=yt,gt.isubn(xt)):xt=0,pt[vt]=xt,gt.iushrn(1)}return pt}tt.getNAF=rt;function nt(lt,dt){var ht=[[],[]];lt=lt.clone(),dt=dt.clone();for(var pt=0,mt=0,gt;lt.cmpn(-pt)>0||dt.cmpn(-mt)>0;){var vt=lt.andln(3)+pt&3,xt=dt.andln(3)+mt&3;vt===3&&(vt=-1),xt===3&&(xt=-1);var yt;vt&1?(gt=lt.andln(7)+pt&7,(gt===3||gt===5)&&xt===2?yt=-vt:yt=vt):yt=0,ht[0].push(yt);var bt;xt&1?(gt=dt.andln(7)+mt&7,(gt===3||gt===5)&&vt===2?bt=-xt:bt=xt):bt=0,ht[1].push(bt),2*pt===yt+1&&(pt=1-pt),2*mt===bt+1&&(mt=1-mt),lt.iushrn(1),dt.iushrn(1)}return ht}tt.getJSF=nt;function it(lt,dt,ht){var pt="_"+dt;lt.prototype[dt]=function(){return this[pt]!==void 0?this[pt]:this[pt]=ht.call(this)}}tt.cachedProperty=it;function at(lt){return typeof lt=="string"?tt.toArray(lt,"hex"):lt}tt.parseBytes=at;function st(lt){return new BN$1(lt,"hex","le")}tt.intFromLE=st}),getNAF=utils_1$1.getNAF,getJSF=utils_1$1.getJSF,assert$1$1=utils_1$1.assert;function BaseCurve(_e,et){this.type=_e,this.p=new BN$1(et.p,16),this.red=et.prime?BN$1.red(et.prime):BN$1.mont(this.p),this.zero=new BN$1(0).toRed(this.red),this.one=new BN$1(1).toRed(this.red),this.two=new BN$1(2).toRed(this.red),this.n=et.n&&new BN$1(et.n,16),this.g=et.g&&this.pointFromJSON(et.g,et.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var tt=this.n&&this.p.div(this.n);!tt||tt.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var base=BaseCurve;BaseCurve.prototype.point=function(){throw new Error("Not implemented")};BaseCurve.prototype.validate=function(){throw new Error("Not implemented")};BaseCurve.prototype._fixedNafMul=function(et,tt){assert$1$1(et.precomputed);var rt=et._getDoubles(),nt=getNAF(tt,1,this._bitLength),it=(1<=st;dt--)lt=(lt<<1)+nt[dt];at.push(lt)}for(var ht=this.jpoint(null,null,null),pt=this.jpoint(null,null,null),mt=it;mt>0;mt--){for(st=0;st=0;lt--){for(var dt=0;lt>=0&&at[lt]===0;lt--)dt++;if(lt>=0&&dt++,st=st.dblp(dt),lt<0)break;var ht=at[lt];assert$1$1(ht!==0),et.type==="affine"?ht>0?st=st.mixedAdd(it[ht-1>>1]):st=st.mixedAdd(it[-ht-1>>1].neg()):ht>0?st=st.add(it[ht-1>>1]):st=st.add(it[-ht-1>>1].neg())}return et.type==="affine"?st.toP():st};BaseCurve.prototype._wnafMulAdd=function(et,tt,rt,nt,it){var at=this._wnafT1,st=this._wnafT2,lt=this._wnafT3,dt=0,ht,pt,mt;for(ht=0;ht=1;ht-=2){var vt=ht-1,xt=ht;if(at[vt]!==1||at[xt]!==1){lt[vt]=getNAF(rt[vt],at[vt],this._bitLength),lt[xt]=getNAF(rt[xt],at[xt],this._bitLength),dt=Math.max(lt[vt].length,dt),dt=Math.max(lt[xt].length,dt);continue}var yt=[tt[vt],null,null,tt[xt]];tt[vt].y.cmp(tt[xt].y)===0?(yt[1]=tt[vt].add(tt[xt]),yt[2]=tt[vt].toJ().mixedAdd(tt[xt].neg())):tt[vt].y.cmp(tt[xt].y.redNeg())===0?(yt[1]=tt[vt].toJ().mixedAdd(tt[xt]),yt[2]=tt[vt].add(tt[xt].neg())):(yt[1]=tt[vt].toJ().mixedAdd(tt[xt]),yt[2]=tt[vt].toJ().mixedAdd(tt[xt].neg()));var bt=[-3,-1,-5,-7,0,7,5,1,3],wt=getJSF(rt[vt],rt[xt]);for(dt=Math.max(wt[0].length,dt),lt[vt]=new Array(dt),lt[xt]=new Array(dt),pt=0;pt=0;ht--){for(var Lt=0;ht>=0;){var jt=!0;for(pt=0;pt=0&&Lt++,Pt=Pt.dblp(Lt),ht<0)break;for(pt=0;pt0?mt=st[pt][qt-1>>1]:qt<0&&(mt=st[pt][-qt-1>>1].neg()),mt.type==="affine"?Pt=Pt.mixedAdd(mt):Pt=Pt.add(mt))}}for(ht=0;ht=Math.ceil((et.bitLength()+1)/tt.step):!1};BasePoint.prototype._getDoubles=function(et,tt){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var rt=[this],nt=this,it=0;it=0&&(gt=dt,vt=ht),pt.negative&&(pt=pt.neg(),mt=mt.neg()),gt.negative&&(gt=gt.neg(),vt=vt.neg()),[{a:pt,b:mt},{a:gt,b:vt}]};ShortCurve.prototype._endoSplit=function(et){var tt=this.endo.basis,rt=tt[0],nt=tt[1],it=nt.b.mul(et).divRound(this.n),at=rt.b.neg().mul(et).divRound(this.n),st=it.mul(rt.a),lt=at.mul(nt.a),dt=it.mul(rt.b),ht=at.mul(nt.b),pt=et.sub(st).sub(lt),mt=dt.add(ht).neg();return{k1:pt,k2:mt}};ShortCurve.prototype.pointFromX=function(et,tt){et=new BN$1(et,16),et.red||(et=et.toRed(this.red));var rt=et.redSqr().redMul(et).redIAdd(et.redMul(this.a)).redIAdd(this.b),nt=rt.redSqrt();if(nt.redSqr().redSub(rt).cmp(this.zero)!==0)throw new Error("invalid point");var it=nt.fromRed().isOdd();return(tt&&!it||!tt&&it)&&(nt=nt.redNeg()),this.point(et,nt)};ShortCurve.prototype.validate=function(et){if(et.inf)return!0;var tt=et.x,rt=et.y,nt=this.a.redMul(tt),it=tt.redSqr().redMul(tt).redIAdd(nt).redIAdd(this.b);return rt.redSqr().redISub(it).cmpn(0)===0};ShortCurve.prototype._endoWnafMulAdd=function(et,tt,rt){for(var nt=this._endoWnafT1,it=this._endoWnafT2,at=0;at":""};Point.prototype.isInfinity=function(){return this.inf};Point.prototype.add=function(et){if(this.inf)return et;if(et.inf)return this;if(this.eq(et))return this.dbl();if(this.neg().eq(et))return this.curve.point(null,null);if(this.x.cmp(et.x)===0)return this.curve.point(null,null);var tt=this.y.redSub(et.y);tt.cmpn(0)!==0&&(tt=tt.redMul(this.x.redSub(et.x).redInvm()));var rt=tt.redSqr().redISub(this.x).redISub(et.x),nt=tt.redMul(this.x.redSub(rt)).redISub(this.y);return this.curve.point(rt,nt)};Point.prototype.dbl=function(){if(this.inf)return this;var et=this.y.redAdd(this.y);if(et.cmpn(0)===0)return this.curve.point(null,null);var tt=this.curve.a,rt=this.x.redSqr(),nt=et.redInvm(),it=rt.redAdd(rt).redIAdd(rt).redIAdd(tt).redMul(nt),at=it.redSqr().redISub(this.x.redAdd(this.x)),st=it.redMul(this.x.redSub(at)).redISub(this.y);return this.curve.point(at,st)};Point.prototype.getX=function(){return this.x.fromRed()};Point.prototype.getY=function(){return this.y.fromRed()};Point.prototype.mul=function(et){return et=new BN$1(et,16),this.isInfinity()?this:this._hasDoubles(et)?this.curve._fixedNafMul(this,et):this.curve.endo?this.curve._endoWnafMulAdd([this],[et]):this.curve._wnafMul(this,et)};Point.prototype.mulAdd=function(et,tt,rt){var nt=[this,tt],it=[et,rt];return this.curve.endo?this.curve._endoWnafMulAdd(nt,it):this.curve._wnafMulAdd(1,nt,it,2)};Point.prototype.jmulAdd=function(et,tt,rt){var nt=[this,tt],it=[et,rt];return this.curve.endo?this.curve._endoWnafMulAdd(nt,it,!0):this.curve._wnafMulAdd(1,nt,it,2,!0)};Point.prototype.eq=function(et){return this===et||this.inf===et.inf&&(this.inf||this.x.cmp(et.x)===0&&this.y.cmp(et.y)===0)};Point.prototype.neg=function(et){if(this.inf)return this;var tt=this.curve.point(this.x,this.y.redNeg());if(et&&this.precomputed){var rt=this.precomputed,nt=function(it){return it.neg()};tt.precomputed={naf:rt.naf&&{wnd:rt.naf.wnd,points:rt.naf.points.map(nt)},doubles:rt.doubles&&{step:rt.doubles.step,points:rt.doubles.points.map(nt)}}}return tt};Point.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var et=this.curve.jpoint(this.x,this.y,this.curve.one);return et};function JPoint(_e,et,tt,rt){base.BasePoint.call(this,_e,"jacobian"),et===null&&tt===null&&rt===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new BN$1(0)):(this.x=new BN$1(et,16),this.y=new BN$1(tt,16),this.z=new BN$1(rt,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}inherits_browser(JPoint,base.BasePoint);ShortCurve.prototype.jpoint=function(et,tt,rt){return new JPoint(this,et,tt,rt)};JPoint.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var et=this.z.redInvm(),tt=et.redSqr(),rt=this.x.redMul(tt),nt=this.y.redMul(tt).redMul(et);return this.curve.point(rt,nt)};JPoint.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};JPoint.prototype.add=function(et){if(this.isInfinity())return et;if(et.isInfinity())return this;var tt=et.z.redSqr(),rt=this.z.redSqr(),nt=this.x.redMul(tt),it=et.x.redMul(rt),at=this.y.redMul(tt.redMul(et.z)),st=et.y.redMul(rt.redMul(this.z)),lt=nt.redSub(it),dt=at.redSub(st);if(lt.cmpn(0)===0)return dt.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var ht=lt.redSqr(),pt=ht.redMul(lt),mt=nt.redMul(ht),gt=dt.redSqr().redIAdd(pt).redISub(mt).redISub(mt),vt=dt.redMul(mt.redISub(gt)).redISub(at.redMul(pt)),xt=this.z.redMul(et.z).redMul(lt);return this.curve.jpoint(gt,vt,xt)};JPoint.prototype.mixedAdd=function(et){if(this.isInfinity())return et.toJ();if(et.isInfinity())return this;var tt=this.z.redSqr(),rt=this.x,nt=et.x.redMul(tt),it=this.y,at=et.y.redMul(tt).redMul(this.z),st=rt.redSub(nt),lt=it.redSub(at);if(st.cmpn(0)===0)return lt.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var dt=st.redSqr(),ht=dt.redMul(st),pt=rt.redMul(dt),mt=lt.redSqr().redIAdd(ht).redISub(pt).redISub(pt),gt=lt.redMul(pt.redISub(mt)).redISub(it.redMul(ht)),vt=this.z.redMul(st);return this.curve.jpoint(mt,gt,vt)};JPoint.prototype.dblp=function(et){if(et===0)return this;if(this.isInfinity())return this;if(!et)return this.dbl();var tt;if(this.curve.zeroA||this.curve.threeA){var rt=this;for(tt=0;tt=0)return!1;if(rt.redIAdd(it),this.x.cmp(rt)===0)return!0}};JPoint.prototype.inspect=function(){return this.isInfinity()?"":""};JPoint.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var curve_1=createCommonjsModule(function(_e,et){var tt=et;tt.base=base,tt.short=short_1,tt.mont=null,tt.edwards=null}),curves_1=createCommonjsModule(function(_e,et){var tt=et,rt=utils_1$1.assert;function nt(st){st.type==="short"?this.curve=new curve_1.short(st):st.type==="edwards"?this.curve=new curve_1.edwards(st):this.curve=new curve_1.mont(st),this.g=this.curve.g,this.n=this.curve.n,this.hash=st.hash,rt(this.g.validate(),"Invalid curve"),rt(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}tt.PresetCurve=nt;function it(st,lt){Object.defineProperty(tt,st,{configurable:!0,enumerable:!0,get:function(){var dt=new nt(lt);return Object.defineProperty(tt,st,{configurable:!0,enumerable:!0,value:dt}),dt}})}it("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:hash$3.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),it("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:hash$3.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),it("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:hash$3.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),it("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:hash$3.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),it("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:hash$3.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),it("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash$3.sha256,gRed:!1,g:["9"]}),it("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash$3.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var at;try{at=null.crash()}catch{at=void 0}it("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:hash$3.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",at]})});function HmacDRBG(_e){if(!(this instanceof HmacDRBG))return new HmacDRBG(_e);this.hash=_e.hash,this.predResist=!!_e.predResist,this.outLen=this.hash.outSize,this.minEntropy=_e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var et=utils_1.toArray(_e.entropy,_e.entropyEnc||"hex"),tt=utils_1.toArray(_e.nonce,_e.nonceEnc||"hex"),rt=utils_1.toArray(_e.pers,_e.persEnc||"hex");minimalisticAssert(et.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(et,tt,rt)}var hmacDrbg=HmacDRBG;HmacDRBG.prototype._init=function(et,tt,rt){var nt=et.concat(tt).concat(rt);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var it=0;it=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(et.concat(rt||[])),this._reseed=1};HmacDRBG.prototype.generate=function(et,tt,rt,nt){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof tt!="string"&&(nt=rt,rt=tt,tt=null),rt&&(rt=utils_1.toArray(rt,nt||"hex"),this._update(rt));for(var it=[];it.length"};var assert$4=utils_1$1.assert;function Signature(_e,et){if(_e instanceof Signature)return _e;this._importDER(_e,et)||(assert$4(_e.r&&_e.s,"Signature without r or s"),this.r=new BN$1(_e.r,16),this.s=new BN$1(_e.s,16),_e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=_e.recoveryParam)}var signature=Signature;function Position(){this.place=0}function getLength(_e,et){var tt=_e[et.place++];if(!(tt&128))return tt;var rt=tt&15;if(rt===0||rt>4)return!1;for(var nt=0,it=0,at=et.place;it>>=0;return nt<=127?!1:(et.place=at,nt)}function rmPadding(_e){for(var et=0,tt=_e.length-1;!_e[et]&&!(_e[et+1]&128)&&et>>3);for(_e.push(tt|128);--tt;)_e.push(et>>>(tt<<3)&255);_e.push(et)}Signature.prototype.toDER=function(et){var tt=this.r.toArray(),rt=this.s.toArray();for(tt[0]&128&&(tt=[0].concat(tt)),rt[0]&128&&(rt=[0].concat(rt)),tt=rmPadding(tt),rt=rmPadding(rt);!rt[0]&&!(rt[1]&128);)rt=rt.slice(1);var nt=[2];constructLength(nt,tt.length),nt=nt.concat(tt),nt.push(2),constructLength(nt,rt.length);var it=nt.concat(rt),at=[48];return constructLength(at,it.length),at=at.concat(it),utils_1$1.encode(at,et)};var rand=function(){throw new Error("unsupported")},assert$5=utils_1$1.assert;function EC(_e){if(!(this instanceof EC))return new EC(_e);typeof _e=="string"&&(assert$5(Object.prototype.hasOwnProperty.call(curves_1,_e),"Unknown curve "+_e),_e=curves_1[_e]),_e instanceof curves_1.PresetCurve&&(_e={curve:_e}),this.curve=_e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=_e.curve.g,this.g.precompute(_e.curve.n.bitLength()+1),this.hash=_e.hash||_e.curve.hash}var ec$1=EC;EC.prototype.keyPair=function(et){return new key(this,et)};EC.prototype.keyFromPrivate=function(et,tt){return key.fromPrivate(this,et,tt)};EC.prototype.keyFromPublic=function(et,tt){return key.fromPublic(this,et,tt)};EC.prototype.genKeyPair=function(et){et||(et={});for(var tt=new hmacDrbg({hash:this.hash,pers:et.pers,persEnc:et.persEnc||"utf8",entropy:et.entropy||rand(this.hash.hmacStrength),entropyEnc:et.entropy&&et.entropyEnc||"utf8",nonce:this.n.toArray()}),rt=this.n.byteLength(),nt=this.n.sub(new BN$1(2));;){var it=new BN$1(tt.generate(rt));if(!(it.cmp(nt)>0))return it.iaddn(1),this.keyFromPrivate(it)}};EC.prototype._truncateToN=function(et,tt){var rt=et.byteLength()*8-this.n.bitLength();return rt>0&&(et=et.ushrn(rt)),!tt&&et.cmp(this.n)>=0?et.sub(this.n):et};EC.prototype.sign=function(et,tt,rt,nt){typeof rt=="object"&&(nt=rt,rt=null),nt||(nt={}),tt=this.keyFromPrivate(tt,rt),et=this._truncateToN(new BN$1(et,16));for(var it=this.n.byteLength(),at=tt.getPrivate().toArray("be",it),st=et.toArray("be",it),lt=new hmacDrbg({hash:this.hash,entropy:at,nonce:st,pers:nt.pers,persEnc:nt.persEnc||"utf8"}),dt=this.n.sub(new BN$1(1)),ht=0;;ht++){var pt=nt.k?nt.k(ht):new BN$1(lt.generate(this.n.byteLength()));if(pt=this._truncateToN(pt,!0),!(pt.cmpn(1)<=0||pt.cmp(dt)>=0)){var mt=this.g.mul(pt);if(!mt.isInfinity()){var gt=mt.getX(),vt=gt.umod(this.n);if(vt.cmpn(0)!==0){var xt=pt.invm(this.n).mul(vt.mul(tt.getPrivate()).iadd(et));if(xt=xt.umod(this.n),xt.cmpn(0)!==0){var yt=(mt.getY().isOdd()?1:0)|(gt.cmp(vt)!==0?2:0);return nt.canonical&&xt.cmp(this.nh)>0&&(xt=this.n.sub(xt),yt^=1),new signature({r:vt,s:xt,recoveryParam:yt})}}}}}};EC.prototype.verify=function(et,tt,rt,nt){et=this._truncateToN(new BN$1(et,16)),rt=this.keyFromPublic(rt,nt),tt=new signature(tt,"hex");var it=tt.r,at=tt.s;if(it.cmpn(1)<0||it.cmp(this.n)>=0||at.cmpn(1)<0||at.cmp(this.n)>=0)return!1;var st=at.invm(this.n),lt=st.mul(et).umod(this.n),dt=st.mul(it).umod(this.n),ht;return this.curve._maxwellTrick?(ht=this.g.jmulAdd(lt,rt.getPublic(),dt),ht.isInfinity()?!1:ht.eqXToP(it)):(ht=this.g.mulAdd(lt,rt.getPublic(),dt),ht.isInfinity()?!1:ht.getX().umod(this.n).cmp(it)===0)};EC.prototype.recoverPubKey=function(_e,et,tt,rt){assert$5((3&tt)===tt,"The recovery param is more than two bits"),et=new signature(et,rt);var nt=this.n,it=new BN$1(_e),at=et.r,st=et.s,lt=tt&1,dt=tt>>1;if(at.cmp(this.curve.p.umod(this.curve.n))>=0&&dt)throw new Error("Unable to find sencond key candinate");dt?at=this.curve.pointFromX(at.add(this.curve.n),lt):at=this.curve.pointFromX(at,lt);var ht=et.r.invm(nt),pt=nt.sub(it).mul(ht).umod(nt),mt=st.mul(ht).umod(nt);return this.g.mulAdd(pt,at,mt)};EC.prototype.getKeyRecoveryParam=function(_e,et,tt,rt){if(et=new signature(et,rt),et.recoveryParam!==null)return et.recoveryParam;for(var nt=0;nt<4;nt++){var it;try{it=this.recoverPubKey(_e,et,nt)}catch{continue}if(it.eq(tt))return nt}throw new Error("Unable to find valid recovery factor")};var elliptic_1=createCommonjsModule(function(_e,et){var tt=et;tt.version="6.5.4",tt.utils=utils_1$1,tt.rand=function(){throw new Error("unsupported")},tt.curve=curve_1,tt.curves=curves_1,tt.ec=ec$1,tt.eddsa=null}),EC$1=elliptic_1.ec;const version$h="signing-key/5.7.0",logger$g=new Logger(version$h);let _curve=null;function getCurve(){return _curve||(_curve=new EC$1("secp256k1")),_curve}class SigningKey{constructor(et){defineReadOnly(this,"curve","secp256k1"),defineReadOnly(this,"privateKey",hexlify(et)),hexDataLength(this.privateKey)!==32&&logger$g.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const tt=getCurve().keyFromPrivate(arrayify(this.privateKey));defineReadOnly(this,"publicKey","0x"+tt.getPublic(!1,"hex")),defineReadOnly(this,"compressedPublicKey","0x"+tt.getPublic(!0,"hex")),defineReadOnly(this,"_isSigningKey",!0)}_addPoint(et){const tt=getCurve().keyFromPublic(arrayify(this.publicKey)),rt=getCurve().keyFromPublic(arrayify(et));return"0x"+tt.pub.add(rt.pub).encodeCompressed("hex")}signDigest(et){const tt=getCurve().keyFromPrivate(arrayify(this.privateKey)),rt=arrayify(et);rt.length!==32&&logger$g.throwArgumentError("bad digest length","digest",et);const nt=tt.sign(rt,{canonical:!0});return splitSignature({recoveryParam:nt.recoveryParam,r:hexZeroPad("0x"+nt.r.toString(16),32),s:hexZeroPad("0x"+nt.s.toString(16),32)})}computeSharedSecret(et){const tt=getCurve().keyFromPrivate(arrayify(this.privateKey)),rt=getCurve().keyFromPublic(arrayify(computePublicKey(et)));return hexZeroPad("0x"+tt.derive(rt.getPublic()).toString(16),32)}static isSigningKey(et){return!!(et&&et._isSigningKey)}}function recoverPublicKey(_e,et){const tt=splitSignature(et),rt={r:arrayify(tt.r),s:arrayify(tt.s)};return"0x"+getCurve().recoverPubKey(arrayify(_e),rt,tt.recoveryParam).encode("hex",!1)}function computePublicKey(_e,et){const tt=arrayify(_e);if(tt.length===32){const rt=new SigningKey(tt);return et?"0x"+getCurve().keyFromPrivate(tt).getPublic(!0,"hex"):rt.publicKey}else{if(tt.length===33)return et?hexlify(tt):"0x"+getCurve().keyFromPublic(tt).getPublic(!1,"hex");if(tt.length===65)return et?"0x"+getCurve().keyFromPublic(tt).getPublic(!0,"hex"):hexlify(tt)}return logger$g.throwArgumentError("invalid public or private key","key","[REDACTED]")}const lib_esm$a=Object.freeze(Object.defineProperty({__proto__:null,SigningKey,computePublicKey,recoverPublicKey},Symbol.toStringTag,{value:"Module"})),version$g="transactions/5.7.0",logger$f=new Logger(version$g);var TransactionTypes;(function(_e){_e[_e.legacy=0]="legacy",_e[_e.eip2930=1]="eip2930",_e[_e.eip1559=2]="eip1559"})(TransactionTypes||(TransactionTypes={}));function handleAddress(_e){return _e==="0x"?null:getAddress$1(_e)}function handleNumber(_e){return _e==="0x"?Zero$1:BigNumber.from(_e)}const transactionFields=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],allowedTransactionKeys$1={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function computeAddress(_e){const et=computePublicKey(_e);return getAddress$1(hexDataSlice(keccak256$2(hexDataSlice(et,1)),12))}function recoverAddress(_e,et){return computeAddress(recoverPublicKey(arrayify(_e),et))}function formatNumber(_e,et){const tt=stripZeros(BigNumber.from(_e).toHexString());return tt.length>32&&logger$f.throwArgumentError("invalid length for "+et,"transaction:"+et,_e),tt}function accessSetify(_e,et){return{address:getAddress$1(_e),storageKeys:(et||[]).map((tt,rt)=>(hexDataLength(tt)!==32&&logger$f.throwArgumentError("invalid access list storageKey",`accessList[${_e}:${rt}]`,tt),tt.toLowerCase()))}}function accessListify(_e){if(Array.isArray(_e))return _e.map((tt,rt)=>Array.isArray(tt)?(tt.length>2&&logger$f.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${rt}]`,tt),accessSetify(tt[0],tt[1])):accessSetify(tt.address,tt.storageKeys));const et=Object.keys(_e).map(tt=>{const rt=_e[tt].reduce((nt,it)=>(nt[it]=!0,nt),{});return accessSetify(tt,Object.keys(rt).sort())});return et.sort((tt,rt)=>tt.address.localeCompare(rt.address)),et}function formatAccessList(_e){return accessListify(_e).map(et=>[et.address,et.storageKeys])}function _serializeEip1559(_e,et){if(_e.gasPrice!=null){const rt=BigNumber.from(_e.gasPrice),nt=BigNumber.from(_e.maxFeePerGas||0);rt.eq(nt)||logger$f.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:rt,maxFeePerGas:nt})}const tt=[formatNumber(_e.chainId||0,"chainId"),formatNumber(_e.nonce||0,"nonce"),formatNumber(_e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),formatNumber(_e.maxFeePerGas||0,"maxFeePerGas"),formatNumber(_e.gasLimit||0,"gasLimit"),_e.to!=null?getAddress$1(_e.to):"0x",formatNumber(_e.value||0,"value"),_e.data||"0x",formatAccessList(_e.accessList||[])];if(et){const rt=splitSignature(et);tt.push(formatNumber(rt.recoveryParam,"recoveryParam")),tt.push(stripZeros(rt.r)),tt.push(stripZeros(rt.s))}return hexConcat(["0x02",encode$2(tt)])}function _serializeEip2930(_e,et){const tt=[formatNumber(_e.chainId||0,"chainId"),formatNumber(_e.nonce||0,"nonce"),formatNumber(_e.gasPrice||0,"gasPrice"),formatNumber(_e.gasLimit||0,"gasLimit"),_e.to!=null?getAddress$1(_e.to):"0x",formatNumber(_e.value||0,"value"),_e.data||"0x",formatAccessList(_e.accessList||[])];if(et){const rt=splitSignature(et);tt.push(formatNumber(rt.recoveryParam,"recoveryParam")),tt.push(stripZeros(rt.r)),tt.push(stripZeros(rt.s))}return hexConcat(["0x01",encode$2(tt)])}function _serialize(_e,et){checkProperties(_e,allowedTransactionKeys$1);const tt=[];transactionFields.forEach(function(at){let st=_e[at.name]||[];const lt={};at.numeric&&(lt.hexPad="left"),st=arrayify(hexlify(st,lt)),at.length&&st.length!==at.length&&st.length>0&&logger$f.throwArgumentError("invalid length for "+at.name,"transaction:"+at.name,st),at.maxLength&&(st=stripZeros(st),st.length>at.maxLength&&logger$f.throwArgumentError("invalid length for "+at.name,"transaction:"+at.name,st)),tt.push(hexlify(st))});let rt=0;if(_e.chainId!=null?(rt=_e.chainId,typeof rt!="number"&&logger$f.throwArgumentError("invalid transaction.chainId","transaction",_e)):et&&!isBytesLike(et)&&et.v>28&&(rt=Math.floor((et.v-35)/2)),rt!==0&&(tt.push(hexlify(rt)),tt.push("0x"),tt.push("0x")),!et)return encode$2(tt);const nt=splitSignature(et);let it=27+nt.recoveryParam;return rt!==0?(tt.pop(),tt.pop(),tt.pop(),it+=rt*2+8,nt.v>28&&nt.v!==it&&logger$f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",et)):nt.v!==it&&logger$f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",et),tt.push(hexlify(it)),tt.push(stripZeros(arrayify(nt.r))),tt.push(stripZeros(arrayify(nt.s))),encode$2(tt)}function serialize$1(_e,et){if(_e.type==null||_e.type===0)return _e.accessList!=null&&logger$f.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",_e),_serialize(_e,et);switch(_e.type){case 1:return _serializeEip2930(_e,et);case 2:return _serializeEip1559(_e,et)}return logger$f.throwError(`unsupported transaction type: ${_e.type}`,Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:_e.type})}function _parseEipSignature(_e,et,tt){try{const rt=handleNumber(et[0]).toNumber();if(rt!==0&&rt!==1)throw new Error("bad recid");_e.v=rt}catch{logger$f.throwArgumentError("invalid v for transaction type: 1","v",et[0])}_e.r=hexZeroPad(et[1],32),_e.s=hexZeroPad(et[2],32);try{const rt=keccak256$2(tt(_e));_e.from=recoverAddress(rt,{r:_e.r,s:_e.s,recoveryParam:_e.v})}catch{}}function _parseEip1559(_e){const et=decode$2(_e.slice(1));et.length!==9&&et.length!==12&&logger$f.throwArgumentError("invalid component count for transaction type: 2","payload",hexlify(_e));const tt=handleNumber(et[2]),rt=handleNumber(et[3]),nt={type:2,chainId:handleNumber(et[0]).toNumber(),nonce:handleNumber(et[1]).toNumber(),maxPriorityFeePerGas:tt,maxFeePerGas:rt,gasPrice:null,gasLimit:handleNumber(et[4]),to:handleAddress(et[5]),value:handleNumber(et[6]),data:et[7],accessList:accessListify(et[8])};return et.length===9||(nt.hash=keccak256$2(_e),_parseEipSignature(nt,et.slice(9),_serializeEip1559)),nt}function _parseEip2930(_e){const et=decode$2(_e.slice(1));et.length!==8&&et.length!==11&&logger$f.throwArgumentError("invalid component count for transaction type: 1","payload",hexlify(_e));const tt={type:1,chainId:handleNumber(et[0]).toNumber(),nonce:handleNumber(et[1]).toNumber(),gasPrice:handleNumber(et[2]),gasLimit:handleNumber(et[3]),to:handleAddress(et[4]),value:handleNumber(et[5]),data:et[6],accessList:accessListify(et[7])};return et.length===8||(tt.hash=keccak256$2(_e),_parseEipSignature(tt,et.slice(8),_serializeEip2930)),tt}function _parse(_e){const et=decode$2(_e);et.length!==9&&et.length!==6&&logger$f.throwArgumentError("invalid raw transaction","rawTransaction",_e);const tt={nonce:handleNumber(et[0]).toNumber(),gasPrice:handleNumber(et[1]),gasLimit:handleNumber(et[2]),to:handleAddress(et[3]),value:handleNumber(et[4]),data:et[5],chainId:0};if(et.length===6)return tt;try{tt.v=BigNumber.from(et[6]).toNumber()}catch{return tt}if(tt.r=hexZeroPad(et[7],32),tt.s=hexZeroPad(et[8],32),BigNumber.from(tt.r).isZero()&&BigNumber.from(tt.s).isZero())tt.chainId=tt.v,tt.v=0;else{tt.chainId=Math.floor((tt.v-35)/2),tt.chainId<0&&(tt.chainId=0);let rt=tt.v-27;const nt=et.slice(0,6);tt.chainId!==0&&(nt.push(hexlify(tt.chainId)),nt.push("0x"),nt.push("0x"),rt-=tt.chainId*2+8);const it=keccak256$2(encode$2(nt));try{tt.from=recoverAddress(it,{r:hexlify(tt.r),s:hexlify(tt.s),recoveryParam:rt})}catch{}tt.hash=keccak256$2(_e)}return tt.type=null,tt}function parse$2(_e){const et=arrayify(_e);if(et[0]>127)return _parse(et);switch(et[0]){case 1:return _parseEip2930(et);case 2:return _parseEip1559(et)}return logger$f.throwError(`unsupported transaction type: ${et[0]}`,Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:et[0]})}const lib_esm$9=Object.freeze(Object.defineProperty({__proto__:null,get TransactionTypes(){return TransactionTypes},accessListify,computeAddress,parse:parse$2,recoverAddress,serialize:serialize$1},Symbol.toStringTag,{value:"Module"})),version$f="contracts/5.7.0";var __awaiter$6=globalThis&&globalThis.__awaiter||function(_e,et,tt,rt){function nt(it){return it instanceof tt?it:new tt(function(at){at(it)})}return new(tt||(tt=Promise))(function(it,at){function st(ht){try{dt(rt.next(ht))}catch(pt){at(pt)}}function lt(ht){try{dt(rt.throw(ht))}catch(pt){at(pt)}}function dt(ht){ht.done?it(ht.value):nt(ht.value).then(st,lt)}dt((rt=rt.apply(_e,et||[])).next())})};const logger$e=new Logger(version$f);function resolveName(_e,et){return __awaiter$6(this,void 0,void 0,function*(){const tt=yield et;typeof tt!="string"&&logger$e.throwArgumentError("invalid address or ENS name","name",tt);try{return getAddress$1(tt)}catch{}_e||logger$e.throwError("a provider or signer is needed to resolve ENS names",Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const rt=yield _e.resolveName(tt);return rt==null&&logger$e.throwArgumentError("resolver or addr is not configured for ENS name","name",tt),rt})}function resolveAddresses(_e,et,tt){return __awaiter$6(this,void 0,void 0,function*(){return Array.isArray(tt)?yield Promise.all(tt.map((rt,nt)=>resolveAddresses(_e,Array.isArray(et)?et[nt]:et[rt.name],rt))):tt.type==="address"?yield resolveName(_e,et):tt.type==="tuple"?yield resolveAddresses(_e,et,tt.components):tt.baseType==="array"?Array.isArray(et)?yield Promise.all(et.map(rt=>resolveAddresses(_e,rt,tt.arrayChildren))):Promise.reject(logger$e.makeError("invalid value for array",Logger.errors.INVALID_ARGUMENT,{argument:"value",value:et})):et})}function populateTransaction(_e,et,tt){return __awaiter$6(this,void 0,void 0,function*(){let rt={};tt.length===et.inputs.length+1&&typeof tt[tt.length-1]=="object"&&(rt=shallowCopy(tt.pop())),logger$e.checkArgumentCount(tt.length,et.inputs.length,"passed to contract"),_e.signer?rt.from?rt.from=resolveProperties({override:resolveName(_e.signer,rt.from),signer:_e.signer.getAddress()}).then(dt=>__awaiter$6(this,void 0,void 0,function*(){return getAddress$1(dt.signer)!==dt.override&&logger$e.throwError("Contract with a Signer cannot override from",Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),dt.override})):rt.from=_e.signer.getAddress():rt.from&&(rt.from=resolveName(_e.provider,rt.from));const nt=yield resolveProperties({args:resolveAddresses(_e.signer||_e.provider,tt,et.inputs),address:_e.resolvedAddress,overrides:resolveProperties(rt)||{}}),it=_e.interface.encodeFunctionData(et,nt.args),at={data:it,to:nt.address},st=nt.overrides;if(st.nonce!=null&&(at.nonce=BigNumber.from(st.nonce).toNumber()),st.gasLimit!=null&&(at.gasLimit=BigNumber.from(st.gasLimit)),st.gasPrice!=null&&(at.gasPrice=BigNumber.from(st.gasPrice)),st.maxFeePerGas!=null&&(at.maxFeePerGas=BigNumber.from(st.maxFeePerGas)),st.maxPriorityFeePerGas!=null&&(at.maxPriorityFeePerGas=BigNumber.from(st.maxPriorityFeePerGas)),st.from!=null&&(at.from=st.from),st.type!=null&&(at.type=st.type),st.accessList!=null&&(at.accessList=accessListify(st.accessList)),at.gasLimit==null&&et.gas!=null){let dt=21e3;const ht=arrayify(it);for(let pt=0;ptrt[dt]!=null);return lt.length&&logger$e.throwError(`cannot override ${lt.map(dt=>JSON.stringify(dt)).join(",")}`,Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:lt}),at})}function buildPopulate(_e,et){return function(...tt){return populateTransaction(_e,et,tt)}}function buildEstimate(_e,et){const tt=_e.signer||_e.provider;return function(...rt){return __awaiter$6(this,void 0,void 0,function*(){tt||logger$e.throwError("estimate require a provider or signer",Logger.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const nt=yield populateTransaction(_e,et,rt);return yield tt.estimateGas(nt)})}}function addContractWait(_e,et){const tt=et.wait.bind(et);et.wait=rt=>tt(rt).then(nt=>(nt.events=nt.logs.map(it=>{let at=deepCopy(it),st=null;try{st=_e.interface.parseLog(it)}catch{}return st&&(at.args=st.args,at.decode=(lt,dt)=>_e.interface.decodeEventLog(st.eventFragment,lt,dt),at.event=st.name,at.eventSignature=st.signature),at.removeListener=()=>_e.provider,at.getBlock=()=>_e.provider.getBlock(nt.blockHash),at.getTransaction=()=>_e.provider.getTransaction(nt.transactionHash),at.getTransactionReceipt=()=>Promise.resolve(nt),at}),nt))}function buildCall(_e,et,tt){const rt=_e.signer||_e.provider;return function(...nt){return __awaiter$6(this,void 0,void 0,function*(){let it;if(nt.length===et.inputs.length+1&&typeof nt[nt.length-1]=="object"){const lt=shallowCopy(nt.pop());lt.blockTag!=null&&(it=yield lt.blockTag),delete lt.blockTag,nt.push(lt)}_e.deployTransaction!=null&&(yield _e._deployed(it));const at=yield populateTransaction(_e,et,nt),st=yield rt.call(at,it);try{let lt=_e.interface.decodeFunctionResult(et,st);return tt&&et.outputs.length===1&&(lt=lt[0]),lt}catch(lt){throw lt.code===Logger.errors.CALL_EXCEPTION&&(lt.address=_e.address,lt.args=nt,lt.transaction=at),lt}})}}function buildSend(_e,et){return function(...tt){return __awaiter$6(this,void 0,void 0,function*(){_e.signer||logger$e.throwError("sending a transaction requires a signer",Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),_e.deployTransaction!=null&&(yield _e._deployed());const rt=yield populateTransaction(_e,et,tt),nt=yield _e.signer.sendTransaction(rt);return addContractWait(_e,nt),nt})}}function buildDefault(_e,et,tt){return et.constant?buildCall(_e,et,tt):buildSend(_e,et)}function getEventTag$1(_e){return _e.address&&(_e.topics==null||_e.topics.length===0)?"*":(_e.address||"*")+"@"+(_e.topics?_e.topics.map(et=>Array.isArray(et)?et.join("|"):et).join(":"):"")}class RunningEvent{constructor(et,tt){defineReadOnly(this,"tag",et),defineReadOnly(this,"filter",tt),this._listeners=[]}addListener(et,tt){this._listeners.push({listener:et,once:tt})}removeListener(et){let tt=!1;this._listeners=this._listeners.filter(rt=>tt||rt.listener!==et?!0:(tt=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(et=>et.listener)}listenerCount(){return this._listeners.length}run(et){const tt=this.listenerCount();return this._listeners=this._listeners.filter(rt=>{const nt=et.slice();return setTimeout(()=>{rt.listener.apply(this,nt)},0),!rt.once}),tt}prepareEvent(et){}getEmit(et){return[et]}}class ErrorRunningEvent extends RunningEvent{constructor(){super("error",null)}}class FragmentRunningEvent extends RunningEvent{constructor(et,tt,rt,nt){const it={address:et};let at=tt.getEventTopic(rt);nt?(at!==nt[0]&&logger$e.throwArgumentError("topic mismatch","topics",nt),it.topics=nt.slice()):it.topics=[at],super(getEventTag$1(it),it),defineReadOnly(this,"address",et),defineReadOnly(this,"interface",tt),defineReadOnly(this,"fragment",rt)}prepareEvent(et){super.prepareEvent(et),et.event=this.fragment.name,et.eventSignature=this.fragment.format(),et.decode=(tt,rt)=>this.interface.decodeEventLog(this.fragment,tt,rt);try{et.args=this.interface.decodeEventLog(this.fragment,et.data,et.topics)}catch(tt){et.args=null,et.decodeError=tt}}getEmit(et){const tt=checkResultErrors(et.args);if(tt.length)throw tt[0].error;const rt=(et.args||[]).slice();return rt.push(et),rt}}class WildcardRunningEvent extends RunningEvent{constructor(et,tt){super("*",{address:et}),defineReadOnly(this,"address",et),defineReadOnly(this,"interface",tt)}prepareEvent(et){super.prepareEvent(et);try{const tt=this.interface.parseLog(et);et.event=tt.name,et.eventSignature=tt.signature,et.decode=(rt,nt)=>this.interface.decodeEventLog(tt.eventFragment,rt,nt),et.args=tt.args}catch{}}}class BaseContract{constructor(et,tt,rt){defineReadOnly(this,"interface",getStatic(new.target,"getInterface")(tt)),rt==null?(defineReadOnly(this,"provider",null),defineReadOnly(this,"signer",null)):Signer.isSigner(rt)?(defineReadOnly(this,"provider",rt.provider||null),defineReadOnly(this,"signer",rt)):Provider.isProvider(rt)?(defineReadOnly(this,"provider",rt),defineReadOnly(this,"signer",null)):logger$e.throwArgumentError("invalid signer or provider","signerOrProvider",rt),defineReadOnly(this,"callStatic",{}),defineReadOnly(this,"estimateGas",{}),defineReadOnly(this,"functions",{}),defineReadOnly(this,"populateTransaction",{}),defineReadOnly(this,"filters",{});{const at={};Object.keys(this.interface.events).forEach(st=>{const lt=this.interface.events[st];defineReadOnly(this.filters,st,(...dt)=>({address:this.address,topics:this.interface.encodeFilterTopics(lt,dt)})),at[lt.name]||(at[lt.name]=[]),at[lt.name].push(st)}),Object.keys(at).forEach(st=>{const lt=at[st];lt.length===1?defineReadOnly(this.filters,st,this.filters[lt[0]]):logger$e.warn(`Duplicate definition of ${st} (${lt.join(", ")})`)})}if(defineReadOnly(this,"_runningEvents",{}),defineReadOnly(this,"_wrappedEmits",{}),et==null&&logger$e.throwArgumentError("invalid contract address or ENS name","addressOrName",et),defineReadOnly(this,"address",et),this.provider)defineReadOnly(this,"resolvedAddress",resolveName(this.provider,et));else try{defineReadOnly(this,"resolvedAddress",Promise.resolve(getAddress$1(et)))}catch{logger$e.throwError("provider is required to use ENS name as contract address",Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(at=>{});const nt={},it={};Object.keys(this.interface.functions).forEach(at=>{const st=this.interface.functions[at];if(it[at]){logger$e.warn(`Duplicate ABI entry for ${JSON.stringify(at)}`);return}it[at]=!0;{const lt=st.name;nt[`%${lt}`]||(nt[`%${lt}`]=[]),nt[`%${lt}`].push(at)}this[at]==null&&defineReadOnly(this,at,buildDefault(this,st,!0)),this.functions[at]==null&&defineReadOnly(this.functions,at,buildDefault(this,st,!1)),this.callStatic[at]==null&&defineReadOnly(this.callStatic,at,buildCall(this,st,!0)),this.populateTransaction[at]==null&&defineReadOnly(this.populateTransaction,at,buildPopulate(this,st)),this.estimateGas[at]==null&&defineReadOnly(this.estimateGas,at,buildEstimate(this,st))}),Object.keys(nt).forEach(at=>{const st=nt[at];if(st.length>1)return;at=at.substring(1);const lt=st[0];try{this[at]==null&&defineReadOnly(this,at,this[lt])}catch{}this.functions[at]==null&&defineReadOnly(this.functions,at,this.functions[lt]),this.callStatic[at]==null&&defineReadOnly(this.callStatic,at,this.callStatic[lt]),this.populateTransaction[at]==null&&defineReadOnly(this.populateTransaction,at,this.populateTransaction[lt]),this.estimateGas[at]==null&&defineReadOnly(this.estimateGas,at,this.estimateGas[lt])})}static getContractAddress(et){return getContractAddress$1(et)}static getInterface(et){return Interface.isInterface(et)?et:new Interface(et)}deployed(){return this._deployed()}_deployed(et){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,et).then(tt=>(tt==="0x"&&logger$e.throwError("contract not deployed",Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(et){this.signer||logger$e.throwError("sending a transactions require a signer",Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const tt=shallowCopy(et||{});return["from","to"].forEach(function(rt){tt[rt]!=null&&logger$e.throwError("cannot override "+rt,Logger.errors.UNSUPPORTED_OPERATION,{operation:rt})}),tt.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(tt))}connect(et){typeof et=="string"&&(et=new VoidSigner(et,this.provider));const tt=new this.constructor(this.address,this.interface,et);return this.deployTransaction&&defineReadOnly(tt,"deployTransaction",this.deployTransaction),tt}attach(et){return new this.constructor(et,this.interface,this.signer||this.provider)}static isIndexed(et){return Indexed.isIndexed(et)}_normalizeRunningEvent(et){return this._runningEvents[et.tag]?this._runningEvents[et.tag]:et}_getRunningEvent(et){if(typeof et=="string"){if(et==="error")return this._normalizeRunningEvent(new ErrorRunningEvent);if(et==="event")return this._normalizeRunningEvent(new RunningEvent("event",null));if(et==="*")return this._normalizeRunningEvent(new WildcardRunningEvent(this.address,this.interface));const tt=this.interface.getEvent(et);return this._normalizeRunningEvent(new FragmentRunningEvent(this.address,this.interface,tt))}if(et.topics&&et.topics.length>0){try{const rt=et.topics[0];if(typeof rt!="string")throw new Error("invalid topic");const nt=this.interface.getEvent(rt);return this._normalizeRunningEvent(new FragmentRunningEvent(this.address,this.interface,nt,et.topics))}catch{}const tt={address:this.address,topics:et.topics};return this._normalizeRunningEvent(new RunningEvent(getEventTag$1(tt),tt))}return this._normalizeRunningEvent(new WildcardRunningEvent(this.address,this.interface))}_checkRunningEvents(et){if(et.listenerCount()===0){delete this._runningEvents[et.tag];const tt=this._wrappedEmits[et.tag];tt&&et.filter&&(this.provider.off(et.filter,tt),delete this._wrappedEmits[et.tag])}}_wrapEvent(et,tt,rt){const nt=deepCopy(tt);return nt.removeListener=()=>{rt&&(et.removeListener(rt),this._checkRunningEvents(et))},nt.getBlock=()=>this.provider.getBlock(tt.blockHash),nt.getTransaction=()=>this.provider.getTransaction(tt.transactionHash),nt.getTransactionReceipt=()=>this.provider.getTransactionReceipt(tt.transactionHash),et.prepareEvent(nt),nt}_addEventListener(et,tt,rt){if(this.provider||logger$e.throwError("events require a provider or a signer with a provider",Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),et.addListener(tt,rt),this._runningEvents[et.tag]=et,!this._wrappedEmits[et.tag]){const nt=it=>{let at=this._wrapEvent(et,it,tt);if(at.decodeError==null)try{const st=et.getEmit(at);this.emit(et.filter,...st)}catch(st){at.decodeError=st.error}et.filter!=null&&this.emit("event",at),at.decodeError!=null&&this.emit("error",at.decodeError,at)};this._wrappedEmits[et.tag]=nt,et.filter!=null&&this.provider.on(et.filter,nt)}}queryFilter(et,tt,rt){const nt=this._getRunningEvent(et),it=shallowCopy(nt.filter);return typeof tt=="string"&&isHexString(tt,32)?(rt!=null&&logger$e.throwArgumentError("cannot specify toBlock with blockhash","toBlock",rt),it.blockHash=tt):(it.fromBlock=tt??0,it.toBlock=rt??"latest"),this.provider.getLogs(it).then(at=>at.map(st=>this._wrapEvent(nt,st,null)))}on(et,tt){return this._addEventListener(this._getRunningEvent(et),tt,!1),this}once(et,tt){return this._addEventListener(this._getRunningEvent(et),tt,!0),this}emit(et,...tt){if(!this.provider)return!1;const rt=this._getRunningEvent(et),nt=rt.run(tt)>0;return this._checkRunningEvents(rt),nt}listenerCount(et){return this.provider?et==null?Object.keys(this._runningEvents).reduce((tt,rt)=>tt+this._runningEvents[rt].listenerCount(),0):this._getRunningEvent(et).listenerCount():0}listeners(et){if(!this.provider)return[];if(et==null){const tt=[];for(let rt in this._runningEvents)this._runningEvents[rt].listeners().forEach(nt=>{tt.push(nt)});return tt}return this._getRunningEvent(et).listeners()}removeAllListeners(et){if(!this.provider)return this;if(et==null){for(const rt in this._runningEvents){const nt=this._runningEvents[rt];nt.removeAllListeners(),this._checkRunningEvents(nt)}return this}const tt=this._getRunningEvent(et);return tt.removeAllListeners(),this._checkRunningEvents(tt),this}off(et,tt){if(!this.provider)return this;const rt=this._getRunningEvent(et);return rt.removeListener(tt),this._checkRunningEvents(rt),this}removeListener(et,tt){return this.off(et,tt)}}class Contract extends BaseContract{}class BaseX{constructor(et){defineReadOnly(this,"alphabet",et),defineReadOnly(this,"base",et.length),defineReadOnly(this,"_alphabetMap",{}),defineReadOnly(this,"_leader",et.charAt(0));for(let tt=0;tt0;)rt.push(at%this.base),at=at/this.base|0}let nt="";for(let it=0;tt[it]===0&&it=0;--it)nt+=this.alphabet[rt[it]];return nt}decode(et){if(typeof et!="string")throw new TypeError("Expected String");let tt=[];if(et.length===0)return new Uint8Array(tt);tt.push(0);for(let rt=0;rt>=8;for(;it>0;)tt.push(it&255),it>>=8}for(let rt=0;et[rt]===this._leader&&rt>24&255,lt[et.length+1]=pt>>16&255,lt[et.length+2]=pt>>8&255,lt[et.length+3]=pt&255;let mt=arrayify(computeHmac(nt,_e,lt));it||(it=mt.length,ht=new Uint8Array(it),at=Math.ceil(rt/it),dt=rt-(at-1)*it),ht.set(mt);for(let xt=1;xt=256)throw new Error("Depth too large!");return base58check(concat$1([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",hexlify(this.depth),this.parentFingerprint,hexZeroPad(hexlify(this.index),4),this.chainCode,this.privateKey!=null?concat$1(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new HDNode(_constructorGuard$1,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(et){if(et>4294967295)throw new Error("invalid index - "+String(et));let tt=this.path;tt&&(tt+="/"+(et&~HardenedBit));const rt=new Uint8Array(37);if(et&HardenedBit){if(!this.privateKey)throw new Error("cannot derive child of neutered node");rt.set(arrayify(this.privateKey),1),tt&&(tt+="'")}else rt.set(arrayify(this.publicKey));for(let pt=24;pt>=0;pt-=8)rt[33+(pt>>3)]=et>>24-pt&255;const nt=arrayify(computeHmac(SupportedAlgorithm.sha512,this.chainCode,rt)),it=nt.slice(0,32),at=nt.slice(32);let st=null,lt=null;this.privateKey?st=bytes32(BigNumber.from(it).add(this.privateKey).mod(N$4)):lt=new SigningKey(hexlify(it))._addPoint(this.publicKey);let dt=tt;const ht=this.mnemonic;return ht&&(dt=Object.freeze({phrase:ht.phrase,path:tt,locale:ht.locale||"en"})),new HDNode(_constructorGuard$1,st,lt,this.fingerprint,bytes32(at),et,this.depth+1,dt)}derivePath(et){const tt=et.split("/");if(tt.length===0||tt[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+et);tt[0]==="m"&&tt.shift();let rt=this;for(let nt=0;nt=HardenedBit)throw new Error("invalid path index - "+it);rt=rt._derive(HardenedBit+at)}else if(it.match(/^[0-9]+$/)){const at=parseInt(it);if(at>=HardenedBit)throw new Error("invalid path index - "+it);rt=rt._derive(at)}else throw new Error("invalid path component - "+it)}return rt}static _fromSeed(et,tt){const rt=arrayify(et);if(rt.length<16||rt.length>64)throw new Error("invalid seed");const nt=arrayify(computeHmac(SupportedAlgorithm.sha512,MasterSecret,rt));return new HDNode(_constructorGuard$1,bytes32(nt.slice(0,32)),null,"0x00000000",bytes32(nt.slice(32)),0,0,tt)}static fromMnemonic(et,tt,rt){return rt=getWordlist(rt),et=entropyToMnemonic(mnemonicToEntropy(et,rt),rt),HDNode._fromSeed(mnemonicToSeed(et,tt),{phrase:et,path:"m",locale:rt.locale})}static fromSeed(et){return HDNode._fromSeed(et,null)}static fromExtendedKey(et){const tt=Base58.decode(et);(tt.length!==82||base58check(tt.slice(0,78))!==et)&&logger$b.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const rt=tt[4],nt=hexlify(tt.slice(5,9)),it=parseInt(hexlify(tt.slice(9,13)).substring(2),16),at=hexlify(tt.slice(13,45)),st=tt.slice(45,78);switch(hexlify(tt.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new HDNode(_constructorGuard$1,null,hexlify(st),nt,at,it,rt,null);case"0x0488ade4":case"0x04358394 ":if(st[0]!==0)break;return new HDNode(_constructorGuard$1,hexlify(st.slice(1)),null,nt,at,it,rt,null)}return logger$b.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function mnemonicToSeed(_e,et){et||(et="");const tt=toUtf8Bytes("mnemonic"+et,UnicodeNormalizationForm.NFKD);return pbkdf2$2(toUtf8Bytes(_e,UnicodeNormalizationForm.NFKD),tt,2048,64,"sha512")}function mnemonicToEntropy(_e,et){et=getWordlist(et),logger$b.checkNormalize();const tt=et.split(_e);if(tt.length%3!==0)throw new Error("invalid mnemonic");const rt=arrayify(new Uint8Array(Math.ceil(11*tt.length/8)));let nt=0;for(let dt=0;dt>3]|=1<<7-nt%8),nt++}const it=32*tt.length/3,at=tt.length/3,st=getUpperMask(at);if((arrayify(sha256$3(rt.slice(0,it/8)))[0]&st)!==(rt[rt.length-1]&st))throw new Error("invalid checksum");return hexlify(rt.slice(0,it/8))}function entropyToMnemonic(_e,et){if(et=getWordlist(et),_e=arrayify(_e),_e.length%4!==0||_e.length<16||_e.length>32)throw new Error("invalid entropy");const tt=[0];let rt=11;for(let at=0;at<_e.length;at++)rt>8?(tt[tt.length-1]<<=8,tt[tt.length-1]|=_e[at],rt-=8):(tt[tt.length-1]<<=rt,tt[tt.length-1]|=_e[at]>>8-rt,tt.push(_e[at]&getLowerMask(8-rt)),rt+=3);const nt=_e.length/4,it=arrayify(sha256$3(_e))[0]&getUpperMask(nt);return tt[tt.length-1]<<=nt,tt[tt.length-1]|=it>>8-nt,et.join(tt.map(at=>et.getWord(at)))}function isValidMnemonic(_e,et){try{return mnemonicToEntropy(_e,et),!0}catch{}return!1}function getAccountPath(_e){return(typeof _e!="number"||_e<0||_e>=HardenedBit||_e%1)&&logger$b.throwArgumentError("invalid account index","index",_e),`m/44'/60'/${_e}'/0/0`}const lib_esm$6=Object.freeze(Object.defineProperty({__proto__:null,HDNode,defaultPath,entropyToMnemonic,getAccountPath,isValidMnemonic,mnemonicToEntropy,mnemonicToSeed},Symbol.toStringTag,{value:"Module"})),version$b="random/5.7.0",logger$a=new Logger(version$b);function getGlobal(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const anyGlobal=getGlobal();let crypto$1=anyGlobal.crypto||anyGlobal.msCrypto;(!crypto$1||!crypto$1.getRandomValues)&&(logger$a.warn("WARNING: Missing strong random number source"),crypto$1={getRandomValues:function(_e){return logger$a.throwError("no secure random source avaialble",Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function randomBytes$1(_e){(_e<=0||_e>1024||_e%1||_e!=_e)&&logger$a.throwArgumentError("invalid length","length",_e);const et=new Uint8Array(_e);return crypto$1.getRandomValues(et),arrayify(et)}function shuffled(_e){_e=_e.slice();for(let et=_e.length-1;et>0;et--){const tt=Math.floor(Math.random()*(et+1)),rt=_e[et];_e[et]=_e[tt],_e[tt]=rt}return _e}const lib_esm$5=Object.freeze(Object.defineProperty({__proto__:null,randomBytes:randomBytes$1,shuffled},Symbol.toStringTag,{value:"Module"}));var aesJs={exports:{}};(function(_e,et){(function(tt){function rt(Ct){return parseInt(Ct)===Ct}function nt(Ct){if(!rt(Ct.length))return!1;for(var St=0;St255)return!1;return!0}function it(Ct,St){if(Ct.buffer&&ArrayBuffer.isView(Ct)&&Ct.name==="Uint8Array")return St&&(Ct.slice?Ct=Ct.slice():Ct=Array.prototype.slice.call(Ct)),Ct;if(Array.isArray(Ct)){if(!nt(Ct))throw new Error("Array contains invalid value: "+Ct);return new Uint8Array(Ct)}if(rt(Ct.length)&&nt(Ct))return new Uint8Array(Ct);throw new Error("unsupported array-like object")}function at(Ct){return new Uint8Array(Ct)}function st(Ct,St,Ft,Vt,Rt){(Vt!=null||Rt!=null)&&(Ct.slice?Ct=Ct.slice(Vt,Rt):Ct=Array.prototype.slice.call(Ct,Vt,Rt)),St.set(Ct,Ft)}var lt=function(){function Ct(Ft){var Vt=[],Rt=0;for(Ft=encodeURI(Ft);Rt191&&Kt<224?(Vt.push(String.fromCharCode((Kt&31)<<6|Ft[Rt+1]&63)),Rt+=2):(Vt.push(String.fromCharCode((Kt&15)<<12|(Ft[Rt+1]&63)<<6|Ft[Rt+2]&63)),Rt+=3)}return Vt.join("")}return{toBytes:Ct,fromBytes:St}}(),dt=function(){function Ct(Vt){for(var Rt=[],Kt=0;Kt>4]+St[Zt&15])}return Rt.join("")}return{toBytes:Ct,fromBytes:Ft}}(),ht={16:10,24:12,32:14},pt=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],mt=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],gt=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],vt=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],xt=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],yt=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],bt=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],wt=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],Et=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],$t=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Pt=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],kt=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Lt=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],jt=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],qt=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Dt(Ct){for(var St=[],Ft=0;Ft>2,this._Ke[Kt][St%4]=Rt[St],this._Kd[Ct-Kt][St%4]=Rt[St];for(var Zt=0,Jt=Vt,rr;Jt>16&255]<<24^mt[rr>>8&255]<<16^mt[rr&255]<<8^mt[rr>>24&255]^pt[Zt]<<24,Zt+=1,Vt!=8)for(var St=1;St>8&255]<<8^mt[rr>>16&255]<<16^mt[rr>>24&255]<<24;for(var St=Vt/2+1;St>2,ar=Jt%4,this._Ke[or][ar]=Rt[St],this._Kd[Ct-or][ar]=Rt[St++],Jt++}for(var or=1;or>24&255]^Lt[rr>>16&255]^jt[rr>>8&255]^qt[rr&255]},Ht.prototype.encrypt=function(Ct){if(Ct.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var St=this._Ke.length-1,Ft=[0,0,0,0],Vt=Dt(Ct),Rt=0;Rt<4;Rt++)Vt[Rt]^=this._Ke[0][Rt];for(var Kt=1;Kt>24&255]^xt[Vt[(Rt+1)%4]>>16&255]^yt[Vt[(Rt+2)%4]>>8&255]^bt[Vt[(Rt+3)%4]&255]^this._Ke[Kt][Rt];Vt=Ft.slice()}for(var Zt=at(16),Jt,Rt=0;Rt<4;Rt++)Jt=this._Ke[St][Rt],Zt[4*Rt]=(mt[Vt[Rt]>>24&255]^Jt>>24)&255,Zt[4*Rt+1]=(mt[Vt[(Rt+1)%4]>>16&255]^Jt>>16)&255,Zt[4*Rt+2]=(mt[Vt[(Rt+2)%4]>>8&255]^Jt>>8)&255,Zt[4*Rt+3]=(mt[Vt[(Rt+3)%4]&255]^Jt)&255;return Zt},Ht.prototype.decrypt=function(Ct){if(Ct.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var St=this._Kd.length-1,Ft=[0,0,0,0],Vt=Dt(Ct),Rt=0;Rt<4;Rt++)Vt[Rt]^=this._Kd[0][Rt];for(var Kt=1;Kt>24&255]^Et[Vt[(Rt+3)%4]>>16&255]^$t[Vt[(Rt+2)%4]>>8&255]^Pt[Vt[(Rt+1)%4]&255]^this._Kd[Kt][Rt];Vt=Ft.slice()}for(var Zt=at(16),Jt,Rt=0;Rt<4;Rt++)Jt=this._Kd[St][Rt],Zt[4*Rt]=(gt[Vt[Rt]>>24&255]^Jt>>24)&255,Zt[4*Rt+1]=(gt[Vt[(Rt+3)%4]>>16&255]^Jt>>16)&255,Zt[4*Rt+2]=(gt[Vt[(Rt+2)%4]>>8&255]^Jt>>8)&255,Zt[4*Rt+3]=(gt[Vt[(Rt+1)%4]&255]^Jt)&255;return Zt};var Xt=function(Ct){if(!(this instanceof Xt))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Ht(Ct)};Xt.prototype.encrypt=function(Ct){if(Ct=it(Ct),Ct.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var St=at(Ct.length),Ft=at(16),Vt=0;Vt=0;--St)this._counter[St]=Ct%256,Ct=Ct>>8},Tt.prototype.setBytes=function(Ct){if(Ct=it(Ct,!0),Ct.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=Ct},Tt.prototype.increment=function(){for(var Ct=15;Ct>=0;Ct--)if(this._counter[Ct]===255)this._counter[Ct]=0;else{this._counter[Ct]++;break}};var Bt=function(Ct,St){if(!(this instanceof Bt))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",St instanceof Tt||(St=new Tt(St)),this._counter=St,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Ht(Ct)};Bt.prototype.encrypt=function(Ct){for(var St=it(Ct,!0),Ft=0;Ft16)throw new Error("PKCS#7 padding byte out of range");for(var Ft=Ct.length-St,Vt=0;Vt=64;){let Wt=bt,Ct=wt,St=Et,Ft=$t,Vt=Pt,Rt=kt,Kt=Lt,Zt=jt,Jt,rr,or,ar,ir;for(rr=0;rr<16;rr++)or=Ot+rr*4,qt[rr]=(Bt[or]&255)<<24|(Bt[or+1]&255)<<16|(Bt[or+2]&255)<<8|Bt[or+3]&255;for(rr=16;rr<64;rr++)Jt=qt[rr-2],ar=(Jt>>>17|Jt<<32-17)^(Jt>>>19|Jt<<32-19)^Jt>>>10,Jt=qt[rr-15],ir=(Jt>>>7|Jt<<32-7)^(Jt>>>18|Jt<<32-18)^Jt>>>3,qt[rr]=(ar+qt[rr-7]|0)+(ir+qt[rr-16]|0)|0;for(rr=0;rr<64;rr++)ar=(((Vt>>>6|Vt<<32-6)^(Vt>>>11|Vt<<32-11)^(Vt>>>25|Vt<<32-25))+(Vt&Rt^~Vt&Kt)|0)+(Zt+(yt[rr]+qt[rr]|0)|0)|0,ir=((Wt>>>2|Wt<<32-2)^(Wt>>>13|Wt<<32-13)^(Wt>>>22|Wt<<32-22))+(Wt&Ct^Wt&St^Ct&St)|0,Zt=Kt,Kt=Rt,Rt=Vt,Vt=Ft+ar|0,Ft=St,St=Ct,Ct=Wt,Wt=ar+ir|0;bt=bt+Wt|0,wt=wt+Ct|0,Et=Et+St|0,$t=$t+Ft|0,Pt=Pt+Vt|0,kt=kt+Rt|0,Lt=Lt+Kt|0,jt=jt+Zt|0,Ot+=64,Ut-=64}}Dt(xt);let Ht,Xt=xt.length%64,Mt=xt.length/536870912|0,_t=xt.length<<3,At=Xt<56?56:120,Tt=xt.slice(xt.length-Xt,xt.length);for(Tt.push(128),Ht=Xt+1;Ht>>24&255),Tt.push(Mt>>>16&255),Tt.push(Mt>>>8&255),Tt.push(Mt>>>0&255),Tt.push(_t>>>24&255),Tt.push(_t>>>16&255),Tt.push(_t>>>8&255),Tt.push(_t>>>0&255),Dt(Tt),[bt>>>24&255,bt>>>16&255,bt>>>8&255,bt>>>0&255,wt>>>24&255,wt>>>16&255,wt>>>8&255,wt>>>0&255,Et>>>24&255,Et>>>16&255,Et>>>8&255,Et>>>0&255,$t>>>24&255,$t>>>16&255,$t>>>8&255,$t>>>0&255,Pt>>>24&255,Pt>>>16&255,Pt>>>8&255,Pt>>>0&255,kt>>>24&255,kt>>>16&255,kt>>>8&255,kt>>>0&255,Lt>>>24&255,Lt>>>16&255,Lt>>>8&255,Lt>>>0&255,jt>>>24&255,jt>>>16&255,jt>>>8&255,jt>>>0&255]}function it(xt,yt,bt){xt=xt.length<=64?xt:nt(xt);const wt=64+yt.length+4,Et=new Array(wt),$t=new Array(64);let Pt,kt=[];for(Pt=0;Pt<64;Pt++)Et[Pt]=54;for(Pt=0;Pt=wt-4;jt--){if(Et[jt]++,Et[jt]<=255)return;Et[jt]=0}}for(;bt>=32;)Lt(),kt=kt.concat(nt($t.concat(nt(Et)))),bt-=32;return bt>0&&(Lt(),kt=kt.concat(nt($t.concat(nt(Et))).slice(0,bt))),kt}function at(xt,yt,bt,wt,Et){let $t;for(ht(xt,(2*bt-1)*16,Et,0,16),$t=0;$t<2*bt;$t++)dt(xt,$t*16,Et,16),lt(Et,wt),ht(Et,0,xt,yt+$t*16,16);for($t=0;$t>>32-yt}function lt(xt,yt){ht(xt,0,yt,0,16);for(let bt=8;bt>0;bt-=2)yt[4]^=st(yt[0]+yt[12],7),yt[8]^=st(yt[4]+yt[0],9),yt[12]^=st(yt[8]+yt[4],13),yt[0]^=st(yt[12]+yt[8],18),yt[9]^=st(yt[5]+yt[1],7),yt[13]^=st(yt[9]+yt[5],9),yt[1]^=st(yt[13]+yt[9],13),yt[5]^=st(yt[1]+yt[13],18),yt[14]^=st(yt[10]+yt[6],7),yt[2]^=st(yt[14]+yt[10],9),yt[6]^=st(yt[2]+yt[14],13),yt[10]^=st(yt[6]+yt[2],18),yt[3]^=st(yt[15]+yt[11],7),yt[7]^=st(yt[3]+yt[15],9),yt[11]^=st(yt[7]+yt[3],13),yt[15]^=st(yt[11]+yt[7],18),yt[1]^=st(yt[0]+yt[3],7),yt[2]^=st(yt[1]+yt[0],9),yt[3]^=st(yt[2]+yt[1],13),yt[0]^=st(yt[3]+yt[2],18),yt[6]^=st(yt[5]+yt[4],7),yt[7]^=st(yt[6]+yt[5],9),yt[4]^=st(yt[7]+yt[6],13),yt[5]^=st(yt[4]+yt[7],18),yt[11]^=st(yt[10]+yt[9],7),yt[8]^=st(yt[11]+yt[10],9),yt[9]^=st(yt[8]+yt[11],13),yt[10]^=st(yt[9]+yt[8],18),yt[12]^=st(yt[15]+yt[14],7),yt[13]^=st(yt[12]+yt[15],9),yt[14]^=st(yt[13]+yt[12],13),yt[15]^=st(yt[14]+yt[13],18);for(let bt=0;bt<16;++bt)xt[bt]+=yt[bt]}function dt(xt,yt,bt,wt){for(let Et=0;Et=256)return!1}return!0}function mt(xt,yt){if(typeof xt!="number"||xt%1)throw new Error("invalid "+yt);return xt}function gt(xt,yt,bt,wt,Et,$t,Pt){if(bt=mt(bt,"N"),wt=mt(wt,"r"),Et=mt(Et,"p"),$t=mt($t,"dkLen"),bt===0||bt&bt-1)throw new Error("N must be power of 2");if(bt>2147483647/128/wt)throw new Error("N too large");if(wt>2147483647/128/Et)throw new Error("r too large");if(!pt(xt))throw new Error("password must be an array or buffer");if(xt=Array.prototype.slice.call(xt),!pt(yt))throw new Error("salt must be an array or buffer");yt=Array.prototype.slice.call(yt);let kt=it(xt,yt,Et*128*wt);const Lt=new Uint32Array(Et*32*wt);for(let Vt=0;VtCt&&(Vt=Ct);for(let Kt=0;KtCt&&(Vt=Ct);for(let Kt=0;Kt>0&255),kt.push(Lt[Kt]>>8&255),kt.push(Lt[Kt]>>16&255),kt.push(Lt[Kt]>>24&255);const Rt=it(xt,kt,$t);return Pt&&Pt(null,1,Rt),Rt}Pt&&St(Ft)};if(!Pt)for(;;){const Vt=Ft();if(Vt!=null)return Vt}Ft()}const vt={scrypt:function(xt,yt,bt,wt,Et,$t,Pt){return new Promise(function(kt,Lt){let jt=0;Pt&&Pt(0),gt(xt,yt,bt,wt,Et,$t,function(qt,Dt,Ht){if(qt)Lt(qt);else if(Ht)Pt&&jt!==1&&Pt(1),kt(new Uint8Array(Ht));else if(Pt&&Dt!==jt)return jt=Dt,Pt(Dt)})})},syncScrypt:function(xt,yt,bt,wt,Et,$t){return new Uint8Array(gt(xt,yt,bt,wt,Et,$t))}};_e.exports=vt})()})(scrypt$1);var scryptExports=scrypt$1.exports;const scrypt=getDefaultExportFromCjs(scryptExports);var __awaiter$5=globalThis&&globalThis.__awaiter||function(_e,et,tt,rt){function nt(it){return it instanceof tt?it:new tt(function(at){at(it)})}return new(tt||(tt=Promise))(function(it,at){function st(ht){try{dt(rt.next(ht))}catch(pt){at(pt)}}function lt(ht){try{dt(rt.throw(ht))}catch(pt){at(pt)}}function dt(ht){ht.done?it(ht.value):nt(ht.value).then(st,lt)}dt((rt=rt.apply(_e,et||[])).next())})};const logger$8=new Logger(version$a);function hasMnemonic$1(_e){return _e!=null&&_e.mnemonic&&_e.mnemonic.phrase}class KeystoreAccount extends Description{isKeystoreAccount(et){return!!(et&&et._isKeystoreAccount)}}function _decrypt(_e,et,tt){if(searchPath(_e,"crypto/cipher")==="aes-128-ctr"){const nt=looseArrayify(searchPath(_e,"crypto/cipherparams/iv")),it=new aes$1.Counter(nt),at=new aes$1.ModeOfOperation.ctr(et,it);return arrayify(at.decrypt(tt))}return null}function _getAccount(_e,et){const tt=looseArrayify(searchPath(_e,"crypto/ciphertext"));if(hexlify(keccak256$2(concat$1([et.slice(16,32),tt]))).substring(2)!==searchPath(_e,"crypto/mac").toLowerCase())throw new Error("invalid password");const nt=_decrypt(_e,et.slice(0,16),tt);nt||logger$8.throwError("unsupported cipher",Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const it=et.slice(32,64),at=computeAddress(nt);if(_e.address){let lt=_e.address.toLowerCase();if(lt.substring(0,2)!=="0x"&&(lt="0x"+lt),getAddress$1(lt)!==at)throw new Error("address mismatch")}const st={_isKeystoreAccount:!0,address:at,privateKey:hexlify(nt)};if(searchPath(_e,"x-ethers/version")==="0.1"){const lt=looseArrayify(searchPath(_e,"x-ethers/mnemonicCiphertext")),dt=looseArrayify(searchPath(_e,"x-ethers/mnemonicCounter")),ht=new aes$1.Counter(dt),pt=new aes$1.ModeOfOperation.ctr(it,ht),mt=searchPath(_e,"x-ethers/path")||defaultPath,gt=searchPath(_e,"x-ethers/locale")||"en",vt=arrayify(pt.decrypt(lt));try{const xt=entropyToMnemonic(vt,gt),yt=HDNode.fromMnemonic(xt,null,gt).derivePath(mt);if(yt.privateKey!=st.privateKey)throw new Error("mnemonic mismatch");st.mnemonic=yt.mnemonic}catch(xt){if(xt.code!==Logger.errors.INVALID_ARGUMENT||xt.argument!=="wordlist")throw xt}}return new KeystoreAccount(st)}function pbkdf2Sync(_e,et,tt,rt,nt){return arrayify(pbkdf2$2(_e,et,tt,rt,nt))}function pbkdf2$1(_e,et,tt,rt,nt){return Promise.resolve(pbkdf2Sync(_e,et,tt,rt,nt))}function _computeKdfKey(_e,et,tt,rt,nt){const it=getPassword(et),at=searchPath(_e,"crypto/kdf");if(at&&typeof at=="string"){const st=function(lt,dt){return logger$8.throwArgumentError("invalid key-derivation function parameters",lt,dt)};if(at.toLowerCase()==="scrypt"){const lt=looseArrayify(searchPath(_e,"crypto/kdfparams/salt")),dt=parseInt(searchPath(_e,"crypto/kdfparams/n")),ht=parseInt(searchPath(_e,"crypto/kdfparams/r")),pt=parseInt(searchPath(_e,"crypto/kdfparams/p"));(!dt||!ht||!pt)&&st("kdf",at),dt&dt-1&&st("N",dt);const mt=parseInt(searchPath(_e,"crypto/kdfparams/dklen"));return mt!==32&&st("dklen",mt),rt(it,lt,dt,ht,pt,64,nt)}else if(at.toLowerCase()==="pbkdf2"){const lt=looseArrayify(searchPath(_e,"crypto/kdfparams/salt"));let dt=null;const ht=searchPath(_e,"crypto/kdfparams/prf");ht==="hmac-sha256"?dt="sha256":ht==="hmac-sha512"?dt="sha512":st("prf",ht);const pt=parseInt(searchPath(_e,"crypto/kdfparams/c")),mt=parseInt(searchPath(_e,"crypto/kdfparams/dklen"));return mt!==32&&st("dklen",mt),tt(it,lt,pt,mt,dt)}}return logger$8.throwArgumentError("unsupported key-derivation function","kdf",at)}function decryptSync(_e,et){const tt=JSON.parse(_e),rt=_computeKdfKey(tt,et,pbkdf2Sync,scrypt.syncScrypt);return _getAccount(tt,rt)}function decrypt(_e,et,tt){return __awaiter$5(this,void 0,void 0,function*(){const rt=JSON.parse(_e),nt=yield _computeKdfKey(rt,et,pbkdf2$1,scrypt.scrypt,tt);return _getAccount(rt,nt)})}function encrypt(_e,et,tt,rt){try{if(getAddress$1(_e.address)!==computeAddress(_e.privateKey))throw new Error("address/privateKey mismatch");if(hasMnemonic$1(_e)){const yt=_e.mnemonic;if(HDNode.fromMnemonic(yt.phrase,null,yt.locale).derivePath(yt.path||defaultPath).privateKey!=_e.privateKey)throw new Error("mnemonic mismatch")}}catch(yt){return Promise.reject(yt)}typeof tt=="function"&&!rt&&(rt=tt,tt={}),tt||(tt={});const nt=arrayify(_e.privateKey),it=getPassword(et);let at=null,st=null,lt=null;if(hasMnemonic$1(_e)){const yt=_e.mnemonic;at=arrayify(mnemonicToEntropy(yt.phrase,yt.locale||"en")),st=yt.path||defaultPath,lt=yt.locale||"en"}let dt=tt.client;dt||(dt="ethers.js");let ht=null;tt.salt?ht=arrayify(tt.salt):ht=randomBytes$1(32);let pt=null;if(tt.iv){if(pt=arrayify(tt.iv),pt.length!==16)throw new Error("invalid iv")}else pt=randomBytes$1(16);let mt=null;if(tt.uuid){if(mt=arrayify(tt.uuid),mt.length!==16)throw new Error("invalid uuid")}else mt=randomBytes$1(16);let gt=1<<17,vt=8,xt=1;return tt.scrypt&&(tt.scrypt.N&&(gt=tt.scrypt.N),tt.scrypt.r&&(vt=tt.scrypt.r),tt.scrypt.p&&(xt=tt.scrypt.p)),scrypt.scrypt(it,ht,gt,vt,xt,64,rt).then(yt=>{yt=arrayify(yt);const bt=yt.slice(0,16),wt=yt.slice(16,32),Et=yt.slice(32,64),$t=new aes$1.Counter(pt),Pt=new aes$1.ModeOfOperation.ctr(bt,$t),kt=arrayify(Pt.encrypt(nt)),Lt=keccak256$2(concat$1([wt,kt])),jt={address:_e.address.substring(2).toLowerCase(),id:uuidV4(mt),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:hexlify(pt).substring(2)},ciphertext:hexlify(kt).substring(2),kdf:"scrypt",kdfparams:{salt:hexlify(ht).substring(2),n:gt,dklen:32,p:xt,r:vt},mac:Lt.substring(2)}};if(at){const qt=randomBytes$1(16),Dt=new aes$1.Counter(qt),Ht=new aes$1.ModeOfOperation.ctr(Et,Dt),Xt=arrayify(Ht.encrypt(at)),Mt=new Date,_t=Mt.getUTCFullYear()+"-"+zpad(Mt.getUTCMonth()+1,2)+"-"+zpad(Mt.getUTCDate(),2)+"T"+zpad(Mt.getUTCHours(),2)+"-"+zpad(Mt.getUTCMinutes(),2)+"-"+zpad(Mt.getUTCSeconds(),2)+".0Z";jt["x-ethers"]={client:dt,gethFilename:"UTC--"+_t+"--"+jt.address,mnemonicCounter:hexlify(qt).substring(2),mnemonicCiphertext:hexlify(Xt).substring(2),path:st,locale:lt,version:"0.1"}}return JSON.stringify(jt)})}function decryptJsonWallet(_e,et,tt){if(isCrowdsaleWallet(_e)){tt&&tt(0);const rt=decrypt$1(_e,et);return tt&&tt(1),Promise.resolve(rt)}return isKeystoreWallet(_e)?decrypt(_e,et,tt):Promise.reject(new Error("invalid JSON wallet"))}function decryptJsonWalletSync(_e,et){if(isCrowdsaleWallet(_e))return decrypt$1(_e,et);if(isKeystoreWallet(_e))return decryptSync(_e,et);throw new Error("invalid JSON wallet")}const lib_esm$4=Object.freeze(Object.defineProperty({__proto__:null,decryptCrowdsale:decrypt$1,decryptJsonWallet,decryptJsonWalletSync,decryptKeystore:decrypt,decryptKeystoreSync:decryptSync,encryptKeystore:encrypt,getJsonWalletAddress,isCrowdsaleWallet,isKeystoreWallet},Symbol.toStringTag,{value:"Module"})),version$9="wallet/5.7.0";var __awaiter$4=globalThis&&globalThis.__awaiter||function(_e,et,tt,rt){function nt(it){return it instanceof tt?it:new tt(function(at){at(it)})}return new(tt||(tt=Promise))(function(it,at){function st(ht){try{dt(rt.next(ht))}catch(pt){at(pt)}}function lt(ht){try{dt(rt.throw(ht))}catch(pt){at(pt)}}function dt(ht){ht.done?it(ht.value):nt(ht.value).then(st,lt)}dt((rt=rt.apply(_e,et||[])).next())})};const logger$7=new Logger(version$9);function isAccount(_e){return _e!=null&&isHexString(_e.privateKey,32)&&_e.address!=null}function hasMnemonic(_e){const et=_e.mnemonic;return et&&et.phrase}class Wallet extends Signer{constructor(et,tt){if(super(),isAccount(et)){const rt=new SigningKey(et.privateKey);if(defineReadOnly(this,"_signingKey",()=>rt),defineReadOnly(this,"address",computeAddress(this.publicKey)),this.address!==getAddress$1(et.address)&&logger$7.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),hasMnemonic(et)){const nt=et.mnemonic;defineReadOnly(this,"_mnemonic",()=>({phrase:nt.phrase,path:nt.path||defaultPath,locale:nt.locale||"en"}));const it=this.mnemonic,at=HDNode.fromMnemonic(it.phrase,null,it.locale).derivePath(it.path);computeAddress(at.privateKey)!==this.address&&logger$7.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else defineReadOnly(this,"_mnemonic",()=>null)}else{if(SigningKey.isSigningKey(et))et.curve!=="secp256k1"&&logger$7.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),defineReadOnly(this,"_signingKey",()=>et);else{typeof et=="string"&&et.match(/^[0-9a-f]*$/i)&&et.length===64&&(et="0x"+et);const rt=new SigningKey(et);defineReadOnly(this,"_signingKey",()=>rt)}defineReadOnly(this,"_mnemonic",()=>null),defineReadOnly(this,"address",computeAddress(this.publicKey))}tt&&!Provider.isProvider(tt)&&logger$7.throwArgumentError("invalid provider","provider",tt),defineReadOnly(this,"provider",tt||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(et){return new Wallet(this,et)}signTransaction(et){return resolveProperties(et).then(tt=>{tt.from!=null&&(getAddress$1(tt.from)!==this.address&&logger$7.throwArgumentError("transaction from address mismatch","transaction.from",et.from),delete tt.from);const rt=this._signingKey().signDigest(keccak256$2(serialize$1(tt)));return serialize$1(tt,rt)})}signMessage(et){return __awaiter$4(this,void 0,void 0,function*(){return joinSignature(this._signingKey().signDigest(hashMessage$1(et)))})}_signTypedData(et,tt,rt){return __awaiter$4(this,void 0,void 0,function*(){const nt=yield TypedDataEncoder.resolveNames(et,tt,rt,it=>(this.provider==null&&logger$7.throwError("cannot resolve ENS names without a provider",Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:it}),this.provider.resolveName(it)));return joinSignature(this._signingKey().signDigest(TypedDataEncoder.hash(nt.domain,tt,nt.value)))})}encrypt(et,tt,rt){if(typeof tt=="function"&&!rt&&(rt=tt,tt={}),rt&&typeof rt!="function")throw new Error("invalid callback");return tt||(tt={}),encrypt(this,et,tt,rt)}static createRandom(et){let tt=randomBytes$1(16);et||(et={}),et.extraEntropy&&(tt=arrayify(hexDataSlice(keccak256$2(concat$1([tt,et.extraEntropy])),0,16)));const rt=entropyToMnemonic(tt,et.locale);return Wallet.fromMnemonic(rt,et.path,et.locale)}static fromEncryptedJson(et,tt,rt){return decryptJsonWallet(et,tt,rt).then(nt=>new Wallet(nt))}static fromEncryptedJsonSync(et,tt){return new Wallet(decryptJsonWalletSync(et,tt))}static fromMnemonic(et,tt,rt){return tt||(tt=defaultPath),new Wallet(HDNode.fromMnemonic(et,null,rt).derivePath(tt))}}function verifyMessage$1(_e,et){return recoverAddress(hashMessage$1(_e),et)}function verifyTypedData$1(_e,et,tt,rt){return recoverAddress(TypedDataEncoder.hash(_e,et,tt),rt)}const lib_esm$3=Object.freeze(Object.defineProperty({__proto__:null,Wallet,verifyMessage:verifyMessage$1,verifyTypedData:verifyTypedData$1},Symbol.toStringTag,{value:"Module"})),version$8="networks/5.7.1",logger$6=new Logger(version$8);function isRenetworkable(_e){return _e&&typeof _e.renetwork=="function"}function ethDefaultProvider(_e){const et=function(tt,rt){rt==null&&(rt={});const nt=[];if(tt.InfuraProvider&&rt.infura!=="-")try{nt.push(new tt.InfuraProvider(_e,rt.infura))}catch{}if(tt.EtherscanProvider&&rt.etherscan!=="-")try{nt.push(new tt.EtherscanProvider(_e,rt.etherscan))}catch{}if(tt.AlchemyProvider&&rt.alchemy!=="-")try{nt.push(new tt.AlchemyProvider(_e,rt.alchemy))}catch{}if(tt.PocketProvider&&rt.pocket!=="-"){const it=["goerli","ropsten","rinkeby","sepolia"];try{const at=new tt.PocketProvider(_e,rt.pocket);at.network&&it.indexOf(at.network.name)===-1&&nt.push(at)}catch{}}if(tt.CloudflareProvider&&rt.cloudflare!=="-")try{nt.push(new tt.CloudflareProvider(_e))}catch{}if(tt.AnkrProvider&&rt.ankr!=="-")try{const it=["ropsten"],at=new tt.AnkrProvider(_e,rt.ankr);at.network&&it.indexOf(at.network.name)===-1&&nt.push(at)}catch{}if(nt.length===0)return null;if(tt.FallbackProvider){let it=1;return rt.quorum!=null?it=rt.quorum:_e==="homestead"&&(it=2),new tt.FallbackProvider(nt,it)}return nt[0]};return et.renetwork=function(tt){return ethDefaultProvider(tt)},et}function etcDefaultProvider(_e,et){const tt=function(rt,nt){return rt.JsonRpcProvider?new rt.JsonRpcProvider(_e,et):null};return tt.renetwork=function(rt){return etcDefaultProvider(_e,rt)},tt}const homestead={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ethDefaultProvider("homestead")},ropsten={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ethDefaultProvider("ropsten")},classicMordor={chainId:63,name:"classicMordor",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/mordor","classicMordor")},networks={unspecified:{chainId:0,name:"unspecified"},homestead,mainnet:homestead,morden:{chainId:2,name:"morden"},ropsten,testnet:ropsten,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ethDefaultProvider("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ethDefaultProvider("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ethDefaultProvider("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ethDefaultProvider("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor,classicTestnet:classicMordor,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ethDefaultProvider("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ethDefaultProvider("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function getNetwork(_e){if(_e==null)return null;if(typeof _e=="number"){for(const rt in networks){const nt=networks[rt];if(nt.chainId===_e)return{name:nt.name,chainId:nt.chainId,ensAddress:nt.ensAddress||null,_defaultProvider:nt._defaultProvider||null}}return{chainId:_e,name:"unknown"}}if(typeof _e=="string"){const rt=networks[_e];return rt==null?null:{name:rt.name,chainId:rt.chainId,ensAddress:rt.ensAddress,_defaultProvider:rt._defaultProvider||null}}const et=networks[_e.name];if(!et)return typeof _e.chainId!="number"&&logger$6.throwArgumentError("invalid network chainId","network",_e),_e;_e.chainId!==0&&_e.chainId!==et.chainId&&logger$6.throwArgumentError("network chainId mismatch","network",_e);let tt=_e._defaultProvider||null;return tt==null&&et._defaultProvider&&(isRenetworkable(et._defaultProvider)?tt=et._defaultProvider.renetwork(_e):tt=et._defaultProvider),{name:_e.name,chainId:et.chainId,ensAddress:_e.ensAddress||et.ensAddress||null,_defaultProvider:tt}}const version$7="web/5.7.1";var __awaiter$3=globalThis&&globalThis.__awaiter||function(_e,et,tt,rt){function nt(it){return it instanceof tt?it:new tt(function(at){at(it)})}return new(tt||(tt=Promise))(function(it,at){function st(ht){try{dt(rt.next(ht))}catch(pt){at(pt)}}function lt(ht){try{dt(rt.throw(ht))}catch(pt){at(pt)}}function dt(ht){ht.done?it(ht.value):nt(ht.value).then(st,lt)}dt((rt=rt.apply(_e,et||[])).next())})};function getUrl$2(_e,et){return __awaiter$3(this,void 0,void 0,function*(){et==null&&(et={});const tt={method:et.method||"GET",headers:et.headers||{},body:et.body||void 0};if(et.skipFetchSetup!==!0&&(tt.mode="cors",tt.cache="no-cache",tt.credentials="same-origin",tt.redirect="follow",tt.referrer="client"),et.fetchOptions!=null){const at=et.fetchOptions;at.mode&&(tt.mode=at.mode),at.cache&&(tt.cache=at.cache),at.credentials&&(tt.credentials=at.credentials),at.redirect&&(tt.redirect=at.redirect),at.referrer&&(tt.referrer=at.referrer)}const rt=yield fetch(_e,tt),nt=yield rt.arrayBuffer(),it={};return rt.headers.forEach?rt.headers.forEach((at,st)=>{it[st.toLowerCase()]=at}):rt.headers.keys().forEach(at=>{it[at.toLowerCase()]=rt.headers.get(at)}),{headers:it,statusCode:rt.status,statusMessage:rt.statusText,body:arrayify(new Uint8Array(nt))}})}var __awaiter$2=globalThis&&globalThis.__awaiter||function(_e,et,tt,rt){function nt(it){return it instanceof tt?it:new tt(function(at){at(it)})}return new(tt||(tt=Promise))(function(it,at){function st(ht){try{dt(rt.next(ht))}catch(pt){at(pt)}}function lt(ht){try{dt(rt.throw(ht))}catch(pt){at(pt)}}function dt(ht){ht.done?it(ht.value):nt(ht.value).then(st,lt)}dt((rt=rt.apply(_e,et||[])).next())})};const logger$5=new Logger(version$7);function staller(_e){return new Promise(et=>{setTimeout(et,_e)})}function bodyify(_e,et){if(_e==null)return null;if(typeof _e=="string")return _e;if(isBytesLike(_e)){if(et&&(et.split("/")[0]==="text"||et.split(";")[0].trim()==="application/json"))try{return toUtf8String(_e)}catch{}return hexlify(_e)}return _e}function unpercent(_e){return toUtf8Bytes(_e.replace(/%([0-9a-f][0-9a-f])/gi,(et,tt)=>String.fromCharCode(parseInt(tt,16))))}function _fetchData(_e,et,tt){const rt=typeof _e=="object"&&_e.throttleLimit!=null?_e.throttleLimit:12;logger$5.assertArgument(rt>0&&rt%1===0,"invalid connection throttle limit","connection.throttleLimit",rt);const nt=typeof _e=="object"?_e.throttleCallback:null,it=typeof _e=="object"&&typeof _e.throttleSlotInterval=="number"?_e.throttleSlotInterval:100;logger$5.assertArgument(it>0&&it%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",it);const at=typeof _e=="object"?!!_e.errorPassThrough:!1,st={};let lt=null;const dt={method:"GET"};let ht=!1,pt=2*60*1e3;if(typeof _e=="string")lt=_e;else if(typeof _e=="object"){if((_e==null||_e.url==null)&&logger$5.throwArgumentError("missing URL","connection.url",_e),lt=_e.url,typeof _e.timeout=="number"&&_e.timeout>0&&(pt=_e.timeout),_e.headers)for(const bt in _e.headers)st[bt.toLowerCase()]={key:bt,value:String(_e.headers[bt])},["if-none-match","if-modified-since"].indexOf(bt.toLowerCase())>=0&&(ht=!0);if(dt.allowGzip=!!_e.allowGzip,_e.user!=null&&_e.password!=null){lt.substring(0,6)!=="https:"&&_e.allowInsecureAuthentication!==!0&&logger$5.throwError("basic authentication requires a secure https url",Logger.errors.INVALID_ARGUMENT,{argument:"url",url:lt,user:_e.user,password:"[REDACTED]"});const bt=_e.user+":"+_e.password;st.authorization={key:"Authorization",value:"Basic "+encode$1(toUtf8Bytes(bt))}}_e.skipFetchSetup!=null&&(dt.skipFetchSetup=!!_e.skipFetchSetup),_e.fetchOptions!=null&&(dt.fetchOptions=shallowCopy(_e.fetchOptions))}const mt=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),gt=lt?lt.match(mt):null;if(gt)try{const bt={statusCode:200,statusMessage:"OK",headers:{"content-type":gt[1]||"text/plain"},body:gt[2]?decode$1(gt[3]):unpercent(gt[3])};let wt=bt.body;return tt&&(wt=tt(bt.body,bt)),Promise.resolve(wt)}catch(bt){logger$5.throwError("processing response error",Logger.errors.SERVER_ERROR,{body:bodyify(gt[1],gt[2]),error:bt,requestBody:null,requestMethod:"GET",url:lt})}et&&(dt.method="POST",dt.body=et,st["content-type"]==null&&(st["content-type"]={key:"Content-Type",value:"application/octet-stream"}),st["content-length"]==null&&(st["content-length"]={key:"Content-Length",value:String(et.length)}));const vt={};Object.keys(st).forEach(bt=>{const wt=st[bt];vt[wt.key]=wt.value}),dt.headers=vt;const xt=function(){let bt=null;return{promise:new Promise(function($t,Pt){pt&&(bt=setTimeout(()=>{bt!=null&&(bt=null,Pt(logger$5.makeError("timeout",Logger.errors.TIMEOUT,{requestBody:bodyify(dt.body,vt["content-type"]),requestMethod:dt.method,timeout:pt,url:lt})))},pt))}),cancel:function(){bt!=null&&(clearTimeout(bt),bt=null)}}}(),yt=function(){return __awaiter$2(this,void 0,void 0,function*(){for(let bt=0;bt=300)&&(xt.cancel(),logger$5.throwError("bad response",Logger.errors.SERVER_ERROR,{status:wt.statusCode,headers:wt.headers,body:bodyify(Et,wt.headers?wt.headers["content-type"]:null),requestBody:bodyify(dt.body,vt["content-type"]),requestMethod:dt.method,url:lt})),tt)try{const $t=yield tt(Et,wt);return xt.cancel(),$t}catch($t){if($t.throttleRetry&&bt{let st=null;if(it!=null)try{st=JSON.parse(toUtf8String(it))}catch(lt){logger$5.throwError("invalid JSON",Logger.errors.SERVER_ERROR,{body:it,error:lt})}return tt&&(st=tt(st,at)),st},nt=null;if(et!=null){nt=toUtf8Bytes(et);const it=typeof _e=="string"?{url:_e}:shallowCopy(_e);it.headers?Object.keys(it.headers).filter(st=>st.toLowerCase()==="content-type").length!==0||(it.headers=shallowCopy(it.headers),it.headers["content-type"]="application/json"):it.headers={"content-type":"application/json"},_e=it}return _fetchData(_e,nt,rt)}function poll$1(_e,et){return et||(et={}),et=shallowCopy(et),et.floor==null&&(et.floor=0),et.ceiling==null&&(et.ceiling=1e4),et.interval==null&&(et.interval=250),new Promise(function(tt,rt){let nt=null,it=!1;const at=()=>it?!1:(it=!0,nt&&clearTimeout(nt),!0);et.timeout&&(nt=setTimeout(()=>{at()&&rt(new Error("timeout"))},et.timeout));const st=et.retryLimit;let lt=0;function dt(){return _e().then(function(ht){if(ht!==void 0)at()&&tt(ht);else if(et.oncePoll)et.oncePoll.once("poll",dt);else if(et.onceBlock)et.onceBlock.once("block",dt);else if(!it){if(lt++,lt>st){at()&&rt(new Error("retry limit reached"));return}let pt=et.interval*parseInt(String(Math.random()*Math.pow(2,lt)));ptet.ceiling&&(pt=et.ceiling),setTimeout(dt,pt)}return null},function(ht){at()&&rt(ht)})}dt()})}const lib_esm$2=Object.freeze(Object.defineProperty({__proto__:null,_fetchData,fetchJson,poll:poll$1},Symbol.toStringTag,{value:"Module"}));var ALPHABET="qpzry9x8gf2tvdw0s3jn54khce6mua7l",ALPHABET_MAP={};for(var z$5=0;z$5>25;return(_e&33554431)<<5^-(et>>0&1)&996825010^-(et>>1&1)&642813549^-(et>>2&1)&513874426^-(et>>3&1)&1027748829^-(et>>4&1)&705979059}function prefixChk(_e){for(var et=1,tt=0;tt<_e.length;++tt){var rt=_e.charCodeAt(tt);if(rt<33||rt>126)return"Invalid prefix ("+_e+")";et=polymodStep(et)^rt>>5}for(et=polymodStep(et),tt=0;tt<_e.length;++tt){var nt=_e.charCodeAt(tt);et=polymodStep(et)^nt&31}return et}function encode(_e,et,tt){if(tt=tt||90,_e.length+7+et.length>tt)throw new TypeError("Exceeds length limit");_e=_e.toLowerCase();var rt=prefixChk(_e);if(typeof rt=="string")throw new Error(rt);for(var nt=_e+"1",it=0;it>5)throw new Error("Non 5-bit word");rt=polymodStep(rt)^at,nt+=ALPHABET.charAt(at)}for(it=0;it<6;++it)rt=polymodStep(rt);for(rt^=1,it=0;it<6;++it){var st=rt>>(5-it)*5&31;nt+=ALPHABET.charAt(st)}return nt}function __decode(_e,et){if(et=et||90,_e.length<8)return _e+" too short";if(_e.length>et)return"Exceeds length limit";var tt=_e.toLowerCase(),rt=_e.toUpperCase();if(_e!==tt&&_e!==rt)return"Mixed-case string "+_e;_e=tt;var nt=_e.lastIndexOf("1");if(nt===-1)return"No separator character for "+_e;if(nt===0)return"Missing prefix for "+_e;var it=_e.slice(0,nt),at=_e.slice(nt+1);if(at.length<6)return"Data too short";var st=prefixChk(it);if(typeof st=="string")return st;for(var lt=[],dt=0;dt=at.length)&<.push(pt)}return st!==1?"Invalid checksum for "+_e:{prefix:it,words:lt}}function decodeUnsafe(){var _e=__decode.apply(null,arguments);if(typeof _e=="object")return _e}function decode(_e){var et=__decode.apply(null,arguments);if(typeof et=="object")return et;throw new Error(et)}function convert(_e,et,tt,rt){for(var nt=0,it=0,at=(1<=tt;)it-=tt,st.push(nt>>it&at);if(rt)it>0&&st.push(nt<=et)return"Excess padding";if(nt<this.data(pt,!0);return et.transaction={hash:at,type:dt,accessList:Formatter.allowNull(this.accessList.bind(this),null),blockHash:Formatter.allowNull(at,null),blockNumber:Formatter.allowNull(lt,null),transactionIndex:Formatter.allowNull(lt,null),confirmations:Formatter.allowNull(lt,null),from:tt,gasPrice:Formatter.allowNull(rt),maxPriorityFeePerGas:Formatter.allowNull(rt),maxFeePerGas:Formatter.allowNull(rt),gasLimit:rt,to:Formatter.allowNull(tt,null),value:rt,nonce:lt,data:it,r:Formatter.allowNull(this.uint256),s:Formatter.allowNull(this.uint256),v:Formatter.allowNull(lt),creates:Formatter.allowNull(tt,null),raw:Formatter.allowNull(it)},et.transactionRequest={from:Formatter.allowNull(tt),nonce:Formatter.allowNull(lt),gasLimit:Formatter.allowNull(rt),gasPrice:Formatter.allowNull(rt),maxPriorityFeePerGas:Formatter.allowNull(rt),maxFeePerGas:Formatter.allowNull(rt),to:Formatter.allowNull(tt),value:Formatter.allowNull(rt),data:Formatter.allowNull(ht),type:Formatter.allowNull(lt),accessList:Formatter.allowNull(this.accessList.bind(this),null)},et.receiptLog={transactionIndex:lt,blockNumber:lt,transactionHash:at,address:tt,topics:Formatter.arrayOf(at),data:it,logIndex:lt,blockHash:at},et.receipt={to:Formatter.allowNull(this.address,null),from:Formatter.allowNull(this.address,null),contractAddress:Formatter.allowNull(tt,null),transactionIndex:lt,root:Formatter.allowNull(st),gasUsed:rt,logsBloom:Formatter.allowNull(it),blockHash:at,transactionHash:at,logs:Formatter.arrayOf(this.receiptLog.bind(this)),blockNumber:lt,confirmations:Formatter.allowNull(lt,null),cumulativeGasUsed:rt,effectiveGasPrice:Formatter.allowNull(rt),status:Formatter.allowNull(lt),type:dt},et.block={hash:Formatter.allowNull(at),parentHash:at,number:lt,timestamp:lt,nonce:Formatter.allowNull(st),difficulty:this.difficulty.bind(this),gasLimit:rt,gasUsed:rt,miner:Formatter.allowNull(tt),extraData:it,transactions:Formatter.allowNull(Formatter.arrayOf(at)),baseFeePerGas:Formatter.allowNull(rt)},et.blockWithTransactions=shallowCopy(et.block),et.blockWithTransactions.transactions=Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this))),et.filter={fromBlock:Formatter.allowNull(nt,void 0),toBlock:Formatter.allowNull(nt,void 0),blockHash:Formatter.allowNull(at,void 0),address:Formatter.allowNull(tt,void 0),topics:Formatter.allowNull(this.topics.bind(this),void 0)},et.filterLog={blockNumber:Formatter.allowNull(lt),blockHash:Formatter.allowNull(at),transactionIndex:lt,removed:Formatter.allowNull(this.boolean.bind(this)),address:tt,data:Formatter.allowFalsish(it,"0x"),topics:Formatter.arrayOf(at),transactionHash:at,logIndex:lt},et}accessList(et){return accessListify(et||[])}number(et){return et==="0x"?0:BigNumber.from(et).toNumber()}type(et){return et==="0x"||et==null?0:BigNumber.from(et).toNumber()}bigNumber(et){return BigNumber.from(et)}boolean(et){if(typeof et=="boolean")return et;if(typeof et=="string"){if(et=et.toLowerCase(),et==="true")return!0;if(et==="false")return!1}throw new Error("invalid boolean - "+et)}hex(et,tt){return typeof et=="string"&&(!tt&&et.substring(0,2)!=="0x"&&(et="0x"+et),isHexString(et))?et.toLowerCase():logger$4.throwArgumentError("invalid hash","value",et)}data(et,tt){const rt=this.hex(et,tt);if(rt.length%2!==0)throw new Error("invalid data; odd-length - "+et);return rt}address(et){return getAddress$1(et)}callAddress(et){if(!isHexString(et,32))return null;const tt=getAddress$1(hexDataSlice(et,12));return tt===AddressZero?null:tt}contractAddress(et){return getContractAddress$1(et)}blockTag(et){if(et==null)return"latest";if(et==="earliest")return"0x0";switch(et){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return et}if(typeof et=="number"||isHexString(et))return hexValue(et);throw new Error("invalid blockTag")}hash(et,tt){const rt=this.hex(et,tt);return hexDataLength(rt)!==32?logger$4.throwArgumentError("invalid hash","value",et):rt}difficulty(et){if(et==null)return null;const tt=BigNumber.from(et);try{return tt.toNumber()}catch{}return null}uint256(et){if(!isHexString(et))throw new Error("invalid uint256");return hexZeroPad(et,32)}_block(et,tt){et.author!=null&&et.miner==null&&(et.miner=et.author);const rt=et._difficulty!=null?et._difficulty:et.difficulty,nt=Formatter.check(tt,et);return nt._difficulty=rt==null?null:BigNumber.from(rt),nt}block(et){return this._block(et,this.formats.block)}blockWithTransactions(et){return this._block(et,this.formats.blockWithTransactions)}transactionRequest(et){return Formatter.check(this.formats.transactionRequest,et)}transactionResponse(et){et.gas!=null&&et.gasLimit==null&&(et.gasLimit=et.gas),et.to&&BigNumber.from(et.to).isZero()&&(et.to="0x0000000000000000000000000000000000000000"),et.input!=null&&et.data==null&&(et.data=et.input),et.to==null&&et.creates==null&&(et.creates=this.contractAddress(et)),(et.type===1||et.type===2)&&et.accessList==null&&(et.accessList=[]);const tt=Formatter.check(this.formats.transaction,et);if(et.chainId!=null){let rt=et.chainId;isHexString(rt)&&(rt=BigNumber.from(rt).toNumber()),tt.chainId=rt}else{let rt=et.networkId;rt==null&&tt.v==null&&(rt=et.chainId),isHexString(rt)&&(rt=BigNumber.from(rt).toNumber()),typeof rt!="number"&&tt.v!=null&&(rt=(tt.v-35)/2,rt<0&&(rt=0),rt=parseInt(rt)),typeof rt!="number"&&(rt=0),tt.chainId=rt}return tt.blockHash&&tt.blockHash.replace(/0/g,"")==="x"&&(tt.blockHash=null),tt}transaction(et){return parse$2(et)}receiptLog(et){return Formatter.check(this.formats.receiptLog,et)}receipt(et){const tt=Formatter.check(this.formats.receipt,et);if(tt.root!=null)if(tt.root.length<=4){const rt=BigNumber.from(tt.root).toNumber();rt===0||rt===1?(tt.status!=null&&tt.status!==rt&&logger$4.throwArgumentError("alt-root-status/status mismatch","value",{root:tt.root,status:tt.status}),tt.status=rt,delete tt.root):logger$4.throwArgumentError("invalid alt-root-status","value.root",tt.root)}else tt.root.length!==66&&logger$4.throwArgumentError("invalid root hash","value.root",tt.root);return tt.status!=null&&(tt.byzantium=!0),tt}topics(et){return Array.isArray(et)?et.map(tt=>this.topics(tt)):et!=null?this.hash(et,!0):null}filter(et){return Formatter.check(this.formats.filter,et)}filterLog(et){return Formatter.check(this.formats.filterLog,et)}static check(et,tt){const rt={};for(const nt in et)try{const it=et[nt](tt[nt]);it!==void 0&&(rt[nt]=it)}catch(it){throw it.checkKey=nt,it.checkValue=tt[nt],it}return rt}static allowNull(et,tt){return function(rt){return rt==null?tt:et(rt)}}static allowFalsish(et,tt){return function(rt){return rt?et(rt):tt}}static arrayOf(et){return function(tt){if(!Array.isArray(tt))throw new Error("not an array");const rt=[];return tt.forEach(function(nt){rt.push(et(nt))}),rt}}}var __awaiter$1=globalThis&&globalThis.__awaiter||function(_e,et,tt,rt){function nt(it){return it instanceof tt?it:new tt(function(at){at(it)})}return new(tt||(tt=Promise))(function(it,at){function st(ht){try{dt(rt.next(ht))}catch(pt){at(pt)}}function lt(ht){try{dt(rt.throw(ht))}catch(pt){at(pt)}}function dt(ht){ht.done?it(ht.value):nt(ht.value).then(st,lt)}dt((rt=rt.apply(_e,et||[])).next())})};const logger$3=new Logger(version$6),MAX_CCIP_REDIRECTS=10;function checkTopic(_e){return _e==null?"null":(hexDataLength(_e)!==32&&logger$3.throwArgumentError("invalid topic","topic",_e),_e.toLowerCase())}function serializeTopics(_e){for(_e=_e.slice();_e.length>0&&_e[_e.length-1]==null;)_e.pop();return _e.map(et=>{if(Array.isArray(et)){const tt={};et.forEach(nt=>{tt[checkTopic(nt)]=!0});const rt=Object.keys(tt);return rt.sort(),rt.join("|")}else return checkTopic(et)}).join("&")}function deserializeTopics(_e){return _e===""?[]:_e.split(/&/g).map(et=>{if(et==="")return[];const tt=et.split("|").map(rt=>rt==="null"?null:rt);return tt.length===1?tt[0]:tt})}function getEventTag(_e){if(typeof _e=="string"){if(_e=_e.toLowerCase(),hexDataLength(_e)===32)return"tx:"+_e;if(_e.indexOf(":")===-1)return _e}else{if(Array.isArray(_e))return"filter:*:"+serializeTopics(_e);if(ForkEvent.isForkEvent(_e))throw logger$3.warn("not implemented"),new Error("not implemented");if(_e&&typeof _e=="object")return"filter:"+(_e.address||"*")+":"+serializeTopics(_e.topics||[])}throw new Error("invalid event - "+_e)}function getTime(){return new Date().getTime()}function stall(_e){return new Promise(et=>{setTimeout(et,_e)})}const PollableEvents=["block","network","pending","poll"];let Event$1=class{constructor(et,tt,rt){defineReadOnly(this,"tag",et),defineReadOnly(this,"listener",tt),defineReadOnly(this,"once",rt),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const et=this.tag.split(":");return et[0]!=="tx"?null:et[1]}get filter(){const et=this.tag.split(":");if(et[0]!=="filter")return null;const tt=et[1],rt=deserializeTopics(et[2]),nt={};return rt.length>0&&(nt.topics=rt),tt&&tt!=="*"&&(nt.address=tt),nt}pollable(){return this.tag.indexOf(":")>=0||PollableEvents.indexOf(this.tag)>=0}};const coinInfos={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function bytes32ify(_e){return hexZeroPad(BigNumber.from(_e).toHexString(),32)}function base58Encode(_e){return Base58.encode(concat$1([_e,hexDataSlice(sha256$3(sha256$3(_e)),0,4)]))}const matcherIpfs=new RegExp("^(ipfs)://(.*)$","i"),matchers$1=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),matcherIpfs,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function _parseString(_e,et){try{return toUtf8String(_parseBytes(_e,et))}catch{}return null}function _parseBytes(_e,et){if(_e==="0x")return null;const tt=BigNumber.from(hexDataSlice(_e,et,et+32)).toNumber(),rt=BigNumber.from(hexDataSlice(_e,tt,tt+32)).toNumber();return hexDataSlice(_e,tt+32,tt+32+rt)}function getIpfsLink(_e){return _e.match(/^ipfs:\/\/ipfs\//i)?_e=_e.substring(12):_e.match(/^ipfs:\/\//i)?_e=_e.substring(7):logger$3.throwArgumentError("unsupported IPFS format","link",_e),`https://gateway.ipfs.io/ipfs/${_e}`}function numPad(_e){const et=arrayify(_e);if(et.length>32)throw new Error("internal; should not happen");const tt=new Uint8Array(32);return tt.set(et,32-et.length),tt}function bytesPad(_e){if(_e.length%32===0)return _e;const et=new Uint8Array(Math.ceil(_e.length/32)*32);return et.set(_e),et}function encodeBytes$1(_e){const et=[];let tt=0;for(let rt=0;rt<_e.length;rt++)et.push(null),tt+=32;for(let rt=0;rt<_e.length;rt++){const nt=arrayify(_e[rt]);et[rt]=numPad(tt),et.push(numPad(nt.length)),et.push(bytesPad(nt)),tt+=32+Math.ceil(nt.length/32)*32}return hexConcat(et)}class Resolver{constructor(et,tt,rt,nt){defineReadOnly(this,"provider",et),defineReadOnly(this,"name",rt),defineReadOnly(this,"address",et.formatter.address(tt)),defineReadOnly(this,"_resolvedAddress",nt)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then(et=>BigNumber.from(et).eq(1)).catch(et=>{if(et.code===Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,et})),this._supportsEip2544}_fetch(et,tt){return __awaiter$1(this,void 0,void 0,function*(){const rt={to:this.address,ccipReadEnabled:!0,data:hexConcat([et,namehash$1(this.name),tt||"0x"])};let nt=!1;(yield this.supportsWildcard())&&(nt=!0,rt.data=hexConcat(["0x9061b923",encodeBytes$1([dnsEncode(this.name),rt.data])]));try{let it=yield this.provider.call(rt);return arrayify(it).length%32===4&&logger$3.throwError("resolver threw error",Logger.errors.CALL_EXCEPTION,{transaction:rt,data:it}),nt&&(it=_parseBytes(it,0)),it}catch(it){if(it.code===Logger.errors.CALL_EXCEPTION)return null;throw it}})}_fetchBytes(et,tt){return __awaiter$1(this,void 0,void 0,function*(){const rt=yield this._fetch(et,tt);return rt!=null?_parseBytes(rt,0):null})}_getAddress(et,tt){const rt=coinInfos[String(et)];if(rt==null&&logger$3.throwError(`unsupported coin type: ${et}`,Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${et})`}),rt.ilk==="eth")return this.provider.formatter.address(tt);const nt=arrayify(tt);if(rt.p2pkh!=null){const it=tt.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(it){const at=parseInt(it[1],16);if(it[2].length===at*2&&at>=1&&at<=75)return base58Encode(concat$1([[rt.p2pkh],"0x"+it[2]]))}}if(rt.p2sh!=null){const it=tt.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(it){const at=parseInt(it[1],16);if(it[2].length===at*2&&at>=1&&at<=75)return base58Encode(concat$1([[rt.p2sh],"0x"+it[2]]))}}if(rt.prefix!=null){const it=nt[1];let at=nt[0];if(at===0?it!==20&&it!==32&&(at=-1):at=-1,at>=0&&nt.length===2+it&&it>=1&&it<=75){const st=bech32$1.toWords(nt.slice(2));return st.unshift(at),bech32$1.encode(rt.prefix,st)}}return null}getAddress(et){return __awaiter$1(this,void 0,void 0,function*(){if(et==null&&(et=60),et===60)try{const nt=yield this._fetch("0x3b3b57de");return nt==="0x"||nt===HashZero?null:this.provider.formatter.callAddress(nt)}catch(nt){if(nt.code===Logger.errors.CALL_EXCEPTION)return null;throw nt}const tt=yield this._fetchBytes("0xf1cb7e06",bytes32ify(et));if(tt==null||tt==="0x")return null;const rt=this._getAddress(et,tt);return rt==null&&logger$3.throwError("invalid or unsupported coin data",Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${et})`,coinType:et,data:tt}),rt})}getAvatar(){return __awaiter$1(this,void 0,void 0,function*(){const et=[{type:"name",content:this.name}];try{const tt=yield this.getText("avatar");if(tt==null)return null;for(let rt=0;rtat[lt])}return logger$3.throwError("invalid or unsupported content hash data",Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:et})})}getText(et){return __awaiter$1(this,void 0,void 0,function*(){let tt=toUtf8Bytes(et);tt=concat$1([bytes32ify(64),bytes32ify(tt.length),tt]),tt.length%32!==0&&(tt=concat$1([tt,hexZeroPad("0x",32-et.length%32)]));const rt=yield this._fetchBytes("0x59d1d43c",hexlify(tt));return rt==null||rt==="0x"?null:toUtf8String(rt)})}}let defaultFormatter=null,nextPollId=1;class BaseProvider extends Provider{constructor(et){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),defineReadOnly(this,"anyNetwork",et==="any"),this.anyNetwork&&(et=this.detectNetwork()),et instanceof Promise)this._networkPromise=et,et.catch(tt=>{}),this._ready().catch(tt=>{});else{const tt=getStatic(new.target,"getNetwork")(et);tt?(defineReadOnly(this,"_network",tt),this.emit("network",tt,null)):logger$3.throwArgumentError("invalid network","network",et)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return __awaiter$1(this,void 0,void 0,function*(){if(this._network==null){let et=null;if(this._networkPromise)try{et=yield this._networkPromise}catch{}et==null&&(et=yield this.detectNetwork()),et||logger$3.throwError("no network detected",Logger.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=et:defineReadOnly(this,"_network",et),this.emit("network",et,null))}return this._network})}get ready(){return poll$1(()=>this._ready().then(et=>et,et=>{if(!(et.code===Logger.errors.NETWORK_ERROR&&et.event==="noNetwork"))throw et}))}static getFormatter(){return defaultFormatter==null&&(defaultFormatter=new Formatter),defaultFormatter}static getNetwork(et){return getNetwork(et??"homestead")}ccipReadFetch(et,tt,rt){return __awaiter$1(this,void 0,void 0,function*(){if(this.disableCcipRead||rt.length===0)return null;const nt=et.to.toLowerCase(),it=tt.toLowerCase(),at=[];for(let st=0;st=0?null:JSON.stringify({data:it,sender:nt}),pt=yield fetchJson({url:dt,errorPassThrough:!0},ht,(gt,vt)=>(gt.status=vt.statusCode,gt));if(pt.data)return pt.data;const mt=pt.message||"unknown error";if(pt.status>=400&&pt.status<500)return logger$3.throwError(`response not found during CCIP fetch: ${mt}`,Logger.errors.SERVER_ERROR,{url:lt,errorMessage:mt});at.push(mt)}return logger$3.throwError(`error encountered during CCIP fetch: ${at.map(st=>JSON.stringify(st)).join(", ")}`,Logger.errors.SERVER_ERROR,{urls:rt,errorMessages:at})})}_getInternalBlockNumber(et){return __awaiter$1(this,void 0,void 0,function*(){if(yield this._ready(),et>0)for(;this._internalBlockNumber;){const nt=this._internalBlockNumber;try{const it=yield nt;if(getTime()-it.respTime<=et)return it.blockNumber;break}catch{if(this._internalBlockNumber===nt)break}}const tt=getTime(),rt=resolveProperties({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(nt=>null,nt=>nt)}).then(({blockNumber:nt,networkError:it})=>{if(it)throw this._internalBlockNumber===rt&&(this._internalBlockNumber=null),it;const at=getTime();return nt=BigNumber.from(nt).toNumber(),nt{this._internalBlockNumber===rt&&(this._internalBlockNumber=null)}),(yield rt).blockNumber})}poll(){return __awaiter$1(this,void 0,void 0,function*(){const et=nextPollId++,tt=[];let rt=null;try{rt=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(nt){this.emit("error",nt);return}if(this._setFastBlockNumber(rt),this.emit("poll",et,rt),rt===this._lastBlockNumber){this.emit("didPoll",et);return}if(this._emitted.block===-2&&(this._emitted.block=rt-1),Math.abs(this._emitted.block-rt)>1e3)logger$3.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${rt})`),this.emit("error",logger$3.makeError("network block skew detected",Logger.errors.NETWORK_ERROR,{blockNumber:rt,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",rt);else for(let nt=this._emitted.block+1;nt<=rt;nt++)this.emit("block",nt);this._emitted.block!==rt&&(this._emitted.block=rt,Object.keys(this._emitted).forEach(nt=>{if(nt==="block")return;const it=this._emitted[nt];it!=="pending"&&rt-it>12&&delete this._emitted[nt]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=rt-1),this._events.forEach(nt=>{switch(nt.type){case"tx":{const it=nt.hash;let at=this.getTransactionReceipt(it).then(st=>(!st||st.blockNumber==null||(this._emitted["t:"+it]=st.blockNumber,this.emit(it,st)),null)).catch(st=>{this.emit("error",st)});tt.push(at);break}case"filter":{if(!nt._inflight){nt._inflight=!0,nt._lastBlockNumber===-2&&(nt._lastBlockNumber=rt-1);const it=nt.filter;it.fromBlock=nt._lastBlockNumber+1,it.toBlock=rt;const at=it.toBlock-this._maxFilterBlockRange;at>it.fromBlock&&(it.fromBlock=at),it.fromBlock<0&&(it.fromBlock=0);const st=this.getLogs(it).then(lt=>{nt._inflight=!1,lt.length!==0&<.forEach(dt=>{dt.blockNumber>nt._lastBlockNumber&&(nt._lastBlockNumber=dt.blockNumber),this._emitted["b:"+dt.blockHash]=dt.blockNumber,this._emitted["t:"+dt.transactionHash]=dt.blockNumber,this.emit(it,dt)})}).catch(lt=>{this.emit("error",lt),nt._inflight=!1});tt.push(st)}break}}}),this._lastBlockNumber=rt,Promise.all(tt).then(()=>{this.emit("didPoll",et)}).catch(nt=>{this.emit("error",nt)})})}resetEventsBlock(et){this._lastBlockNumber=et-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return __awaiter$1(this,void 0,void 0,function*(){return logger$3.throwError("provider does not support network detection",Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return __awaiter$1(this,void 0,void 0,function*(){const et=yield this._ready(),tt=yield this.detectNetwork();if(et.chainId!==tt.chainId){if(this.anyNetwork)return this._network=tt,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",tt,et),yield stall(0),this._network;const rt=logger$3.makeError("underlying network changed",Logger.errors.NETWORK_ERROR,{event:"changed",network:et,detectedNetwork:tt});throw this.emit("error",rt),rt}return et})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(et=>{this._setFastBlockNumber(et)},et=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(et){et&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!et&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(et){if(typeof et!="number"||et<=0||parseInt(String(et))!=et)throw new Error("invalid polling interval");this._pollingInterval=et,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const et=getTime();return et-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=et,this._fastBlockNumberPromise=this.getBlockNumber().then(tt=>((this._fastBlockNumber==null||tt>this._fastBlockNumber)&&(this._fastBlockNumber=tt),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(et){this._fastBlockNumber!=null&&etthis._fastBlockNumber)&&(this._fastBlockNumber=et,this._fastBlockNumberPromise=Promise.resolve(et)))}waitForTransaction(et,tt,rt){return __awaiter$1(this,void 0,void 0,function*(){return this._waitForTransaction(et,tt??1,rt||0,null)})}_waitForTransaction(et,tt,rt,nt){return __awaiter$1(this,void 0,void 0,function*(){const it=yield this.getTransactionReceipt(et);return(it?it.confirmations:0)>=tt?it:new Promise((at,st)=>{const lt=[];let dt=!1;const ht=function(){return dt?!0:(dt=!0,lt.forEach(mt=>{mt()}),!1)},pt=mt=>{mt.confirmations{this.removeListener(et,pt)}),nt){let mt=nt.startBlock,gt=null;const vt=xt=>__awaiter$1(this,void 0,void 0,function*(){dt||(yield stall(1e3),this.getTransactionCount(nt.from).then(yt=>__awaiter$1(this,void 0,void 0,function*(){if(!dt){if(yt<=nt.nonce)mt=xt;else{{const bt=yield this.getTransaction(et);if(bt&&bt.blockNumber!=null)return}for(gt==null&&(gt=mt-3,gt{dt||this.once("block",vt)}))});if(dt)return;this.once("block",vt),lt.push(()=>{this.removeListener("block",vt)})}if(typeof rt=="number"&&rt>0){const mt=setTimeout(()=>{ht()||st(logger$3.makeError("timeout exceeded",Logger.errors.TIMEOUT,{timeout:rt}))},rt);mt.unref&&mt.unref(),lt.push(()=>{clearTimeout(mt)})}})})}getBlockNumber(){return __awaiter$1(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return __awaiter$1(this,void 0,void 0,function*(){yield this.getNetwork();const et=yield this.perform("getGasPrice",{});try{return BigNumber.from(et)}catch(tt){return logger$3.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:et,error:tt})}})}getBalance(et,tt){return __awaiter$1(this,void 0,void 0,function*(){yield this.getNetwork();const rt=yield resolveProperties({address:this._getAddress(et),blockTag:this._getBlockTag(tt)}),nt=yield this.perform("getBalance",rt);try{return BigNumber.from(nt)}catch(it){return logger$3.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getBalance",params:rt,result:nt,error:it})}})}getTransactionCount(et,tt){return __awaiter$1(this,void 0,void 0,function*(){yield this.getNetwork();const rt=yield resolveProperties({address:this._getAddress(et),blockTag:this._getBlockTag(tt)}),nt=yield this.perform("getTransactionCount",rt);try{return BigNumber.from(nt).toNumber()}catch(it){return logger$3.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:rt,result:nt,error:it})}})}getCode(et,tt){return __awaiter$1(this,void 0,void 0,function*(){yield this.getNetwork();const rt=yield resolveProperties({address:this._getAddress(et),blockTag:this._getBlockTag(tt)}),nt=yield this.perform("getCode",rt);try{return hexlify(nt)}catch(it){return logger$3.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getCode",params:rt,result:nt,error:it})}})}getStorageAt(et,tt,rt){return __awaiter$1(this,void 0,void 0,function*(){yield this.getNetwork();const nt=yield resolveProperties({address:this._getAddress(et),blockTag:this._getBlockTag(rt),position:Promise.resolve(tt).then(at=>hexValue(at))}),it=yield this.perform("getStorageAt",nt);try{return hexlify(it)}catch(at){return logger$3.throwError("bad result from backend",Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:nt,result:it,error:at})}})}_wrapTransaction(et,tt,rt){if(tt!=null&&hexDataLength(tt)!==32)throw new Error("invalid response - sendTransaction");const nt=et;return tt!=null&&et.hash!==tt&&logger$3.throwError("Transaction hash mismatch from Provider.sendTransaction.",Logger.errors.UNKNOWN_ERROR,{expectedHash:et.hash,returnedHash:tt}),nt.wait=(it,at)=>__awaiter$1(this,void 0,void 0,function*(){it==null&&(it=1),at==null&&(at=0);let st;it!==0&&rt!=null&&(st={data:et.data,from:et.from,nonce:et.nonce,to:et.to,value:et.value,startBlock:rt});const lt=yield this._waitForTransaction(et.hash,it,at,st);return lt==null&&it===0?null:(this._emitted["t:"+et.hash]=lt.blockNumber,lt.status===0&&logger$3.throwError("transaction failed",Logger.errors.CALL_EXCEPTION,{transactionHash:et.hash,transaction:et,receipt:lt}),lt)}),nt}sendTransaction(et){return __awaiter$1(this,void 0,void 0,function*(){yield this.getNetwork();const tt=yield Promise.resolve(et).then(it=>hexlify(it)),rt=this.formatter.transaction(et);rt.confirmations==null&&(rt.confirmations=0);const nt=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const it=yield this.perform("sendTransaction",{signedTransaction:tt});return this._wrapTransaction(rt,it,nt)}catch(it){throw it.transaction=rt,it.transactionHash=rt.hash,it}})}_getTransactionRequest(et){return __awaiter$1(this,void 0,void 0,function*(){const tt=yield et,rt={};return["from","to"].forEach(nt=>{tt[nt]!=null&&(rt[nt]=Promise.resolve(tt[nt]).then(it=>it?this._getAddress(it):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(nt=>{tt[nt]!=null&&(rt[nt]=Promise.resolve(tt[nt]).then(it=>it?BigNumber.from(it):null))}),["type"].forEach(nt=>{tt[nt]!=null&&(rt[nt]=Promise.resolve(tt[nt]).then(it=>it??null))}),tt.accessList&&(rt.accessList=this.formatter.accessList(tt.accessList)),["data"].forEach(nt=>{tt[nt]!=null&&(rt[nt]=Promise.resolve(tt[nt]).then(it=>it?hexlify(it):null))}),this.formatter.transactionRequest(yield resolveProperties(rt))})}_getFilter(et){return __awaiter$1(this,void 0,void 0,function*(){et=yield et;const tt={};return et.address!=null&&(tt.address=this._getAddress(et.address)),["blockHash","topics"].forEach(rt=>{et[rt]!=null&&(tt[rt]=et[rt])}),["fromBlock","toBlock"].forEach(rt=>{et[rt]!=null&&(tt[rt]=this._getBlockTag(et[rt]))}),this.formatter.filter(yield resolveProperties(tt))})}_call(et,tt,rt){return __awaiter$1(this,void 0,void 0,function*(){rt>=MAX_CCIP_REDIRECTS&&logger$3.throwError("CCIP read exceeded maximum redirections",Logger.errors.SERVER_ERROR,{redirects:rt,transaction:et});const nt=et.to,it=yield this.perform("call",{transaction:et,blockTag:tt});if(rt>=0&&tt==="latest"&&nt!=null&&it.substring(0,10)==="0x556f1830"&&hexDataLength(it)%32===4)try{const at=hexDataSlice(it,4),st=hexDataSlice(at,0,32);BigNumber.from(st).eq(nt)||logger$3.throwError("CCIP Read sender did not match",Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:et,data:it});const lt=[],dt=BigNumber.from(hexDataSlice(at,32,64)).toNumber(),ht=BigNumber.from(hexDataSlice(at,dt,dt+32)).toNumber(),pt=hexDataSlice(at,dt+32);for(let bt=0;bt__awaiter$1(this,void 0,void 0,function*(){const it=yield this.perform("getBlock",nt);if(it==null)return nt.blockHash!=null&&this._emitted["b:"+nt.blockHash]==null||nt.blockTag!=null&&rt>this._emitted.block?null:void 0;if(tt){let at=null;for(let lt=0;ltthis._wrapTransaction(lt)),st}return this.formatter.block(it)}),{oncePoll:this})})}getBlock(et){return this._getBlock(et,!1)}getBlockWithTransactions(et){return this._getBlock(et,!0)}getTransaction(et){return __awaiter$1(this,void 0,void 0,function*(){yield this.getNetwork(),et=yield et;const tt={transactionHash:this.formatter.hash(et,!0)};return poll$1(()=>__awaiter$1(this,void 0,void 0,function*(){const rt=yield this.perform("getTransaction",tt);if(rt==null)return this._emitted["t:"+et]==null?null:void 0;const nt=this.formatter.transactionResponse(rt);if(nt.blockNumber==null)nt.confirmations=0;else if(nt.confirmations==null){let at=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-nt.blockNumber+1;at<=0&&(at=1),nt.confirmations=at}return this._wrapTransaction(nt)}),{oncePoll:this})})}getTransactionReceipt(et){return __awaiter$1(this,void 0,void 0,function*(){yield this.getNetwork(),et=yield et;const tt={transactionHash:this.formatter.hash(et,!0)};return poll$1(()=>__awaiter$1(this,void 0,void 0,function*(){const rt=yield this.perform("getTransactionReceipt",tt);if(rt==null)return this._emitted["t:"+et]==null?null:void 0;if(rt.blockHash==null)return;const nt=this.formatter.receipt(rt);if(nt.blockNumber==null)nt.confirmations=0;else if(nt.confirmations==null){let at=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-nt.blockNumber+1;at<=0&&(at=1),nt.confirmations=at}return nt}),{oncePoll:this})})}getLogs(et){return __awaiter$1(this,void 0,void 0,function*(){yield this.getNetwork();const tt=yield resolveProperties({filter:this._getFilter(et)}),rt=yield this.perform("getLogs",tt);return rt.forEach(nt=>{nt.removed==null&&(nt.removed=!1)}),Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(rt)})}getEtherPrice(){return __awaiter$1(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(et){return __awaiter$1(this,void 0,void 0,function*(){if(et=yield et,typeof et=="number"&&et<0){et%1&&logger$3.throwArgumentError("invalid BlockTag","blockTag",et);let tt=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return tt+=et,tt<0&&(tt=0),this.formatter.blockTag(tt)}return this.formatter.blockTag(et)})}getResolver(et){return __awaiter$1(this,void 0,void 0,function*(){let tt=et;for(;;){if(tt===""||tt==="."||et!=="eth"&&tt==="eth")return null;const rt=yield this._getResolver(tt,"getResolver");if(rt!=null){const nt=new Resolver(this,rt,et);return tt!==et&&!(yield nt.supportsWildcard())?null:nt}tt=tt.split(".").slice(1).join(".")}})}_getResolver(et,tt){return __awaiter$1(this,void 0,void 0,function*(){tt==null&&(tt="ENS");const rt=yield this.getNetwork();rt.ensAddress||logger$3.throwError("network does not support ENS",Logger.errors.UNSUPPORTED_OPERATION,{operation:tt,network:rt.name});try{const nt=yield this.call({to:rt.ensAddress,data:"0x0178b8bf"+namehash$1(et).substring(2)});return this.formatter.callAddress(nt)}catch{}return null})}resolveName(et){return __awaiter$1(this,void 0,void 0,function*(){et=yield et;try{return Promise.resolve(this.formatter.address(et))}catch(rt){if(isHexString(et))throw rt}typeof et!="string"&&logger$3.throwArgumentError("invalid ENS name","name",et);const tt=yield this.getResolver(et);return tt?yield tt.getAddress():null})}lookupAddress(et){return __awaiter$1(this,void 0,void 0,function*(){et=yield et,et=this.formatter.address(et);const tt=et.substring(2).toLowerCase()+".addr.reverse",rt=yield this._getResolver(tt,"lookupAddress");if(rt==null)return null;const nt=_parseString(yield this.call({to:rt,data:"0x691f3431"+namehash$1(tt).substring(2)}),0);return(yield this.resolveName(nt))!=et?null:nt})}getAvatar(et){return __awaiter$1(this,void 0,void 0,function*(){let tt=null;if(isHexString(et)){const it=this.formatter.address(et).substring(2).toLowerCase()+".addr.reverse",at=yield this._getResolver(it,"getAvatar");if(!at)return null;tt=new Resolver(this,at,it);try{const st=yield tt.getAvatar();if(st)return st.url}catch(st){if(st.code!==Logger.errors.CALL_EXCEPTION)throw st}try{const st=_parseString(yield this.call({to:at,data:"0x691f3431"+namehash$1(it).substring(2)}),0);tt=yield this.getResolver(st)}catch(st){if(st.code!==Logger.errors.CALL_EXCEPTION)throw st;return null}}else if(tt=yield this.getResolver(et),!tt)return null;const rt=yield tt.getAvatar();return rt==null?null:rt.url})}perform(et,tt){return logger$3.throwError(et+" not implemented",Logger.errors.NOT_IMPLEMENTED,{operation:et})}_startEvent(et){this.polling=this._events.filter(tt=>tt.pollable()).length>0}_stopEvent(et){this.polling=this._events.filter(tt=>tt.pollable()).length>0}_addEventListener(et,tt,rt){const nt=new Event$1(getEventTag(et),tt,rt);return this._events.push(nt),this._startEvent(nt),this}on(et,tt){return this._addEventListener(et,tt,!1)}once(et,tt){return this._addEventListener(et,tt,!0)}emit(et,...tt){let rt=!1,nt=[],it=getEventTag(et);return this._events=this._events.filter(at=>at.tag!==it?!0:(setTimeout(()=>{at.listener.apply(this,tt)},0),rt=!0,at.once?(nt.push(at),!1):!0)),nt.forEach(at=>{this._stopEvent(at)}),rt}listenerCount(et){if(!et)return this._events.length;let tt=getEventTag(et);return this._events.filter(rt=>rt.tag===tt).length}listeners(et){if(et==null)return this._events.map(rt=>rt.listener);let tt=getEventTag(et);return this._events.filter(rt=>rt.tag===tt).map(rt=>rt.listener)}off(et,tt){if(tt==null)return this.removeAllListeners(et);const rt=[];let nt=!1,it=getEventTag(et);return this._events=this._events.filter(at=>at.tag!==it||at.listener!=tt||nt?!0:(nt=!0,rt.push(at),!1)),rt.forEach(at=>{this._stopEvent(at)}),this}removeAllListeners(et){let tt=[];if(et==null)tt=this._events,this._events=[];else{const rt=getEventTag(et);this._events=this._events.filter(nt=>nt.tag!==rt?!0:(tt.push(nt),!1))}return tt.forEach(rt=>{this._stopEvent(rt)}),this}}var __awaiter=globalThis&&globalThis.__awaiter||function(_e,et,tt,rt){function nt(it){return it instanceof tt?it:new tt(function(at){at(it)})}return new(tt||(tt=Promise))(function(it,at){function st(ht){try{dt(rt.next(ht))}catch(pt){at(pt)}}function lt(ht){try{dt(rt.throw(ht))}catch(pt){at(pt)}}function dt(ht){ht.done?it(ht.value):nt(ht.value).then(st,lt)}dt((rt=rt.apply(_e,et||[])).next())})};const logger$2=new Logger(version$6),errorGas=["call","estimateGas"];function spelunk(_e,et){if(_e==null)return null;if(typeof _e.message=="string"&&_e.message.match("reverted")){const tt=isHexString(_e.data)?_e.data:null;if(!et||tt)return{message:_e.message,data:tt}}if(typeof _e=="object"){for(const tt in _e){const rt=spelunk(_e[tt],et);if(rt)return rt}return null}if(typeof _e=="string")try{return spelunk(JSON.parse(_e),et)}catch{}return null}function checkError(_e,et,tt){const rt=tt.transaction||tt.signedTransaction;if(_e==="call"){const it=spelunk(et,!0);if(it)return it.data;logger$2.throwError("missing revert data in call exception; Transaction reverted without a reason string",Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:rt,error:et})}if(_e==="estimateGas"){let it=spelunk(et.body,!1);it==null&&(it=spelunk(et,!1)),it&&logger$2.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:it.message,method:_e,transaction:rt,error:et})}let nt=et.message;throw et.code===Logger.errors.SERVER_ERROR&&et.error&&typeof et.error.message=="string"?nt=et.error.message:typeof et.body=="string"?nt=et.body:typeof et.responseText=="string"&&(nt=et.responseText),nt=(nt||"").toLowerCase(),nt.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&logger$2.throwError("insufficient funds for intrinsic transaction cost",Logger.errors.INSUFFICIENT_FUNDS,{error:et,method:_e,transaction:rt}),nt.match(/nonce (is )?too low/i)&&logger$2.throwError("nonce has already been used",Logger.errors.NONCE_EXPIRED,{error:et,method:_e,transaction:rt}),nt.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&logger$2.throwError("replacement fee too low",Logger.errors.REPLACEMENT_UNDERPRICED,{error:et,method:_e,transaction:rt}),nt.match(/only replay-protected/i)&&logger$2.throwError("legacy pre-eip-155 transactions not supported",Logger.errors.UNSUPPORTED_OPERATION,{error:et,method:_e,transaction:rt}),errorGas.indexOf(_e)>=0&&nt.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&logger$2.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:et,method:_e,transaction:rt}),et}function timer(_e){return new Promise(function(et){setTimeout(et,_e)})}function getResult(_e){if(_e.error){const et=new Error(_e.error.message);throw et.code=_e.error.code,et.data=_e.error.data,et}return _e.result}function getLowerCase(_e){return _e&&_e.toLowerCase()}const _constructorGuard={};class JsonRpcSigner extends Signer{constructor(et,tt,rt){if(super(),et!==_constructorGuard)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");defineReadOnly(this,"provider",tt),rt==null&&(rt=0),typeof rt=="string"?(defineReadOnly(this,"_address",this.provider.formatter.address(rt)),defineReadOnly(this,"_index",null)):typeof rt=="number"?(defineReadOnly(this,"_index",rt),defineReadOnly(this,"_address",null)):logger$2.throwArgumentError("invalid address or index","addressOrIndex",rt)}connect(et){return logger$2.throwError("cannot alter JSON-RPC Signer connection",Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new UncheckedJsonRpcSigner(_constructorGuard,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(et=>(et.length<=this._index&&logger$2.throwError("unknown account #"+this._index,Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(et[this._index])))}sendUncheckedTransaction(et){et=shallowCopy(et);const tt=this.getAddress().then(rt=>(rt&&(rt=rt.toLowerCase()),rt));if(et.gasLimit==null){const rt=shallowCopy(et);rt.from=tt,et.gasLimit=this.provider.estimateGas(rt)}return et.to!=null&&(et.to=Promise.resolve(et.to).then(rt=>__awaiter(this,void 0,void 0,function*(){if(rt==null)return null;const nt=yield this.provider.resolveName(rt);return nt==null&&logger$2.throwArgumentError("provided ENS name resolves to null","tx.to",rt),nt}))),resolveProperties({tx:resolveProperties(et),sender:tt}).then(({tx:rt,sender:nt})=>{rt.from!=null?rt.from.toLowerCase()!==nt&&logger$2.throwArgumentError("from address mismatch","transaction",et):rt.from=nt;const it=this.provider.constructor.hexlifyTransaction(rt,{from:!0});return this.provider.send("eth_sendTransaction",[it]).then(at=>at,at=>(typeof at.message=="string"&&at.message.match(/user denied/i)&&logger$2.throwError("user rejected transaction",Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:rt}),checkError("sendTransaction",at,it)))})}signTransaction(et){return logger$2.throwError("signing transactions is unsupported",Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(et){return __awaiter(this,void 0,void 0,function*(){const tt=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),rt=yield this.sendUncheckedTransaction(et);try{return yield poll$1(()=>__awaiter(this,void 0,void 0,function*(){const nt=yield this.provider.getTransaction(rt);if(nt!==null)return this.provider._wrapTransaction(nt,rt,tt)}),{oncePoll:this.provider})}catch(nt){throw nt.transactionHash=rt,nt}})}signMessage(et){return __awaiter(this,void 0,void 0,function*(){const tt=typeof et=="string"?toUtf8Bytes(et):et,rt=yield this.getAddress();try{return yield this.provider.send("personal_sign",[hexlify(tt),rt.toLowerCase()])}catch(nt){throw typeof nt.message=="string"&&nt.message.match(/user denied/i)&&logger$2.throwError("user rejected signing",Logger.errors.ACTION_REJECTED,{action:"signMessage",from:rt,messageData:et}),nt}})}_legacySignMessage(et){return __awaiter(this,void 0,void 0,function*(){const tt=typeof et=="string"?toUtf8Bytes(et):et,rt=yield this.getAddress();try{return yield this.provider.send("eth_sign",[rt.toLowerCase(),hexlify(tt)])}catch(nt){throw typeof nt.message=="string"&&nt.message.match(/user denied/i)&&logger$2.throwError("user rejected signing",Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:rt,messageData:et}),nt}})}_signTypedData(et,tt,rt){return __awaiter(this,void 0,void 0,function*(){const nt=yield TypedDataEncoder.resolveNames(et,tt,rt,at=>this.provider.resolveName(at)),it=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[it.toLowerCase(),JSON.stringify(TypedDataEncoder.getPayload(nt.domain,tt,nt.value))])}catch(at){throw typeof at.message=="string"&&at.message.match(/user denied/i)&&logger$2.throwError("user rejected signing",Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:it,messageData:{domain:nt.domain,types:tt,value:nt.value}}),at}})}unlock(et){return __awaiter(this,void 0,void 0,function*(){const tt=this.provider,rt=yield this.getAddress();return tt.send("personal_unlockAccount",[rt.toLowerCase(),et,null])})}}class UncheckedJsonRpcSigner extends JsonRpcSigner{sendTransaction(et){return this.sendUncheckedTransaction(et).then(tt=>({hash:tt,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:rt=>this.provider.waitForTransaction(tt,rt)}))}}const allowedTransactionKeys={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class JsonRpcProvider extends BaseProvider{constructor(et,tt){let rt=tt;rt==null&&(rt=new Promise((nt,it)=>{setTimeout(()=>{this.detectNetwork().then(at=>{nt(at)},at=>{it(at)})},0)})),super(rt),et||(et=getStatic(this.constructor,"defaultUrl")()),typeof et=="string"?defineReadOnly(this,"connection",Object.freeze({url:et})):defineReadOnly(this,"connection",Object.freeze(shallowCopy(et))),this._nextId=42}get _cache(){return this._eventLoopCache==null&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return __awaiter(this,void 0,void 0,function*(){yield timer(0);let et=null;try{et=yield this.send("eth_chainId",[])}catch{try{et=yield this.send("net_version",[])}catch{}}if(et!=null){const tt=getStatic(this.constructor,"getNetwork");try{return tt(BigNumber.from(et).toNumber())}catch(rt){return logger$2.throwError("could not detect network",Logger.errors.NETWORK_ERROR,{chainId:et,event:"invalidNetwork",serverError:rt})}}return logger$2.throwError("could not detect network",Logger.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(et){return new JsonRpcSigner(_constructorGuard,this,et)}getUncheckedSigner(et){return this.getSigner(et).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(et=>et.map(tt=>this.formatter.address(tt)))}send(et,tt){const rt={method:et,params:tt,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:deepCopy(rt),provider:this});const nt=["eth_chainId","eth_blockNumber"].indexOf(et)>=0;if(nt&&this._cache[et])return this._cache[et];const it=fetchJson(this.connection,JSON.stringify(rt),getResult).then(at=>(this.emit("debug",{action:"response",request:rt,response:at,provider:this}),at),at=>{throw this.emit("debug",{action:"response",error:at,request:rt,provider:this}),at});return nt&&(this._cache[et]=it,setTimeout(()=>{this._cache[et]=null},0)),it}prepareRequest(et,tt){switch(et){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[getLowerCase(tt.address),tt.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[getLowerCase(tt.address),tt.blockTag]];case"getCode":return["eth_getCode",[getLowerCase(tt.address),tt.blockTag]];case"getStorageAt":return["eth_getStorageAt",[getLowerCase(tt.address),hexZeroPad(tt.position,32),tt.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[tt.signedTransaction]];case"getBlock":return tt.blockTag?["eth_getBlockByNumber",[tt.blockTag,!!tt.includeTransactions]]:tt.blockHash?["eth_getBlockByHash",[tt.blockHash,!!tt.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[tt.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[tt.transactionHash]];case"call":return["eth_call",[getStatic(this.constructor,"hexlifyTransaction")(tt.transaction,{from:!0}),tt.blockTag]];case"estimateGas":return["eth_estimateGas",[getStatic(this.constructor,"hexlifyTransaction")(tt.transaction,{from:!0})]];case"getLogs":return tt.filter&&tt.filter.address!=null&&(tt.filter.address=getLowerCase(tt.filter.address)),["eth_getLogs",[tt.filter]]}return null}perform(et,tt){return __awaiter(this,void 0,void 0,function*(){if(et==="call"||et==="estimateGas"){const nt=tt.transaction;if(nt&&nt.type!=null&&BigNumber.from(nt.type).isZero()&&nt.maxFeePerGas==null&&nt.maxPriorityFeePerGas==null){const it=yield this.getFeeData();it.maxFeePerGas==null&&it.maxPriorityFeePerGas==null&&(tt=shallowCopy(tt),tt.transaction=shallowCopy(nt),delete tt.transaction.type)}}const rt=this.prepareRequest(et,tt);rt==null&&logger$2.throwError(et+" not implemented",Logger.errors.NOT_IMPLEMENTED,{operation:et});try{return yield this.send(rt[0],rt[1])}catch(nt){return checkError(et,nt,tt)}})}_startEvent(et){et.tag==="pending"&&this._startPending(),super._startEvent(et)}_startPending(){if(this._pendingFilter!=null)return;const et=this,tt=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=tt,tt.then(function(rt){function nt(){et.send("eth_getFilterChanges",[rt]).then(function(it){if(et._pendingFilter!=tt)return null;let at=Promise.resolve();return it.forEach(function(st){et._emitted["t:"+st.toLowerCase()]="pending",at=at.then(function(){return et.getTransaction(st).then(function(lt){return et.emit("pending",lt),null})})}),at.then(function(){return timer(1e3)})}).then(function(){if(et._pendingFilter!=tt){et.send("eth_uninstallFilter",[rt]);return}return setTimeout(function(){nt()},0),null}).catch(it=>{})}return nt(),rt}).catch(rt=>{})}_stopEvent(et){et.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(et)}static hexlifyTransaction(et,tt){const rt=shallowCopy(allowedTransactionKeys);if(tt)for(const it in tt)tt[it]&&(rt[it]=!0);checkProperties(et,rt);const nt={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(it){if(et[it]==null)return;const at=hexValue(BigNumber.from(et[it]));it==="gasLimit"&&(it="gas"),nt[it]=at}),["from","to","data"].forEach(function(it){et[it]!=null&&(nt[it]=hexlify(et[it]))}),et.accessList&&(nt.accessList=accessListify(et.accessList)),nt}}const version$5="solidity/5.7.0",regexBytes=new RegExp("^bytes([0-9]+)$"),regexNumber=new RegExp("^(u?int)([0-9]*)$"),regexArray=new RegExp("^(.*)\\[([0-9]*)\\]$"),Zeros="0000000000000000000000000000000000000000000000000000000000000000",logger$1=new Logger(version$5);function _pack(_e,et,tt){switch(_e){case"address":return tt?zeroPad(et,32):arrayify(et);case"string":return toUtf8Bytes(et);case"bytes":return arrayify(et);case"bool":return et=et?"0x01":"0x00",tt?zeroPad(et,32):arrayify(et)}let rt=_e.match(regexNumber);if(rt){let nt=parseInt(rt[2]||"256");return(rt[2]&&String(nt)!==rt[2]||nt%8!==0||nt===0||nt>256)&&logger$1.throwArgumentError("invalid number type","type",_e),tt&&(nt=256),et=BigNumber.from(et).toTwos(nt),zeroPad(et,nt/8)}if(rt=_e.match(regexBytes),rt){const nt=parseInt(rt[1]);return(String(nt)!==rt[1]||nt===0||nt>32)&&logger$1.throwArgumentError("invalid bytes type","type",_e),arrayify(et).byteLength!==nt&&logger$1.throwArgumentError(`invalid value for ${_e}`,"value",et),tt?arrayify((et+Zeros).substring(0,66)):et}if(rt=_e.match(regexArray),rt&&Array.isArray(et)){const nt=rt[1];parseInt(rt[2]||String(et.length))!=et.length&&logger$1.throwArgumentError(`invalid array length for ${_e}`,"value",et);const at=[];return et.forEach(function(st){at.push(_pack(nt,st,!0))}),concat$1(at)}return logger$1.throwArgumentError("invalid type","type",_e)}function pack(_e,et){_e.length!=et.length&&logger$1.throwArgumentError("wrong number of values; expected ${ types.length }","values",et);const tt=[];return _e.forEach(function(rt,nt){tt.push(_pack(rt,et[nt]))}),hexlify(concat$1(tt))}function keccak256$1(_e,et){return keccak256$2(pack(_e,et))}function sha256$2(_e,et){return sha256$3(pack(_e,et))}const lib_esm$1=Object.freeze(Object.defineProperty({__proto__:null,keccak256:keccak256$1,pack,sha256:sha256$2},Symbol.toStringTag,{value:"Module"})),version$4="units/5.7.0",logger=new Logger(version$4),names$1=["wei","kwei","mwei","gwei","szabo","finney","ether"];function commify(_e){const et=String(_e).split(".");(et.length>2||!et[0].match(/^-?[0-9]*$/)||et[1]&&!et[1].match(/^[0-9]*$/)||_e==="."||_e==="-.")&&logger.throwArgumentError("invalid value","value",_e);let tt=et[0],rt="";for(tt.substring(0,1)==="-"&&(rt="-",tt=tt.substring(1));tt.substring(0,1)==="0";)tt=tt.substring(1);tt===""&&(tt="0");let nt="";for(et.length===2&&(nt="."+(et[1]||"0"));nt.length>2&&nt[nt.length-1]==="0";)nt=nt.substring(0,nt.length-1);const it=[];for(;tt.length;)if(tt.length<=3){it.unshift(tt);break}else{const at=tt.length-3;it.unshift(tt.substring(at)),tt=tt.substring(0,at)}return rt+it.join(",")+nt}function formatUnits$1(_e,et){if(typeof et=="string"){const tt=names$1.indexOf(et);tt!==-1&&(et=3*tt)}return formatFixed(_e,et??18)}function parseUnits$1(_e,et){if(typeof _e!="string"&&logger.throwArgumentError("value must be a string","value",_e),typeof et=="string"){const tt=names$1.indexOf(et);tt!==-1&&(et=3*tt)}return parseFixed(_e,et??18)}function formatEther$1(_e){return formatUnits$1(_e,18)}function parseEther$1(_e){return parseUnits$1(_e,18)}const lib_esm=Object.freeze(Object.defineProperty({__proto__:null,commify,formatEther:formatEther$1,formatUnits:formatUnits$1,parseEther:parseEther$1,parseUnits:parseUnits$1},Symbol.toStringTag,{value:"Module"}));var utils={};const require$$0=getAugmentedNamespace(lib_esm$b),require$$1=getAugmentedNamespace(lib_esm$f),require$$2$1=getAugmentedNamespace(lib_esm$d),require$$3=getAugmentedNamespace(lib_esm$8),require$$4=getAugmentedNamespace(lib_esm$j),require$$5=getAugmentedNamespace(lib_esm$c),require$$6=getAugmentedNamespace(lib_esm$6),require$$7=getAugmentedNamespace(lib_esm$4),require$$8=getAugmentedNamespace(lib_esm$h),require$$9=getAugmentedNamespace(lib_esm$k),require$$10=getAugmentedNamespace(lib_esm$7),require$$11=getAugmentedNamespace(lib_esm$1),require$$12=getAugmentedNamespace(lib_esm$5),require$$13=getAugmentedNamespace(lib_esm$i),require$$14=getAugmentedNamespace(lib_esm$g),require$$15=getAugmentedNamespace(lib_esm$a),require$$16=getAugmentedNamespace(lib_esm$e),require$$17=getAugmentedNamespace(lib_esm$9),require$$18=getAugmentedNamespace(lib_esm),require$$19=getAugmentedNamespace(lib_esm$3),require$$20=getAugmentedNamespace(lib_esm$2);(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(Ht,Xt,Mt,_t){_t===void 0&&(_t=Mt),Object.defineProperty(Ht,_t,{enumerable:!0,get:function(){return Xt[Mt]}})}:function(Ht,Xt,Mt,_t){_t===void 0&&(_t=Mt),Ht[_t]=Xt[Mt]}),tt=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(Ht,Xt){Object.defineProperty(Ht,"default",{enumerable:!0,value:Xt})}:function(Ht,Xt){Ht.default=Xt}),rt=commonjsGlobal&&commonjsGlobal.__importStar||function(Ht){if(Ht&&Ht.__esModule)return Ht;var Xt={};if(Ht!=null)for(var Mt in Ht)Mt!=="default"&&Object.prototype.hasOwnProperty.call(Ht,Mt)&&et(Xt,Ht,Mt);return tt(Xt,Ht),Xt};Object.defineProperty(_e,"__esModule",{value:!0}),_e.formatBytes32String=_e.Utf8ErrorFuncs=_e.toUtf8String=_e.toUtf8CodePoints=_e.toUtf8Bytes=_e._toEscapedUtf8String=_e.nameprep=_e.hexDataSlice=_e.hexDataLength=_e.hexZeroPad=_e.hexValue=_e.hexStripZeros=_e.hexConcat=_e.isHexString=_e.hexlify=_e.base64=_e.base58=_e.TransactionDescription=_e.LogDescription=_e.Interface=_e.SigningKey=_e.HDNode=_e.defaultPath=_e.isBytesLike=_e.isBytes=_e.zeroPad=_e.stripZeros=_e.concat=_e.arrayify=_e.shallowCopy=_e.resolveProperties=_e.getStatic=_e.defineReadOnly=_e.deepCopy=_e.checkProperties=_e.poll=_e.fetchJson=_e._fetchData=_e.RLP=_e.Logger=_e.checkResultErrors=_e.FormatTypes=_e.ParamType=_e.FunctionFragment=_e.EventFragment=_e.ErrorFragment=_e.ConstructorFragment=_e.Fragment=_e.defaultAbiCoder=_e.AbiCoder=void 0,_e.Indexed=_e.Utf8ErrorReason=_e.UnicodeNormalizationForm=_e.SupportedAlgorithm=_e.mnemonicToSeed=_e.isValidMnemonic=_e.entropyToMnemonic=_e.mnemonicToEntropy=_e.getAccountPath=_e.verifyTypedData=_e.verifyMessage=_e.recoverPublicKey=_e.computePublicKey=_e.recoverAddress=_e.computeAddress=_e.getJsonWalletAddress=_e.TransactionTypes=_e.serializeTransaction=_e.parseTransaction=_e.accessListify=_e.joinSignature=_e.splitSignature=_e.soliditySha256=_e.solidityKeccak256=_e.solidityPack=_e.shuffled=_e.randomBytes=_e.sha512=_e.sha256=_e.ripemd160=_e.keccak256=_e.computeHmac=_e.commify=_e.parseUnits=_e.formatUnits=_e.parseEther=_e.formatEther=_e.isAddress=_e.getCreate2Address=_e.getContractAddress=_e.getIcapAddress=_e.getAddress=_e._TypedDataEncoder=_e.id=_e.isValidName=_e.namehash=_e.hashMessage=_e.dnsEncode=_e.parseBytes32String=void 0;var nt=require$$0;Object.defineProperty(_e,"AbiCoder",{enumerable:!0,get:function(){return nt.AbiCoder}}),Object.defineProperty(_e,"checkResultErrors",{enumerable:!0,get:function(){return nt.checkResultErrors}}),Object.defineProperty(_e,"ConstructorFragment",{enumerable:!0,get:function(){return nt.ConstructorFragment}}),Object.defineProperty(_e,"defaultAbiCoder",{enumerable:!0,get:function(){return nt.defaultAbiCoder}}),Object.defineProperty(_e,"ErrorFragment",{enumerable:!0,get:function(){return nt.ErrorFragment}}),Object.defineProperty(_e,"EventFragment",{enumerable:!0,get:function(){return nt.EventFragment}}),Object.defineProperty(_e,"FormatTypes",{enumerable:!0,get:function(){return nt.FormatTypes}}),Object.defineProperty(_e,"Fragment",{enumerable:!0,get:function(){return nt.Fragment}}),Object.defineProperty(_e,"FunctionFragment",{enumerable:!0,get:function(){return nt.FunctionFragment}}),Object.defineProperty(_e,"Indexed",{enumerable:!0,get:function(){return nt.Indexed}}),Object.defineProperty(_e,"Interface",{enumerable:!0,get:function(){return nt.Interface}}),Object.defineProperty(_e,"LogDescription",{enumerable:!0,get:function(){return nt.LogDescription}}),Object.defineProperty(_e,"ParamType",{enumerable:!0,get:function(){return nt.ParamType}}),Object.defineProperty(_e,"TransactionDescription",{enumerable:!0,get:function(){return nt.TransactionDescription}});var it=require$$1;Object.defineProperty(_e,"getAddress",{enumerable:!0,get:function(){return it.getAddress}}),Object.defineProperty(_e,"getCreate2Address",{enumerable:!0,get:function(){return it.getCreate2Address}}),Object.defineProperty(_e,"getContractAddress",{enumerable:!0,get:function(){return it.getContractAddress}}),Object.defineProperty(_e,"getIcapAddress",{enumerable:!0,get:function(){return it.getIcapAddress}}),Object.defineProperty(_e,"isAddress",{enumerable:!0,get:function(){return it.isAddress}});var at=rt(require$$2$1);_e.base64=at;var st=require$$3;Object.defineProperty(_e,"base58",{enumerable:!0,get:function(){return st.Base58}});var lt=require$$4;Object.defineProperty(_e,"arrayify",{enumerable:!0,get:function(){return lt.arrayify}}),Object.defineProperty(_e,"concat",{enumerable:!0,get:function(){return lt.concat}}),Object.defineProperty(_e,"hexConcat",{enumerable:!0,get:function(){return lt.hexConcat}}),Object.defineProperty(_e,"hexDataSlice",{enumerable:!0,get:function(){return lt.hexDataSlice}}),Object.defineProperty(_e,"hexDataLength",{enumerable:!0,get:function(){return lt.hexDataLength}}),Object.defineProperty(_e,"hexlify",{enumerable:!0,get:function(){return lt.hexlify}}),Object.defineProperty(_e,"hexStripZeros",{enumerable:!0,get:function(){return lt.hexStripZeros}}),Object.defineProperty(_e,"hexValue",{enumerable:!0,get:function(){return lt.hexValue}}),Object.defineProperty(_e,"hexZeroPad",{enumerable:!0,get:function(){return lt.hexZeroPad}}),Object.defineProperty(_e,"isBytes",{enumerable:!0,get:function(){return lt.isBytes}}),Object.defineProperty(_e,"isBytesLike",{enumerable:!0,get:function(){return lt.isBytesLike}}),Object.defineProperty(_e,"isHexString",{enumerable:!0,get:function(){return lt.isHexString}}),Object.defineProperty(_e,"joinSignature",{enumerable:!0,get:function(){return lt.joinSignature}}),Object.defineProperty(_e,"zeroPad",{enumerable:!0,get:function(){return lt.zeroPad}}),Object.defineProperty(_e,"splitSignature",{enumerable:!0,get:function(){return lt.splitSignature}}),Object.defineProperty(_e,"stripZeros",{enumerable:!0,get:function(){return lt.stripZeros}});var dt=require$$5;Object.defineProperty(_e,"_TypedDataEncoder",{enumerable:!0,get:function(){return dt._TypedDataEncoder}}),Object.defineProperty(_e,"dnsEncode",{enumerable:!0,get:function(){return dt.dnsEncode}}),Object.defineProperty(_e,"hashMessage",{enumerable:!0,get:function(){return dt.hashMessage}}),Object.defineProperty(_e,"id",{enumerable:!0,get:function(){return dt.id}}),Object.defineProperty(_e,"isValidName",{enumerable:!0,get:function(){return dt.isValidName}}),Object.defineProperty(_e,"namehash",{enumerable:!0,get:function(){return dt.namehash}});var ht=require$$6;Object.defineProperty(_e,"defaultPath",{enumerable:!0,get:function(){return ht.defaultPath}}),Object.defineProperty(_e,"entropyToMnemonic",{enumerable:!0,get:function(){return ht.entropyToMnemonic}}),Object.defineProperty(_e,"getAccountPath",{enumerable:!0,get:function(){return ht.getAccountPath}}),Object.defineProperty(_e,"HDNode",{enumerable:!0,get:function(){return ht.HDNode}}),Object.defineProperty(_e,"isValidMnemonic",{enumerable:!0,get:function(){return ht.isValidMnemonic}}),Object.defineProperty(_e,"mnemonicToEntropy",{enumerable:!0,get:function(){return ht.mnemonicToEntropy}}),Object.defineProperty(_e,"mnemonicToSeed",{enumerable:!0,get:function(){return ht.mnemonicToSeed}});var pt=require$$7;Object.defineProperty(_e,"getJsonWalletAddress",{enumerable:!0,get:function(){return pt.getJsonWalletAddress}});var mt=require$$8;Object.defineProperty(_e,"keccak256",{enumerable:!0,get:function(){return mt.keccak256}});var gt=require$$9;Object.defineProperty(_e,"Logger",{enumerable:!0,get:function(){return gt.Logger}});var vt=require$$10;Object.defineProperty(_e,"computeHmac",{enumerable:!0,get:function(){return vt.computeHmac}}),Object.defineProperty(_e,"ripemd160",{enumerable:!0,get:function(){return vt.ripemd160}}),Object.defineProperty(_e,"sha256",{enumerable:!0,get:function(){return vt.sha256}}),Object.defineProperty(_e,"sha512",{enumerable:!0,get:function(){return vt.sha512}});var xt=require$$11;Object.defineProperty(_e,"solidityKeccak256",{enumerable:!0,get:function(){return xt.keccak256}}),Object.defineProperty(_e,"solidityPack",{enumerable:!0,get:function(){return xt.pack}}),Object.defineProperty(_e,"soliditySha256",{enumerable:!0,get:function(){return xt.sha256}});var yt=require$$12;Object.defineProperty(_e,"randomBytes",{enumerable:!0,get:function(){return yt.randomBytes}}),Object.defineProperty(_e,"shuffled",{enumerable:!0,get:function(){return yt.shuffled}});var bt=require$$13;Object.defineProperty(_e,"checkProperties",{enumerable:!0,get:function(){return bt.checkProperties}}),Object.defineProperty(_e,"deepCopy",{enumerable:!0,get:function(){return bt.deepCopy}}),Object.defineProperty(_e,"defineReadOnly",{enumerable:!0,get:function(){return bt.defineReadOnly}}),Object.defineProperty(_e,"getStatic",{enumerable:!0,get:function(){return bt.getStatic}}),Object.defineProperty(_e,"resolveProperties",{enumerable:!0,get:function(){return bt.resolveProperties}}),Object.defineProperty(_e,"shallowCopy",{enumerable:!0,get:function(){return bt.shallowCopy}});var wt=rt(require$$14);_e.RLP=wt;var Et=require$$15;Object.defineProperty(_e,"computePublicKey",{enumerable:!0,get:function(){return Et.computePublicKey}}),Object.defineProperty(_e,"recoverPublicKey",{enumerable:!0,get:function(){return Et.recoverPublicKey}}),Object.defineProperty(_e,"SigningKey",{enumerable:!0,get:function(){return Et.SigningKey}});var $t=require$$16;Object.defineProperty(_e,"formatBytes32String",{enumerable:!0,get:function(){return $t.formatBytes32String}}),Object.defineProperty(_e,"nameprep",{enumerable:!0,get:function(){return $t.nameprep}}),Object.defineProperty(_e,"parseBytes32String",{enumerable:!0,get:function(){return $t.parseBytes32String}}),Object.defineProperty(_e,"_toEscapedUtf8String",{enumerable:!0,get:function(){return $t._toEscapedUtf8String}}),Object.defineProperty(_e,"toUtf8Bytes",{enumerable:!0,get:function(){return $t.toUtf8Bytes}}),Object.defineProperty(_e,"toUtf8CodePoints",{enumerable:!0,get:function(){return $t.toUtf8CodePoints}}),Object.defineProperty(_e,"toUtf8String",{enumerable:!0,get:function(){return $t.toUtf8String}}),Object.defineProperty(_e,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return $t.Utf8ErrorFuncs}});var Pt=require$$17;Object.defineProperty(_e,"accessListify",{enumerable:!0,get:function(){return Pt.accessListify}}),Object.defineProperty(_e,"computeAddress",{enumerable:!0,get:function(){return Pt.computeAddress}}),Object.defineProperty(_e,"parseTransaction",{enumerable:!0,get:function(){return Pt.parse}}),Object.defineProperty(_e,"recoverAddress",{enumerable:!0,get:function(){return Pt.recoverAddress}}),Object.defineProperty(_e,"serializeTransaction",{enumerable:!0,get:function(){return Pt.serialize}}),Object.defineProperty(_e,"TransactionTypes",{enumerable:!0,get:function(){return Pt.TransactionTypes}});var kt=require$$18;Object.defineProperty(_e,"commify",{enumerable:!0,get:function(){return kt.commify}}),Object.defineProperty(_e,"formatEther",{enumerable:!0,get:function(){return kt.formatEther}}),Object.defineProperty(_e,"parseEther",{enumerable:!0,get:function(){return kt.parseEther}}),Object.defineProperty(_e,"formatUnits",{enumerable:!0,get:function(){return kt.formatUnits}}),Object.defineProperty(_e,"parseUnits",{enumerable:!0,get:function(){return kt.parseUnits}});var Lt=require$$19;Object.defineProperty(_e,"verifyMessage",{enumerable:!0,get:function(){return Lt.verifyMessage}}),Object.defineProperty(_e,"verifyTypedData",{enumerable:!0,get:function(){return Lt.verifyTypedData}});var jt=require$$20;Object.defineProperty(_e,"_fetchData",{enumerable:!0,get:function(){return jt._fetchData}}),Object.defineProperty(_e,"fetchJson",{enumerable:!0,get:function(){return jt.fetchJson}}),Object.defineProperty(_e,"poll",{enumerable:!0,get:function(){return jt.poll}});var qt=require$$10;Object.defineProperty(_e,"SupportedAlgorithm",{enumerable:!0,get:function(){return qt.SupportedAlgorithm}});var Dt=require$$16;Object.defineProperty(_e,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return Dt.UnicodeNormalizationForm}}),Object.defineProperty(_e,"Utf8ErrorReason",{enumerable:!0,get:function(){return Dt.Utf8ErrorReason}})})(utils);function Jr(_e,et){let tt={};for(let rt in _e)tt[rt]=et(_e[rt],rt);return tt}function lr(){return pipe(filter(_e=>_e!=null))}var fe$2=function(){let _e=mr,et=fr;return et(_e(32),8)+"-"+et(_e(16),4)+"-"+et(16384|_e(12),4)+"-"+et(32768|_e(14),4)+"-"+et(_e(48),12)},mr=function(_e){if(_e<0||_e>53)return NaN;let et=0|Math.random()*1073741824;return _e>30?et+(0|Math.random()*(1<<_e-30))*1073741824:et>>>30-_e},fr=function(_e,et){let tt=_e.toString(16),rt=et-tt.length,nt="0";for(;rt>0;rt>>>=1,nt+=nt)rt&1&&(tt=nt+tt);return tt};function y$3(_e){return{..._e,[Symbol.iterator](){return this}}}function I$6(_e,et){return y$3({next(){let{done:tt,value:rt}=_e.next();return{done:tt,value:tt?rt:et(rt)}}})}function Cr(_e){if(_e<2)throw new Error("Minimum size is 2");if(_e>64)throw new Error("Maximum size is 64");let et=2**(_e-1)-1,tt=-et-1;return rt=>{if(rt=rt<<0,rt>et||rtet,rt(_e[_e.Boolean=0]="Boolean",_e[_e.Number=1]="Number",_e[_e.OptionalNumber=2]="OptionalNumber",_e[_e.BigInt=3]="BigInt",_e[_e.OptionalBigInt=4]="OptionalBigInt",_e[_e.String=5]="String",_e[_e.OptionalString=6]="OptionalString",_e[_e.NumberArray=7]="NumberArray",_e[_e.OptionalNumberArray=8]="OptionalNumberArray",_e[_e.BigIntArray=9]="BigIntArray",_e[_e.OptionalBigIntArray=10]="OptionalBigIntArray",_e[_e.StringArray=11]="StringArray",_e[_e.OptionalStringArray=12]="OptionalStringArray",_e[_e.Entity=13]="Entity",_e[_e.OptionalEntity=14]="OptionalEntity",_e[_e.EntityArray=15]="EntityArray",_e[_e.OptionalEntityArray=16]="OptionalEntityArray",_e[_e.T=17]="T",_e[_e.OptionalT=18]="OptionalT",_e))(P$a||{}),w$2=(_e=>(_e[_e.Enter=0]="Enter",_e[_e.Exit=1]="Exit",_e[_e.Update=2]="Update",_e[_e.Noop=3]="Noop",_e))(w$2||{}),k$3=[14,16,2,8,4,10,6,12,18];function M$7(_e){let et=new Map;function tt(st){let lt=et.get(rt(st));return lt?new Set([...lt].map(x$7)):new Set}function rt(st){return Object.values(st).join("/")}function nt(st,lt){if(!lt)return;let dt=rt(lt),ht=et.get(dt);ht||(ht=new Set,et.set(dt,ht)),ht.add(st)}function it(st,lt){if(!lt)return;let dt=rt(lt),ht=et.get(dt);ht&&ht.delete(st)}for(let st of O$5(_e)){let lt=g$7(_e,st);nt(p$4(st),lt)}let at=_e.update$.subscribe(({entity:st,value:lt})=>{it(p$4(st),lt[1]),nt(p$4(st),lt[0])});return _e.world.registerDisposer(()=>at?.unsubscribe()),{..._e,getEntitiesWithValue:tt}}function F$2(_e,et){let tt=g$7(et,_e);return{entity:_e,component:et,value:[tt,void 0],type:tt==null?3:0}}function Y$4(_e){return pipe(map(et=>F$2(et,_e)))}function I$5(_e){return"getEntitiesWithValue"in _e}function T$5(_e,et){return Object.keys(_e.schema).every(tt=>tt in et)}function b$5(_e){return _e.metadata?.componentName??_e.metadata?.tableName??_e.metadata?.tableId??_e.metadata?.contractId??_e.id}function ie$1(_e,et,tt){if(Object.keys(et).length===0)throw new Error("Component schema must have at least one key");let rt=tt?.id??fe$2(),nt=Jr(et,()=>new Map),it=new Subject,at=tt?.metadata,st={values:nt,schema:et,id:rt,update$:it,metadata:at,entities:()=>I$6(Object.values(nt)[0].keys(),x$7),world:_e};return tt?.indexed&&(st=M$7(st)),_e.registerComponent(st),st}function E$3(_e,et,tt){let rt=p$4(et),nt=g$7(_e,et);for(let[it,at]of Object.entries(tt))_e.values[it]?_e.values[it].set(rt,at):_e.metadata?.tableId&&/^\d+$/.test(it)||console.warn("Component definition for",b$5(_e),"is missing key",it,", ignoring value",at,"for entity",et,". Existing keys: ",Object.keys(_e.values));_e.update$.next({entity:et,value:[tt,nt],component:_e})}function ue$1(_e,et,tt,rt){let nt=g$7(_e,et);if(nt===void 0){if(rt===void 0)throw new Error(`Can't update component ${b$5(_e)} without a current value or initial value`);E$3(_e,et,{...rt,...tt})}else E$3(_e,et,{...nt,...tt})}function se$1(_e,et){let tt=p$4(et),rt=g$7(_e,et);for(let nt of Object.keys(_e.values))_e.values[nt].delete(tt);_e.update$.next({entity:et,value:[void 0,rt],component:_e})}function le$1(_e,et){let tt=p$4(et);return Object.values(_e.values)[0].has(tt)}function g$7(_e,et){let tt={},rt=p$4(et),nt=Object.keys(_e.schema);for(let it of nt){let at=_e.values[it].get(rt);if(at===void 0&&!k$3.includes(_e.schema[it]))return;tt[it]=at}return tt}function de$2(_e,et){let tt=g$7(_e,et);if(!tt)throw new Error(`No value for component ${b$5(_e)} on entity ${et}`);return tt}function q$3(_e,et){if(!_e&&!et)return!0;if(!_e||!et)return!1;let tt=!0;for(let rt of Object.keys(_e))if(tt=_e[rt]===et[rt],!tt)return!1;return tt}function ce$2(_e,et){if(I$5(_e)&&T$5(_e,et))return _e.getEntitiesWithValue(et);let tt=new Set;for(let rt of O$5(_e)){let nt=g$7(_e,rt);q$3(et,nt)&&tt.add(rt)}return tt}function O$5(_e){return _e.entities()}function p$4(_e){return Symbol.for(_e)}function x$7(_e){return Symbol.keyFor(_e)}var N$3=(_e=>(_e[_e.Has=0]="Has",_e[_e.HasValue=1]="HasValue",_e[_e.Not=2]="Not",_e[_e.NotValue=3]="NotValue",_e[_e.ProxyRead=4]="ProxyRead",_e[_e.ProxyExpand=5]="ProxyExpand",_e))(N$3||{});function Ye$1(_e){return{type:0,component:_e}}function Je$1(_e,et){return{type:1,component:_e,value:et}}function c$3(_e,et){if(et.type===0)return le$1(et.component,_e);if(et.type===1)return q$3(et.value,g$7(et.component,_e));if(et.type===2)return!le$1(et.component,_e);if(et.type===3)return!q$3(et.value,g$7(et.component,_e));throw new Error("Unknown query fragment")}function G$4(_e){return _e.type===0||_e.type==1}function P$9(_e){return _e.type===2||_e.type==3}function J$2(_e){return _e.type===5||_e.type==4}function U$6(_e,et){return _e&&G$4(et)||!_e&&P$9(et)}function I$4(_e,et,tt){let rt=_e,nt=!1;for(let it=0;it[...Q$2(it,et,tt-1)]).flat();return new Set([...rt,...nt])}function A$5(_e,et){let tt=et?new Set([...et]):void 0,rt,nt;for(let it=0;it<_e.length;it++){let at=_e[it];if(J$2(at))at.type===4&&(rt=at),at.type===5&&(nt=at);else if(tt)for(let st of[...tt]){let lt=c$3(st,at);if(rt&&rt.depth>0&&!U$6(lt,at)&&(lt=I$4(st,at,rt)??lt),lt||tt.delete(st),nt&&nt.depth>0){let dt=Q$2(st,nt.component,nt.depth);for(let ht of dt)(c$3(ht,at)||rt&&rt.depth>0&&I$4(ht,at,rt))&&tt.add(ht)}}else{if(P$9(at))throw new Error("First EntityQueryFragment must be Has or HasValue");if(tt=at.type===0?new Set([...O$5(at.component)]):ce$2(at.component,at.value),nt&&nt.depth>0)for(let st of[...tt])for(let lt of Q$2(st,nt.component,nt.depth))tt.add(lt)}}return tt??new Set}function f$5(_e,et){let tt=et?.runOnInit||et?.initialSet?A$5(_e,et.initialSet):new Set,rt=observable$2(tt),nt=from$1(rt).pipe(Y$4(_e[0].component)),it=_e.findIndex(st=>[5,4].includes(st.type))!==-1,at=merge$2(..._e.map(st=>st.component.update$)).pipe(it?concatMap(st=>{let lt=A$5(_e,et?.initialSet),dt=[];for(let ht of rt)lt.has(ht)||(rt.delete(ht),dt.push({entity:ht,type:1,component:st.component,value:[void 0,void 0]}));for(let ht of lt)rt.has(ht)?dt.push({entity:ht,type:2,component:st.component,value:[g$7(st.component,ht),void 0]}):(rt.add(ht),dt.push({entity:ht,type:0,component:st.component,value:[g$7(st.component,ht),void 0]}));return of$1(...dt)}):map(st=>{if(rt.has(st.entity))return _e.filter(lt=>lt.component.id===st.component.id).every(lt=>c$3(st.entity,lt))?{...st,type:2}:(rt.delete(st.entity),{...st,type:1});if(_e.every(lt=>c$3(st.entity,lt)))return rt.add(st.entity),{...st,type:0}}),lr());return{matching:rt,update$:concat$2(nt,at).pipe(share$1())}}function ft(){let _e=new Set,et=[],tt=[];function rt({id:ht,idSuffix:pt}={}){let mt=ht||_e.size+(pt?"-"+pt:""),gt=p$4(mt);return _e.add(gt),mt}function nt(){return I$6(_e.values(),x$7)}function it(ht){et.push(ht)}function at(ht){for(let[,pt]of tt.filter(mt=>!ht||mt[0]===ht))pt();tt=tt.filter(pt=>ht&&pt[0]!==ht)}function st(ht,pt=""){tt.push([pt,ht])}function lt(ht){let pt=p$4(ht);return _e.has(pt)}function dt(ht){for(let pt of et)le$1(pt,ht)&&se$1(pt,ht);_e.delete(p$4(ht))}return{registerEntity:rt,components:et,registerComponent:it,dispose:at,registerDisposer:st,hasEntity:lt,getEntities:nt,entitySymbols:_e,deleteEntity:dt}}var i$2=/\[\]$/;function r$3(_e){return _e.replace(i$2,"")}var n$2=["uint8","uint16","uint24","uint32","uint40","uint48","uint56","uint64","uint72","uint80","uint88","uint96","uint104","uint112","uint120","uint128","uint136","uint144","uint152","uint160","uint168","uint176","uint184","uint192","uint200","uint208","uint216","uint224","uint232","uint240","uint248","uint256","int8","int16","int24","int32","int40","int48","int56","int64","int72","int80","int88","int96","int104","int112","int120","int128","int136","int144","int152","int160","int168","int176","int184","int192","int200","int208","int216","int224","int232","int240","int248","int256","bytes1","bytes2","bytes3","bytes4","bytes5","bytes6","bytes7","bytes8","bytes9","bytes10","bytes11","bytes12","bytes13","bytes14","bytes15","bytes16","bytes17","bytes18","bytes19","bytes20","bytes21","bytes22","bytes23","bytes24","bytes25","bytes26","bytes27","bytes28","bytes29","bytes30","bytes31","bytes32","bool","address","uint8[]","uint16[]","uint24[]","uint32[]","uint40[]","uint48[]","uint56[]","uint64[]","uint72[]","uint80[]","uint88[]","uint96[]","uint104[]","uint112[]","uint120[]","uint128[]","uint136[]","uint144[]","uint152[]","uint160[]","uint168[]","uint176[]","uint184[]","uint192[]","uint200[]","uint208[]","uint216[]","uint224[]","uint232[]","uint240[]","uint248[]","uint256[]","int8[]","int16[]","int24[]","int32[]","int40[]","int48[]","int56[]","int64[]","int72[]","int80[]","int88[]","int96[]","int104[]","int112[]","int120[]","int128[]","int136[]","int144[]","int152[]","int160[]","int168[]","int176[]","int184[]","int192[]","int200[]","int208[]","int216[]","int224[]","int232[]","int240[]","int248[]","int256[]","bytes1[]","bytes2[]","bytes3[]","bytes4[]","bytes5[]","bytes6[]","bytes7[]","bytes8[]","bytes9[]","bytes10[]","bytes11[]","bytes12[]","bytes13[]","bytes14[]","bytes15[]","bytes16[]","bytes17[]","bytes18[]","bytes19[]","bytes20[]","bytes21[]","bytes22[]","bytes23[]","bytes24[]","bytes25[]","bytes26[]","bytes27[]","bytes28[]","bytes29[]","bytes30[]","bytes31[]","bytes32[]","bool[]","address[]","bytes","string"],y$2=n$2.slice(98),s$3={"uint8[]":[],"uint16[]":[],"uint24[]":[],"uint32[]":[],"uint40[]":[],"uint48[]":[],"uint56[]":[],"uint64[]":[],"uint72[]":[],"uint80[]":[],"uint88[]":[],"uint96[]":[],"uint104[]":[],"uint112[]":[],"uint120[]":[],"uint128[]":[],"uint136[]":[],"uint144[]":[],"uint152[]":[],"uint160[]":[],"uint168[]":[],"uint176[]":[],"uint184[]":[],"uint192[]":[],"uint200[]":[],"uint208[]":[],"uint216[]":[],"uint224[]":[],"uint232[]":[],"uint240[]":[],"uint248[]":[],"uint256[]":[],"int8[]":[],"int16[]":[],"int24[]":[],"int32[]":[],"int40[]":[],"int48[]":[],"int56[]":[],"int64[]":[],"int72[]":[],"int80[]":[],"int88[]":[],"int96[]":[],"int104[]":[],"int112[]":[],"int120[]":[],"int128[]":[],"int136[]":[],"int144[]":[],"int152[]":[],"int160[]":[],"int168[]":[],"int176[]":[],"int184[]":[],"int192[]":[],"int200[]":[],"int208[]":[],"int216[]":[],"int224[]":[],"int232[]":[],"int240[]":[],"int248[]":[],"int256[]":[],"bytes1[]":[],"bytes2[]":[],"bytes3[]":[],"bytes4[]":[],"bytes5[]":[],"bytes6[]":[],"bytes7[]":[],"bytes8[]":[],"bytes9[]":[],"bytes10[]":[],"bytes11[]":[],"bytes12[]":[],"bytes13[]":[],"bytes14[]":[],"bytes15[]":[],"bytes16[]":[],"bytes17[]":[],"bytes18[]":[],"bytes19[]":[],"bytes20[]":[],"bytes21[]":[],"bytes22[]":[],"bytes23[]":[],"bytes24[]":[],"bytes25[]":[],"bytes26[]":[],"bytes27[]":[],"bytes28[]":[],"bytes29[]":[],"bytes30[]":[],"bytes31[]":[],"bytes32[]":[],"bool[]":[],"address[]":[],bytes:"0x",string:""};function T$4(_e){return y$2.includes(_e)}var a$4={uint8:0,uint16:0,uint24:0,uint32:0,uint40:0,uint48:0,uint56:0n,uint64:0n,uint72:0n,uint80:0n,uint88:0n,uint96:0n,uint104:0n,uint112:0n,uint120:0n,uint128:0n,uint136:0n,uint144:0n,uint152:0n,uint160:0n,uint168:0n,uint176:0n,uint184:0n,uint192:0n,uint200:0n,uint208:0n,uint216:0n,uint224:0n,uint232:0n,uint240:0n,uint248:0n,uint256:0n,int8:0,int16:0,int24:0,int32:0,int40:0,int48:0,int56:0n,int64:0n,int72:0n,int80:0n,int88:0n,int96:0n,int104:0n,int112:0n,int120:0n,int128:0n,int136:0n,int144:0n,int152:0n,int160:0n,int168:0n,int176:0n,int184:0n,int192:0n,int200:0n,int208:0n,int216:0n,int224:0n,int232:0n,int240:0n,int248:0n,int256:0n,bytes1:"0x00",bytes2:"0x0000",bytes3:"0x000000",bytes4:"0x00000000",bytes5:"0x0000000000",bytes6:"0x000000000000",bytes7:"0x00000000000000",bytes8:"0x0000000000000000",bytes9:"0x000000000000000000",bytes10:"0x00000000000000000000",bytes11:"0x0000000000000000000000",bytes12:"0x000000000000000000000000",bytes13:"0x00000000000000000000000000",bytes14:"0x0000000000000000000000000000",bytes15:"0x000000000000000000000000000000",bytes16:"0x00000000000000000000000000000000",bytes17:"0x0000000000000000000000000000000000",bytes18:"0x000000000000000000000000000000000000",bytes19:"0x00000000000000000000000000000000000000",bytes20:"0x0000000000000000000000000000000000000000",bytes21:"0x000000000000000000000000000000000000000000",bytes22:"0x00000000000000000000000000000000000000000000",bytes23:"0x0000000000000000000000000000000000000000000000",bytes24:"0x000000000000000000000000000000000000000000000000",bytes25:"0x00000000000000000000000000000000000000000000000000",bytes26:"0x0000000000000000000000000000000000000000000000000000",bytes27:"0x000000000000000000000000000000000000000000000000000000",bytes28:"0x00000000000000000000000000000000000000000000000000000000",bytes29:"0x0000000000000000000000000000000000000000000000000000000000",bytes30:"0x000000000000000000000000000000000000000000000000000000000000",bytes31:"0x00000000000000000000000000000000000000000000000000000000000000",bytes32:"0x0000000000000000000000000000000000000000000000000000000000000000",bool:!1,address:"0x0000000000000000000000000000000000000000"},A$4={uint8:1,uint16:2,uint24:3,uint32:4,uint40:5,uint48:6,uint56:7,uint64:8,uint72:9,uint80:10,uint88:11,uint96:12,uint104:13,uint112:14,uint120:15,uint128:16,uint136:17,uint144:18,uint152:19,uint160:20,uint168:21,uint176:22,uint184:23,uint192:24,uint200:25,uint208:26,uint216:27,uint224:28,uint232:29,uint240:30,uint248:31,uint256:32,int8:1,int16:2,int24:3,int32:4,int40:5,int48:6,int56:7,int64:8,int72:9,int80:10,int88:11,int96:12,int104:13,int112:14,int120:15,int128:16,int136:17,int144:18,int152:19,int160:20,int168:21,int176:22,int184:23,int192:24,int200:25,int208:26,int216:27,int224:28,int232:29,int240:30,int248:31,int256:32,bytes1:1,bytes2:2,bytes3:3,bytes4:4,bytes5:5,bytes6:6,bytes7:7,bytes8:8,bytes9:9,bytes10:10,bytes11:11,bytes12:12,bytes13:13,bytes14:14,bytes15:15,bytes16:16,bytes17:17,bytes18:18,bytes19:19,bytes20:20,bytes21:21,bytes22:22,bytes23:23,bytes24:24,bytes25:25,bytes26:26,bytes27:27,bytes28:28,bytes29:29,bytes30:30,bytes31:31,bytes32:32,bool:1,address:20},P$8={...a$4,...s$3};const version$3="0.9.3";let BaseError$1=class En extends Error{constructor(et,tt={}){const rt=tt.cause instanceof En?tt.cause.details:tt.cause?.message?tt.cause.message:tt.details,nt=tt.cause instanceof En&&tt.cause.docsPath||tt.docsPath,it=[et||"An error occurred.","",...tt.metaMessages?[...tt.metaMessages,""]:[],...nt?[`Docs: https://abitype.dev${nt}`]:[],...rt?[`Details: ${rt}`]:[],`Version: abitype@${version$3}`].join(` +`);super(it),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),tt.cause&&(this.cause=tt.cause),this.details=rt,this.docsPath=nt,this.metaMessages=tt.metaMessages,this.shortMessage=et}};function execTyped(_e,et){return _e.exec(et)?.groups}const bytesRegex$1=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,integerRegex$1=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,isTupleRegex=/^\(.+?\).*?$/,errorSignatureRegex=/^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function isErrorSignature(_e){return errorSignatureRegex.test(_e)}function execErrorSignature(_e){return execTyped(errorSignatureRegex,_e)}const eventSignatureRegex=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function isEventSignature(_e){return eventSignatureRegex.test(_e)}function execEventSignature(_e){return execTyped(eventSignatureRegex,_e)}const functionSignatureRegex=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;function isFunctionSignature(_e){return functionSignatureRegex.test(_e)}function execFunctionSignature(_e){return execTyped(functionSignatureRegex,_e)}const structSignatureRegex=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;function isStructSignature(_e){return structSignatureRegex.test(_e)}function execStructSignature(_e){return execTyped(structSignatureRegex,_e)}const constructorSignatureRegex=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;function isConstructorSignature(_e){return constructorSignatureRegex.test(_e)}function execConstructorSignature(_e){return execTyped(constructorSignatureRegex,_e)}const fallbackSignatureRegex=/^fallback\(\)$/;function isFallbackSignature(_e){return fallbackSignatureRegex.test(_e)}const receiveSignatureRegex=/^receive\(\) external payable$/;function isReceiveSignature(_e){return receiveSignatureRegex.test(_e)}const modifiers=new Set(["memory","indexed","storage","calldata"]),eventModifiers=new Set(["indexed"]),functionModifiers=new Set(["calldata","memory","storage"]);class UnknownTypeError extends BaseError$1{constructor({type:et}){super("Unknown type.",{metaMessages:[`Type "${et}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class UnknownSolidityTypeError extends BaseError$1{constructor({type:et}){super("Unknown type.",{metaMessages:[`Type "${et}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class InvalidAbiParametersError extends BaseError$1{constructor({params:et}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(et,null,2)})`,docsPath:"/api/human.html#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class InvalidParameterError extends BaseError$1{constructor({param:et}){super("Invalid ABI parameter.",{details:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class SolidityProtectedKeywordError extends BaseError$1{constructor({param:et,name:tt}){super("Invalid ABI parameter.",{details:et,metaMessages:[`"${tt}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class InvalidModifierError extends BaseError$1{constructor({param:et,type:tt,modifier:rt}){super("Invalid ABI parameter.",{details:et,metaMessages:[`Modifier "${rt}" not allowed${tt?` in "${tt}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class InvalidFunctionModifierError extends BaseError$1{constructor({param:et,type:tt,modifier:rt}){super("Invalid ABI parameter.",{details:et,metaMessages:[`Modifier "${rt}" not allowed${tt?` in "${tt}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${rt}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class InvalidAbiTypeParameterError extends BaseError$1{constructor({abiParameter:et}){super("Invalid ABI parameter.",{details:JSON.stringify(et,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class InvalidSignatureError extends BaseError$1{constructor({signature:et,type:tt}){super(`Invalid ${tt} signature.`,{details:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class UnknownSignatureError extends BaseError$1{constructor({signature:et}){super("Unknown signature.",{details:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class InvalidStructSignatureError extends BaseError$1{constructor({signature:et}){super("Invalid struct signature.",{details:et,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class CircularReferenceError extends BaseError$1{constructor({type:et}){super("Circular reference detected.",{metaMessages:[`Struct "${et}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class InvalidParenthesisError extends BaseError$1{constructor({current:et,depth:tt}){super("Unbalanced parentheses.",{metaMessages:[`"${et.trim()}" has too many ${tt>0?"opening":"closing"} parentheses.`],details:`Depth "${tt}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function getParameterCacheKey(_e,et){return et?`${et}:${_e}`:_e}const parameterCache=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function parseSignature(_e,et={}){if(isFunctionSignature(_e)){const tt=execFunctionSignature(_e);if(!tt)throw new InvalidSignatureError({signature:_e,type:"function"});const rt=splitParameters(tt.parameters),nt=[],it=rt.length;for(let st=0;st[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,abiParameterWithTupleRegex=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,dynamicIntegerRegex=/^u?int$/;function parseAbiParameter(_e,et){const tt=getParameterCacheKey(_e,et?.type);if(parameterCache.has(tt))return parameterCache.get(tt);const rt=isTupleRegex.test(_e),nt=execTyped(rt?abiParameterWithTupleRegex:abiParameterWithoutTupleRegex,_e);if(!nt)throw new InvalidParameterError({param:_e});if(nt.name&&isSolidityKeyword(nt.name))throw new SolidityProtectedKeywordError({param:_e,name:nt.name});const it=nt.name?{name:nt.name}:{},at=nt.modifier==="indexed"?{indexed:!0}:{},st=et?.structs??{};let lt,dt={};if(rt){lt="tuple";const pt=splitParameters(nt.type),mt=[],gt=pt.length;for(let vt=0;vt[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/;function resolveStructs(_e,et,tt=new Set){const rt=[],nt=_e.length;for(let it=0;itformatAbiParam(tt,{includeName:et})).join(et?", ":","):""}function formatAbiParam(_e,{includeName:et}){return _e.type.startsWith("tuple")?`(${formatAbiParams(_e.components,{includeName:et})})${_e.type.slice(5)}`:_e.type+(et&&_e.name?` ${_e.name}`:"")}function isHex(_e,{strict:et=!0}={}){return!_e||typeof _e!="string"?!1:et?/^0x[0-9a-fA-F]*$/.test(_e):_e.startsWith("0x")}function size$1(_e){return isHex(_e,{strict:!1})?Math.ceil((_e.length-2)/2):_e.length}const version$2="1.5.4",getContractAddress=_e=>_e,getUrl$1=_e=>_e,getVersion=()=>`viem@${version$2}`;class BaseError extends Error{constructor(et,tt={}){super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:getVersion()});const rt=tt.cause instanceof BaseError?tt.cause.details:tt.cause?.message?tt.cause.message:tt.details,nt=tt.cause instanceof BaseError&&tt.cause.docsPath||tt.docsPath;this.message=[et||"An error occurred.","",...tt.metaMessages?[...tt.metaMessages,""]:[],...nt?[`Docs: https://viem.sh${nt}.html${tt.docsSlug?`#${tt.docsSlug}`:""}`]:[],...rt?[`Details: ${rt}`]:[],`Version: ${this.version}`].join(` +`),tt.cause&&(this.cause=tt.cause),this.details=rt,this.docsPath=nt,this.metaMessages=tt.metaMessages,this.shortMessage=et}walk(et){return walk(this,et)}}function walk(_e,et){return et?.(_e)?_e:_e&&typeof _e=="object"&&"cause"in _e?walk(_e.cause,et):et?null:_e}class AbiConstructorNotFoundError extends BaseError{constructor({docsPath:et}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` +`),{docsPath:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class AbiConstructorParamsNotFoundError extends BaseError{constructor({docsPath:et}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` +`),{docsPath:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class AbiDecodingDataSizeTooSmallError extends BaseError{constructor({data:et,params:tt,size:rt}){super([`Data size of ${rt} bytes is too small for given parameters.`].join(` +`),{metaMessages:[`Params: (${formatAbiParams(tt,{includeName:!0})})`,`Data: ${et} (${rt} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=et,this.params=tt,this.size=rt}}class AbiDecodingZeroDataError extends BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class AbiEncodingArrayLengthMismatchError extends BaseError{constructor({expectedLength:et,givenLength:tt,type:rt}){super([`ABI encoding array length mismatch for type ${rt}.`,`Expected length: ${et}`,`Given length: ${tt}`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class AbiEncodingBytesSizeMismatchError extends BaseError{constructor({expectedSize:et,value:tt}){super(`Size of bytes "${tt}" (bytes${size$1(tt)}) does not match expected size (bytes${et}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class AbiEncodingLengthMismatchError extends BaseError{constructor({expectedLength:et,givenLength:tt}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${et}`,`Given length (values): ${tt}`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class AbiErrorSignatureNotFoundError extends BaseError{constructor(et,{docsPath:tt}){super([`Encoded error signature "${et}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${et}.`].join(` +`),{docsPath:tt}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=et}}class AbiEventSignatureEmptyTopicsError extends BaseError{constructor({docsPath:et}){super("Cannot extract event signature from empty topics.",{docsPath:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class AbiEventSignatureNotFoundError extends BaseError{constructor(et,{docsPath:tt}){super([`Encoded event signature "${et}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${et}.`].join(` +`),{docsPath:tt}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class AbiEventNotFoundError extends BaseError{constructor(et,{docsPath:tt}={}){super([`Event ${et?`"${et}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` +`),{docsPath:tt}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class AbiFunctionNotFoundError extends BaseError{constructor(et,{docsPath:tt}={}){super([`Function ${et?`"${et}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:tt}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class AbiFunctionOutputsNotFoundError extends BaseError{constructor(et,{docsPath:tt}){super([`Function "${et}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:tt}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class BytesSizeMismatchError extends BaseError{constructor({expectedSize:et,givenSize:tt}){super(`Expected bytes${et}, got bytes${tt}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class DecodeLogDataMismatch extends BaseError{constructor({abiItem:et,data:tt,params:rt,size:nt}){super([`Data size of ${nt} bytes is too small for non-indexed event parameters.`].join(` +`),{metaMessages:[`Params: (${formatAbiParams(rt,{includeName:!0})})`,`Data: ${tt} (${nt} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=et,this.data=tt,this.params=rt,this.size=nt}}class DecodeLogTopicsMismatch extends BaseError{constructor({abiItem:et,param:tt}){super([`Expected a topic for indexed event parameter${tt.name?` "${tt.name}"`:""} on event "${formatAbiItem(et,{includeName:!0})}".`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=et}}class InvalidAbiEncodingTypeError extends BaseError{constructor(et,{docsPath:tt}){super([`Type "${et}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:tt}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class InvalidAbiDecodingTypeError extends BaseError{constructor(et,{docsPath:tt}){super([`Type "${et}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:tt}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class InvalidArrayError extends BaseError{constructor(et){super([`Value "${et}" is not a valid array.`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class InvalidDefinitionTypeError extends BaseError{constructor(et){super([`"${et}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}class FilterTypeNotSupportedError extends BaseError{constructor(et){super(`Filter type "${et}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}class SliceOffsetOutOfBoundsError extends BaseError{constructor({offset:et,position:tt,size:rt}){super(`Slice ${tt==="start"?"starting":"ending"} at offset "${et}" is out-of-bounds (size: ${rt}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SliceOffsetOutOfBoundsError"})}}class SizeExceedsPaddingSizeError extends BaseError{constructor({size:et,targetSize:tt,type:rt}){super(`${rt.charAt(0).toUpperCase()}${rt.slice(1).toLowerCase()} size (${et}) exceeds padding size (${tt}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeExceedsPaddingSizeError"})}}function pad(_e,{dir:et,size:tt=32}={}){return typeof _e=="string"?padHex(_e,{dir:et,size:tt}):padBytes(_e,{dir:et,size:tt})}function padHex(_e,{dir:et,size:tt=32}={}){if(tt===null)return _e;const rt=_e.replace("0x","");if(rt.length>tt*2)throw new SizeExceedsPaddingSizeError({size:Math.ceil(rt.length/2),targetSize:tt,type:"hex"});return`0x${rt[et==="right"?"padEnd":"padStart"](tt*2,"0")}`}function padBytes(_e,{dir:et,size:tt=32}={}){if(tt===null)return _e;if(_e.length>tt)throw new SizeExceedsPaddingSizeError({size:_e.length,targetSize:tt,type:"bytes"});const rt=new Uint8Array(tt);for(let nt=0;ntet)throw new SizeOverflowError({givenSize:size$1(_e),maxSize:et})}function hexToBigInt(_e,et={}){const{signed:tt}=et;et.size&&assertSize(_e,{size:et.size});const rt=BigInt(_e);if(!tt)return rt;const nt=(_e.length-2)/2,it=(1n<et.toString(16).padStart(2,"0"));function toHex$1(_e,et={}){return typeof _e=="number"||typeof _e=="bigint"?numberToHex(_e,et):typeof _e=="string"?stringToHex(_e,et):typeof _e=="boolean"?boolToHex(_e,et):bytesToHex$1(_e,et)}function boolToHex(_e,et={}){const tt=`0x${Number(_e)}`;return typeof et.size=="number"?(assertSize(tt,{size:et.size}),pad(tt,{size:et.size})):tt}function bytesToHex$1(_e,et={}){let tt="";for(let nt=0;nt<_e.length;nt++)tt+=hexes$1[_e[nt]];const rt=`0x${tt}`;return typeof et.size=="number"?(assertSize(rt,{size:et.size}),pad(rt,{dir:"right",size:et.size})):rt}function numberToHex(_e,et={}){const{signed:tt,size:rt}=et,nt=BigInt(_e);let it;rt?tt?it=(1n<it||ntrt.trim().split(" "))?.map(rt=>({type:rt[0],name:rt[1]==="indexed"?rt[2]:rt[1],...rt[1]==="indexed"?{indexed:!0}:{}}))}function number$2(_e){if(!Number.isSafeInteger(_e)||_e<0)throw new Error(`Wrong positive integer: ${_e}`)}function bool$1(_e){if(typeof _e!="boolean")throw new Error(`Expected boolean, not ${_e}`)}function bytes$1(_e,...et){if(!(_e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(et.length>0&&!et.includes(_e.length))throw new TypeError(`Expected Uint8Array of length ${et}, not of length=${_e.length}`)}function hash$2(_e){if(typeof _e!="function"||typeof _e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");number$2(_e.outputLen),number$2(_e.blockLen)}function exists$1(_e,et=!0){if(_e.destroyed)throw new Error("Hash instance has been destroyed");if(et&&_e.finished)throw new Error("Hash#digest() has already been called")}function output$1(_e,et){bytes$1(_e);const tt=et.outputLen;if(_e.length>_32n&U32_MASK64)}:{h:Number(_e>>_32n&U32_MASK64)|0,l:Number(_e&U32_MASK64)|0}}function split(_e,et=!1){let tt=new Uint32Array(_e.length),rt=new Uint32Array(_e.length);for(let nt=0;nt<_e.length;nt++){const{h:it,l:at}=fromBig(_e[nt],et);[tt[nt],rt[nt]]=[it,at]}return[tt,rt]}const toBig=(_e,et)=>BigInt(_e>>>0)<<_32n|BigInt(et>>>0),shrSH=(_e,et,tt)=>_e>>>tt,shrSL=(_e,et,tt)=>_e<<32-tt|et>>>tt,rotrSH=(_e,et,tt)=>_e>>>tt|et<<32-tt,rotrSL=(_e,et,tt)=>_e<<32-tt|et>>>tt,rotrBH=(_e,et,tt)=>_e<<64-tt|et>>>tt-32,rotrBL=(_e,et,tt)=>_e>>>tt-32|et<<64-tt,rotr32H=(_e,et)=>et,rotr32L=(_e,et)=>_e,rotlSH=(_e,et,tt)=>_e<>>32-tt,rotlSL=(_e,et,tt)=>et<>>32-tt,rotlBH=(_e,et,tt)=>et<>>64-tt,rotlBL=(_e,et,tt)=>_e<>>64-tt;function add(_e,et,tt,rt){const nt=(et>>>0)+(rt>>>0);return{h:_e+tt+(nt/2**32|0)|0,l:nt|0}}const add3L=(_e,et,tt)=>(_e>>>0)+(et>>>0)+(tt>>>0),add3H=(_e,et,tt,rt)=>et+tt+rt+(_e/2**32|0)|0,add4L=(_e,et,tt,rt)=>(_e>>>0)+(et>>>0)+(tt>>>0)+(rt>>>0),add4H=(_e,et,tt,rt,nt)=>et+tt+rt+nt+(_e/2**32|0)|0,add5L=(_e,et,tt,rt,nt)=>(_e>>>0)+(et>>>0)+(tt>>>0)+(rt>>>0)+(nt>>>0),add5H=(_e,et,tt,rt,nt,it)=>et+tt+rt+nt+it+(_e/2**32|0)|0,u64={fromBig,split,toBig,shrSH,shrSL,rotrSH,rotrSL,rotrBH,rotrBL,rotr32H,rotr32L,rotlSH,rotlSL,rotlBH,rotlBL,add,add3L,add3H,add4L,add4H,add5H,add5L};/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const u32=_e=>new Uint32Array(_e.buffer,_e.byteOffset,Math.floor(_e.byteLength/4)),isLE$1=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!isLE$1)throw new Error("Non little-endian hardware is not supported");Array.from({length:256},(_e,et)=>et.toString(16).padStart(2,"0"));function utf8ToBytes$2(_e){if(typeof _e!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof _e}`);return new TextEncoder().encode(_e)}function toBytes$1(_e){if(typeof _e=="string"&&(_e=utf8ToBytes$2(_e)),!(_e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof _e})`);return _e}let Hash$1=class{clone(){return this._cloneInto()}};function wrapConstructor$1(_e){const et=rt=>_e().update(toBytes$1(rt)).digest(),tt=_e();return et.outputLen=tt.outputLen,et.blockLen=tt.blockLen,et.create=()=>_e(),et}function wrapConstructorWithOpts(_e){const et=(rt,nt)=>_e(nt).update(toBytes$1(rt)).digest(),tt=_e({});return et.outputLen=tt.outputLen,et.blockLen=tt.blockLen,et.create=rt=>_e(rt),et}const[SHA3_PI,SHA3_ROTL,_SHA3_IOTA]=[[],[],[]],_0n$4=BigInt(0),_1n$5=BigInt(1),_2n$3=BigInt(2),_7n=BigInt(7),_256n=BigInt(256),_0x71n=BigInt(113);for(let _e=0,et=_1n$5,tt=1,rt=0;_e<24;_e++){[tt,rt]=[rt,(2*tt+3*rt)%5],SHA3_PI.push(2*(5*rt+tt)),SHA3_ROTL.push((_e+1)*(_e+2)/2%64);let nt=_0n$4;for(let it=0;it<7;it++)et=(et<<_1n$5^(et>>_7n)*_0x71n)%_256n,et&_2n$3&&(nt^=_1n$5<<(_1n$5<tt>32?u64.rotlBH(_e,et,tt):u64.rotlSH(_e,et,tt),rotlL=(_e,et,tt)=>tt>32?u64.rotlBL(_e,et,tt):u64.rotlSL(_e,et,tt);function keccakP(_e,et=24){const tt=new Uint32Array(10);for(let rt=24-et;rt<24;rt++){for(let at=0;at<10;at++)tt[at]=_e[at]^_e[at+10]^_e[at+20]^_e[at+30]^_e[at+40];for(let at=0;at<10;at+=2){const st=(at+8)%10,lt=(at+2)%10,dt=tt[lt],ht=tt[lt+1],pt=rotlH(dt,ht,1)^tt[st],mt=rotlL(dt,ht,1)^tt[st+1];for(let gt=0;gt<50;gt+=10)_e[at+gt]^=pt,_e[at+gt+1]^=mt}let nt=_e[2],it=_e[3];for(let at=0;at<24;at++){const st=SHA3_ROTL[at],lt=rotlH(nt,it,st),dt=rotlL(nt,it,st),ht=SHA3_PI[at];nt=_e[ht],it=_e[ht+1],_e[ht]=lt,_e[ht+1]=dt}for(let at=0;at<50;at+=10){for(let st=0;st<10;st++)tt[st]=_e[at+st];for(let st=0;st<10;st++)_e[at+st]^=~tt[(st+2)%10]&tt[(st+4)%10]}_e[0]^=SHA3_IOTA_H[rt],_e[1]^=SHA3_IOTA_L[rt]}tt.fill(0)}class Keccak extends Hash$1{constructor(et,tt,rt,nt=!1,it=24){if(super(),this.blockLen=et,this.suffix=tt,this.outputLen=rt,this.enableXOF=nt,this.rounds=it,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,assert$1.number(rt),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=u32(this.state)}keccak(){keccakP(this.state32,this.rounds),this.posOut=0,this.pos=0}update(et){assert$1.exists(this);const{blockLen:tt,state:rt}=this;et=toBytes$1(et);const nt=et.length;for(let it=0;it=rt&&this.keccak();const at=Math.min(rt-this.posOut,it-nt);et.set(tt.subarray(this.posOut,this.posOut+at),nt),this.posOut+=at,nt+=at}return et}xofInto(et){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(et)}xof(et){return assert$1.number(et),this.xofInto(new Uint8Array(et))}digestInto(et){if(assert$1.output(et,this),this.finished)throw new Error("digest() was already called");return this.writeInto(et),this.destroy(),et}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(et){const{blockLen:tt,suffix:rt,outputLen:nt,rounds:it,enableXOF:at}=this;return et||(et=new Keccak(tt,rt,nt,at,it)),et.state32.set(this.state32),et.pos=this.pos,et.posOut=this.posOut,et.finished=this.finished,et.rounds=it,et.suffix=rt,et.outputLen=nt,et.enableXOF=at,et.destroyed=this.destroyed,et}}const gen=(_e,et,tt)=>wrapConstructor$1(()=>new Keccak(et,_e,tt));gen(6,144,224/8);gen(6,136,256/8);gen(6,104,384/8);gen(6,72,512/8);gen(1,144,224/8);const keccak_256=gen(1,136,256/8);gen(1,104,384/8);gen(1,72,512/8);const genShake=(_e,et,tt)=>wrapConstructorWithOpts((rt={})=>new Keccak(et,_e,rt.dkLen===void 0?tt:rt.dkLen,!0));genShake(31,168,128/8);genShake(31,136,256/8);function keccak256(_e,et){const tt=et||"hex",rt=keccak_256(isHex(_e,{strict:!1})?toBytes$2(_e):_e);return tt==="bytes"?rt:toHex$1(rt)}const hash$1=_e=>keccak256(toBytes$2(_e));function hashFunction(_e){const et=extractFunctionName(_e),tt=extractFunctionParams(_e)||[];return hash$1(`${et}(${tt.map(({type:rt})=>rt).join(",")})`)}function hashAbiItem(_e){return hash$1(formatAbiItem(_e))}const getEventSelector=_e=>typeof _e=="string"?hashFunction(_e):hashAbiItem(_e);class InvalidAddressError extends BaseError{constructor({address:et}){super(`Address "${et}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}const addressRegex=/^0x[a-fA-F0-9]{40}$/;function isAddress(_e){return addressRegex.test(_e)}function concat(_e){return typeof _e[0]=="string"?concatHex(_e):concatBytes$2(_e)}function concatBytes$2(_e){let et=0;for(const nt of _e)et+=nt.length;const tt=new Uint8Array(et);let rt=0;for(const nt of _e)tt.set(nt,rt),rt+=nt.length;return tt}function concatHex(_e){return`0x${_e.reduce((et,tt)=>et+tt.replace("0x",""),"")}`}function slice$1(_e,et,tt,{strict:rt}={}){return isHex(_e,{strict:!1})?sliceHex(_e,et,tt,{strict:rt}):sliceBytes(_e,et,tt,{strict:rt})}function assertStartOffset(_e,et){if(typeof et=="number"&&et>0&&et>size$1(_e)-1)throw new SliceOffsetOutOfBoundsError({offset:et,position:"start",size:size$1(_e)})}function assertEndOffset(_e,et,tt){if(typeof et=="number"&&typeof tt=="number"&&size$1(_e)!==tt-et)throw new SliceOffsetOutOfBoundsError({offset:tt,position:"end",size:size$1(_e)})}function sliceBytes(_e,et,tt,{strict:rt}={}){assertStartOffset(_e,et);const nt=_e.slice(et,tt);return rt&&assertEndOffset(nt,et,tt),nt}function sliceHex(_e,et,tt,{strict:rt}={}){assertStartOffset(_e,et);const nt=`0x${_e.replace("0x","").slice((et??0)*2,(tt??_e.length)*2)}`;return rt&&assertEndOffset(nt,et,tt),nt}function encodeAbiParameters(_e,et){if(_e.length!==et.length)throw new AbiEncodingLengthMismatchError({expectedLength:_e.length,givenLength:et.length});const tt=prepareParams({params:_e,values:et}),rt=encodeParams(tt);return rt.length===0?"0x":rt}function prepareParams({params:_e,values:et}){const tt=[];for(let rt=0;rt<_e.length;rt++)tt.push(prepareParam({param:_e[rt],value:et[rt]}));return tt}function prepareParam({param:_e,value:et}){const tt=getArrayComponents(_e.type);if(tt){const[rt,nt]=tt;return encodeArray(et,{length:rt,param:{..._e,type:nt}})}if(_e.type==="tuple")return encodeTuple(et,{param:_e});if(_e.type==="address")return encodeAddress(et);if(_e.type==="bool")return encodeBool(et);if(_e.type.startsWith("uint")||_e.type.startsWith("int")){const rt=_e.type.startsWith("int");return encodeNumber(et,{signed:rt})}if(_e.type.startsWith("bytes"))return encodeBytes(et,{param:_e});if(_e.type==="string")return encodeString(et);throw new InvalidAbiEncodingTypeError(_e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function encodeParams(_e){let et=0;for(let it=0;it<_e.length;it++){const{dynamic:at,encoded:st}=_e[it];at?et+=32:et+=size$1(st)}const tt=[],rt=[];let nt=0;for(let it=0;it<_e.length;it++){const{dynamic:at,encoded:st}=_e[it];at?(tt.push(numberToHex(et+nt,{size:32})),rt.push(st),nt+=size$1(st)):tt.push(st)}return concat([...tt,...rt])}function encodeAddress(_e){if(!isAddress(_e))throw new InvalidAddressError({address:_e});return{dynamic:!1,encoded:padHex(_e.toLowerCase())}}function encodeArray(_e,{length:et,param:tt}){const rt=et===null;if(!Array.isArray(_e))throw new InvalidArrayError(_e);if(!rt&&_e.length!==et)throw new AbiEncodingArrayLengthMismatchError({expectedLength:et,givenLength:_e.length,type:`${tt.type}[${et}]`});let nt=!1;const it=[];for(let at=0;at<_e.length;at++){const st=prepareParam({param:tt,value:_e[at]});st.dynamic&&(nt=!0),it.push(st)}if(rt||nt){const at=encodeParams(it);if(rt){const st=numberToHex(it.length,{size:32});return{dynamic:!0,encoded:it.length>0?concat([st,at]):st}}if(nt)return{dynamic:!0,encoded:at}}return{dynamic:!1,encoded:concat(it.map(({encoded:at})=>at))}}function encodeBytes(_e,{param:et}){const[,tt]=et.type.split("bytes"),rt=size$1(_e);if(!tt){let nt=_e;return rt%32!==0&&(nt=padHex(nt,{dir:"right",size:Math.ceil((_e.length-2)/2/32)*32})),{dynamic:!0,encoded:concat([padHex(numberToHex(rt,{size:32})),nt])}}if(rt!==parseInt(tt))throw new AbiEncodingBytesSizeMismatchError({expectedSize:parseInt(tt),value:_e});return{dynamic:!1,encoded:padHex(_e,{dir:"right"})}}function encodeBool(_e){return{dynamic:!1,encoded:padHex(boolToHex(_e))}}function encodeNumber(_e,{signed:et}){return{dynamic:!1,encoded:numberToHex(_e,{size:32,signed:et})}}function encodeString(_e){const et=stringToHex(_e),tt=Math.ceil(size$1(et)/32),rt=[];for(let nt=0;ntnt))}}function getArrayComponents(_e){const et=_e.match(/^(.*)\[(\d+)?\]$/);return et?[et[2]?Number(et[2]):null,et[1]]:void 0}function getAbiItem({abi:_e,args:et=[],name:tt}){const rt=_e.filter(nt=>"name"in nt&&nt.name===tt);if(rt.length!==0){if(rt.length===1)return rt[0];for(const nt of rt){if(!("inputs"in nt))continue;if(!et||et.length===0){if(!nt.inputs||nt.inputs.length===0)return nt;continue}if(!nt.inputs||nt.inputs.length===0||nt.inputs.length!==et.length)continue;if(et.every((at,st)=>{const lt="inputs"in nt&&nt.inputs[st];return lt?isArgOfType(at,lt):!1}))return nt}return rt[0]}}function isArgOfType(_e,et){const tt=typeof _e,rt=et.type;switch(rt){case"address":return isAddress(_e);case"bool":return tt==="boolean";case"function":return tt==="string";case"string":return tt==="string";default:return rt==="tuple"&&"components"in et?Object.values(et.components).every((nt,it)=>isArgOfType(Object.values(_e)[it],nt)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(rt)?tt==="number"||tt==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(rt)?tt==="string"||_e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(rt)?Array.isArray(_e)&&_e.every(nt=>isArgOfType(nt,{...et,type:rt.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function encodeEventTopics({abi:_e,eventName:et,args:tt}){let rt=_e[0];if(et&&(rt=getAbiItem({abi:_e,args:tt,name:et}),!rt))throw new AbiEventNotFoundError(et,{docsPath:"/docs/contract/encodeEventTopics"});if(rt.type!=="event")throw new AbiEventNotFoundError(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const nt=formatAbiItem(rt),it=getEventSelector(nt);let at=[];if(tt&&"inputs"in rt){const st=rt.inputs?.filter(dt=>"indexed"in dt&&dt.indexed),lt=Array.isArray(tt)?tt:Object.values(tt).length>0?st?.map(dt=>tt[dt.name])??[]:[];lt.length>0&&(at=st?.map((dt,ht)=>Array.isArray(lt[ht])?lt[ht].map((pt,mt)=>encodeArg({param:dt,value:lt[ht][mt]})):lt[ht]?encodeArg({param:dt,value:lt[ht]}):null)??[])}return[it,...at]}function encodeArg({param:_e,value:et}){if(_e.type==="string"||_e.type==="bytes")return keccak256(toBytes$2(et));if(_e.type==="tuple"||_e.type.match(/^(.*)\[(\d+)?\]$/))throw new FilterTypeNotSupportedError(_e.type);return encodeAbiParameters([_e],[et])}function createFilterRequestScope(_e,{method:et}){const tt={};return _e.transport.type==="fallback"&&_e.transport.onResponse?.(({method:rt,response:nt,status:it,transport:at})=>{it==="success"&&et===rt&&(tt[nt]=at.request)}),rt=>tt[rt]||_e.request}async function createContractEventFilter(_e,{address:et,abi:tt,args:rt,eventName:nt,fromBlock:it,strict:at,toBlock:st}){const lt=createFilterRequestScope(_e,{method:"eth_newFilter"}),dt=nt?encodeEventTopics({abi:tt,args:rt,eventName:nt}):void 0,ht=await _e.request({method:"eth_newFilter",params:[{address:et,fromBlock:typeof it=="bigint"?numberToHex(it):it,toBlock:typeof st=="bigint"?numberToHex(st):st,topics:dt}]});return{abi:tt,args:rt,eventName:nt,id:ht,request:lt(ht),strict:at,type:"event"}}function parseAccount(_e){return typeof _e=="string"?{address:_e,type:"json-rpc"}:_e}const getFunctionSelector=_e=>slice$1(typeof _e=="string"?hashFunction(_e):hashAbiItem(_e),0,4);function encodeFunctionData({abi:_e,args:et,functionName:tt}){let rt=_e[0];if(tt&&(rt=getAbiItem({abi:_e,args:et,name:tt}),!rt))throw new AbiFunctionNotFoundError(tt,{docsPath:"/docs/contract/encodeFunctionData"});if(rt.type!=="function")throw new AbiFunctionNotFoundError(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const nt=formatAbiItem(rt),it=getFunctionSelector(nt),at="inputs"in rt&&rt.inputs?encodeAbiParameters(rt.inputs,et??[]):void 0;return concatHex([it,at??"0x"])}const panicReasons={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function checksumAddress(_e,et){const tt=et?`${et}${_e.toLowerCase()}`:_e.substring(2).toLowerCase(),rt=keccak256(stringToBytes(tt),"bytes"),nt=(et?tt.substring(`${et}0x`.length):tt).split("");for(let it=0;it<40;it+=2)rt[it>>1]>>4>=8&&nt[it]&&(nt[it]=nt[it].toUpperCase()),(rt[it>>1]&15)>=8&&nt[it+1]&&(nt[it+1]=nt[it+1].toUpperCase());return`0x${nt.join("")}`}function getAddress(_e,et){if(!isAddress(_e))throw new InvalidAddressError({address:_e});return checksumAddress(_e,et)}function decodeAbiParameters(_e,et){if(et==="0x"&&_e.length>0)throw new AbiDecodingZeroDataError;if(size$1(et)&&size$1(et)<32)throw new AbiDecodingDataSizeTooSmallError({data:et,params:_e,size:size$1(et)});return decodeParams({data:et,params:_e})}function decodeParams({data:_e,params:et}){const tt=[];let rt=0;for(let nt=0;nt=size$1(_e))throw new AbiDecodingDataSizeTooSmallError({data:_e,params:et,size:size$1(_e)});const it=et[nt],{consumed:at,value:st}=decodeParam({data:_e,param:it,position:rt});tt.push(st),rt+=at}return tt}function decodeParam({data:_e,param:et,position:tt}){const rt=getArrayComponents(et.type);if(rt){const[it,at]=rt;return decodeArray(_e,{length:it,param:{...et,type:at},position:tt})}if(et.type==="tuple")return decodeTuple(_e,{param:et,position:tt});if(et.type==="string")return decodeString(_e,{position:tt});if(et.type.startsWith("bytes"))return decodeBytes(_e,{param:et,position:tt});const nt=slice$1(_e,tt,tt+32,{strict:!0});if(et.type.startsWith("uint")||et.type.startsWith("int"))return decodeNumber(nt,{param:et});if(et.type==="address")return decodeAddress(nt);if(et.type==="bool")return decodeBool(nt);throw new InvalidAbiDecodingTypeError(et.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function decodeAddress(_e){return{consumed:32,value:checksumAddress(slice$1(_e,-20))}}function decodeArray(_e,{param:et,length:tt,position:rt}){if(!tt){const at=hexToNumber$1(slice$1(_e,rt,rt+32,{strict:!0})),st=hexToNumber$1(slice$1(_e,at,at+32,{strict:!0}));let lt=0;const dt=[];for(let ht=0;ht48?hexToBigInt(_e,{signed:tt}):hexToNumber$1(_e,{signed:tt})}}function decodeString(_e,{position:et}){const tt=hexToNumber$1(slice$1(_e,et,et+32,{strict:!0})),rt=hexToNumber$1(slice$1(_e,tt,tt+32,{strict:!0}));return rt===0?{consumed:32,value:""}:{consumed:32,value:hexToString(trim$1(slice$1(_e,tt+32,tt+32+rt,{strict:!0})))}}function decodeTuple(_e,{param:et,position:tt}){const rt=et.components.length===0||et.components.some(({name:at})=>!at),nt=rt?[]:{};let it=0;if(hasDynamicChild(et)){const at=hexToNumber$1(slice$1(_e,tt,tt+32,{strict:!0}));for(let st=0;stit.type==="error"&&tt===getFunctionSelector(formatAbiItem(it)));if(!nt)throw new AbiErrorSignatureNotFoundError(tt,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:nt,args:"inputs"in nt&&nt.inputs&&nt.inputs.length>0?decodeAbiParameters(nt.inputs,slice$1(et,4)):void 0,errorName:nt.name}}const stringify$2=(_e,et,tt)=>JSON.stringify(_e,(rt,nt)=>{const it=typeof nt=="bigint"?nt.toString():nt;return typeof et=="function"?et(rt,it):it},tt);function formatAbiItemWithArgs({abiItem:_e,args:et,includeFunctionName:tt=!0,includeName:rt=!1}){if("name"in _e&&"inputs"in _e&&_e.inputs)return`${tt?_e.name:""}(${_e.inputs.map((nt,it)=>`${rt&&nt.name?`${nt.name}: `:""}${typeof et[it]=="object"?stringify$2(et[it]):et[it]}`).join(", ")})`}const etherUnits={gwei:9,wei:18},gweiUnits={ether:-9,wei:9};function formatUnits(_e,et){let tt=_e.toString();const rt=tt.startsWith("-");rt&&(tt=tt.slice(1)),tt=tt.padStart(et,"0");let[nt,it]=[tt.slice(0,tt.length-et),tt.slice(tt.length-et)];return it=it.replace(/(0+)$/,""),`${rt?"-":""}${nt||"0"}${it?`.${it}`:""}`}function formatEther(_e,et="wei"){return formatUnits(_e,etherUnits[et])}function formatGwei(_e,et="wei"){return formatUnits(_e,gweiUnits[et])}function prettyPrint(_e){const et=Object.entries(_e).map(([rt,nt])=>nt===void 0||nt===!1?null:[rt,nt]).filter(Boolean),tt=et.reduce((rt,[nt])=>Math.max(rt,nt.length),0);return et.map(([rt,nt])=>` ${`${rt}:`.padEnd(tt+1)} ${nt}`).join(` +`)}class FeeConflictError extends BaseError{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class InvalidLegacyVError extends BaseError{constructor({v:et}){super(`Invalid \`v\` value "${et}". Expected 27 or 28.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidLegacyVError"})}}class InvalidSerializableTransactionError extends BaseError{constructor({transaction:et}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",prettyPrint(et),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class InvalidStorageKeySizeError extends BaseError{constructor({storageKey:et}){super(`Size for storage key "${et}" is invalid. Expected 32 bytes. Got ${Math.floor((et.length-2)/2)} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStorageKeySizeError"})}}class TransactionExecutionError extends BaseError{constructor(et,{account:tt,docsPath:rt,chain:nt,data:it,gas:at,gasPrice:st,maxFeePerGas:lt,maxPriorityFeePerGas:dt,nonce:ht,to:pt,value:mt}){const gt=prettyPrint({chain:nt&&`${nt?.name} (id: ${nt?.id})`,from:tt?.address,to:pt,value:typeof mt<"u"&&`${formatEther(mt)} ${nt?.nativeCurrency.symbol||"ETH"}`,data:it,gas:at,gasPrice:typeof st<"u"&&`${formatGwei(st)} gwei`,maxFeePerGas:typeof lt<"u"&&`${formatGwei(lt)} gwei`,maxPriorityFeePerGas:typeof dt<"u"&&`${formatGwei(dt)} gwei`,nonce:ht});super(et.shortMessage,{cause:et,docsPath:rt,metaMessages:[...et.metaMessages?[...et.metaMessages," "]:[],"Request Arguments:",gt].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=et}}class TransactionNotFoundError extends BaseError{constructor({blockHash:et,blockNumber:tt,blockTag:rt,hash:nt,index:it}){let at="Transaction";rt&&it!==void 0&&(at=`Transaction at block time "${rt}" at index "${it}"`),et&&it!==void 0&&(at=`Transaction at block hash "${et}" at index "${it}"`),tt&&it!==void 0&&(at=`Transaction at block number "${tt}" at index "${it}"`),nt&&(at=`Transaction with hash "${nt}"`),super(`${at} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class TransactionReceiptNotFoundError extends BaseError{constructor({hash:et}){super(`Transaction receipt with hash "${et}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class WaitForTransactionReceiptTimeoutError extends BaseError{constructor({hash:et}){super(`Timed out while waiting for transaction with hash "${et}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}class CallExecutionError extends BaseError{constructor(et,{account:tt,docsPath:rt,chain:nt,data:it,gas:at,gasPrice:st,maxFeePerGas:lt,maxPriorityFeePerGas:dt,nonce:ht,to:pt,value:mt}){const gt=tt?parseAccount(tt):void 0,vt=prettyPrint({from:gt?.address,to:pt,value:typeof mt<"u"&&`${formatEther(mt)} ${nt?.nativeCurrency.symbol||"ETH"}`,data:it,gas:at,gasPrice:typeof st<"u"&&`${formatGwei(st)} gwei`,maxFeePerGas:typeof lt<"u"&&`${formatGwei(lt)} gwei`,maxPriorityFeePerGas:typeof dt<"u"&&`${formatGwei(dt)} gwei`,nonce:ht});super(et.shortMessage,{cause:et,docsPath:rt,metaMessages:[...et.metaMessages?[...et.metaMessages," "]:[],"Raw Call Arguments:",vt].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=et}}class ContractFunctionExecutionError extends BaseError{constructor(et,{abi:tt,args:rt,contractAddress:nt,docsPath:it,functionName:at,sender:st}){const lt=getAbiItem({abi:tt,args:rt,name:at}),dt=lt?formatAbiItemWithArgs({abiItem:lt,args:rt,includeFunctionName:!1,includeName:!1}):void 0,ht=lt?formatAbiItem(lt,{includeName:!0}):void 0,pt=prettyPrint({address:nt&&getContractAddress(nt),function:ht,args:dt&&dt!=="()"&&`${[...Array(at?.length??0).keys()].map(()=>" ").join("")}${dt}`,sender:st});super(et.shortMessage||`An unknown error occurred while executing the contract function "${at}".`,{cause:et,docsPath:it,metaMessages:[...et.metaMessages?[...et.metaMessages," "]:[],"Contract Call:",pt].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=tt,this.args=rt,this.cause=et,this.contractAddress=nt,this.functionName=at,this.sender=st}}class ContractFunctionRevertedError extends BaseError{constructor({abi:et,data:tt,functionName:rt,message:nt}){let it,at,st,lt;if(tt&&tt!=="0x")try{at=decodeErrorResult({abi:et,data:tt});const{abiItem:ht,errorName:pt,args:mt}=at;if(pt==="Error")lt=mt[0];else if(pt==="Panic"){const[gt]=mt;lt=panicReasons[gt]}else{const gt=ht?formatAbiItem(ht,{includeName:!0}):void 0,vt=ht&&mt?formatAbiItemWithArgs({abiItem:ht,args:mt,includeFunctionName:!1,includeName:!1}):void 0;st=[gt?`Error: ${gt}`:"",vt&&vt!=="()"?` ${[...Array(pt?.length??0).keys()].map(()=>" ").join("")}${vt}`:""]}}catch(ht){it=ht}else nt&&(lt=nt);let dt;it instanceof AbiErrorSignatureNotFoundError&&(dt=it.signature,st=[`Unable to decode signature "${dt}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${dt}.`]),super(lt&<!=="execution reverted"||dt?[`The contract function "${rt}" reverted with the following ${dt?"signature":"reason"}:`,lt||dt].join(` +`):`The contract function "${rt}" reverted.`,{cause:it,metaMessages:st}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=at,this.reason=lt,this.signature=dt}}class ContractFunctionZeroDataError extends BaseError{constructor({functionName:et}){super(`The contract function "${et}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${et}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class RawContractError extends BaseError{constructor({data:et,message:tt}){super(tt||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=et}}const EXECUTION_REVERTED_ERROR_CODE=3;function getContractError(_e,{abi:et,address:tt,args:rt,docsPath:nt,functionName:it,sender:at}){const{code:st,data:lt,message:dt,shortMessage:ht}=_e instanceof RawContractError?_e:_e instanceof BaseError?_e.walk(mt=>"data"in mt)||_e.walk():{};let pt=_e;return _e instanceof AbiDecodingZeroDataError?pt=new ContractFunctionZeroDataError({functionName:it}):st===EXECUTION_REVERTED_ERROR_CODE&&(lt||dt||ht)&&(pt=new ContractFunctionRevertedError({abi:et,data:typeof lt=="object"?lt.data:lt,functionName:it,message:ht??dt})),new ContractFunctionExecutionError(pt,{abi:et,args:rt,contractAddress:tt,docsPath:nt,functionName:it,sender:at})}class AccountNotFoundError extends BaseError{constructor({docsPath:et}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join(` +`),{docsPath:et,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}class EstimateGasExecutionError extends BaseError{constructor(et,{account:tt,docsPath:rt,chain:nt,data:it,gas:at,gasPrice:st,maxFeePerGas:lt,maxPriorityFeePerGas:dt,nonce:ht,to:pt,value:mt}){const gt=prettyPrint({from:tt?.address,to:pt,value:typeof mt<"u"&&`${formatEther(mt)} ${nt?.nativeCurrency.symbol||"ETH"}`,data:it,gas:at,gasPrice:typeof st<"u"&&`${formatGwei(st)} gwei`,maxFeePerGas:typeof lt<"u"&&`${formatGwei(lt)} gwei`,maxPriorityFeePerGas:typeof dt<"u"&&`${formatGwei(dt)} gwei`,nonce:ht});super(et.shortMessage,{cause:et,docsPath:rt,metaMessages:[...et.metaMessages?[...et.metaMessages," "]:[],"Estimate Gas Arguments:",gt].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=et}}class ExecutionRevertedError extends BaseError{constructor({cause:et,message:tt}={}){const rt=tt?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${rt?`with reason: ${rt}`:"for an unknown reason"}.`,{cause:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(ExecutionRevertedError,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(ExecutionRevertedError,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class FeeCapTooHighError extends BaseError{constructor({cause:et,maxFeePerGas:tt}={}){super(`The fee cap (\`maxFeePerGas\`${tt?` = ${formatGwei(tt)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(FeeCapTooHighError,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class FeeCapTooLowError extends BaseError{constructor({cause:et,maxFeePerGas:tt}={}){super(`The fee cap (\`maxFeePerGas\`${tt?` = ${formatGwei(tt)}`:""} gwei) cannot be lower than the block base fee.`,{cause:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(FeeCapTooLowError,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class NonceTooHighError extends BaseError{constructor({cause:et,nonce:tt}={}){super(`Nonce provided for the transaction ${tt?`(${tt}) `:""}is higher than the next one expected.`,{cause:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(NonceTooHighError,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class NonceTooLowError extends BaseError{constructor({cause:et,nonce:tt}={}){super([`Nonce provided for the transaction ${tt?`(${tt}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` +`),{cause:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(NonceTooLowError,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class NonceMaxValueError extends BaseError{constructor({cause:et,nonce:tt}={}){super(`Nonce provided for the transaction ${tt?`(${tt}) `:""}exceeds the maximum allowed nonce.`,{cause:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(NonceMaxValueError,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class InsufficientFundsError extends BaseError{constructor({cause:et}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` +`),{cause:et,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(InsufficientFundsError,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class IntrinsicGasTooHighError extends BaseError{constructor({cause:et,gas:tt}={}){super(`The amount of gas ${tt?`(${tt}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(IntrinsicGasTooHighError,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class IntrinsicGasTooLowError extends BaseError{constructor({cause:et,gas:tt}={}){super(`The amount of gas ${tt?`(${tt}) `:""}provided for the transaction is too low.`,{cause:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(IntrinsicGasTooLowError,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class TransactionTypeNotSupportedError extends BaseError{constructor({cause:et}){super("The transaction type is not supported for this chain.",{cause:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(TransactionTypeNotSupportedError,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class TipAboveFeeCapError extends BaseError{constructor({cause:et,maxPriorityFeePerGas:tt,maxFeePerGas:rt}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${tt?` = ${formatGwei(tt)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${rt?` = ${formatGwei(rt)} gwei`:""}).`].join(` +`),{cause:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(TipAboveFeeCapError,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class UnknownNodeError extends BaseError{constructor({cause:et}){super(`An error occurred while executing: ${et?.message}`,{cause:et}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}class HttpRequestError extends BaseError{constructor({body:et,details:tt,headers:rt,status:nt,url:it}){super("HTTP request failed.",{details:tt,metaMessages:[nt&&`Status: ${nt}`,`URL: ${getUrl$1(it)}`,et&&`Request body: ${stringify$2(et)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=et,this.headers=rt,this.status=nt,this.url=it}}class WebSocketRequestError extends BaseError{constructor({body:et,details:tt,url:rt}){super("WebSocket request failed.",{details:tt,metaMessages:[`URL: ${getUrl$1(rt)}`,`Request body: ${stringify$2(et)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class RpcRequestError extends BaseError{constructor({body:et,error:tt,url:rt}){super("RPC Request failed.",{cause:tt,details:tt.message,metaMessages:[`URL: ${getUrl$1(rt)}`,`Request body: ${stringify$2(et)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=tt.code}}class TimeoutError extends BaseError{constructor({body:et,url:tt}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${getUrl$1(tt)}`,`Request body: ${stringify$2(et)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}const unknownErrorCode=-1;class RpcError extends BaseError{constructor(et,{code:tt,docsPath:rt,metaMessages:nt,shortMessage:it}){super(it,{cause:et,docsPath:rt,metaMessages:nt||et?.metaMessages}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=et.name,this.code=et instanceof RpcRequestError?et.code:tt??unknownErrorCode}}class ProviderRpcError extends RpcError{constructor(et,tt){super(et,tt),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=tt.data}}class ParseRpcError extends RpcError{constructor(et){super(et,{code:ParseRpcError.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(ParseRpcError,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class InvalidRequestRpcError extends RpcError{constructor(et){super(et,{code:InvalidRequestRpcError.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(InvalidRequestRpcError,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class MethodNotFoundRpcError extends RpcError{constructor(et){super(et,{code:MethodNotFoundRpcError.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(MethodNotFoundRpcError,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class InvalidParamsRpcError extends RpcError{constructor(et){super(et,{code:InvalidParamsRpcError.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` +`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(InvalidParamsRpcError,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class InternalRpcError extends RpcError{constructor(et){super(et,{code:InternalRpcError.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(InternalRpcError,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class InvalidInputRpcError extends RpcError{constructor(et){super(et,{code:InvalidInputRpcError.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` +`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(InvalidInputRpcError,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class ResourceNotFoundRpcError extends RpcError{constructor(et){super(et,{code:ResourceNotFoundRpcError.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(ResourceNotFoundRpcError,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class ResourceUnavailableRpcError extends RpcError{constructor(et){super(et,{code:ResourceUnavailableRpcError.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(ResourceUnavailableRpcError,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class TransactionRejectedRpcError extends RpcError{constructor(et){super(et,{code:TransactionRejectedRpcError.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(TransactionRejectedRpcError,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class MethodNotSupportedRpcError extends RpcError{constructor(et){super(et,{code:MethodNotSupportedRpcError.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(MethodNotSupportedRpcError,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class LimitExceededRpcError extends RpcError{constructor(et){super(et,{code:LimitExceededRpcError.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(LimitExceededRpcError,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class JsonRpcVersionUnsupportedError extends RpcError{constructor(et){super(et,{code:JsonRpcVersionUnsupportedError.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(JsonRpcVersionUnsupportedError,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class UserRejectedRequestError extends ProviderRpcError{constructor(et){super(et,{code:UserRejectedRequestError.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(UserRejectedRequestError,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class UnauthorizedProviderError extends ProviderRpcError{constructor(et){super(et,{code:UnauthorizedProviderError.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(UnauthorizedProviderError,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class UnsupportedProviderMethodError extends ProviderRpcError{constructor(et){super(et,{code:UnsupportedProviderMethodError.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(UnsupportedProviderMethodError,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class ProviderDisconnectedError extends ProviderRpcError{constructor(et){super(et,{code:ProviderDisconnectedError.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(ProviderDisconnectedError,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class ChainDisconnectedError extends ProviderRpcError{constructor(et){super(et,{code:ChainDisconnectedError.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(ChainDisconnectedError,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class SwitchChainError extends ProviderRpcError{constructor(et){super(et,{code:SwitchChainError.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(SwitchChainError,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class UnknownRpcError extends RpcError{constructor(et){super(et,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}function containsNodeError(_e){return _e instanceof TransactionRejectedRpcError||_e instanceof InvalidInputRpcError||_e instanceof RpcRequestError&&_e.code===ExecutionRevertedError.code}function getNodeError(_e,et){const tt=_e.details.toLowerCase();return FeeCapTooHighError.nodeMessage.test(tt)?new FeeCapTooHighError({cause:_e,maxFeePerGas:et?.maxFeePerGas}):FeeCapTooLowError.nodeMessage.test(tt)?new FeeCapTooLowError({cause:_e,maxFeePerGas:et?.maxFeePerGas}):NonceTooHighError.nodeMessage.test(tt)?new NonceTooHighError({cause:_e,nonce:et?.nonce}):NonceTooLowError.nodeMessage.test(tt)?new NonceTooLowError({cause:_e,nonce:et?.nonce}):NonceMaxValueError.nodeMessage.test(tt)?new NonceMaxValueError({cause:_e,nonce:et?.nonce}):InsufficientFundsError.nodeMessage.test(tt)?new InsufficientFundsError({cause:_e}):IntrinsicGasTooHighError.nodeMessage.test(tt)?new IntrinsicGasTooHighError({cause:_e,gas:et?.gas}):IntrinsicGasTooLowError.nodeMessage.test(tt)?new IntrinsicGasTooLowError({cause:_e,gas:et?.gas}):TransactionTypeNotSupportedError.nodeMessage.test(tt)?new TransactionTypeNotSupportedError({cause:_e}):TipAboveFeeCapError.nodeMessage.test(tt)?new TipAboveFeeCapError({cause:_e,maxFeePerGas:et?.maxFeePerGas,maxPriorityFeePerGas:et?.maxPriorityFeePerGas}):tt.match(ExecutionRevertedError.nodeMessage)||"code"in _e.cause&&_e.cause?.code===ExecutionRevertedError.code?new ExecutionRevertedError({cause:_e,message:_e.cause.details||_e.details}):new UnknownNodeError({cause:_e.cause.cause})}function getEstimateGasError(_e,{docsPath:et,...tt}){let rt=_e;return containsNodeError(_e)&&(rt=getNodeError(_e,tt)),new EstimateGasExecutionError(rt,{docsPath:et,...tt})}function extract(_e,{format:et}){return et?Object.keys(et({})).reduce((rt,nt)=>(_e?.hasOwnProperty(nt)&&(rt[nt]=_e[nt]),rt),{}):{}}function formatTransactionRequest(_e){return{..._e,gas:typeof _e.gas<"u"?numberToHex(_e.gas):void 0,gasPrice:typeof _e.gasPrice<"u"?numberToHex(_e.gasPrice):void 0,maxFeePerGas:typeof _e.maxFeePerGas<"u"?numberToHex(_e.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof _e.maxPriorityFeePerGas<"u"?numberToHex(_e.maxPriorityFeePerGas):void 0,nonce:typeof _e.nonce<"u"?numberToHex(_e.nonce):void 0,value:typeof _e.value<"u"?numberToHex(_e.value):void 0}}function assertRequest(_e){const{account:et,gasPrice:tt,maxFeePerGas:rt,maxPriorityFeePerGas:nt,to:it}=_e,at=et?parseAccount(et):void 0;if(at&&!isAddress(at.address))throw new InvalidAddressError({address:at.address});if(it&&!isAddress(it))throw new InvalidAddressError({address:it});if(typeof tt<"u"&&(typeof rt<"u"||typeof nt<"u"))throw new FeeConflictError;if(rt&&rt>2n**256n-1n)throw new FeeCapTooHighError({maxFeePerGas:rt});if(nt&&rt&&nt>rt)throw new TipAboveFeeCapError({maxFeePerGas:rt,maxPriorityFeePerGas:nt})}class BlockNotFoundError extends BaseError{constructor({blockHash:et,blockNumber:tt}){let rt="Block";et&&(rt=`Block at hash "${et}"`),tt&&(rt=`Block at number "${tt}"`),super(`${rt} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}const transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559"};function formatTransaction(_e){const et={..._e,blockHash:_e.blockHash?_e.blockHash:null,blockNumber:_e.blockNumber?BigInt(_e.blockNumber):null,chainId:_e.chainId?hexToNumber$1(_e.chainId):void 0,gas:_e.gas?BigInt(_e.gas):void 0,gasPrice:_e.gasPrice?BigInt(_e.gasPrice):void 0,maxFeePerGas:_e.maxFeePerGas?BigInt(_e.maxFeePerGas):void 0,maxPriorityFeePerGas:_e.maxPriorityFeePerGas?BigInt(_e.maxPriorityFeePerGas):void 0,nonce:_e.nonce?hexToNumber$1(_e.nonce):void 0,to:_e.to?_e.to:null,transactionIndex:_e.transactionIndex?Number(_e.transactionIndex):null,type:_e.type?transactionType[_e.type]:void 0,typeHex:_e.type?_e.type:void 0,value:_e.value?BigInt(_e.value):void 0,v:_e.v?BigInt(_e.v):void 0};return et.type==="legacy"&&(delete et.accessList,delete et.maxFeePerGas,delete et.maxPriorityFeePerGas),et.type==="eip2930"&&(delete et.maxFeePerGas,delete et.maxPriorityFeePerGas),et}function formatBlock(_e){const et=_e.transactions?.map(tt=>typeof tt=="string"?tt:formatTransaction(tt));return{..._e,baseFeePerGas:_e.baseFeePerGas?BigInt(_e.baseFeePerGas):null,difficulty:_e.difficulty?BigInt(_e.difficulty):void 0,gasLimit:_e.gasLimit?BigInt(_e.gasLimit):void 0,gasUsed:_e.gasUsed?BigInt(_e.gasUsed):void 0,hash:_e.hash?_e.hash:null,logsBloom:_e.logsBloom?_e.logsBloom:null,nonce:_e.nonce?_e.nonce:null,number:_e.number?BigInt(_e.number):null,size:_e.size?BigInt(_e.size):void 0,timestamp:_e.timestamp?BigInt(_e.timestamp):void 0,transactions:et,totalDifficulty:_e.totalDifficulty?BigInt(_e.totalDifficulty):null}}async function getBlock(_e,{blockHash:et,blockNumber:tt,blockTag:rt,includeTransactions:nt}={}){const it=rt??"latest",at=nt??!1,st=tt!==void 0?numberToHex(tt):void 0;let lt=null;if(et?lt=await _e.request({method:"eth_getBlockByHash",params:[et,at]}):lt=await _e.request({method:"eth_getBlockByNumber",params:[st||it,at]}),!lt)throw new BlockNotFoundError({blockHash:et,blockNumber:tt});return(_e.chain?.formatters?.block?.format||formatBlock)(lt)}async function getGasPrice(_e){const et=await _e.request({method:"eth_gasPrice"});return BigInt(et)}async function getTransactionCount(_e,{address:et,blockTag:tt="latest",blockNumber:rt}){const nt=await _e.request({method:"eth_getTransactionCount",params:[et,rt?numberToHex(rt):tt]});return hexToNumber$1(nt)}async function prepareRequest(_e,et){const{account:tt,chain:rt=_e.chain,gas:nt,gasPrice:it,maxFeePerGas:at,maxPriorityFeePerGas:st,nonce:lt}=et;if(!tt)throw new AccountNotFoundError;const dt=parseAccount(tt),ht=await getBlock(_e,{blockTag:"latest"}),pt={...et,from:dt.address};if(typeof lt>"u"&&(pt.nonce=await getTransactionCount(_e,{address:dt.address,blockTag:"pending"})),typeof ht.baseFeePerGas=="bigint"&&typeof it>"u"){let mt=1500000000n;if(typeof rt?.fees?.defaultPriorityFee<"u"&&(mt=typeof rt.fees.defaultPriorityFee=="bigint"?rt.fees.defaultPriorityFee:await rt.fees.defaultPriorityFee({block:ht,request:pt})),typeof at>"u")pt.maxPriorityFeePerGas=st??mt,pt.maxFeePerGas=ht.baseFeePerGas*120n/100n+pt.maxPriorityFeePerGas;else{if(typeof st>"u"&&at"u"){if(typeof at<"u"||typeof st<"u")throw new BaseError("Chain does not support EIP-1559 fees.");pt.gasPrice=await getGasPrice(_e)*120n/100n}return typeof nt>"u"&&(pt.gas=await estimateGas(_e,{...pt,account:{address:dt.address,type:"json-rpc"}})),assertRequest(pt),pt}async function estimateGas(_e,et){const tt=et.account??_e.account;if(!tt)throw new AccountNotFoundError({docsPath:"/docs/actions/public/estimateGas"});const rt=parseAccount(tt);try{const{accessList:nt,blockNumber:it,blockTag:at,data:st,gas:lt,gasPrice:dt,maxFeePerGas:ht,maxPriorityFeePerGas:pt,nonce:mt,to:gt,value:vt,...xt}=rt.type==="local"?await prepareRequest(_e,et):et,bt=(it?numberToHex(it):void 0)||at;assertRequest(et);const wt=_e.chain?.formatters?.transactionRequest?.format||formatTransactionRequest,Et=wt({...extract(xt,{format:wt}),from:rt.address,accessList:nt,data:st,gas:lt,gasPrice:dt,maxFeePerGas:ht,maxPriorityFeePerGas:pt,nonce:mt,to:gt,value:vt}),$t=await _e.request({method:"eth_estimateGas",params:bt?[Et,bt]:[Et]});return BigInt($t)}catch(nt){throw getEstimateGasError(nt,{...et,account:rt,chain:_e.chain})}}async function estimateContractGas(_e,{abi:et,address:tt,args:rt,functionName:nt,...it}){const at=encodeFunctionData({abi:et,args:rt,functionName:nt});try{return await estimateGas(_e,{data:at,to:tt,...it})}catch(st){const lt=it.account?parseAccount(it.account):void 0;throw getContractError(st,{abi:et,address:tt,args:rt,docsPath:"/docs/contract/estimateContractGas",functionName:nt,sender:lt?.address})}}const docsPath$2="/docs/contract/decodeFunctionResult";function decodeFunctionResult({abi:_e,args:et,functionName:tt,data:rt}){let nt=_e[0];if(tt&&(nt=getAbiItem({abi:_e,args:et,name:tt}),!nt))throw new AbiFunctionNotFoundError(tt,{docsPath:docsPath$2});if(nt.type!=="function")throw new AbiFunctionNotFoundError(void 0,{docsPath:docsPath$2});if(!nt.outputs)throw new AbiFunctionOutputsNotFoundError(nt.name,{docsPath:docsPath$2});const it=decodeAbiParameters(nt.outputs,rt);if(it&&it.length>1)return it;if(it&&it.length===1)return it[0]}const multicall3Abi=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],universalResolverErrors=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],universalResolverResolveAbi=[...universalResolverErrors,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],universalResolverReverseAbi=[...universalResolverErrors,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],addressResolverAbi=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],universalSignatureValidatorAbi=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}],aggregate3Signature="0x82ad56cb";class ChainDoesNotSupportContract extends BaseError{constructor({blockNumber:et,chain:tt,contract:rt}){super(`Chain "${tt.name}" does not support contract "${rt.name}".`,{metaMessages:["This could be due to any of the following:",...et&&rt.blockCreated&&rt.blockCreated>et?[`- The contract "${rt.name}" was not deployed until block ${rt.blockCreated} (current block ${et}).`]:[`- The chain does not have the contract "${rt.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class ChainMismatchError extends BaseError{constructor({chain:et,currentChainId:tt}){super(`The current chain of the wallet (id: ${tt}) does not match the target chain for the transaction (id: ${et.id} – ${et.name}).`,{metaMessages:[`Current Chain ID: ${tt}`,`Expected Chain ID: ${et.id} – ${et.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class ChainNotFoundError extends BaseError{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class ClientChainNotConfiguredError extends BaseError{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}class InvalidChainIdError extends BaseError{constructor({chainId:et}){super(`Chain ID "${et}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidChainIdError"})}}function assertCurrentChain({chain:_e,currentChainId:et}){if(!_e)throw new ChainNotFoundError;if(et!==_e.id)throw new ChainMismatchError({chain:_e,currentChainId:et})}function defineChain(_e,et={}){const{fees:tt=_e.fees,formatters:rt=_e.formatters,serializers:nt=_e.serializers}=et;return{..._e,fees:tt,formatters:rt,serializers:nt}}function getChainContractAddress({blockNumber:_e,chain:et,contract:tt}){const rt=et?.contracts?.[tt];if(!rt)throw new ChainDoesNotSupportContract({chain:et,contract:{name:tt}});if(_e&&rt.blockCreated&&rt.blockCreated>_e)throw new ChainDoesNotSupportContract({blockNumber:_e,chain:et,contract:{name:tt,blockCreated:rt.blockCreated}});return rt.address}function getCallError(_e,{docsPath:et,...tt}){let rt=_e;return containsNodeError(_e)&&(rt=getNodeError(_e,tt)),new CallExecutionError(rt,{docsPath:et,...tt})}const schedulerCache=new Map;function createBatchScheduler({fn:_e,id:et,shouldSplitBatch:tt,wait:rt=0}){const nt=async()=>{const dt=st();it();const ht=dt.map(({args:pt})=>pt);ht.length!==0&&_e(ht).then(pt=>{dt.forEach(({pendingPromise:mt},gt)=>mt.resolve?.([pt[gt],pt]))}).catch(pt=>{dt.forEach(({pendingPromise:mt})=>mt.reject?.(pt))})},it=()=>schedulerCache.delete(et),at=()=>st().map(({args:dt})=>dt),st=()=>schedulerCache.get(et)||[],lt=dt=>schedulerCache.set(et,[...st(),dt]);return{flush:it,async schedule(dt){const ht={},pt=new Promise((vt,xt)=>{ht.resolve=vt,ht.reject=xt});return tt?.([...at(),dt])&&nt(),st().length>0?(lt({args:dt,pendingPromise:ht}),pt):(lt({args:dt,pendingPromise:ht}),setTimeout(nt,rt),pt)}}}async function call$1(_e,et){const{account:tt,batch:rt=!!_e.batch?.multicall,blockNumber:nt,blockTag:it="latest",accessList:at,data:st,gas:lt,gasPrice:dt,maxFeePerGas:ht,maxPriorityFeePerGas:pt,nonce:mt,to:gt,value:vt,...xt}=et,yt=tt?parseAccount(tt):void 0;try{assertRequest(et);const wt=(nt?numberToHex(nt):void 0)||it,Et=_e.chain?.formatters?.transactionRequest?.format||formatTransactionRequest,$t=Et({...extract(xt,{format:Et}),from:yt?.address,accessList:at,data:st,gas:lt,gasPrice:dt,maxFeePerGas:ht,maxPriorityFeePerGas:pt,nonce:mt,to:gt,value:vt});if(rt&&shouldPerformMulticall({request:$t}))try{return await scheduleMulticall(_e,{...$t,blockNumber:nt,blockTag:it})}catch(kt){if(!(kt instanceof ClientChainNotConfiguredError)&&!(kt instanceof ChainDoesNotSupportContract))throw kt}const Pt=await _e.request({method:"eth_call",params:wt?[$t,wt]:[$t]});return Pt==="0x"?{data:void 0}:{data:Pt}}catch(bt){const wt=getRevertErrorData(bt),{offchainLookup:Et,offchainLookupSignature:$t}=await __vitePreload(()=>import("./ccip-1c16130d.js"),[]);if(wt?.slice(0,10)===$t&>)return{data:await Et(_e,{data:wt,to:gt})};throw getCallError(bt,{...et,account:yt,chain:_e.chain})}}function shouldPerformMulticall({request:_e}){const{data:et,to:tt,...rt}=_e;return!(!et||et.startsWith(aggregate3Signature)||!tt||Object.values(rt).filter(nt=>typeof nt<"u").length>0)}async function scheduleMulticall(_e,et){const{batchSize:tt=1024,wait:rt=0}=typeof _e.batch?.multicall=="object"?_e.batch.multicall:{},{blockNumber:nt,blockTag:it="latest",data:at,multicallAddress:st,to:lt}=et;let dt=st;if(!dt){if(!_e.chain)throw new ClientChainNotConfiguredError;dt=getChainContractAddress({blockNumber:nt,chain:_e.chain,contract:"multicall3"})}const pt=(nt?numberToHex(nt):void 0)||it,{schedule:mt}=createBatchScheduler({id:`${_e.uid}.${pt}`,wait:rt,shouldSplitBatch(xt){return xt.reduce((bt,{data:wt})=>bt+(wt.length-2),0)>tt*2},fn:async xt=>{const yt=xt.map(Et=>({allowFailure:!0,callData:Et.data,target:Et.to})),bt=encodeFunctionData({abi:multicall3Abi,args:[yt],functionName:"aggregate3"}),wt=await _e.request({method:"eth_call",params:[{data:bt,to:dt},pt]});return decodeFunctionResult({abi:multicall3Abi,args:[yt],functionName:"aggregate3",data:wt||"0x"})}}),[{returnData:gt,success:vt}]=await mt({data:at,to:lt});if(!vt)throw new RawContractError({data:gt});return gt==="0x"?{data:void 0}:{data:gt}}function getRevertErrorData(_e){if(!(_e instanceof BaseError))return;const et=_e.walk();return typeof et.data=="object"?et.data.data:et.data}async function readContract(_e,{abi:et,address:tt,args:rt,functionName:nt,...it}){const at=encodeFunctionData({abi:et,args:rt,functionName:nt});try{const{data:st}=await call$1(_e,{data:at,to:tt,...it});return decodeFunctionResult({abi:et,args:rt,functionName:nt,data:st||"0x"})}catch(st){throw getContractError(st,{abi:et,address:tt,args:rt,docsPath:"/docs/contract/readContract",functionName:nt})}}async function simulateContract(_e,{abi:et,address:tt,args:rt,dataSuffix:nt,functionName:it,...at}){const st=at.account?parseAccount(at.account):void 0,lt=encodeFunctionData({abi:et,args:rt,functionName:it});try{const{data:dt}=await call$1(_e,{batch:!1,data:`${lt}${nt?nt.replace("0x",""):""}`,to:tt,...at});return{result:decodeFunctionResult({abi:et,args:rt,functionName:it,data:dt||"0x"}),request:{abi:et,address:tt,args:rt,dataSuffix:nt,functionName:it,...at}}}catch(dt){throw getContractError(dt,{abi:et,address:tt,args:rt,docsPath:"/docs/contract/simulateContract",functionName:it,sender:st?.address})}}const listenersCache=new Map,cleanupCache=new Map;let callbackCount=0;function observe(_e,et,tt){const rt=++callbackCount,nt=()=>listenersCache.get(_e)||[],it=()=>{const ht=nt();listenersCache.set(_e,ht.filter(pt=>pt.id!==rt))},at=()=>{const ht=cleanupCache.get(_e);nt().length===1&&ht&&ht(),it()},st=nt();if(listenersCache.set(_e,[...st,{id:rt,fns:et}]),st&&st.length>0)return at;const lt={};for(const ht in et)lt[ht]=(...pt)=>{const mt=nt();mt.length!==0&&mt.forEach(gt=>gt.fns[ht]?.(...pt))};const dt=tt(lt);return typeof dt=="function"&&cleanupCache.set(_e,dt),at}async function wait$1(_e){return new Promise(et=>setTimeout(et,_e))}function poll(_e,{emitOnBegin:et,initialWaitTime:tt,interval:rt}){let nt=!0;const it=()=>nt=!1;return(async()=>{let st;et&&(st=await _e({unpoll:it}));const lt=await tt?.(st)??rt;await wait$1(lt);const dt=async()=>{nt&&(await _e({unpoll:it}),await wait$1(rt),dt())};dt()})(),it}const promiseCache=new Map,responseCache=new Map;function getCache(_e){const et=(nt,it)=>({clear:()=>it.delete(nt),get:()=>it.get(nt),set:at=>it.set(nt,at)}),tt=et(_e,promiseCache),rt=et(_e,responseCache);return{clear:()=>{tt.clear(),rt.clear()},promise:tt,response:rt}}async function withCache(_e,{cacheKey:et,cacheTime:tt=1/0}){const rt=getCache(et),nt=rt.response.get();if(nt&&tt>0&&new Date().getTime()-nt.created.getTime()`blockNumber.${_e}`;async function getBlockNumber(_e,{cacheTime:et=_e.cacheTime,maxAge:tt}={}){const rt=await withCache(()=>_e.request({method:"eth_blockNumber"}),{cacheKey:cacheKey(_e.uid),cacheTime:tt??et});return BigInt(rt)}const docsPath$1="/docs/contract/decodeEventLog";function decodeEventLog({abi:_e,data:et,strict:tt,topics:rt}){const nt=tt??!0,[it,...at]=rt;if(!it)throw new AbiEventSignatureEmptyTopicsError({docsPath:docsPath$1});const st=_e.find(vt=>vt.type==="event"&&it===getEventSelector(formatAbiItem(vt)));if(!(st&&"name"in st)||st.type!=="event")throw new AbiEventSignatureNotFoundError(it,{docsPath:docsPath$1});const{name:lt,inputs:dt}=st,ht=dt?.some(vt=>!("name"in vt&&vt.name));let pt=ht?[]:{};const mt=dt.filter(vt=>"indexed"in vt&&vt.indexed);if(at.length>0)for(let vt=0;vt!("indexed"in vt&&vt.indexed));if(gt.length>0){if(et&&et!=="0x")try{const vt=decodeAbiParameters(gt,et);if(vt)if(ht)pt=[...pt,...vt];else for(let xt=0;xt0?pt:void 0}}function decodeTopic({param:_e,value:et}){return _e.type==="string"||_e.type==="bytes"||_e.type==="tuple"||_e.type.match(/^(.*)\[(\d+)?\]$/)?et:(decodeAbiParameters([_e],et)||[])[0]}function formatLog(_e,{args:et,eventName:tt}={}){return{..._e,blockHash:_e.blockHash?_e.blockHash:null,blockNumber:_e.blockNumber?BigInt(_e.blockNumber):null,logIndex:_e.logIndex?Number(_e.logIndex):null,transactionHash:_e.transactionHash?_e.transactionHash:null,transactionIndex:_e.transactionIndex?Number(_e.transactionIndex):null,...tt?{args:et,eventName:tt}:{}}}async function getFilterChanges(_e,{filter:et}){const tt="strict"in et&&et.strict;return(await et.request({method:"eth_getFilterChanges",params:[et.id]})).map(nt=>{if(typeof nt=="string")return nt;try{const{eventName:it,args:at}="abi"in et&&et.abi?decodeEventLog({abi:et.abi,data:nt.data,topics:nt.topics,strict:tt}):{eventName:void 0,args:void 0};return formatLog(nt,{args:at,eventName:it})}catch(it){let at,st;if(it instanceof DecodeLogDataMismatch||it instanceof DecodeLogTopicsMismatch){if("strict"in et&&et.strict)return;at=it.abiItem.name,st=it.abiItem.inputs?.some(lt=>!("name"in lt&<.name))}return formatLog(nt,{args:st?[]:{},eventName:at})}}).filter(Boolean)}async function getLogs(_e,{address:et,blockHash:tt,fromBlock:rt,toBlock:nt,event:it,events:at,args:st,strict:lt}={}){const dt=lt??!1,ht=at??(it?[it]:void 0);let pt=[];ht&&(pt=[ht.flatMap(gt=>encodeEventTopics({abi:[gt],eventName:gt.name,args:st}))],it&&(pt=pt[0]));let mt;return tt?mt=await _e.request({method:"eth_getLogs",params:[{address:et,topics:pt,blockHash:tt}]}):mt=await _e.request({method:"eth_getLogs",params:[{address:et,topics:pt,fromBlock:typeof rt=="bigint"?numberToHex(rt):rt,toBlock:typeof nt=="bigint"?numberToHex(nt):nt}]}),mt.map(gt=>{try{const{eventName:vt,args:xt}=ht?decodeEventLog({abi:ht,data:gt.data,topics:gt.topics,strict:dt}):{eventName:void 0,args:void 0};return formatLog(gt,{args:xt,eventName:vt})}catch(vt){let xt,yt;if(vt instanceof DecodeLogDataMismatch||vt instanceof DecodeLogTopicsMismatch){if(dt)return;xt=vt.abiItem.name,yt=vt.abiItem.inputs?.some(bt=>!("name"in bt&&bt.name))}return formatLog(gt,{args:yt?[]:{},eventName:xt})}}).filter(Boolean)}async function uninstallFilter(_e,{filter:et}){return et.request({method:"eth_uninstallFilter",params:[et.id]})}function watchContractEvent(_e,{abi:et,address:tt,args:rt,batch:nt=!0,eventName:it,onError:at,onLogs:st,poll:lt,pollingInterval:dt=_e.pollingInterval,strict:ht}){return(typeof lt<"u"?lt:_e.transport.type!=="webSocket")?(()=>{const vt=stringify$2(["watchContractEvent",tt,rt,nt,_e.uid,it,dt]),xt=ht??!1;return observe(vt,{onLogs:st,onError:at},yt=>{let bt,wt,Et=!1;const $t=poll(async()=>{if(!Et){try{wt=await createContractEventFilter(_e,{abi:et,address:tt,args:rt,eventName:it,strict:xt})}catch{}Et=!0;return}try{let Pt;if(wt)Pt=await getFilterChanges(_e,{filter:wt});else{const kt=await getBlockNumber(_e);bt&&bt!==kt?Pt=await getLogs(_e,{address:tt,args:rt,fromBlock:bt+1n,toBlock:kt,event:getAbiItem({abi:et,name:it})}):Pt=[],bt=kt}if(Pt.length===0)return;nt?yt.onLogs(Pt):Pt.forEach(kt=>yt.onLogs([kt]))}catch(Pt){wt&&Pt instanceof InvalidInputRpcError&&(Et=!1),yt.onError?.(Pt)}},{emitOnBegin:!0,interval:dt});return async()=>{wt&&await uninstallFilter(_e,{filter:wt}),$t()}})})():(()=>{let vt=!0,xt=()=>vt=!1;return(async()=>{try{const yt=it?encodeEventTopics({abi:et,eventName:it,args:rt}):[],{unsubscribe:bt}=await _e.transport.subscribe({params:["logs",{address:tt,topics:yt}],onData(wt){if(!vt)return;const Et=wt.result;try{const{eventName:$t,args:Pt}=decodeEventLog({abi:et,data:Et.data,topics:Et.topics,strict:ht}),kt=formatLog(Et,{args:Pt,eventName:$t});st([kt])}catch($t){let Pt,kt;if($t instanceof DecodeLogDataMismatch||$t instanceof DecodeLogTopicsMismatch){if(ht)return;Pt=$t.abiItem.name,kt=$t.abiItem.inputs?.some(jt=>!("name"in jt&&jt.name))}const Lt=formatLog(Et,{args:kt?[]:{},eventName:Pt});st([Lt])}},onError(wt){at?.(wt)}});xt=bt,vt||xt()}catch(yt){at?.(yt)}})(),xt})()}function getTransactionError(_e,{docsPath:et,...tt}){let rt=_e;return containsNodeError(_e)&&(rt=getNodeError(_e,tt)),new TransactionExecutionError(rt,{docsPath:et,...tt})}async function getChainId(_e){const et=await _e.request({method:"eth_chainId"});return hexToNumber$1(et)}async function sendTransaction(_e,et){const{account:tt=_e.account,chain:rt=_e.chain,accessList:nt,data:it,gas:at,gasPrice:st,maxFeePerGas:lt,maxPriorityFeePerGas:dt,nonce:ht,to:pt,value:mt,...gt}=et;if(!tt)throw new AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});const vt=parseAccount(tt);try{assertRequest(et);let xt;if(rt!==null&&(xt=await getChainId(_e),assertCurrentChain({currentChainId:xt,chain:rt})),vt.type==="local"){const wt=await prepareRequest(_e,{account:vt,accessList:nt,chain:rt,data:it,gas:at,gasPrice:st,maxFeePerGas:lt,maxPriorityFeePerGas:dt,nonce:ht,to:pt,value:mt,...gt});xt||(xt=await getChainId(_e));const Et=rt?.serializers?.transaction,$t=await vt.signTransaction({...wt,chainId:xt},{serializer:Et});return await _e.request({method:"eth_sendRawTransaction",params:[$t]})}const yt=rt?.formatters?.transactionRequest?.format||formatTransactionRequest,bt=yt({...extract(gt,{format:yt}),accessList:nt,data:it,from:vt.address,gas:at,gasPrice:st,maxFeePerGas:lt,maxPriorityFeePerGas:dt,nonce:ht,to:pt,value:mt});return await _e.request({method:"eth_sendTransaction",params:[bt]})}catch(xt){throw getTransactionError(xt,{...et,account:vt,chain:et.chain||void 0})}}async function writeContract(_e,{abi:et,address:tt,args:rt,dataSuffix:nt,functionName:it,...at}){const st=encodeFunctionData({abi:et,args:rt,functionName:it});return await sendTransaction(_e,{data:`${st}${nt?nt.replace("0x",""):""}`,to:tt,...at})}function getContract({abi:_e,address:et,publicClient:tt,walletClient:rt}){const nt=tt!=null,it=rt!=null,at={};let st=!1,lt=!1,dt=!1;for(const ht of _e)if(ht.type==="function"?ht.stateMutability==="view"||ht.stateMutability==="pure"?st=!0:lt=!0:ht.type==="event"&&(dt=!0),st&<&&dt)break;return nt&&(st&&(at.read=new Proxy({},{get(ht,pt){return(...mt)=>{const{args:gt,options:vt}=getFunctionParameters(mt);return readContract(tt,{abi:_e,address:et,functionName:pt,args:gt,...vt})}}})),lt&&(at.simulate=new Proxy({},{get(ht,pt){return(...mt)=>{const{args:gt,options:vt}=getFunctionParameters(mt);return simulateContract(tt,{abi:_e,address:et,functionName:pt,args:gt,...vt})}}})),dt&&(at.createEventFilter=new Proxy({},{get(ht,pt){return(...mt)=>{const gt=_e.find(yt=>yt.type==="event"&&yt.name===pt),{args:vt,options:xt}=getEventParameters(mt,gt);return createContractEventFilter(tt,{abi:_e,address:et,eventName:pt,args:vt,...xt})}}}),at.watchEvent=new Proxy({},{get(ht,pt){return(...mt)=>{const gt=_e.find(yt=>yt.type==="event"&&yt.name===pt),{args:vt,options:xt}=getEventParameters(mt,gt);return watchContractEvent(tt,{abi:_e,address:et,eventName:pt,args:vt,...xt})}}}))),it&<&&(at.write=new Proxy({},{get(ht,pt){return(...mt)=>{const{args:gt,options:vt}=getFunctionParameters(mt);return writeContract(rt,{abi:_e,address:et,functionName:pt,args:gt,...vt})}}})),(nt||it)&<&&(at.estimateGas=new Proxy({},{get(ht,pt){return(...mt)=>{const{args:gt,options:vt}=getFunctionParameters(mt);return estimateContractGas(tt??rt,{abi:_e,address:et,functionName:pt,args:gt,...vt,account:vt.account??rt.account})}}})),at.address=et,at.abi=_e,at}function getFunctionParameters(_e){const et=_e.length&&Array.isArray(_e[0]),tt=et?_e[0]:[],rt=(et?_e[1]:_e[0])??{};return{args:tt,options:rt}}function getEventParameters(_e,et){let tt=!1;Array.isArray(_e[0])?tt=!0:_e.length===1?tt=et.inputs.some(it=>it.indexed):_e.length===2&&(tt=!0);const rt=tt?_e[0]:void 0,nt=(tt?_e[1]:_e[0])??{};return{args:rt,options:nt}}async function addChain(_e,{chain:et}){const{id:tt,name:rt,nativeCurrency:nt,rpcUrls:it,blockExplorers:at}=et;await _e.request({method:"wallet_addEthereumChain",params:[{chainId:numberToHex(tt),chainName:rt,nativeCurrency:nt,rpcUrls:it.default.http,blockExplorerUrls:at?Object.values(at).map(({url:st})=>st):void 0}]})}function publicKeyToAddress(_e){const et=keccak256(`0x${_e.substring(4)}`).substring(26);return checksumAddress(`0x${et}`)}const size=256;let index$1=size,buffer$1;function uid(_e=11){if(!buffer$1||index$1+_e>size*2){buffer$1="",index$1=0;for(let et=0;et{const bt=yt(xt);for(const Et in gt)delete bt[Et];const wt={...xt,...bt};return Object.assign(wt,{extend:vt(wt)})}}return Object.assign(gt,{extend:vt(gt)})}function withRetry(_e,{delay:et=100,retryCount:tt=2,shouldRetry:rt=()=>!0}={}){return new Promise((nt,it)=>{const at=async({count:st=0}={})=>{const lt=async({error:dt})=>{const ht=typeof et=="function"?et({count:st,error:dt}):et;ht&&await wait$1(ht),at({count:st+1})};try{const dt=await _e();nt(dt)}catch(dt){if(st"code"in _e?_e.code!==-1&&_e.code!==-32004&&_e.code!==-32005&&_e.code!==-32042&&_e.code!==-32603:_e instanceof HttpRequestError&&_e.status?_e.status!==403&&_e.status!==408&&_e.status!==413&&_e.status!==429&&_e.status!==500&&_e.status!==502&&_e.status!==503&&_e.status!==504:!1;function buildRequest(_e,{retryDelay:et=150,retryCount:tt=3}={}){return async rt=>withRetry(async()=>{try{return await _e(rt)}catch(nt){const it=nt;switch(it.code){case ParseRpcError.code:throw new ParseRpcError(it);case InvalidRequestRpcError.code:throw new InvalidRequestRpcError(it);case MethodNotFoundRpcError.code:throw new MethodNotFoundRpcError(it);case InvalidParamsRpcError.code:throw new InvalidParamsRpcError(it);case InternalRpcError.code:throw new InternalRpcError(it);case InvalidInputRpcError.code:throw new InvalidInputRpcError(it);case ResourceNotFoundRpcError.code:throw new ResourceNotFoundRpcError(it);case ResourceUnavailableRpcError.code:throw new ResourceUnavailableRpcError(it);case TransactionRejectedRpcError.code:throw new TransactionRejectedRpcError(it);case MethodNotSupportedRpcError.code:throw new MethodNotSupportedRpcError(it);case LimitExceededRpcError.code:throw new LimitExceededRpcError(it);case JsonRpcVersionUnsupportedError.code:throw new JsonRpcVersionUnsupportedError(it);case UserRejectedRequestError.code:throw new UserRejectedRequestError(it);case UnauthorizedProviderError.code:throw new UnauthorizedProviderError(it);case UnsupportedProviderMethodError.code:throw new UnsupportedProviderMethodError(it);case ProviderDisconnectedError.code:throw new ProviderDisconnectedError(it);case ChainDisconnectedError.code:throw new ChainDisconnectedError(it);case SwitchChainError.code:throw new SwitchChainError(it);default:throw nt instanceof BaseError?nt:new UnknownRpcError(it)}}},{delay:({count:nt,error:it})=>{if(it&&it instanceof HttpRequestError){const at=it?.headers?.get("Retry-After");if(at?.match(/\d/))return parseInt(at)*1e3}return~~(1<!isDeterministicError(nt)})}function createTransport({key:_e,name:et,request:tt,retryCount:rt=3,retryDelay:nt=150,timeout:it,type:at},st){return{config:{key:_e,name:et,request:tt,retryCount:rt,retryDelay:nt,timeout:it,type:at},request:buildRequest(tt,{retryCount:rt,retryDelay:nt}),value:st}}function fallback(_e,et={}){const{key:tt="fallback",name:rt="Fallback",rank:nt=!1,retryCount:it,retryDelay:at}=et;return({chain:st,pollingInterval:lt=4e3,timeout:dt})=>{let ht=_e,pt=()=>{};const mt=createTransport({key:tt,name:rt,async request({method:gt,params:vt}){const xt=async(yt=0)=>{const bt=ht[yt]({chain:st,retryCount:0,timeout:dt});try{const wt=await bt.request({method:gt,params:vt});return pt({method:gt,params:vt,response:wt,transport:bt,status:"success"}),wt}catch(wt){if(pt({error:wt,method:gt,params:vt,transport:bt,status:"error"}),isDeterministicError(wt)||yt===ht.length-1)throw wt;return xt(yt+1)}};return xt()},retryCount:it,retryDelay:at,type:"fallback"},{onResponse:gt=>pt=gt,transports:ht.map(gt=>gt({chain:st,retryCount:0}))});if(nt){const gt=typeof nt=="object"?nt:{};rankTransports({chain:st,interval:gt.interval??lt,onTransports:vt=>ht=vt,sampleCount:gt.sampleCount,timeout:gt.timeout,transports:ht,weights:gt.weights})}return mt}}function rankTransports({chain:_e,interval:et=4e3,onTransports:tt,sampleCount:rt=10,timeout:nt=1e3,transports:it,weights:at={}}){const{stability:st=.7,latency:lt=.3}=at,dt=[],ht=async()=>{const pt=await Promise.all(it.map(async vt=>{const xt=vt({chain:_e,retryCount:0,timeout:nt}),yt=Date.now();let bt,wt;try{await xt.request({method:"net_listening"}),wt=1}catch{wt=0}finally{bt=Date.now()}return{latency:bt-yt,success:wt}}));dt.push(pt),dt.length>rt&&dt.shift();const mt=Math.max(...dt.map(vt=>Math.max(...vt.map(({latency:xt})=>xt)))),gt=it.map((vt,xt)=>{const yt=dt.map(Pt=>Pt[xt].latency),wt=1-yt.reduce((Pt,kt)=>Pt+kt,0)/yt.length/mt,Et=dt.map(Pt=>Pt[xt].success),$t=Et.reduce((Pt,kt)=>Pt+kt,0)/Et.length;return $t===0?[0,xt]:[lt*wt+st*$t,xt]}).sort((vt,xt)=>xt[0]-vt[0]);tt(gt.map(([,vt])=>it[vt])),await wait$1(et),ht()};ht()}class UrlRequiredError extends BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}function withTimeout(_e,{errorInstance:et,timeout:tt,signal:rt}){return new Promise((nt,it)=>{(async()=>{let at;try{const st=new AbortController;tt>0&&(at=setTimeout(()=>{rt?st.abort():it(et)},tt)),nt(await _e({signal:st?.signal}))}catch(st){st.name==="AbortError"&&it(et),it(st)}finally{clearTimeout(at)}})()})}let id$1=0;async function http$1(_e,{body:et,fetchOptions:tt={},timeout:rt=1e4}){const{headers:nt,method:it,signal:at}=tt;try{const st=await withTimeout(async({signal:dt})=>await fetch(_e,{...tt,body:Array.isArray(et)?stringify$2(et.map(pt=>({jsonrpc:"2.0",id:id$1++,...pt}))):stringify$2({jsonrpc:"2.0",id:id$1++,...et}),headers:{...nt,"Content-Type":"application/json"},method:it||"POST",signal:at||(rt>0?dt:void 0)}),{errorInstance:new TimeoutError({body:et,url:_e}),timeout:rt,signal:!0});let lt;if(st.headers.get("Content-Type")?.startsWith("application/json")?lt=await st.json():lt=await st.text(),!st.ok)throw new HttpRequestError({body:et,details:stringify$2(lt.error)||st.statusText,headers:st.headers,status:st.status,url:_e});return lt}catch(st){throw st instanceof HttpRequestError||st instanceof TimeoutError?st:new HttpRequestError({body:et,details:st.message,url:_e})}}const sockets=new Map;async function getSocket(_e){const et=new URL(_e),tt=et.toString();let rt=sockets.get(tt);if(rt)return rt;const{schedule:nt}=createBatchScheduler({id:tt,fn:async()=>{let st=await __vitePreload(()=>import("./browser-3852a342.js"),[]);st.default?.constructor?st=st.default:st=st.WebSocket;const lt=new st(et),dt=new Map,ht=new Map,pt=({data:gt})=>{const vt=JSON.parse(gt),xt=vt.method==="eth_subscription",yt=xt?vt.params.subscription:vt.id,bt=xt?ht:dt,wt=bt.get(yt);wt&&wt({data:gt}),xt||bt.delete(yt)},mt=()=>{sockets.delete(tt),lt.removeEventListener("close",mt),lt.removeEventListener("message",pt)};return lt.addEventListener("close",mt),lt.addEventListener("message",pt),lt.readyState===st.CONNECTING&&await new Promise((gt,vt)=>{lt&&(lt.onopen=gt,lt.onerror=vt)}),rt=Object.assign(lt,{requests:dt,subscriptions:ht}),sockets.set(tt,rt),[rt]}}),[it,[at]]=await nt();return at}function webSocket$1(_e,{body:et,onResponse:tt}){if(_e.readyState===_e.CLOSED||_e.readyState===_e.CLOSING)throw new WebSocketRequestError({body:et,url:_e.url,details:"Socket is closed."});const rt=id$1++,nt=({data:it})=>{const at=JSON.parse(it);typeof at.id=="number"&&rt!==at.id||(tt?.(at),et.method==="eth_subscribe"&&typeof at.result=="string"&&_e.subscriptions.set(at.result,nt),et.method==="eth_unsubscribe"&&_e.subscriptions.delete(et.params?.[0]))};return _e.requests.set(rt,nt),_e.send(JSON.stringify({jsonrpc:"2.0",...et,id:rt})),_e}async function webSocketAsync(_e,{body:et,timeout:tt=1e4}){return withTimeout(()=>new Promise(rt=>rpc$1.webSocket(_e,{body:et,onResponse:rt})),{errorInstance:new TimeoutError({body:et,url:_e.url}),timeout:tt})}const rpc$1={http:http$1,webSocket:webSocket$1,webSocketAsync};function http(_e,et={}){const{batch:tt,fetchOptions:rt,key:nt="http",name:it="HTTP JSON-RPC",retryDelay:at}=et;return({chain:st,retryCount:lt,timeout:dt})=>{const{batchSize:ht=1e3,wait:pt=0}=typeof tt=="object"?tt:{},mt=et.retryCount??lt,gt=dt??et.timeout??1e4,vt=_e||st?.rpcUrls.default.http[0];if(!vt)throw new UrlRequiredError;return createTransport({key:nt,name:it,async request({method:xt,params:yt}){const bt={method:xt,params:yt},{schedule:wt}=createBatchScheduler({id:`${_e}`,wait:pt,shouldSplitBatch(kt){return kt.length>ht},fn:kt=>rpc$1.http(vt,{body:kt,fetchOptions:rt,timeout:gt})}),Et=async kt=>tt?wt(kt):[await rpc$1.http(vt,{body:kt,fetchOptions:rt,timeout:gt})],[{error:$t,result:Pt}]=await Et(bt);if($t)throw new RpcRequestError({body:bt,error:$t,url:vt});return Pt},retryCount:mt,retryDelay:at,timeout:gt,type:"http"},{url:_e})}}function isNullUniversalResolverError(_e,et){if(!(_e instanceof BaseError))return!1;const tt=_e.walk(rt=>rt instanceof ContractFunctionRevertedError);return tt instanceof ContractFunctionRevertedError?!!(tt.data?.errorName==="ResolverNotFound"||tt.data?.errorName==="ResolverWildcardNotSupported"||tt.reason?.includes("Wildcard on non-extended resolvers is not supported")||et==="reverse"&&tt.reason===panicReasons[50]):!1}const bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function validateTypedData({domain:_e,message:et,primaryType:tt,types:rt}){const nt=rt,it=(at,st)=>{for(const lt of at){const{name:dt,type:ht}=lt,pt=ht,mt=st[dt],gt=pt.match(integerRegex);if(gt&&(typeof mt=="number"||typeof mt=="bigint")){const[yt,bt,wt]=gt;numberToHex(mt,{signed:bt==="int",size:parseInt(wt)/8})}if(pt==="address"&&typeof mt=="string"&&!isAddress(mt))throw new InvalidAddressError({address:mt});const vt=pt.match(bytesRegex);if(vt){const[yt,bt]=vt;if(bt&&size$1(mt)!==parseInt(bt))throw new BytesSizeMismatchError({expectedSize:parseInt(bt),givenSize:size$1(mt)})}const xt=nt[pt];xt&&it(xt,mt)}};if(nt.EIP712Domain&&_e&&it(nt.EIP712Domain,_e),tt!=="EIP712Domain"){const at=nt[tt];it(at,et)}}const docsPath="/docs/contract/encodeDeployData";function encodeDeployData({abi:_e,args:et,bytecode:tt}){if(!et||et.length===0)return tt;const rt=_e.find(it=>"type"in it&&it.type==="constructor");if(!rt)throw new AbiConstructorNotFoundError({docsPath});if(!("inputs"in rt))throw new AbiConstructorParamsNotFoundError({docsPath});if(!rt.inputs||rt.inputs.length===0)throw new AbiConstructorParamsNotFoundError({docsPath});const nt=encodeAbiParameters(rt.inputs,et);return concatHex([tt,nt])}function toRlp(_e,et){const tt=et||"hex";return format$2(bytesToRlp(parse$1(_e)),tt)}function parse$1(_e){return Array.isArray(_e)?_e.map(parse$1):typeof _e=="string"?toBytes$2(_e):_e}function format$2(_e,et="bytes"){return et==="hex"?bytesToHex$1(_e):_e}function bytesToRlp(_e){if(Array.isArray(_e)){const et=concat(_e.map(bytesToRlp));return new Uint8Array([...encodeLength(et.length,192),...et])}return _e.length===1&&_e[0]<128?_e:new Uint8Array([...encodeLength(_e.length,128),..._e])}function encodeLength(_e,et){return _e<56?[et+_e]:[toBytes$2(_e).length+et+55,...toBytes$2(_e)]}const statuses={"0x0":"reverted","0x1":"success"};function formatTransactionReceipt(_e){return{..._e,blockNumber:_e.blockNumber?BigInt(_e.blockNumber):null,contractAddress:_e.contractAddress?_e.contractAddress:null,cumulativeGasUsed:_e.cumulativeGasUsed?BigInt(_e.cumulativeGasUsed):null,effectiveGasPrice:_e.effectiveGasPrice?BigInt(_e.effectiveGasPrice):null,gasUsed:_e.gasUsed?BigInt(_e.gasUsed):null,logs:_e.logs?_e.logs.map(et=>formatLog(et)):null,to:_e.to?_e.to:null,transactionIndex:_e.transactionIndex?hexToNumber$1(_e.transactionIndex):null,status:_e.status?statuses[_e.status]:null,type:_e.type?transactionType[_e.type]||_e.type:null}}function hashTypedData({domain:_e,message:et,primaryType:tt,types:rt}){const nt=typeof _e>"u"?{}:_e,it={EIP712Domain:[typeof nt?.name=="string"&&{name:"name",type:"string"},nt?.version&&{name:"version",type:"string"},typeof nt?.chainId=="number"&&{name:"chainId",type:"uint256"},nt?.verifyingContract&&{name:"verifyingContract",type:"address"},nt?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean),...rt};validateTypedData({domain:nt,message:et,primaryType:tt,types:it});const at=["0x1901"];return nt&&at.push(hashDomain({domain:nt,types:it})),tt!=="EIP712Domain"&&at.push(hashStruct({data:et,primaryType:tt,types:it})),keccak256(concat(at))}function hashDomain({domain:_e,types:et}){return hashStruct({data:_e,primaryType:"EIP712Domain",types:et})}function hashStruct({data:_e,primaryType:et,types:tt}){const rt=encodeData({data:_e,primaryType:et,types:tt});return keccak256(rt)}function encodeData({data:_e,primaryType:et,types:tt}){const rt=[{type:"bytes32"}],nt=[hashType({primaryType:et,types:tt})];for(const it of tt[et]){const[at,st]=encodeField({types:tt,name:it.name,type:it.type,value:_e[it.name]});rt.push(at),nt.push(st)}return encodeAbiParameters(rt,nt)}function hashType({primaryType:_e,types:et}){const tt=toHex$1(encodeType({primaryType:_e,types:et}));return keccak256(tt)}function encodeType({primaryType:_e,types:et}){let tt="";const rt=findTypeDependencies({primaryType:_e,types:et});rt.delete(_e);const nt=[_e,...Array.from(rt).sort()];for(const it of nt)tt+=`${it}(${et[it].map(({name:at,type:st})=>`${st} ${at}`).join(",")})`;return tt}function findTypeDependencies({primaryType:_e,types:et},tt=new Set){const nt=_e.match(/^\w*/u)?.[0];if(tt.has(nt)||et[nt]===void 0)return tt;tt.add(nt);for(const it of et[nt])findTypeDependencies({primaryType:it.type,types:et},tt);return tt}function encodeField({types:_e,name:et,type:tt,value:rt}){if(_e[tt]!==void 0)return[{type:"bytes32"},keccak256(encodeData({data:rt,primaryType:tt,types:_e}))];if(tt==="bytes")return rt=`0x${(rt.length%2?"0":"")+rt.slice(2)}`,[{type:"bytes32"},keccak256(rt)];if(tt==="string")return[{type:"bytes32"},keccak256(toHex$1(rt))];if(tt.lastIndexOf("]")===tt.length-1){const nt=tt.slice(0,tt.lastIndexOf("[")),it=rt.map(at=>encodeField({name:et,type:nt,types:_e,value:at}));return[{type:"bytes32"},keccak256(encodeAbiParameters(it.map(([at])=>at),it.map(([,at])=>at)))]}return[{type:tt},rt]}function hashMessage(_e,et){const tt=(()=>typeof _e=="string"?stringToBytes(_e):_e.raw instanceof Uint8Array?_e.raw:toBytes$2(_e.raw))(),rt=stringToBytes(`Ethereum Signed Message: +${tt.length}`);return keccak256(concat([rt,tt]),et)}function getTransactionType(_e){if(_e.type)return _e.type;if(typeof _e.maxFeePerGas<"u"||typeof _e.maxPriorityFeePerGas<"u")return"eip1559";if(typeof _e.gasPrice<"u")return typeof _e.accessList<"u"?"eip2930":"legacy";throw new InvalidSerializableTransactionError({transaction:_e})}function assertTransactionEIP1559(_e){const{chainId:et,maxPriorityFeePerGas:tt,gasPrice:rt,maxFeePerGas:nt,to:it}=_e;if(et<=0)throw new InvalidChainIdError({chainId:et});if(it&&!isAddress(it))throw new InvalidAddressError({address:it});if(rt)throw new BaseError("`gasPrice` is not a valid EIP-1559 Transaction attribute.");if(nt&&nt>2n**256n-1n)throw new FeeCapTooHighError({maxFeePerGas:nt});if(tt&&nt&&tt>nt)throw new TipAboveFeeCapError({maxFeePerGas:nt,maxPriorityFeePerGas:tt})}function assertTransactionEIP2930(_e){const{chainId:et,maxPriorityFeePerGas:tt,gasPrice:rt,maxFeePerGas:nt,to:it}=_e;if(et<=0)throw new InvalidChainIdError({chainId:et});if(it&&!isAddress(it))throw new InvalidAddressError({address:it});if(tt||nt)throw new BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(rt&&rt>2n**256n-1n)throw new FeeCapTooHighError({maxFeePerGas:rt})}function assertTransactionLegacy(_e){const{chainId:et,maxPriorityFeePerGas:tt,gasPrice:rt,maxFeePerGas:nt,to:it,accessList:at}=_e;if(it&&!isAddress(it))throw new InvalidAddressError({address:it});if(typeof et<"u"&&et<=0)throw new InvalidChainIdError({chainId:et});if(tt||nt)throw new BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(rt&&rt>2n**256n-1n)throw new FeeCapTooHighError({maxFeePerGas:rt});if(at)throw new BaseError("`accessList` is not a valid Legacy Transaction attribute.")}function serializeAccessList(_e){if(!_e||_e.length===0)return[];const et=[];for(let tt=0;tt<_e.length;tt++){const{address:rt,storageKeys:nt}=_e[tt];for(let it=0;it0)ht=BigInt(tt*2)+BigInt(35n+et.v-27n);else if(et.v!==ht)throw new InvalidLegacyVError({v:et.v});dt=[...dt,toHex$1(ht),et.r,et.s]}else tt>0&&(dt=[...dt,toHex$1(tt),"0x","0x"]);return toRlp(dt)}function parseUnits(_e,et){let[tt,rt="0"]=_e.split(".");const nt=tt.startsWith("-");if(nt&&(tt=tt.slice(1)),rt=rt.replace(/(0+)$/,""),et===0)Math.round(+`.${rt}`)===1&&(tt=`${BigInt(tt)+1n}`),rt="";else if(rt.length>et){const[it,at,st]=[rt.slice(0,et-1),rt.slice(et-1,et),rt.slice(et)],lt=Math.round(+`${at}.${st}`);lt>9?rt=`${BigInt(it)+BigInt(1)}0`.padStart(it.length+1,"0"):rt=`${it}${lt}`,rt.length>et&&(rt=rt.slice(1),tt=`${BigInt(tt)+1n}`),rt=rt.slice(0,et)}else rt=rt.padEnd(et,"0");return BigInt(`${nt?"-":""}${tt}${rt}`)}function parseEther(_e,et="wei"){return parseUnits(_e,etherUnits[et])}function encodedLabelToLabelhash(_e){if(_e.length!==66||_e.indexOf("[")!==0||_e.indexOf("]")!==65)return null;const et=`0x${_e.slice(1,65)}`;return isHex(et)?et:null}function namehash(_e){let et=new Uint8Array(32).fill(0);if(!_e)return bytesToHex$1(et);const tt=_e.split(".");for(let rt=tt.length-1;rt>=0;rt-=1){const nt=encodedLabelToLabelhash(tt[rt]),it=nt?toBytes$2(nt):keccak256(stringToBytes(tt[rt]),"bytes");et=keccak256(concat([et,it]),"bytes")}return bytesToHex$1(et)}function encodeLabelhash(_e){return`[${_e.slice(2)}]`}function labelhash(_e){const et=new Uint8Array(32).fill(0);return _e?encodedLabelToLabelhash(_e)||keccak256(stringToBytes(_e)):bytesToHex$1(et)}function packetToBytes(_e){const et=_e.replace(/^\.|\.$/gm,"");if(et.length===0)return new Uint8Array(1);const tt=new Uint8Array(stringToBytes(et).byteLength+2);let rt=0;const nt=et.split(".");for(let it=0;it255&&(at=stringToBytes(encodeLabelhash(labelhash(nt[it])))),tt[rt]=at.length,tt.set(at,rt+1),rt+=at.length+1}return tt.byteLength!==rt+1?tt.slice(0,rt+1):tt}async function getEnsAddress(_e,{blockNumber:et,blockTag:tt,coinType:rt,name:nt,universalResolverAddress:it}){let at=it;if(!at){if(!_e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");at=getChainContractAddress({blockNumber:et,chain:_e.chain,contract:"ensUniversalResolver"})}try{const st=encodeFunctionData({abi:addressResolverAbi,functionName:"addr",...rt!=null?{args:[namehash(nt),BigInt(rt)]}:{args:[namehash(nt)]}}),lt=await readContract(_e,{address:at,abi:universalResolverResolveAbi,functionName:"resolve",args:[toHex$1(packetToBytes(nt)),st],blockNumber:et,blockTag:tt});if(lt[0]==="0x")return null;const dt=trim$1(decodeFunctionResult({abi:addressResolverAbi,args:rt!=null?[namehash(nt),BigInt(rt)]:void 0,functionName:"addr",data:lt[0]}));return dt==="0x"||trim$1(dt)==="0x00"?null:dt}catch(st){if(isNullUniversalResolverError(st,"resolve"))return null;throw st}}class EnsAvatarInvalidMetadataError extends BaseError{constructor({data:et}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(et)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class EnsAvatarInvalidNftUriError extends BaseError{constructor({reason:et}){super(`ENS NFT avatar URI is invalid. ${et}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class EnsAvatarUriResolutionError extends BaseError{constructor({uri:et}){super(`Unable to resolve ENS avatar URI "${et}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class EnsAvatarUnsupportedNamespaceError extends BaseError{constructor({namespace:et}){super(`ENS NFT avatar namespace "${et}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const networkRegex=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,ipfsHashRegex=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,base64Regex=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,dataURIRegex=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function isImageUri(_e){try{const et=await fetch(_e,{method:"HEAD"});return et.status===200?et.headers.get("content-type")?.startsWith("image/"):!1}catch(et){return typeof et=="object"&&typeof et.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(tt=>{const rt=new Image;rt.onload=()=>{tt(!0)},rt.onerror=()=>{tt(!1)},rt.src=_e})}}function getGateway(_e,et){return _e?_e.endsWith("/")?_e.slice(0,-1):_e:et}function resolveAvatarUri({uri:_e,gatewayUrls:et}){const tt=base64Regex.test(_e);if(tt)return{uri:_e,isOnChain:!0,isEncoded:tt};const rt=getGateway(et?.ipfs,"https://ipfs.io"),nt=getGateway(et?.arweave,"https://arweave.net"),it=_e.match(networkRegex),{protocol:at,subpath:st,target:lt,subtarget:dt=""}=it?.groups||{},ht=at==="ipns:/"||st==="ipns/",pt=at==="ipfs:/"||st==="ipfs/"||ipfsHashRegex.test(_e);if(_e.startsWith("http")&&!ht&&!pt){let gt=_e;return et?.arweave&&(gt=_e.replace(/https:\/\/arweave.net/g,et?.arweave)),{uri:gt,isOnChain:!1,isEncoded:!1}}if((ht||pt)&<)return{uri:`${rt}/${ht?"ipns":"ipfs"}/${lt}${dt}`,isOnChain:!1,isEncoded:!1};if(at==="ar:/"&<)return{uri:`${nt}/${lt}${dt||""}`,isOnChain:!1,isEncoded:!1};let mt=_e.replace(dataURIRegex,"");if(mt.startsWith("nt.json());return await parseAvatarUri({gatewayUrls:_e,uri:getJsonImage(tt)})}catch{throw new EnsAvatarUriResolutionError({uri:et})}}async function parseAvatarUri({gatewayUrls:_e,uri:et}){const{uri:tt,isOnChain:rt}=resolveAvatarUri({uri:et,gatewayUrls:_e});if(rt||await isImageUri(tt))return tt;throw new EnsAvatarUriResolutionError({uri:et})}function parseNftUri(_e){let et=_e;et.startsWith("did:nft:")&&(et=et.replace("did:nft:","").replace(/_/g,"/"));const[tt,rt,nt]=et.split("/"),[it,at]=tt.split(":"),[st,lt]=rt.split(":");if(!it||it.toLowerCase()!=="eip155")throw new EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!at)throw new EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!lt)throw new EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!nt)throw new EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!st)throw new EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:parseInt(at),namespace:st.toLowerCase(),contractAddress:lt,tokenID:nt}}async function getNftTokenUri(_e,{nft:et}){if(et.namespace==="erc721")return readContract(_e,{address:et.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(et.tokenID)]});if(et.namespace==="erc1155")return readContract(_e,{address:et.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(et.tokenID)]});throw new EnsAvatarUnsupportedNamespaceError({namespace:et.namespace})}async function parseAvatarRecord(_e,{gatewayUrls:et,record:tt}){return/eip155:/i.test(tt)?parseNftAvatarUri(_e,{gatewayUrls:et,record:tt}):parseAvatarUri({uri:tt,gatewayUrls:et})}async function parseNftAvatarUri(_e,{gatewayUrls:et,record:tt}){const rt=parseNftUri(tt),nt=await getNftTokenUri(_e,{nft:rt}),{uri:it,isOnChain:at,isEncoded:st}=resolveAvatarUri({uri:nt,gatewayUrls:et});if(at&&(it.includes("data:application/json;base64,")||it.startsWith("{"))){const dt=st?atob(it.replace("data:application/json;base64,","")):it,ht=JSON.parse(dt);return parseAvatarUri({uri:getJsonImage(ht),gatewayUrls:et})}let lt=rt.tokenID;return rt.namespace==="erc1155"&&(lt=lt.replace("0x","").padStart(64,"0")),getMetadataAvatarUri({gatewayUrls:et,uri:it.replace(/(?:0x)?{id}/,lt)})}async function getEnsText(_e,{blockNumber:et,blockTag:tt,name:rt,key:nt,universalResolverAddress:it}){let at=it;if(!at){if(!_e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");at=getChainContractAddress({blockNumber:et,chain:_e.chain,contract:"ensUniversalResolver"})}try{const st=await readContract(_e,{address:at,abi:universalResolverResolveAbi,functionName:"resolve",args:[toHex$1(packetToBytes(rt)),encodeFunctionData({abi:textResolverAbi,functionName:"text",args:[namehash(rt),nt]})],blockNumber:et,blockTag:tt});if(st[0]==="0x")return null;const lt=decodeFunctionResult({abi:textResolverAbi,functionName:"text",data:st[0]});return lt===""?null:lt}catch(st){if(isNullUniversalResolverError(st,"resolve"))return null;throw st}}async function getEnsAvatar(_e,{blockNumber:et,blockTag:tt,gatewayUrls:rt,name:nt,universalResolverAddress:it}){const at=await getEnsText(_e,{blockNumber:et,blockTag:tt,key:"avatar",name:nt,universalResolverAddress:it});if(!at)return null;try{return await parseAvatarRecord(_e,{record:at,gatewayUrls:rt})}catch{return null}}async function getEnsName(_e,{address:et,blockNumber:tt,blockTag:rt,universalResolverAddress:nt}){let it=nt;if(!it){if(!_e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");it=getChainContractAddress({blockNumber:tt,chain:_e.chain,contract:"ensUniversalResolver"})}const at=`${et.toLowerCase().substring(2)}.addr.reverse`;try{return(await readContract(_e,{address:it,abi:universalResolverReverseAbi,functionName:"reverse",args:[toHex$1(packetToBytes(at))],blockNumber:tt,blockTag:rt}))[0]}catch(st){if(isNullUniversalResolverError(st,"reverse"))return null;throw st}}async function getEnsResolver(_e,{blockNumber:et,blockTag:tt,name:rt,universalResolverAddress:nt}){let it=nt;if(!it){if(!_e.chain)throw new Error("client chain not configured. universalResolverAddress is required.");it=getChainContractAddress({blockNumber:et,chain:_e.chain,contract:"ensUniversalResolver"})}const[at]=await readContract(_e,{address:it,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[toHex$1(packetToBytes(rt))],blockNumber:et,blockTag:tt});return at}async function createBlockFilter(_e){const et=createFilterRequestScope(_e,{method:"eth_newBlockFilter"}),tt=await _e.request({method:"eth_newBlockFilter"});return{id:tt,request:et(tt),type:"block"}}async function createEventFilter(_e,{address:et,args:tt,event:rt,events:nt,fromBlock:it,strict:at,toBlock:st}={}){const lt=nt??(rt?[rt]:void 0),dt=createFilterRequestScope(_e,{method:"eth_newFilter"});let ht=[];lt&&(ht=[lt.flatMap(mt=>encodeEventTopics({abi:[mt],eventName:mt.name,args:tt}))],rt&&(ht=ht[0]));const pt=await _e.request({method:"eth_newFilter",params:[{address:et,fromBlock:typeof it=="bigint"?numberToHex(it):it,toBlock:typeof st=="bigint"?numberToHex(st):st,...ht.length?{topics:ht}:{}}]});return{abi:lt,args:tt,eventName:rt?rt.name:void 0,fromBlock:it,id:pt,request:dt(pt),strict:at,toBlock:st,type:"event"}}async function createPendingTransactionFilter(_e){const et=createFilterRequestScope(_e,{method:"eth_newPendingTransactionFilter"}),tt=await _e.request({method:"eth_newPendingTransactionFilter"});return{id:tt,request:et(tt),type:"transaction"}}async function getBalance(_e,{address:et,blockNumber:tt,blockTag:rt="latest"}){const nt=tt?numberToHex(tt):void 0,it=await _e.request({method:"eth_getBalance",params:[et,nt||rt]});return BigInt(it)}async function getBlockTransactionCount(_e,{blockHash:et,blockNumber:tt,blockTag:rt="latest"}={}){const nt=tt!==void 0?numberToHex(tt):void 0;let it;return et?it=await _e.request({method:"eth_getBlockTransactionCountByHash",params:[et]}):it=await _e.request({method:"eth_getBlockTransactionCountByNumber",params:[nt||rt]}),hexToNumber$1(it)}async function getBytecode(_e,{address:et,blockNumber:tt,blockTag:rt="latest"}){const nt=tt!==void 0?numberToHex(tt):void 0,it=await _e.request({method:"eth_getCode",params:[et,nt||rt]});if(it!=="0x")return it}function formatFeeHistory(_e){return{baseFeePerGas:_e.baseFeePerGas.map(et=>BigInt(et)),gasUsedRatio:_e.gasUsedRatio,oldestBlock:BigInt(_e.oldestBlock),reward:_e.reward?.map(et=>et.map(tt=>BigInt(tt)))}}async function getFeeHistory(_e,{blockCount:et,blockNumber:tt,blockTag:rt="latest",rewardPercentiles:nt}){const it=tt?numberToHex(tt):void 0,at=await _e.request({method:"eth_feeHistory",params:[numberToHex(et),it||rt,nt]});return formatFeeHistory(at)}async function getFilterLogs(_e,{filter:et}){const tt=et.strict??!1;return(await et.request({method:"eth_getFilterLogs",params:[et.id]})).map(nt=>{try{const{eventName:it,args:at}="abi"in et&&et.abi?decodeEventLog({abi:et.abi,data:nt.data,topics:nt.topics,strict:tt}):{eventName:void 0,args:void 0};return formatLog(nt,{args:at,eventName:it})}catch(it){let at,st;if(it instanceof DecodeLogDataMismatch||it instanceof DecodeLogTopicsMismatch){if("strict"in et&&et.strict)return;at=it.abiItem.name,st=it.abiItem.inputs?.some(lt=>!("name"in lt&<.name))}return formatLog(nt,{args:st?[]:{},eventName:at})}}).filter(Boolean)}async function getStorageAt(_e,{address:et,blockNumber:tt,blockTag:rt="latest",slot:nt}){const it=tt!==void 0?numberToHex(tt):void 0;return await _e.request({method:"eth_getStorageAt",params:[et,nt,it||rt]})}async function getTransaction(_e,{blockHash:et,blockNumber:tt,blockTag:rt,hash:nt,index:it}){const at=rt||"latest",st=tt!==void 0?numberToHex(tt):void 0;let lt=null;if(nt?lt=await _e.request({method:"eth_getTransactionByHash",params:[nt]}):et?lt=await _e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[et,numberToHex(it)]}):(st||at)&&(lt=await _e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[st||at,numberToHex(it)]})),!lt)throw new TransactionNotFoundError({blockHash:et,blockNumber:tt,blockTag:at,hash:nt,index:it});return(_e.chain?.formatters?.transaction?.format||formatTransaction)(lt)}async function getTransactionConfirmations(_e,{hash:et,transactionReceipt:tt}){const[rt,nt]=await Promise.all([getBlockNumber(_e),et?getTransaction(_e,{hash:et}):void 0]),it=tt?.blockNumber||nt?.blockNumber;return it?rt-it+1n:0n}async function getTransactionReceipt(_e,{hash:et}){const tt=await _e.request({method:"eth_getTransactionReceipt",params:[et]});if(!tt)throw new TransactionReceiptNotFoundError({hash:et});return(_e.chain?.formatters?.transactionReceipt?.format||formatTransactionReceipt)(tt)}async function multicall(_e,et){const{allowFailure:tt=!0,batchSize:rt,blockNumber:nt,blockTag:it,contracts:at,multicallAddress:st}=et,lt=rt??(typeof _e.batch?.multicall=="object"&&_e.batch.multicall.batchSize||1024),dt=at;let ht=st;if(!ht){if(!_e.chain)throw new Error("client chain not configured. multicallAddress is required.");ht=getChainContractAddress({blockNumber:nt,chain:_e.chain,contract:"multicall3"})}const pt=[[]];let mt=0,gt=0;for(let xt=0;xt0&>>lt&&(mt++,gt=($t.length-2)/2,pt[mt]=[]),pt[mt]=[...pt[mt],{allowFailure:!0,callData:$t,target:bt}]}catch($t){const Pt=getContractError($t,{abi:yt,address:bt,args:wt,docsPath:"/docs/contract/multicall",functionName:Et});if(!tt)throw Pt;pt[mt]=[...pt[mt],{allowFailure:!0,callData:"0x",target:bt}]}}return(await Promise.all(pt.map(xt=>readContract(_e,{abi:multicall3Abi,address:ht,args:[xt],blockNumber:nt,blockTag:it,functionName:"aggregate3"})))).flat().map(({returnData:xt,success:yt},bt)=>{const wt=pt.flat(),{callData:Et}=wt[bt],{abi:$t,address:Pt,functionName:kt,args:Lt}=dt[bt];try{if(Et==="0x")throw new AbiDecodingZeroDataError;if(!yt)throw new RawContractError({data:xt});const jt=decodeFunctionResult({abi:$t,args:Lt,data:xt,functionName:kt});return tt?{result:jt,status:"success"}:jt}catch(jt){const qt=getContractError(jt,{abi:$t,address:Pt,args:Lt,docsPath:"/docs/contract/multicall",functionName:kt});if(!tt)throw qt;return{error:qt,result:void 0,status:"failure"}}})}const universalSignatureValidatorByteCode="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$3=BigInt(0),_1n$4=BigInt(1),_2n$2=BigInt(2),u8a$1=_e=>_e instanceof Uint8Array,hexes=Array.from({length:256},(_e,et)=>et.toString(16).padStart(2,"0"));function bytesToHex(_e){if(!u8a$1(_e))throw new Error("Uint8Array expected");let et="";for(let tt=0;tt<_e.length;tt++)et+=hexes[_e[tt]];return et}function numberToHexUnpadded(_e){const et=_e.toString(16);return et.length&1?`0${et}`:et}function hexToNumber(_e){if(typeof _e!="string")throw new Error("hex string expected, got "+typeof _e);return BigInt(_e===""?"0":`0x${_e}`)}function hexToBytes(_e){if(typeof _e!="string")throw new Error("hex string expected, got "+typeof _e);const et=_e.length;if(et%2)throw new Error("padded hex string expected, got unpadded hex of length "+et);const tt=new Uint8Array(et/2);for(let rt=0;rtrt+nt.length,0));let tt=0;return _e.forEach(rt=>{if(!u8a$1(rt))throw new Error("Uint8Array expected");et.set(rt,tt),tt+=rt.length}),et}function equalBytes(_e,et){if(_e.length!==et.length)return!1;for(let tt=0;tt<_e.length;tt++)if(_e[tt]!==et[tt])return!1;return!0}function utf8ToBytes$1(_e){if(typeof _e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof _e}`);return new Uint8Array(new TextEncoder().encode(_e))}function bitLen(_e){let et;for(et=0;_e>_0n$3;_e>>=_1n$4,et+=1);return et}function bitGet(_e,et){return _e>>BigInt(et)&_1n$4}const bitSet=(_e,et,tt)=>_e|(tt?_1n$4:_0n$3)<(_2n$2<new Uint8Array(_e),u8fr=_e=>Uint8Array.from(_e);function createHmacDrbg(_e,et,tt){if(typeof _e!="number"||_e<2)throw new Error("hashLen must be a number");if(typeof et!="number"||et<2)throw new Error("qByteLen must be a number");if(typeof tt!="function")throw new Error("hmacFn must be a function");let rt=u8n(_e),nt=u8n(_e),it=0;const at=()=>{rt.fill(1),nt.fill(0),it=0},st=(...pt)=>tt(nt,rt,...pt),lt=(pt=u8n())=>{nt=st(u8fr([0]),pt),rt=st(),pt.length!==0&&(nt=st(u8fr([1]),pt),rt=st())},dt=()=>{if(it++>=1e3)throw new Error("drbg: tried 1000 values");let pt=0;const mt=[];for(;pt{at(),lt(pt);let gt;for(;!(gt=mt(dt()));)lt();return at(),gt}}const validatorFns={bigint:_e=>typeof _e=="bigint",function:_e=>typeof _e=="function",boolean:_e=>typeof _e=="boolean",string:_e=>typeof _e=="string",isSafeInteger:_e=>Number.isSafeInteger(_e),array:_e=>Array.isArray(_e),field:(_e,et)=>et.Fp.isValid(_e),hash:_e=>typeof _e=="function"&&Number.isSafeInteger(_e.outputLen)};function validateObject(_e,et,tt={}){const rt=(nt,it,at)=>{const st=validatorFns[it];if(typeof st!="function")throw new Error(`Invalid validator "${it}", expected function`);const lt=_e[nt];if(!(at&<===void 0)&&!st(lt,_e))throw new Error(`Invalid param ${String(nt)}=${lt} (${typeof lt}), expected ${it}`)};for(const[nt,it]of Object.entries(et))rt(nt,it,!1);for(const[nt,it]of Object.entries(tt))rt(nt,it,!0);return _e}const ut$1=Object.freeze(Object.defineProperty({__proto__:null,bitGet,bitLen,bitMask,bitSet,bytesToHex,bytesToNumberBE,bytesToNumberLE,concatBytes:concatBytes$1,createHmacDrbg,ensureBytes,equalBytes,hexToBytes,hexToNumber,numberToBytesBE,numberToBytesLE,numberToHexUnpadded,numberToVarBytesBE,utf8ToBytes:utf8ToBytes$1,validateObject},Symbol.toStringTag,{value:"Module"}));function isBytesEqual(_e,et){const tt=isHex(_e)?toBytes$2(_e):_e,rt=isHex(et)?toBytes$2(et):et;return equalBytes(tt,rt)}async function verifyHash(_e,{address:et,hash:tt,signature:rt,...nt}){const it=isHex(rt)?rt:toHex$1(rt);try{const{data:at}=await call$1(_e,{data:encodeDeployData({abi:universalSignatureValidatorAbi,args:[et,tt,it],bytecode:universalSignatureValidatorByteCode}),...nt});return isBytesEqual(at??"0x0","0x1")}catch(at){if(at instanceof CallExecutionError)return!1;throw at}}async function verifyMessage(_e,{address:et,message:tt,signature:rt,...nt}){const it=hashMessage(tt);return verifyHash(_e,{address:et,hash:it,signature:rt,...nt})}async function verifyTypedData(_e,{address:et,signature:tt,message:rt,primaryType:nt,types:it,domain:at,...st}){const lt=hashTypedData({message:rt,primaryType:nt,types:it,domain:at});return verifyHash(_e,{address:et,hash:lt,signature:tt,...st})}function watchBlockNumber(_e,{emitOnBegin:et=!1,emitMissed:tt=!1,onBlockNumber:rt,onError:nt,poll:it,pollingInterval:at=_e.pollingInterval}){const st=typeof it<"u"?it:_e.transport.type!=="webSocket";let lt;return st?(()=>{const pt=stringify$2(["watchBlockNumber",_e.uid,et,tt,at]);return observe(pt,{onBlockNumber:rt,onError:nt},mt=>poll(async()=>{try{const gt=await getBlockNumber(_e,{cacheTime:0});if(lt){if(gt===lt)return;if(gt-lt>1&&tt)for(let vt=lt+1n;vtlt)&&(mt.onBlockNumber(gt,lt),lt=gt)}catch(gt){mt.onError?.(gt)}},{emitOnBegin:et,interval:at}))})():(()=>{let pt=!0,mt=()=>pt=!1;return(async()=>{try{const{unsubscribe:gt}=await _e.transport.subscribe({params:["newHeads"],onData(vt){if(!pt)return;const xt=hexToBigInt(vt.result?.number);rt(xt,lt),lt=xt},onError(vt){nt?.(vt)}});mt=gt,pt||mt()}catch(gt){nt?.(gt)}})(),mt})()}async function waitForTransactionReceipt(_e,{confirmations:et=1,hash:tt,onReplaced:rt,pollingInterval:nt=_e.pollingInterval,timeout:it}){const at=stringify$2(["waitForTransactionReceipt",_e.uid,tt]);let st,lt,dt,ht=!1;return new Promise((pt,mt)=>{it&&setTimeout(()=>mt(new WaitForTransactionReceiptTimeoutError({hash:tt})),it);const gt=observe(at,{onReplaced:rt,resolve:pt,reject:mt},vt=>{const xt=watchBlockNumber(_e,{emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:nt,async onBlockNumber(yt){if(ht)return;let bt=yt;const wt=Et=>{xt(),Et(),gt()};try{if(dt){if(bt-dt.blockNumber+1nvt.resolve(dt));return}if(st||(ht=!0,await withRetry(async()=>{st=await getTransaction(_e,{hash:tt}),st.blockNumber&&(bt=st.blockNumber)},{delay:({count:Et})=>~~(1<0&&bt-dt.blockNumber+1nvt.resolve(dt))}catch(Et){if(st&&(Et instanceof TransactionNotFoundError||Et instanceof TransactionReceiptNotFoundError)){lt=st;const Pt=(await getBlock(_e,{blockNumber:bt,includeTransactions:!0})).transactions.find(({from:Lt,nonce:jt})=>Lt===lt.from&&jt===lt.nonce);if(!Pt||(dt=await getTransactionReceipt(_e,{hash:Pt.hash}),bt-dt.blockNumber+1n{vt.onReplaced?.({reason:kt,replacedTransaction:lt,transaction:Pt,transactionReceipt:dt}),vt.resolve(dt)})}else wt(()=>vt.reject(Et))}}})})})}function watchBlocks(_e,{blockTag:et="latest",emitMissed:tt=!1,emitOnBegin:rt=!1,onBlock:nt,onError:it,includeTransactions:at,poll:st,pollingInterval:lt=_e.pollingInterval}){const dt=typeof st<"u"?st:_e.transport.type!=="webSocket",ht=at??!1;let pt;return dt?(()=>{const vt=stringify$2(["watchBlocks",_e.uid,tt,rt,ht,lt]);return observe(vt,{onBlock:nt,onError:it},xt=>poll(async()=>{try{const yt=await getBlock(_e,{blockTag:et,includeTransactions:ht});if(yt.number&&pt?.number){if(yt.number===pt.number)return;if(yt.number-pt.number>1&&tt)for(let bt=pt?.number+1n;btpt.number)&&(xt.onBlock(yt,pt),pt=yt)}catch(yt){xt.onError?.(yt)}},{emitOnBegin:rt,interval:lt}))})():(()=>{let vt=!0,xt=()=>vt=!1;return(async()=>{try{const{unsubscribe:yt}=await _e.transport.subscribe({params:["newHeads"],onData(bt){if(!vt)return;const Et=(_e.chain?.formatters?.block?.format||formatBlock)(bt.result);nt(Et,pt),pt=Et},onError(bt){it?.(bt)}});xt=yt,vt||xt()}catch(yt){it?.(yt)}})(),xt})()}function watchEvent(_e,{address:et,args:tt,batch:rt=!0,event:nt,events:it,onError:at,onLogs:st,poll:lt,pollingInterval:dt=_e.pollingInterval,strict:ht}){const pt=typeof lt<"u"?lt:_e.transport.type!=="webSocket",mt=ht??!1;return pt?(()=>{const xt=stringify$2(["watchEvent",et,tt,rt,_e.uid,nt,dt]);return observe(xt,{onLogs:st,onError:at},yt=>{let bt,wt,Et=!1;const $t=poll(async()=>{if(!Et){try{wt=await createEventFilter(_e,{address:et,args:tt,event:nt,events:it,strict:mt})}catch{}Et=!0;return}try{let Pt;if(wt)Pt=await getFilterChanges(_e,{filter:wt});else{const kt=await getBlockNumber(_e);bt&&bt!==kt?Pt=await getLogs(_e,{address:et,args:tt,event:nt,events:it,fromBlock:bt+1n,toBlock:kt}):Pt=[],bt=kt}if(Pt.length===0)return;rt?yt.onLogs(Pt):Pt.forEach(kt=>yt.onLogs([kt]))}catch(Pt){wt&&Pt instanceof InvalidInputRpcError&&(Et=!1),yt.onError?.(Pt)}},{emitOnBegin:!0,interval:dt});return async()=>{wt&&await uninstallFilter(_e,{filter:wt}),$t()}})})():(()=>{let xt=!0,yt=()=>xt=!1;return(async()=>{try{const bt=it??(nt?[nt]:void 0);let wt=[];bt&&(wt=[bt.flatMap($t=>encodeEventTopics({abi:[$t],eventName:$t.name,args:tt}))],nt&&(wt=wt[0]));const{unsubscribe:Et}=await _e.transport.subscribe({params:["logs",{address:et,topics:wt}],onData($t){if(!xt)return;const Pt=$t.result;try{const{eventName:kt,args:Lt}=decodeEventLog({abi:bt,data:Pt.data,topics:Pt.topics,strict:mt}),jt=formatLog(Pt,{args:Lt,eventName:kt});st([jt])}catch(kt){let Lt,jt;if(kt instanceof DecodeLogDataMismatch||kt instanceof DecodeLogTopicsMismatch){if(ht)return;Lt=kt.abiItem.name,jt=kt.abiItem.inputs?.some(Dt=>!("name"in Dt&&Dt.name))}const qt=formatLog(Pt,{args:jt?[]:{},eventName:Lt});st([qt])}},onError($t){at?.($t)}});yt=Et,xt||yt()}catch(bt){at?.(bt)}})(),yt})()}function watchPendingTransactions(_e,{batch:et=!0,onError:tt,onTransactions:rt,poll:nt,pollingInterval:it=_e.pollingInterval}){return(typeof nt<"u"?nt:_e.transport.type!=="webSocket")?(()=>{const dt=stringify$2(["watchPendingTransactions",_e.uid,et,it]);return observe(dt,{onTransactions:rt,onError:tt},ht=>{let pt;const mt=poll(async()=>{try{if(!pt)try{pt=await createPendingTransactionFilter(_e);return}catch(vt){throw mt(),vt}const gt=await getFilterChanges(_e,{filter:pt});if(gt.length===0)return;et?ht.onTransactions(gt):gt.forEach(vt=>ht.onTransactions([vt]))}catch(gt){ht.onError?.(gt)}},{emitOnBegin:!0,interval:it});return async()=>{pt&&await uninstallFilter(_e,{filter:pt}),mt()}})})():(()=>{let dt=!0,ht=()=>dt=!1;return(async()=>{try{const{unsubscribe:pt}=await _e.transport.subscribe({params:["newPendingTransactions"],onData(mt){if(!dt)return;const gt=mt.result;rt([gt])},onError(mt){tt?.(mt)}});ht=pt,dt||ht()}catch(pt){tt?.(pt)}})(),ht})()}function publicActions(_e){return{call:et=>call$1(_e,et),createBlockFilter:()=>createBlockFilter(_e),createContractEventFilter:et=>createContractEventFilter(_e,et),createEventFilter:et=>createEventFilter(_e,et),createPendingTransactionFilter:()=>createPendingTransactionFilter(_e),estimateContractGas:et=>estimateContractGas(_e,et),estimateGas:et=>estimateGas(_e,et),getBalance:et=>getBalance(_e,et),getBlock:et=>getBlock(_e,et),getBlockNumber:et=>getBlockNumber(_e,et),getBlockTransactionCount:et=>getBlockTransactionCount(_e,et),getBytecode:et=>getBytecode(_e,et),getChainId:()=>getChainId(_e),getEnsAddress:et=>getEnsAddress(_e,et),getEnsAvatar:et=>getEnsAvatar(_e,et),getEnsName:et=>getEnsName(_e,et),getEnsResolver:et=>getEnsResolver(_e,et),getEnsText:et=>getEnsText(_e,et),getFeeHistory:et=>getFeeHistory(_e,et),getFilterChanges:et=>getFilterChanges(_e,et),getFilterLogs:et=>getFilterLogs(_e,et),getGasPrice:()=>getGasPrice(_e),getLogs:et=>getLogs(_e,et),getStorageAt:et=>getStorageAt(_e,et),getTransaction:et=>getTransaction(_e,et),getTransactionConfirmations:et=>getTransactionConfirmations(_e,et),getTransactionCount:et=>getTransactionCount(_e,et),getTransactionReceipt:et=>getTransactionReceipt(_e,et),multicall:et=>multicall(_e,et),readContract:et=>readContract(_e,et),simulateContract:et=>simulateContract(_e,et),verifyMessage:et=>verifyMessage(_e,et),verifyTypedData:et=>verifyTypedData(_e,et),uninstallFilter:et=>uninstallFilter(_e,et),waitForTransactionReceipt:et=>waitForTransactionReceipt(_e,et),watchBlocks:et=>watchBlocks(_e,et),watchBlockNumber:et=>watchBlockNumber(_e,et),watchContractEvent:et=>watchContractEvent(_e,et),watchEvent:et=>watchEvent(_e,et),watchPendingTransactions:et=>watchPendingTransactions(_e,et)}}function createPublicClient(_e){const{key:et="public",name:tt="Public Client"}=_e;return createClient$1({..._e,key:et,name:tt,type:"publicClient"}).extend(publicActions)}function deployContract(_e,{abi:et,args:tt,bytecode:rt,...nt}){const it=encodeDeployData({abi:et,args:tt,bytecode:rt});return sendTransaction(_e,{...nt,data:it})}async function getAddresses(_e){return(await _e.request({method:"eth_accounts"})).map(tt=>checksumAddress(tt))}async function getPermissions(_e){return await _e.request({method:"wallet_getPermissions"})}async function requestAddresses(_e){return(await _e.request({method:"eth_requestAccounts"})).map(tt=>getAddress(tt))}async function requestPermissions(_e,et){return _e.request({method:"wallet_requestPermissions",params:[et]})}async function signMessage$1(_e,{account:et=_e.account,message:tt}){if(!et)throw new AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});const rt=parseAccount(et);if(rt.type==="local")return rt.signMessage({message:tt});const nt=(()=>typeof tt=="string"?stringToHex(tt):tt.raw instanceof Uint8Array?toHex$1(tt.raw):tt.raw)();return _e.request({method:"personal_sign",params:[nt,rt.address]})}async function signTypedData$1(_e,{account:et=_e.account,domain:tt,message:rt,primaryType:nt,types:it}){if(!et)throw new AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});const at=parseAccount(et),st={EIP712Domain:[typeof tt?.name=="string"&&{name:"name",type:"string"},tt?.version&&{name:"version",type:"string"},typeof tt?.chainId=="number"&&{name:"chainId",type:"uint256"},tt?.verifyingContract&&{name:"verifyingContract",type:"address"},tt?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean),...it};if(validateTypedData({domain:tt,message:rt,primaryType:nt,types:st}),at.type==="local")return at.signTypedData({domain:tt,primaryType:nt,types:st,message:rt});const lt=stringify$2({domain:tt??{},primaryType:nt,types:st,message:rt},(dt,ht)=>isHex(ht)?ht.toLowerCase():ht);return _e.request({method:"eth_signTypedData_v4",params:[at.address,lt]})}async function switchChain(_e,{id:et}){await _e.request({method:"wallet_switchEthereumChain",params:[{chainId:numberToHex(et)}]})}async function watchAsset(_e,et){return await _e.request({method:"wallet_watchAsset",params:et})}function walletActions(_e){return{addChain:et=>addChain(_e,et),deployContract:et=>deployContract(_e,et),getAddresses:()=>getAddresses(_e),getChainId:()=>getChainId(_e),getPermissions:()=>getPermissions(_e),requestAddresses:()=>requestAddresses(_e),requestPermissions:et=>requestPermissions(_e,et),sendTransaction:et=>sendTransaction(_e,et),signMessage:et=>signMessage$1(_e,et),signTypedData:et=>signTypedData$1(_e,et),switchChain:et=>switchChain(_e,et),watchAsset:et=>watchAsset(_e,et),writeContract:et=>writeContract(_e,et)}}function createWalletClient(_e){const{key:et="wallet",name:tt="Wallet Client",transport:rt}=_e;return createClient$1({..._e,key:et,name:tt,transport:it=>rt({...it,retryCount:0}),type:"walletClient"}).extend(walletActions)}function webSocket(_e,et={}){const{key:tt="webSocket",name:rt="WebSocket JSON-RPC",retryDelay:nt}=et;return({chain:it,retryCount:at,timeout:st})=>{const lt=et.retryCount??at,dt=st??et.timeout??1e4,ht=_e||it?.rpcUrls.default.webSocket?.[0];if(!ht)throw new UrlRequiredError;return createTransport({key:tt,name:rt,async request({method:pt,params:mt}){const gt={method:pt,params:mt},vt=await getSocket(ht),{error:xt,result:yt}=await rpc$1.webSocketAsync(vt,{body:gt,timeout:dt});if(xt)throw new RpcRequestError({body:gt,error:xt,url:ht});return yt},retryCount:lt,retryDelay:nt,timeout:dt,type:"webSocket"},{getSocket(){return getSocket(ht)},async subscribe({params:pt,onData:mt,onError:gt}){const vt=await getSocket(ht),{result:xt}=await new Promise((yt,bt)=>rpc$1.webSocket(vt,{body:{method:"eth_subscribe",params:pt},onResponse(wt){if(wt.error){bt(wt.error),gt?.(wt.error);return}if(typeof wt.id=="number"){yt(wt);return}wt.method==="eth_subscription"&&mt(wt.params)}}));return{subscriptionId:xt,async unsubscribe(){return new Promise(yt=>rpc$1.webSocket(vt,{body:{method:"eth_unsubscribe",params:[xt]},onResponse:yt}))}}}})}}function number$1(_e){if(!Number.isSafeInteger(_e)||_e<0)throw new Error(`Wrong positive integer: ${_e}`)}function bool(_e){if(typeof _e!="boolean")throw new Error(`Expected boolean, not ${_e}`)}function bytes(_e,...et){if(!(_e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(et.length>0&&!et.includes(_e.length))throw new Error(`Expected Uint8Array of length ${et}, not of length=${_e.length}`)}function hash(_e){if(typeof _e!="function"||typeof _e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");number$1(_e.outputLen),number$1(_e.blockLen)}function exists(_e,et=!0){if(_e.destroyed)throw new Error("Hash instance has been destroyed");if(et&&_e.finished)throw new Error("Hash#digest() has already been called")}function output(_e,et){bytes(_e);const tt=et.outputLen;if(_e.length_e instanceof Uint8Array,createView=_e=>new DataView(_e.buffer,_e.byteOffset,_e.byteLength),rotr=(_e,et)=>_e<<32-et|_e>>>et,isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!isLE)throw new Error("Non little-endian hardware is not supported");Array.from({length:256},(_e,et)=>et.toString(16).padStart(2,"0"));function utf8ToBytes(_e){if(typeof _e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof _e}`);return new Uint8Array(new TextEncoder().encode(_e))}function toBytes(_e){if(typeof _e=="string"&&(_e=utf8ToBytes(_e)),!u8a(_e))throw new Error(`expected Uint8Array, got ${typeof _e}`);return _e}function concatBytes(..._e){const et=new Uint8Array(_e.reduce((rt,nt)=>rt+nt.length,0));let tt=0;return _e.forEach(rt=>{if(!u8a(rt))throw new Error("Uint8Array expected");et.set(rt,tt),tt+=rt.length}),et}class Hash{clone(){return this._cloneInto()}}function wrapConstructor(_e){const et=rt=>_e().update(toBytes(rt)).digest(),tt=_e();return et.outputLen=tt.outputLen,et.blockLen=tt.blockLen,et.create=()=>_e(),et}function randomBytes(_e=32){if(crypto&&typeof crypto.getRandomValues=="function")return crypto.getRandomValues(new Uint8Array(_e));throw new Error("crypto.getRandomValues must be defined")}function setBigUint64(_e,et,tt,rt){if(typeof _e.setBigUint64=="function")return _e.setBigUint64(et,tt,rt);const nt=BigInt(32),it=BigInt(4294967295),at=Number(tt>>nt&it),st=Number(tt&it),lt=rt?4:0,dt=rt?0:4;_e.setUint32(et+lt,at,rt),_e.setUint32(et+dt,st,rt)}class SHA2 extends Hash{constructor(et,tt,rt,nt){super(),this.blockLen=et,this.outputLen=tt,this.padOffset=rt,this.isLE=nt,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(et),this.view=createView(this.buffer)}update(et){assert.exists(this);const{view:tt,buffer:rt,blockLen:nt}=this;et=toBytes(et);const it=et.length;for(let at=0;atnt-at&&(this.process(rt,0),at=0);for(let pt=at;ptht.length)throw new Error("_sha2: outputLen bigger than state");for(let pt=0;pt_e&et^~_e&tt,Maj=(_e,et,tt)=>_e&et^_e&tt^et&tt,SHA256_K=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),IV=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),SHA256_W=new Uint32Array(64);class SHA256 extends SHA2{constructor(){super(64,32,8,!1),this.A=IV[0]|0,this.B=IV[1]|0,this.C=IV[2]|0,this.D=IV[3]|0,this.E=IV[4]|0,this.F=IV[5]|0,this.G=IV[6]|0,this.H=IV[7]|0}get(){const{A:et,B:tt,C:rt,D:nt,E:it,F:at,G:st,H:lt}=this;return[et,tt,rt,nt,it,at,st,lt]}set(et,tt,rt,nt,it,at,st,lt){this.A=et|0,this.B=tt|0,this.C=rt|0,this.D=nt|0,this.E=it|0,this.F=at|0,this.G=st|0,this.H=lt|0}process(et,tt){for(let pt=0;pt<16;pt++,tt+=4)SHA256_W[pt]=et.getUint32(tt,!1);for(let pt=16;pt<64;pt++){const mt=SHA256_W[pt-15],gt=SHA256_W[pt-2],vt=rotr(mt,7)^rotr(mt,18)^mt>>>3,xt=rotr(gt,17)^rotr(gt,19)^gt>>>10;SHA256_W[pt]=xt+SHA256_W[pt-7]+vt+SHA256_W[pt-16]|0}let{A:rt,B:nt,C:it,D:at,E:st,F:lt,G:dt,H:ht}=this;for(let pt=0;pt<64;pt++){const mt=rotr(st,6)^rotr(st,11)^rotr(st,25),gt=ht+mt+Chi(st,lt,dt)+SHA256_K[pt]+SHA256_W[pt]|0,xt=(rotr(rt,2)^rotr(rt,13)^rotr(rt,22))+Maj(rt,nt,it)|0;ht=dt,dt=lt,lt=st,st=at+gt|0,at=it,it=nt,nt=rt,rt=gt+xt|0}rt=rt+this.A|0,nt=nt+this.B|0,it=it+this.C|0,at=at+this.D|0,st=st+this.E|0,lt=lt+this.F|0,dt=dt+this.G|0,ht=ht+this.H|0,this.set(rt,nt,it,at,st,lt,dt,ht)}roundClean(){SHA256_W.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class SHA224 extends SHA256{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const sha256$1=wrapConstructor(()=>new SHA256);wrapConstructor(()=>new SHA224);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$2=BigInt(0),_1n$3=BigInt(1),_2n$1=BigInt(2),_3n$1=BigInt(3),_4n=BigInt(4),_5n=BigInt(5),_8n=BigInt(8);BigInt(9);BigInt(16);function mod(_e,et){const tt=_e%et;return tt>=_0n$2?tt:et+tt}function pow(_e,et,tt){if(tt<=_0n$2||et<_0n$2)throw new Error("Expected power/modulo > 0");if(tt===_1n$3)return _0n$2;let rt=_1n$3;for(;et>_0n$2;)et&_1n$3&&(rt=rt*_e%tt),_e=_e*_e%tt,et>>=_1n$3;return rt}function pow2(_e,et,tt){let rt=_e;for(;et-- >_0n$2;)rt*=rt,rt%=tt;return rt}function invert$1(_e,et){if(_e===_0n$2||et<=_0n$2)throw new Error(`invert: expected positive integers, got n=${_e} mod=${et}`);let tt=mod(_e,et),rt=et,nt=_0n$2,it=_1n$3;for(;tt!==_0n$2;){const st=rt/tt,lt=rt%tt,dt=nt-it*st;rt=tt,tt=lt,nt=it,it=dt}if(rt!==_1n$3)throw new Error("invert: does not exist");return mod(nt,et)}function tonelliShanks(_e){const et=(_e-_1n$3)/_2n$1;let tt,rt,nt;for(tt=_e-_1n$3,rt=0;tt%_2n$1===_0n$2;tt/=_2n$1,rt++);for(nt=_2n$1;nt<_e&&pow(nt,et,_e)!==_e-_1n$3;nt++);if(rt===1){const at=(_e+_1n$3)/_4n;return function(lt,dt){const ht=lt.pow(dt,at);if(!lt.eql(lt.sqr(ht),dt))throw new Error("Cannot find square root");return ht}}const it=(tt+_1n$3)/_2n$1;return function(st,lt){if(st.pow(lt,et)===st.neg(st.ONE))throw new Error("Cannot find square root");let dt=rt,ht=st.pow(st.mul(st.ONE,nt),tt),pt=st.pow(lt,it),mt=st.pow(lt,tt);for(;!st.eql(mt,st.ONE);){if(st.eql(mt,st.ZERO))return st.ZERO;let gt=1;for(let xt=st.sqr(mt);gt(rt[nt]="function",rt),et);return validateObject(_e,tt)}function FpPow(_e,et,tt){if(tt<_0n$2)throw new Error("Expected power > 0");if(tt===_0n$2)return _e.ONE;if(tt===_1n$3)return et;let rt=_e.ONE,nt=et;for(;tt>_0n$2;)tt&_1n$3&&(rt=_e.mul(rt,nt)),nt=_e.sqr(nt),tt>>=_1n$3;return rt}function FpInvertBatch(_e,et){const tt=new Array(et.length),rt=et.reduce((it,at,st)=>_e.is0(at)?it:(tt[st]=it,_e.mul(it,at)),_e.ONE),nt=_e.inv(rt);return et.reduceRight((it,at,st)=>_e.is0(at)?it:(tt[st]=_e.mul(it,tt[st]),_e.mul(it,at)),nt),tt}function nLength(_e,et){const tt=et!==void 0?et:_e.toString(2).length,rt=Math.ceil(tt/8);return{nBitLength:tt,nByteLength:rt}}function Field$1(_e,et,tt=!1,rt={}){if(_e<=_0n$2)throw new Error(`Expected Fp ORDER > 0, got ${_e}`);const{nBitLength:nt,nByteLength:it}=nLength(_e,et);if(it>2048)throw new Error("Field lengths over 2048 bytes are not supported");const at=FpSqrt(_e),st=Object.freeze({ORDER:_e,BITS:nt,BYTES:it,MASK:bitMask(nt),ZERO:_0n$2,ONE:_1n$3,create:lt=>mod(lt,_e),isValid:lt=>{if(typeof lt!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof lt}`);return _0n$2<=lt&<<_e},is0:lt=>lt===_0n$2,isOdd:lt=>(lt&_1n$3)===_1n$3,neg:lt=>mod(-lt,_e),eql:(lt,dt)=>lt===dt,sqr:lt=>mod(lt*lt,_e),add:(lt,dt)=>mod(lt+dt,_e),sub:(lt,dt)=>mod(lt-dt,_e),mul:(lt,dt)=>mod(lt*dt,_e),pow:(lt,dt)=>FpPow(st,lt,dt),div:(lt,dt)=>mod(lt*invert$1(dt,_e),_e),sqrN:lt=>lt*lt,addN:(lt,dt)=>lt+dt,subN:(lt,dt)=>lt-dt,mulN:(lt,dt)=>lt*dt,inv:lt=>invert$1(lt,_e),sqrt:rt.sqrt||(lt=>at(st,lt)),invertBatch:lt=>FpInvertBatch(st,lt),cmov:(lt,dt,ht)=>ht?dt:lt,toBytes:lt=>tt?numberToBytesLE(lt,it):numberToBytesBE(lt,it),fromBytes:lt=>{if(lt.length!==it)throw new Error(`Fp.fromBytes: expected ${it}, got ${lt.length}`);return tt?bytesToNumberLE(lt):bytesToNumberBE(lt)}});return Object.freeze(st)}function hashToPrivateScalar(_e,et,tt=!1){_e=ensureBytes("privateHash",_e);const rt=_e.length,nt=nLength(et).nByteLength+8;if(nt<24||rt1024)throw new Error(`hashToPrivateScalar: expected ${nt}-1024 bytes of input, got ${rt}`);const it=tt?bytesToNumberLE(_e):bytesToNumberBE(_e);return mod(it,et-_1n$3)+_1n$3}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const _0n$1=BigInt(0),_1n$2=BigInt(1);function wNAF(_e,et){const tt=(nt,it)=>{const at=it.negate();return nt?at:it},rt=nt=>{const it=Math.ceil(et/nt)+1,at=2**(nt-1);return{windows:it,windowSize:at}};return{constTimeNegate:tt,unsafeLadder(nt,it){let at=_e.ZERO,st=nt;for(;it>_0n$1;)it&_1n$2&&(at=at.add(st)),st=st.double(),it>>=_1n$2;return at},precomputeWindow(nt,it){const{windows:at,windowSize:st}=rt(it),lt=[];let dt=nt,ht=dt;for(let pt=0;pt>=gt,yt>lt&&(yt-=mt,at+=_1n$2);const bt=xt,wt=xt+Math.abs(yt)-1,Et=vt%2!==0,$t=yt<0;yt===0?ht=ht.add(tt(Et,it[bt])):dt=dt.add(tt($t,it[wt]))}return{p:dt,f:ht}},wNAFCached(nt,it,at,st){const lt=nt._WINDOW_SIZE||1;let dt=it.get(nt);return dt||(dt=this.precomputeWindow(nt,lt),lt!==1&&it.set(nt,st(dt))),this.wNAF(lt,dt,at)}}}function validateBasic(_e){return validateField(_e.Fp),validateObject(_e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...nLength(_e.n,_e.nBitLength),..._e,p:_e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function validatePointOpts(_e){const et=validateBasic(_e);validateObject(et,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:tt,Fp:rt,a:nt}=et;if(tt){if(!rt.eql(nt,rt.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof tt!="object"||typeof tt.beta!="bigint"||typeof tt.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...et})}const{bytesToNumberBE:b2n,hexToBytes:h2b}=ut$1,DER={Err:class extends Error{constructor(et=""){super(et)}},_parseInt(_e){const{Err:et}=DER;if(_e.length<2||_e[0]!==2)throw new et("Invalid signature integer tag");const tt=_e[1],rt=_e.subarray(2,tt+2);if(!tt||rt.length!==tt)throw new et("Invalid signature integer: wrong length");if(rt[0]&128)throw new et("Invalid signature integer: negative");if(rt[0]===0&&!(rt[1]&128))throw new et("Invalid signature integer: unnecessary leading zero");return{d:b2n(rt),l:_e.subarray(tt+2)}},toSig(_e){const{Err:et}=DER,tt=typeof _e=="string"?h2b(_e):_e;if(!(tt instanceof Uint8Array))throw new Error("ui8a expected");let rt=tt.length;if(rt<2||tt[0]!=48)throw new et("Invalid signature tag");if(tt[1]!==rt-2)throw new et("Invalid signature: incorrect length");const{d:nt,l:it}=DER._parseInt(tt.subarray(2)),{d:at,l:st}=DER._parseInt(it);if(st.length)throw new et("Invalid signature: left bytes after parsing");return{r:nt,s:at}},hexFromSig(_e){const et=dt=>Number.parseInt(dt[0],16)&8?"00"+dt:dt,tt=dt=>{const ht=dt.toString(16);return ht.length&1?`0${ht}`:ht},rt=et(tt(_e.s)),nt=et(tt(_e.r)),it=rt.length/2,at=nt.length/2,st=tt(it),lt=tt(at);return`30${tt(at+it+4)}02${lt}${nt}02${st}${rt}`}},_0n=BigInt(0),_1n$1=BigInt(1);BigInt(2);const _3n=BigInt(3);BigInt(4);function weierstrassPoints(_e){const et=validatePointOpts(_e),{Fp:tt}=et,rt=et.toBytes||((vt,xt,yt)=>{const bt=xt.toAffine();return concatBytes$1(Uint8Array.from([4]),tt.toBytes(bt.x),tt.toBytes(bt.y))}),nt=et.fromBytes||(vt=>{const xt=vt.subarray(1),yt=tt.fromBytes(xt.subarray(0,tt.BYTES)),bt=tt.fromBytes(xt.subarray(tt.BYTES,2*tt.BYTES));return{x:yt,y:bt}});function it(vt){const{a:xt,b:yt}=et,bt=tt.sqr(vt),wt=tt.mul(bt,vt);return tt.add(tt.add(wt,tt.mul(vt,xt)),yt)}if(!tt.eql(tt.sqr(et.Gy),it(et.Gx)))throw new Error("bad generator point: equation left != right");function at(vt){return typeof vt=="bigint"&&_0ntt.eql(Et,tt.ZERO);return wt(yt)&&wt(bt)?pt.ZERO:new pt(yt,bt,tt.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(xt){const yt=tt.invertBatch(xt.map(bt=>bt.pz));return xt.map((bt,wt)=>bt.toAffine(yt[wt])).map(pt.fromAffine)}static fromHex(xt){const yt=pt.fromAffine(nt(ensureBytes("pointHex",xt)));return yt.assertValidity(),yt}static fromPrivateKey(xt){return pt.BASE.multiply(lt(xt))}_setWindowSize(xt){this._WINDOW_SIZE=xt,dt.delete(this)}assertValidity(){if(this.is0()){if(et.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:xt,y:yt}=this.toAffine();if(!tt.isValid(xt)||!tt.isValid(yt))throw new Error("bad point: x or y not FE");const bt=tt.sqr(yt),wt=it(xt);if(!tt.eql(bt,wt))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:xt}=this.toAffine();if(tt.isOdd)return!tt.isOdd(xt);throw new Error("Field doesn't support isOdd")}equals(xt){ht(xt);const{px:yt,py:bt,pz:wt}=this,{px:Et,py:$t,pz:Pt}=xt,kt=tt.eql(tt.mul(yt,Pt),tt.mul(Et,wt)),Lt=tt.eql(tt.mul(bt,Pt),tt.mul($t,wt));return kt&&Lt}negate(){return new pt(this.px,tt.neg(this.py),this.pz)}double(){const{a:xt,b:yt}=et,bt=tt.mul(yt,_3n),{px:wt,py:Et,pz:$t}=this;let Pt=tt.ZERO,kt=tt.ZERO,Lt=tt.ZERO,jt=tt.mul(wt,wt),qt=tt.mul(Et,Et),Dt=tt.mul($t,$t),Ht=tt.mul(wt,Et);return Ht=tt.add(Ht,Ht),Lt=tt.mul(wt,$t),Lt=tt.add(Lt,Lt),Pt=tt.mul(xt,Lt),kt=tt.mul(bt,Dt),kt=tt.add(Pt,kt),Pt=tt.sub(qt,kt),kt=tt.add(qt,kt),kt=tt.mul(Pt,kt),Pt=tt.mul(Ht,Pt),Lt=tt.mul(bt,Lt),Dt=tt.mul(xt,Dt),Ht=tt.sub(jt,Dt),Ht=tt.mul(xt,Ht),Ht=tt.add(Ht,Lt),Lt=tt.add(jt,jt),jt=tt.add(Lt,jt),jt=tt.add(jt,Dt),jt=tt.mul(jt,Ht),kt=tt.add(kt,jt),Dt=tt.mul(Et,$t),Dt=tt.add(Dt,Dt),jt=tt.mul(Dt,Ht),Pt=tt.sub(Pt,jt),Lt=tt.mul(Dt,qt),Lt=tt.add(Lt,Lt),Lt=tt.add(Lt,Lt),new pt(Pt,kt,Lt)}add(xt){ht(xt);const{px:yt,py:bt,pz:wt}=this,{px:Et,py:$t,pz:Pt}=xt;let kt=tt.ZERO,Lt=tt.ZERO,jt=tt.ZERO;const qt=et.a,Dt=tt.mul(et.b,_3n);let Ht=tt.mul(yt,Et),Xt=tt.mul(bt,$t),Mt=tt.mul(wt,Pt),_t=tt.add(yt,bt),At=tt.add(Et,$t);_t=tt.mul(_t,At),At=tt.add(Ht,Xt),_t=tt.sub(_t,At),At=tt.add(yt,wt);let Tt=tt.add(Et,Pt);return At=tt.mul(At,Tt),Tt=tt.add(Ht,Mt),At=tt.sub(At,Tt),Tt=tt.add(bt,wt),kt=tt.add($t,Pt),Tt=tt.mul(Tt,kt),kt=tt.add(Xt,Mt),Tt=tt.sub(Tt,kt),jt=tt.mul(qt,At),kt=tt.mul(Dt,Mt),jt=tt.add(kt,jt),kt=tt.sub(Xt,jt),jt=tt.add(Xt,jt),Lt=tt.mul(kt,jt),Xt=tt.add(Ht,Ht),Xt=tt.add(Xt,Ht),Mt=tt.mul(qt,Mt),At=tt.mul(Dt,At),Xt=tt.add(Xt,Mt),Mt=tt.sub(Ht,Mt),Mt=tt.mul(qt,Mt),At=tt.add(At,Mt),Ht=tt.mul(Xt,At),Lt=tt.add(Lt,Ht),Ht=tt.mul(Tt,At),kt=tt.mul(_t,kt),kt=tt.sub(kt,Ht),Ht=tt.mul(_t,Xt),jt=tt.mul(Tt,jt),jt=tt.add(jt,Ht),new pt(kt,Lt,jt)}subtract(xt){return this.add(xt.negate())}is0(){return this.equals(pt.ZERO)}wNAF(xt){return gt.wNAFCached(this,dt,xt,yt=>{const bt=tt.invertBatch(yt.map(wt=>wt.pz));return yt.map((wt,Et)=>wt.toAffine(bt[Et])).map(pt.fromAffine)})}multiplyUnsafe(xt){const yt=pt.ZERO;if(xt===_0n)return yt;if(st(xt),xt===_1n$1)return this;const{endo:bt}=et;if(!bt)return gt.unsafeLadder(this,xt);let{k1neg:wt,k1:Et,k2neg:$t,k2:Pt}=bt.splitScalar(xt),kt=yt,Lt=yt,jt=this;for(;Et>_0n||Pt>_0n;)Et&_1n$1&&(kt=kt.add(jt)),Pt&_1n$1&&(Lt=Lt.add(jt)),jt=jt.double(),Et>>=_1n$1,Pt>>=_1n$1;return wt&&(kt=kt.negate()),$t&&(Lt=Lt.negate()),Lt=new pt(tt.mul(Lt.px,bt.beta),Lt.py,Lt.pz),kt.add(Lt)}multiply(xt){st(xt);let yt=xt,bt,wt;const{endo:Et}=et;if(Et){const{k1neg:$t,k1:Pt,k2neg:kt,k2:Lt}=Et.splitScalar(yt);let{p:jt,f:qt}=this.wNAF(Pt),{p:Dt,f:Ht}=this.wNAF(Lt);jt=gt.constTimeNegate($t,jt),Dt=gt.constTimeNegate(kt,Dt),Dt=new pt(tt.mul(Dt.px,Et.beta),Dt.py,Dt.pz),bt=jt.add(Dt),wt=qt.add(Ht)}else{const{p:$t,f:Pt}=this.wNAF(yt);bt=$t,wt=Pt}return pt.normalizeZ([bt,wt])[0]}multiplyAndAddUnsafe(xt,yt,bt){const wt=pt.BASE,Et=(Pt,kt)=>kt===_0n||kt===_1n$1||!Pt.equals(wt)?Pt.multiplyUnsafe(kt):Pt.multiply(kt),$t=Et(this,yt).add(Et(xt,bt));return $t.is0()?void 0:$t}toAffine(xt){const{px:yt,py:bt,pz:wt}=this,Et=this.is0();xt==null&&(xt=Et?tt.ONE:tt.inv(wt));const $t=tt.mul(yt,xt),Pt=tt.mul(bt,xt),kt=tt.mul(wt,xt);if(Et)return{x:tt.ZERO,y:tt.ZERO};if(!tt.eql(kt,tt.ONE))throw new Error("invZ was invalid");return{x:$t,y:Pt}}isTorsionFree(){const{h:xt,isTorsionFree:yt}=et;if(xt===_1n$1)return!0;if(yt)return yt(pt,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:xt,clearCofactor:yt}=et;return xt===_1n$1?this:yt?yt(pt,this):this.multiplyUnsafe(et.h)}toRawBytes(xt=!0){return this.assertValidity(),rt(pt,this,xt)}toHex(xt=!0){return bytesToHex(this.toRawBytes(xt))}}pt.BASE=new pt(et.Gx,et.Gy,tt.ONE),pt.ZERO=new pt(tt.ZERO,tt.ONE,tt.ZERO);const mt=et.nBitLength,gt=wNAF(pt,et.endo?Math.ceil(mt/2):mt);return{CURVE:et,ProjectivePoint:pt,normPrivateKeyToScalar:lt,weierstrassEquation:it,isWithinCurveOrder:at}}function validateOpts(_e){const et=validateBasic(_e);return validateObject(et,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...et})}function weierstrass(_e){const et=validateOpts(_e),{Fp:tt,n:rt}=et,nt=tt.BYTES+1,it=2*tt.BYTES+1;function at(At){return _0nbytesToHex(numberToBytesBE(At,et.nByteLength));function vt(At){const Tt=rt>>_1n$1;return At>Tt}function xt(At){return vt(At)?st(-At):At}const yt=(At,Tt,Bt)=>bytesToNumberBE(At.slice(Tt,Bt));class bt{constructor(Tt,Bt,Ot){this.r=Tt,this.s=Bt,this.recovery=Ot,this.assertValidity()}static fromCompact(Tt){const Bt=et.nByteLength;return Tt=ensureBytes("compactSignature",Tt,Bt*2),new bt(yt(Tt,0,Bt),yt(Tt,Bt,2*Bt))}static fromDER(Tt){const{r:Bt,s:Ot}=DER.toSig(ensureBytes("DER",Tt));return new bt(Bt,Ot)}assertValidity(){if(!mt(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!mt(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(Tt){return new bt(this.r,this.s,Tt)}recoverPublicKey(Tt){const{r:Bt,s:Ot,recovery:Ut}=this,Wt=Lt(ensureBytes("msgHash",Tt));if(Ut==null||![0,1,2,3].includes(Ut))throw new Error("recovery id invalid");const Ct=Ut===2||Ut===3?Bt+et.n:Bt;if(Ct>=tt.ORDER)throw new Error("recovery id 2 or 3 invalid");const St=Ut&1?"03":"02",Ft=dt.fromHex(St+gt(Ct)),Vt=lt(Ct),Rt=st(-Wt*Vt),Kt=st(Ot*Vt),Zt=dt.BASE.multiplyAndAddUnsafe(Ft,Rt,Kt);if(!Zt)throw new Error("point at infinify");return Zt.assertValidity(),Zt}hasHighS(){return vt(this.s)}normalizeS(){return this.hasHighS()?new bt(this.r,st(-this.s),this.recovery):this}toDERRawBytes(){return hexToBytes(this.toDERHex())}toDERHex(){return DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return hexToBytes(this.toCompactHex())}toCompactHex(){return gt(this.r)+gt(this.s)}}const wt={isValidPrivateKey(At){try{return ht(At),!0}catch{return!1}},normPrivateKeyToScalar:ht,randomPrivateKey:()=>{const At=et.randomBytes(tt.BYTES+8),Tt=hashToPrivateScalar(At,rt);return numberToBytesBE(Tt,et.nByteLength)},precompute(At=8,Tt=dt.BASE){return Tt._setWindowSize(At),Tt.multiply(BigInt(3)),Tt}};function Et(At,Tt=!0){return dt.fromPrivateKey(At).toRawBytes(Tt)}function $t(At){const Tt=At instanceof Uint8Array,Bt=typeof At=="string",Ot=(Tt||Bt)&&At.length;return Tt?Ot===nt||Ot===it:Bt?Ot===2*nt||Ot===2*it:At instanceof dt}function Pt(At,Tt,Bt=!0){if($t(At))throw new Error("first arg must be private key");if(!$t(Tt))throw new Error("second arg must be public key");return dt.fromHex(Tt).multiply(ht(At)).toRawBytes(Bt)}const kt=et.bits2int||function(At){const Tt=bytesToNumberBE(At),Bt=At.length*8-et.nBitLength;return Bt>0?Tt>>BigInt(Bt):Tt},Lt=et.bits2int_modN||function(At){return st(kt(At))},jt=bitMask(et.nBitLength);function qt(At){if(typeof At!="bigint")throw new Error("bigint expected");if(!(_0n<=At&&Atrr in Bt))throw new Error("sign() legacy options not supported");const{hash:Ot,randomBytes:Ut}=et;let{lowS:Wt,prehash:Ct,extraEntropy:St}=Bt;Wt==null&&(Wt=!0),At=ensureBytes("msgHash",At),Ct&&(At=ensureBytes("prehashed msgHash",Ot(At)));const Ft=Lt(At),Vt=ht(Tt),Rt=[qt(Vt),qt(Ft)];if(St!=null){const rr=St===!0?Ut(tt.BYTES):St;Rt.push(ensureBytes("extraEntropy",rr,tt.BYTES))}const Kt=concatBytes$1(...Rt),Zt=Ft;function Jt(rr){const or=kt(rr);if(!mt(or))return;const ar=lt(or),ir=dt.BASE.multiply(or).toAffine(),pr=st(ir.x);if(pr===_0n)return;const nr=st(ar*st(Zt+pr*Vt));if(nr===_0n)return;let hr=(ir.x===pr?0:2)|Number(ir.y&_1n$1),Ar=nr;return Wt&&vt(nr)&&(Ar=xt(nr),hr^=1),new bt(pr,Ar,hr)}return{seed:Kt,k2sig:Jt}}const Ht={lowS:et.lowS,prehash:!1},Xt={lowS:et.lowS,prehash:!1};function Mt(At,Tt,Bt=Ht){const{seed:Ot,k2sig:Ut}=Dt(At,Tt,Bt),Wt=et;return createHmacDrbg(Wt.hash.outputLen,Wt.nByteLength,Wt.hmac)(Ot,Ut)}dt.BASE._setWindowSize(8);function _t(At,Tt,Bt,Ot=Xt){const Ut=At;if(Tt=ensureBytes("msgHash",Tt),Bt=ensureBytes("publicKey",Bt),"strict"in Ot)throw new Error("options.strict was renamed to lowS");const{lowS:Wt,prehash:Ct}=Ot;let St,Ft;try{if(typeof Ut=="string"||Ut instanceof Uint8Array)try{St=bt.fromDER(Ut)}catch(ir){if(!(ir instanceof DER.Err))throw ir;St=bt.fromCompact(Ut)}else if(typeof Ut=="object"&&typeof Ut.r=="bigint"&&typeof Ut.s=="bigint"){const{r:ir,s:pr}=Ut;St=new bt(ir,pr)}else throw new Error("PARSE");Ft=dt.fromHex(Bt)}catch(ir){if(ir.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Wt&&St.hasHighS())return!1;Ct&&(Tt=et.hash(Tt));const{r:Vt,s:Rt}=St,Kt=Lt(Tt),Zt=lt(Rt),Jt=st(Kt*Zt),rr=st(Vt*Zt),or=dt.BASE.multiplyAndAddUnsafe(Ft,Jt,rr)?.toAffine();return or?st(or.x)===Vt:!1}return{CURVE:et,getPublicKey:Et,getSharedSecret:Pt,sign:Mt,verify:_t,ProjectivePoint:dt,Signature:bt,utils:wt}}class HMAC extends Hash{constructor(et,tt){super(),this.finished=!1,this.destroyed=!1,assert.hash(et);const rt=toBytes(tt);if(this.iHash=et.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const nt=this.blockLen,it=new Uint8Array(nt);it.set(rt.length>nt?et.create().update(rt).digest():rt);for(let at=0;atnew HMAC(_e,et).update(tt).digest();hmac$1.create=(_e,et)=>new HMAC(_e,et);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function getHash(_e){return{hash:_e,hmac:(et,...tt)=>hmac$1(_e,et,concatBytes(...tt)),randomBytes}}function createCurve(_e,et){const tt=rt=>weierstrass({..._e,...getHash(rt)});return Object.freeze({...tt(et),create:tt})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const secp256k1P=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),secp256k1N=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),_1n=BigInt(1),_2n=BigInt(2),divNearest=(_e,et)=>(_e+et/_2n)/et;function sqrtMod(_e){const et=secp256k1P,tt=BigInt(3),rt=BigInt(6),nt=BigInt(11),it=BigInt(22),at=BigInt(23),st=BigInt(44),lt=BigInt(88),dt=_e*_e*_e%et,ht=dt*dt*_e%et,pt=pow2(ht,tt,et)*ht%et,mt=pow2(pt,tt,et)*ht%et,gt=pow2(mt,_2n,et)*dt%et,vt=pow2(gt,nt,et)*gt%et,xt=pow2(vt,it,et)*vt%et,yt=pow2(xt,st,et)*xt%et,bt=pow2(yt,lt,et)*yt%et,wt=pow2(bt,st,et)*xt%et,Et=pow2(wt,tt,et)*ht%et,$t=pow2(Et,at,et)*vt%et,Pt=pow2($t,rt,et)*dt%et,kt=pow2(Pt,_2n,et);if(!Fp.eql(Fp.sqr(kt),_e))throw new Error("Cannot find square root");return kt}const Fp=Field$1(secp256k1P,void 0,void 0,{sqrt:sqrtMod}),secp256k1=createCurve({a:BigInt(0),b:BigInt(7),Fp,n:secp256k1N,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:_e=>{const et=secp256k1N,tt=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),rt=-_1n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),nt=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),it=tt,at=BigInt("0x100000000000000000000000000000000"),st=divNearest(it*_e,et),lt=divNearest(-rt*_e,et);let dt=mod(_e-st*tt-lt*nt,et),ht=mod(-st*rt-lt*it,et);const pt=dt>at,mt=ht>at;if(pt&&(dt=et-dt),mt&&(ht=et-ht),dt>at||ht>at)throw new Error("splitScalar: Endomorphism failed, k="+_e);return{k1neg:pt,k1:dt,k2neg:mt,k2:ht}}}},sha256$1);BigInt(0);secp256k1.ProjectivePoint;function signatureToHex({r:_e,s:et,v:tt}){return`0x${new secp256k1.Signature(hexToBigInt(_e),hexToBigInt(et)).toCompactHex()}${toHex$1(tt).slice(2)}`}function t$4(_e,et){throw new Error(et??`Unexpected value: ${_e}`)}function u$3(..._e){return _e.reduce((et,tt)=>ttet?1:0}function*f$4(_e,et){for(let tt=0;tt<_e.length;tt+=et)yield _e.slice(tt,tt+et)}function P$7(_e){return _e!==void 0}function b$4(_e){return new Promise(et=>setTimeout(()=>et(),_e))}var r$2=class extends Error{name="MUDError"};function ne$2(_e){let et=[],tt=[];for(let rt of _e)T$4(rt)?tt.push(rt):et.push(rt);return{staticFields:et,dynamicFields:tt}}var d$5=class extends r$2{name="InvalidHexValueError";constructor(et){super(`Hex value "${et}" is an odd length (${et.length-2}). It must be an even length.`)}},f$3=class extends r$2{name="InvalidHexLengthForSchemaError";constructor(et){super(`Hex value "${et}" has length of ${et.length-2}, but expected length of 64 for a schema.`)}},x$6=class extends r$2{name="InvalidHexLengthForPackedCounterError";constructor(et){super(`Hex value "${et}" has length of ${et.length-2}, but expected length of 64 for a packed counter.`)}},g$6=class extends r$2{name="InvalidHexLengthForStaticFieldError";constructor(et,tt){super(`Hex value "${tt}" has length of ${tt.length-2}, but expected length of ${A$4[et]*2} for ${et} type.`)}},S$3=class extends r$2{name="InvalidHexLengthForArrayFieldError";constructor(et,tt){super(`Hex value "${tt}" has length of ${tt.length-2}, but expected a multiple of ${A$4[et]*2} for ${et}[] type.`)}},A$3=class extends r$2{name="SchemaStaticLengthMismatchError";constructor(et,tt,rt){super(`Schema "${et}" static data length (${tt}) did not match the summed length of all static fields (${rt}). Is \`staticAbiTypeToByteLength\` up to date with Solidity schema types?`)}},v$6=class extends r$2{name="PackedCounterLengthMismatchError";constructor(et,tt,rt){super(`PackedCounter "${et}" total bytes length (${tt}) did not match the summed length of all field byte lengths (${rt}).`)}};function p$3(_e,et){if(et.length>3&&et.length%2!==0)throw new d$5(et);if((et.length-2)/2!==A$4[_e])throw new g$6(_e,et);switch(_e){case"uint8":case"uint16":case"uint24":case"uint32":case"uint40":case"uint48":case"uint56":case"uint64":case"uint72":case"uint80":case"uint88":case"uint96":case"uint104":case"uint112":case"uint120":case"uint128":case"uint136":case"uint144":case"uint152":case"uint160":case"uint168":case"uint176":case"uint184":case"uint192":case"uint200":case"uint208":case"uint216":case"uint224":case"uint232":case"uint240":case"uint248":case"uint256":case"int8":case"int16":case"int24":case"int32":case"int40":case"int48":case"int56":case"int64":case"int72":case"int80":case"int88":case"int96":case"int104":case"int112":case"int120":case"int128":case"int136":case"int144":case"int152":case"int160":case"int168":case"int176":case"int184":case"int192":case"int200":case"int208":case"int216":case"int224":case"int232":case"int240":case"int248":case"int256":{let tt=hexToBigInt(et,{signed:_e.startsWith("int")}),rt=typeof a$4[_e];if(rt==="number")return Number(tt);if(rt==="bigint")return tt;throw new Error(`Unexpected default value type (${rt}) for ABI type (${_e})`)}case"bytes1":case"bytes2":case"bytes3":case"bytes4":case"bytes5":case"bytes6":case"bytes7":case"bytes8":case"bytes9":case"bytes10":case"bytes11":case"bytes12":case"bytes13":case"bytes14":case"bytes15":case"bytes16":case"bytes17":case"bytes18":case"bytes19":case"bytes20":case"bytes21":case"bytes22":case"bytes23":case"bytes24":case"bytes25":case"bytes26":case"bytes27":case"bytes28":case"bytes29":case"bytes30":case"bytes31":case"bytes32":return et;case"bool":return hexToBool(et);case"address":return getAddress(et)}return t$4(_e,`Unsupported static ABI type: ${_e}`)}function h$5(_e,et){if(_e==="bytes")return et;if(_e==="string")return hexToString(et);if(et.length>3&&et.length%2!==0)throw new d$5(et);let tt=(et.length-2)/2;switch(_e){case"uint8[]":case"uint16[]":case"uint24[]":case"uint32[]":case"uint40[]":case"uint48[]":case"uint56[]":case"uint64[]":case"uint72[]":case"uint80[]":case"uint88[]":case"uint96[]":case"uint104[]":case"uint112[]":case"uint120[]":case"uint128[]":case"uint136[]":case"uint144[]":case"uint152[]":case"uint160[]":case"uint168[]":case"uint176[]":case"uint184[]":case"uint192[]":case"uint200[]":case"uint208[]":case"uint216[]":case"uint224[]":case"uint232[]":case"uint240[]":case"uint248[]":case"uint256[]":case"int8[]":case"int16[]":case"int24[]":case"int32[]":case"int40[]":case"int48[]":case"int56[]":case"int64[]":case"int72[]":case"int80[]":case"int88[]":case"int96[]":case"int104[]":case"int112[]":case"int120[]":case"int128[]":case"int136[]":case"int144[]":case"int152[]":case"int160[]":case"int168[]":case"int176[]":case"int184[]":case"int192[]":case"int200[]":case"int208[]":case"int216[]":case"int224[]":case"int232[]":case"int240[]":case"int248[]":case"int256[]":case"bytes1[]":case"bytes2[]":case"bytes3[]":case"bytes4[]":case"bytes5[]":case"bytes6[]":case"bytes7[]":case"bytes8[]":case"bytes9[]":case"bytes10[]":case"bytes11[]":case"bytes12[]":case"bytes13[]":case"bytes14[]":case"bytes15[]":case"bytes16[]":case"bytes17[]":case"bytes18[]":case"bytes19[]":case"bytes20[]":case"bytes21[]":case"bytes22[]":case"bytes23[]":case"bytes24[]":case"bytes25[]":case"bytes26[]":case"bytes27[]":case"bytes28[]":case"bytes29[]":case"bytes30[]":case"bytes31[]":case"bytes32[]":case"bool[]":case"address[]":{let rt=r$3(_e),nt=A$4[rt];if(tt%nt!==0)throw new S$3(rt,et);return new Array(tt/nt).fill(void 0).map((it,at)=>{let st=sliceHex(et,at*nt,(at+1)*nt);return p$3(rt,st)})}}return t$4(_e,`Unsupported dynamic ABI type: ${_e}`)}function ke$1(_e,et){return T$4(_e)?h$5(_e,et):p$3(_e,et)}function ze$1(_e,et){if(_e.staticFields.length!==et.length)throw new Error(`key tuple length ${et.length} does not match key schema length ${_e.staticFields.length}`);return et.map((tt,rt)=>decodeAbiParameters([{type:_e.staticFields[rt]}],tt)[0])}function B$4(_e){if(_e.length!==66)throw new x$6(_e);let et=p$3("uint56",sliceHex(_e,32-7,32)),tt=h$5("uint40[]",sliceHex(_e,0,32-7)),rt=Object.freeze([...tt].reverse()),nt=BigInt(rt.reduce((it,at)=>it+at,0));if(nt!==et)throw new v$6(_e,et,nt);return{totalByteLength:et,fieldByteLengths:rt}}function P$6(_e){return _e.reduce((et,tt)=>et+A$4[tt],0)}function ct(_e,et){let tt=[],rt=0;_e.staticFields.forEach(at=>{let st=A$4[at],lt=p$3(at,sliceHex(et,rt,rt+st));rt+=st,tt.push(lt)});let nt=P$6(_e.staticFields),it=rt;if(it!==nt&&console.warn("Decoded static data length does not match schema's expected static data length. Data may get corrupted. Is `getStaticByteLength` outdated?",{expectedLength:nt,actualLength:it,bytesOffset:rt}),_e.dynamicFields.length>0){let at=B$4(sliceHex(et,rt,rt+32));rt+=32,_e.dynamicFields.forEach((lt,dt)=>{let ht=at.fieldByteLengths[dt];if(ht>0){let pt=h$5(lt,sliceHex(et,rt,rt+ht));rt+=ht,tt.push(pt)}else tt.push(s$3[lt])});let st=rt-32-it;BigInt(st)!==at.totalByteLength&&console.warn("Decoded dynamic data length does not match data layout's expected data length. Data may get corrupted. Did the data layout change?",{expectedLength:at.totalByteLength,actualLength:st,bytesOffset:rt})}return tt}function D$2(_e){if(_e.length!==66)throw new f$3(_e);let et=hexToNumber$1(sliceHex(_e,0,2)),tt=hexToNumber$1(sliceHex(_e,2,3)),rt=hexToNumber$1(sliceHex(_e,3,4)),nt=[],it=[];for(let st=4;st<4+tt;st++){let lt=hexToNumber$1(sliceHex(_e,st,st+1));nt.push(n$2[lt])}for(let st=4+tt;st<4+tt+rt;st++){let lt=hexToNumber$1(sliceHex(_e,st,st+1));it.push(n$2[lt])}let at=nt.reduce((st,lt)=>st+A$4[lt],0);if(at!==et)throw console.warn(`Schema "${_e}" static data length (${et}) did not match the summed length of all static fields (${at}). Is \`staticAbiTypeToByteLength\` up to date with Solidity schema types?`),new A$3(_e,et,at);return{staticFields:nt,dynamicFields:it}}var browser={exports:{}},ms,hasRequiredMs;function requireMs(){if(hasRequiredMs)return ms;hasRequiredMs=1;var _e=1e3,et=_e*60,tt=et*60,rt=tt*24,nt=rt*7,it=rt*365.25;ms=function(ht,pt){pt=pt||{};var mt=typeof ht;if(mt==="string"&&ht.length>0)return at(ht);if(mt==="number"&&isFinite(ht))return pt.long?lt(ht):st(ht);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ht))};function at(ht){if(ht=String(ht),!(ht.length>100)){var pt=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(ht);if(pt){var mt=parseFloat(pt[1]),gt=(pt[2]||"ms").toLowerCase();switch(gt){case"years":case"year":case"yrs":case"yr":case"y":return mt*it;case"weeks":case"week":case"w":return mt*nt;case"days":case"day":case"d":return mt*rt;case"hours":case"hour":case"hrs":case"hr":case"h":return mt*tt;case"minutes":case"minute":case"mins":case"min":case"m":return mt*et;case"seconds":case"second":case"secs":case"sec":case"s":return mt*_e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return mt;default:return}}}}function st(ht){var pt=Math.abs(ht);return pt>=rt?Math.round(ht/rt)+"d":pt>=tt?Math.round(ht/tt)+"h":pt>=et?Math.round(ht/et)+"m":pt>=_e?Math.round(ht/_e)+"s":ht+"ms"}function lt(ht){var pt=Math.abs(ht);return pt>=rt?dt(ht,pt,rt,"day"):pt>=tt?dt(ht,pt,tt,"hour"):pt>=et?dt(ht,pt,et,"minute"):pt>=_e?dt(ht,pt,_e,"second"):ht+" ms"}function dt(ht,pt,mt,gt){var vt=pt>=mt*1.5;return Math.round(ht/mt)+" "+gt+(vt?"s":"")}return ms}function setup$1(_e){tt.debug=tt,tt.default=tt,tt.coerce=lt,tt.disable=it,tt.enable=nt,tt.enabled=at,tt.humanize=requireMs(),tt.destroy=dt,Object.keys(_e).forEach(ht=>{tt[ht]=_e[ht]}),tt.names=[],tt.skips=[],tt.formatters={};function et(ht){let pt=0;for(let mt=0;mt{if(kt==="%%")return"%";$t++;const jt=tt.formatters[Lt];if(typeof jt=="function"){const qt=yt[$t];kt=jt.call(bt,qt),yt.splice($t,1),$t--}return kt}),tt.formatArgs.call(bt,yt),(bt.log||tt.log).apply(bt,yt)}return xt.namespace=ht,xt.useColors=tt.useColors(),xt.color=tt.selectColor(ht),xt.extend=rt,xt.destroy=tt.destroy,Object.defineProperty(xt,"enabled",{enumerable:!0,configurable:!1,get:()=>mt!==null?mt:(gt!==tt.namespaces&&(gt=tt.namespaces,vt=tt.enabled(ht)),vt),set:yt=>{mt=yt}}),typeof tt.init=="function"&&tt.init(xt),xt}function rt(ht,pt){const mt=tt(this.namespace+(typeof pt>"u"?":":pt)+ht);return mt.log=this.log,mt}function nt(ht){tt.save(ht),tt.namespaces=ht,tt.names=[],tt.skips=[];let pt;const mt=(typeof ht=="string"?ht:"").split(/[\s,]+/),gt=mt.length;for(pt=0;pt"-"+pt)].join(",");return tt.enable(""),ht}function at(ht){if(ht[ht.length-1]==="*")return!0;let pt,mt;for(pt=0,mt=tt.skips.length;pt{let lt=!1;return()=>{lt||(lt=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),et.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function tt(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function rt(lt){if(lt[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+lt[0]+(this.useColors?"%c ":" ")+"+"+_e.exports.humanize(this.diff),!this.useColors)return;const dt="color: "+this.color;lt.splice(1,0,dt,"color: inherit");let ht=0,pt=0;lt[0].replace(/%[a-zA-Z%]/g,mt=>{mt!=="%%"&&(ht++,mt==="%c"&&(pt=ht))}),lt.splice(pt,0,dt)}et.log=console.debug||console.log||(()=>{});function nt(lt){try{lt?et.storage.setItem("debug",lt):et.storage.removeItem("debug")}catch{}}function it(){let lt;try{lt=et.storage.getItem("debug")}catch{}return!lt&&typeof process<"u"&&"env"in process&&(lt={}.DEBUG),lt}function at(){try{return localStorage}catch{}}_e.exports=common$1(et);const{formatters:st}=_e.exports;st.j=function(lt){try{return JSON.stringify(lt)}catch(dt){return"[UnexpectedJSONParseError]: "+dt.message}}})(browser,browser.exports);var browserExports=browser.exports;const g$5=getDefaultExportFromCjs(browserExports);function generatePrivateKey(){return toHex$1(secp256k1.utils.randomPrivateKey())}function toAccount(_e){if(typeof _e=="string"){if(!isAddress(_e))throw new InvalidAddressError({address:_e});return{address:_e,type:"json-rpc"}}if(!isAddress(_e.address))throw new InvalidAddressError({address:_e.address});return{address:_e.address,signMessage:_e.signMessage,signTransaction:_e.signTransaction,signTypedData:_e.signTypedData,source:"custom",type:"local"}}async function sign({hash:_e,privateKey:et}){const{r:tt,s:rt,recovery:nt}=secp256k1.sign(_e.slice(2),et.slice(2));return{r:toHex$1(tt),s:toHex$1(rt),v:nt?28n:27n}}async function signMessage({message:_e,privateKey:et}){const tt=await sign({hash:hashMessage(_e),privateKey:et});return signatureToHex(tt)}async function signTransaction({privateKey:_e,transaction:et,serializer:tt=serializeTransaction}){const rt=await sign({hash:keccak256(tt(et)),privateKey:_e});return tt(et,rt)}async function signTypedData({privateKey:_e,...et}){const tt=await sign({hash:hashTypedData(et),privateKey:_e});return signatureToHex(tt)}function privateKeyToAccount(_e){const et=toHex$1(secp256k1.getPublicKey(_e.slice(2),!1)),tt=publicKeyToAddress(et);return{...toAccount({address:tt,async signMessage({message:nt}){return signMessage({message:nt,privateKey:_e})},async signTransaction(nt,{serializer:it}={}){return signTransaction({privateKey:_e,transaction:nt,serializer:it})},async signTypedData(nt){return signTypedData({...nt,privateKey:_e})}}),publicKey:et,source:"privateKey"}}var retry$3={};function RetryOperation(_e,et){typeof et=="boolean"&&(et={forever:et}),this._originalTimeouts=JSON.parse(JSON.stringify(_e)),this._timeouts=_e,this._options=et||{},this._maxRetryTime=et&&et.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var retry_operation=RetryOperation;RetryOperation.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};RetryOperation.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};RetryOperation.prototype.retry=function(_e){if(this._timeout&&clearTimeout(this._timeout),!_e)return!1;var et=new Date().getTime();if(_e&&et-this._operationStart>=this._maxRetryTime)return this._errors.push(_e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(_e);var tt=this._timeouts.shift();if(tt===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),tt=this._cachedTimeouts.slice(-1);else return!1;var rt=this;return this._timer=setTimeout(function(){rt._attempts++,rt._operationTimeoutCb&&(rt._timeout=setTimeout(function(){rt._operationTimeoutCb(rt._attempts)},rt._operationTimeout),rt._options.unref&&rt._timeout.unref()),rt._fn(rt._attempts)},tt),this._options.unref&&this._timer.unref(),!0};RetryOperation.prototype.attempt=function(_e,et){this._fn=_e,et&&(et.timeout&&(this._operationTimeout=et.timeout),et.cb&&(this._operationTimeoutCb=et.cb));var tt=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){tt._operationTimeoutCb()},tt._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};RetryOperation.prototype.try=function(_e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(_e)};RetryOperation.prototype.start=function(_e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(_e)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0)return null;for(var _e={},et=null,tt=0,rt=0;rt=tt&&(et=nt,tt=at)}return et};(function(_e){var et=retry_operation;_e.operation=function(tt){var rt=_e.timeouts(tt);return new et(rt,{forever:tt&&(tt.forever||tt.retries===1/0),unref:tt&&tt.unref,maxRetryTime:tt&&tt.maxRetryTime})},_e.timeouts=function(tt){if(tt instanceof Array)return[].concat(tt);var rt={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var nt in tt)rt[nt]=tt[nt];if(rt.minTimeout>rt.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var it=[],at=0;at{const rt=tt.retries-(et-1);return _e.attemptNumber=et,_e.retriesLeft=rt,_e},isNetworkError=_e=>networkErrorMsgs.has(_e),getDOMException=_e=>globalThis.DOMException===void 0?new Error(_e):new DOMException(_e);async function pRetry(_e,et){return new Promise((tt,rt)=>{et={onFailedAttempt(){},retries:10,...et};const nt=retry$2.operation(et);nt.attempt(async it=>{try{tt(await _e(it))}catch(at){if(!(at instanceof Error)){rt(new TypeError(`Non-error was thrown: "${at}". You should only throw errors.`));return}if(at instanceof AbortError$1)nt.stop(),rt(at.originalError);else if(at instanceof TypeError&&!isNetworkError(at.message))nt.stop(),rt(at);else{decorateErrorWithCounts(at,it,et);try{await et.onFailedAttempt(at)}catch(st){rt(st);return}nt.retry(at)||rt(nt.mainError())}}}),et.signal&&!et.signal.aborted&&et.signal.addEventListener("abort",()=>{nt.stop();const it=et.signal.reason===void 0?getDOMException("The operation was aborted."):et.signal.reason;rt(it instanceof Error?it:getDOMException(it))},{once:!0})})}function J$1(_e){return{...privateKeyToAccount(_e)}}var p$2=g$5("mud:common"),x$5=p$2.extend("createNonceManager");function b$3({publicClient:_e,address:et,blockTag:tt}){let rt={current:-1},nt=typeof BroadcastChannel<"u"?new BroadcastChannel(`mud:createNonceManager:${_e.chain?.id}:${et}`):null;nt&&nt.addEventListener("message",dt=>{let ht=JSON.parse(dt.data);x$5("got nonce from broadcast channel",ht),rt.current=ht});function it(){return rt.current>=0}function at(){if(!it())throw new Error("call resetNonce before using nextNonce");let dt=rt.current++;return nt?.postMessage(JSON.stringify(rt.current)),dt}async function st(){let dt=await _e.getTransactionCount({address:et,blockTag:tt});rt.current=dt,nt?.postMessage(JSON.stringify(rt.current)),x$5("reset nonce to",rt.current)}function lt(dt){return dt instanceof BaseError&&dt.walk(ht=>ht instanceof NonceTooLowError||ht instanceof NonceTooHighError)!=null}return{hasNonce:it,nextNonce:at,resetNonce:st,shouldResetNonce:lt}}var m$4=p$2.extend("createContract");function E$2(_e){let et=_e.length&&Array.isArray(_e[0]),tt=et?_e[0]:[],rt=(et?_e[1]:_e[0])??{};return{args:tt,options:rt}}function me$1({abi:_e,address:et,publicClient:tt,walletClient:rt,onWrite:nt}){let it=getContract({abi:_e,address:et,publicClient:tt,walletClient:rt});if(it.write){let at=0,st=b$3({publicClient:tt,address:rt.account.address});it.write=new Proxy({},{get(lt,dt){async function ht(mt){if(mt.gas)return m$4("gas provided, skipping simulate",dt,mt),mt;m$4("simulating write",dt,mt);let{request:gt}=await tt.simulateContract({...mt,account:mt.account??rt.account});return gt}async function pt(mt){let gt=await ht(mt);return await pRetry(async()=>{st.hasNonce()||await st.resetNonce();let vt=st.nextNonce();return m$4("calling write function with nonce",vt,gt),await rt.writeContract({nonce:vt,...gt})},{retries:3,onFailedAttempt:async vt=>{if(st.shouldResetNonce(vt)){m$4("got nonce error, retrying",vt),await st.resetNonce();return}throw vt}})}return(...mt)=>{let gt=`${rt.chain.id}:${rt.account.address}:${at++}`,{args:vt,options:xt}=E$2(mt),yt={address:et,abi:_e,functionName:dt,args:vt,...xt},bt=pt(yt);return nt?.({id:gt,request:yt,result:bt}),bt}}})}return it}function B$3(_e,et){if(!isHex(_e))throw console.error("Private key found in cache is not valid hex",{privateKey:_e,cacheKey:et}),new Error(`Private key found in cache (${et}) is not valid hex`);privateKeyToAccount(_e)}function be$2(_e="mud:burnerWallet"){let et=localStorage.getItem(_e);if(et!=null)return B$3(et,_e),et;let tt=generatePrivateKey();return console.log("New burner wallet created:",privateKeyToAccount(tt)),localStorage.setItem(_e,tt),tt}function ye$1(_e){let et=hexToString(sliceHex(_e,0,16)).replace(/\0+$/,""),tt=hexToString(sliceHex(_e,16,32)).replace(/\0+$/,"");return{namespace:et,name:tt}}function He$1(_e,et){return concatHex([stringToHex(_e.substring(0,16),{size:16}),stringToHex(et.substring(0,16),{size:16})])}var I$3=p$2.extend("transportObserver");function Ee$1(_e){return et=>{let tt=_e(et);return{...tt,request:async rt=>{if(rt.method==="eth_sendRawTransaction"&&rt.params instanceof Array){let nt=rt.params.map(it=>keccak256(it));I$3("saw txs",nt)}return tt.request(rt)}}}}var I$2=(_e=>(_e[_e.UINT8=0]="UINT8",_e[_e.UINT16=1]="UINT16",_e[_e.UINT24=2]="UINT24",_e[_e.UINT32=3]="UINT32",_e[_e.UINT40=4]="UINT40",_e[_e.UINT48=5]="UINT48",_e[_e.UINT56=6]="UINT56",_e[_e.UINT64=7]="UINT64",_e[_e.UINT72=8]="UINT72",_e[_e.UINT80=9]="UINT80",_e[_e.UINT88=10]="UINT88",_e[_e.UINT96=11]="UINT96",_e[_e.UINT104=12]="UINT104",_e[_e.UINT112=13]="UINT112",_e[_e.UINT120=14]="UINT120",_e[_e.UINT128=15]="UINT128",_e[_e.UINT136=16]="UINT136",_e[_e.UINT144=17]="UINT144",_e[_e.UINT152=18]="UINT152",_e[_e.UINT160=19]="UINT160",_e[_e.UINT168=20]="UINT168",_e[_e.UINT176=21]="UINT176",_e[_e.UINT184=22]="UINT184",_e[_e.UINT192=23]="UINT192",_e[_e.UINT200=24]="UINT200",_e[_e.UINT208=25]="UINT208",_e[_e.UINT216=26]="UINT216",_e[_e.UINT224=27]="UINT224",_e[_e.UINT232=28]="UINT232",_e[_e.UINT240=29]="UINT240",_e[_e.UINT248=30]="UINT248",_e[_e.UINT256=31]="UINT256",_e[_e.INT8=32]="INT8",_e[_e.INT16=33]="INT16",_e[_e.INT24=34]="INT24",_e[_e.INT32=35]="INT32",_e[_e.INT40=36]="INT40",_e[_e.INT48=37]="INT48",_e[_e.INT56=38]="INT56",_e[_e.INT64=39]="INT64",_e[_e.INT72=40]="INT72",_e[_e.INT80=41]="INT80",_e[_e.INT88=42]="INT88",_e[_e.INT96=43]="INT96",_e[_e.INT104=44]="INT104",_e[_e.INT112=45]="INT112",_e[_e.INT120=46]="INT120",_e[_e.INT128=47]="INT128",_e[_e.INT136=48]="INT136",_e[_e.INT144=49]="INT144",_e[_e.INT152=50]="INT152",_e[_e.INT160=51]="INT160",_e[_e.INT168=52]="INT168",_e[_e.INT176=53]="INT176",_e[_e.INT184=54]="INT184",_e[_e.INT192=55]="INT192",_e[_e.INT200=56]="INT200",_e[_e.INT208=57]="INT208",_e[_e.INT216=58]="INT216",_e[_e.INT224=59]="INT224",_e[_e.INT232=60]="INT232",_e[_e.INT240=61]="INT240",_e[_e.INT248=62]="INT248",_e[_e.INT256=63]="INT256",_e[_e.BYTES1=64]="BYTES1",_e[_e.BYTES2=65]="BYTES2",_e[_e.BYTES3=66]="BYTES3",_e[_e.BYTES4=67]="BYTES4",_e[_e.BYTES5=68]="BYTES5",_e[_e.BYTES6=69]="BYTES6",_e[_e.BYTES7=70]="BYTES7",_e[_e.BYTES8=71]="BYTES8",_e[_e.BYTES9=72]="BYTES9",_e[_e.BYTES10=73]="BYTES10",_e[_e.BYTES11=74]="BYTES11",_e[_e.BYTES12=75]="BYTES12",_e[_e.BYTES13=76]="BYTES13",_e[_e.BYTES14=77]="BYTES14",_e[_e.BYTES15=78]="BYTES15",_e[_e.BYTES16=79]="BYTES16",_e[_e.BYTES17=80]="BYTES17",_e[_e.BYTES18=81]="BYTES18",_e[_e.BYTES19=82]="BYTES19",_e[_e.BYTES20=83]="BYTES20",_e[_e.BYTES21=84]="BYTES21",_e[_e.BYTES22=85]="BYTES22",_e[_e.BYTES23=86]="BYTES23",_e[_e.BYTES24=87]="BYTES24",_e[_e.BYTES25=88]="BYTES25",_e[_e.BYTES26=89]="BYTES26",_e[_e.BYTES27=90]="BYTES27",_e[_e.BYTES28=91]="BYTES28",_e[_e.BYTES29=92]="BYTES29",_e[_e.BYTES30=93]="BYTES30",_e[_e.BYTES31=94]="BYTES31",_e[_e.BYTES32=95]="BYTES32",_e[_e.BOOL=96]="BOOL",_e[_e.ADDRESS=97]="ADDRESS",_e[_e.UINT8_ARRAY=98]="UINT8_ARRAY",_e[_e.UINT16_ARRAY=99]="UINT16_ARRAY",_e[_e.UINT24_ARRAY=100]="UINT24_ARRAY",_e[_e.UINT32_ARRAY=101]="UINT32_ARRAY",_e[_e.UINT40_ARRAY=102]="UINT40_ARRAY",_e[_e.UINT48_ARRAY=103]="UINT48_ARRAY",_e[_e.UINT56_ARRAY=104]="UINT56_ARRAY",_e[_e.UINT64_ARRAY=105]="UINT64_ARRAY",_e[_e.UINT72_ARRAY=106]="UINT72_ARRAY",_e[_e.UINT80_ARRAY=107]="UINT80_ARRAY",_e[_e.UINT88_ARRAY=108]="UINT88_ARRAY",_e[_e.UINT96_ARRAY=109]="UINT96_ARRAY",_e[_e.UINT104_ARRAY=110]="UINT104_ARRAY",_e[_e.UINT112_ARRAY=111]="UINT112_ARRAY",_e[_e.UINT120_ARRAY=112]="UINT120_ARRAY",_e[_e.UINT128_ARRAY=113]="UINT128_ARRAY",_e[_e.UINT136_ARRAY=114]="UINT136_ARRAY",_e[_e.UINT144_ARRAY=115]="UINT144_ARRAY",_e[_e.UINT152_ARRAY=116]="UINT152_ARRAY",_e[_e.UINT160_ARRAY=117]="UINT160_ARRAY",_e[_e.UINT168_ARRAY=118]="UINT168_ARRAY",_e[_e.UINT176_ARRAY=119]="UINT176_ARRAY",_e[_e.UINT184_ARRAY=120]="UINT184_ARRAY",_e[_e.UINT192_ARRAY=121]="UINT192_ARRAY",_e[_e.UINT200_ARRAY=122]="UINT200_ARRAY",_e[_e.UINT208_ARRAY=123]="UINT208_ARRAY",_e[_e.UINT216_ARRAY=124]="UINT216_ARRAY",_e[_e.UINT224_ARRAY=125]="UINT224_ARRAY",_e[_e.UINT232_ARRAY=126]="UINT232_ARRAY",_e[_e.UINT240_ARRAY=127]="UINT240_ARRAY",_e[_e.UINT248_ARRAY=128]="UINT248_ARRAY",_e[_e.UINT256_ARRAY=129]="UINT256_ARRAY",_e[_e.INT8_ARRAY=130]="INT8_ARRAY",_e[_e.INT16_ARRAY=131]="INT16_ARRAY",_e[_e.INT24_ARRAY=132]="INT24_ARRAY",_e[_e.INT32_ARRAY=133]="INT32_ARRAY",_e[_e.INT40_ARRAY=134]="INT40_ARRAY",_e[_e.INT48_ARRAY=135]="INT48_ARRAY",_e[_e.INT56_ARRAY=136]="INT56_ARRAY",_e[_e.INT64_ARRAY=137]="INT64_ARRAY",_e[_e.INT72_ARRAY=138]="INT72_ARRAY",_e[_e.INT80_ARRAY=139]="INT80_ARRAY",_e[_e.INT88_ARRAY=140]="INT88_ARRAY",_e[_e.INT96_ARRAY=141]="INT96_ARRAY",_e[_e.INT104_ARRAY=142]="INT104_ARRAY",_e[_e.INT112_ARRAY=143]="INT112_ARRAY",_e[_e.INT120_ARRAY=144]="INT120_ARRAY",_e[_e.INT128_ARRAY=145]="INT128_ARRAY",_e[_e.INT136_ARRAY=146]="INT136_ARRAY",_e[_e.INT144_ARRAY=147]="INT144_ARRAY",_e[_e.INT152_ARRAY=148]="INT152_ARRAY",_e[_e.INT160_ARRAY=149]="INT160_ARRAY",_e[_e.INT168_ARRAY=150]="INT168_ARRAY",_e[_e.INT176_ARRAY=151]="INT176_ARRAY",_e[_e.INT184_ARRAY=152]="INT184_ARRAY",_e[_e.INT192_ARRAY=153]="INT192_ARRAY",_e[_e.INT200_ARRAY=154]="INT200_ARRAY",_e[_e.INT208_ARRAY=155]="INT208_ARRAY",_e[_e.INT216_ARRAY=156]="INT216_ARRAY",_e[_e.INT224_ARRAY=157]="INT224_ARRAY",_e[_e.INT232_ARRAY=158]="INT232_ARRAY",_e[_e.INT240_ARRAY=159]="INT240_ARRAY",_e[_e.INT248_ARRAY=160]="INT248_ARRAY",_e[_e.INT256_ARRAY=161]="INT256_ARRAY",_e[_e.BYTES1_ARRAY=162]="BYTES1_ARRAY",_e[_e.BYTES2_ARRAY=163]="BYTES2_ARRAY",_e[_e.BYTES3_ARRAY=164]="BYTES3_ARRAY",_e[_e.BYTES4_ARRAY=165]="BYTES4_ARRAY",_e[_e.BYTES5_ARRAY=166]="BYTES5_ARRAY",_e[_e.BYTES6_ARRAY=167]="BYTES6_ARRAY",_e[_e.BYTES7_ARRAY=168]="BYTES7_ARRAY",_e[_e.BYTES8_ARRAY=169]="BYTES8_ARRAY",_e[_e.BYTES9_ARRAY=170]="BYTES9_ARRAY",_e[_e.BYTES10_ARRAY=171]="BYTES10_ARRAY",_e[_e.BYTES11_ARRAY=172]="BYTES11_ARRAY",_e[_e.BYTES12_ARRAY=173]="BYTES12_ARRAY",_e[_e.BYTES13_ARRAY=174]="BYTES13_ARRAY",_e[_e.BYTES14_ARRAY=175]="BYTES14_ARRAY",_e[_e.BYTES15_ARRAY=176]="BYTES15_ARRAY",_e[_e.BYTES16_ARRAY=177]="BYTES16_ARRAY",_e[_e.BYTES17_ARRAY=178]="BYTES17_ARRAY",_e[_e.BYTES18_ARRAY=179]="BYTES18_ARRAY",_e[_e.BYTES19_ARRAY=180]="BYTES19_ARRAY",_e[_e.BYTES20_ARRAY=181]="BYTES20_ARRAY",_e[_e.BYTES21_ARRAY=182]="BYTES21_ARRAY",_e[_e.BYTES22_ARRAY=183]="BYTES22_ARRAY",_e[_e.BYTES23_ARRAY=184]="BYTES23_ARRAY",_e[_e.BYTES24_ARRAY=185]="BYTES24_ARRAY",_e[_e.BYTES25_ARRAY=186]="BYTES25_ARRAY",_e[_e.BYTES26_ARRAY=187]="BYTES26_ARRAY",_e[_e.BYTES27_ARRAY=188]="BYTES27_ARRAY",_e[_e.BYTES28_ARRAY=189]="BYTES28_ARRAY",_e[_e.BYTES29_ARRAY=190]="BYTES29_ARRAY",_e[_e.BYTES30_ARRAY=191]="BYTES30_ARRAY",_e[_e.BYTES31_ARRAY=192]="BYTES31_ARRAY",_e[_e.BYTES32_ARRAY=193]="BYTES32_ARRAY",_e[_e.BOOL_ARRAY=194]="BOOL_ARRAY",_e[_e.ADDRESS_ARRAY=195]="ADDRESS_ARRAY",_e[_e.BYTES=196]="BYTES",_e[_e.STRING=197]="STRING",_e))(I$2||{}),Y$3={0:"uint8",1:"uint16",2:"uint24",3:"uint32",4:"uint40",5:"uint48",6:"uint56",7:"uint64",8:"uint72",9:"uint80",10:"uint88",11:"uint96",12:"uint104",13:"uint112",14:"uint120",15:"uint128",16:"uint136",17:"uint144",18:"uint152",19:"uint160",20:"uint168",21:"uint176",22:"uint184",23:"uint192",24:"uint200",25:"uint208",26:"uint216",27:"uint224",28:"uint232",29:"uint240",30:"uint248",31:"uint256",32:"int8",33:"int16",34:"int24",35:"int32",36:"int40",37:"int48",38:"int56",39:"int64",40:"int72",41:"int80",42:"int88",43:"int96",44:"int104",45:"int112",46:"int120",47:"int128",48:"int136",49:"int144",50:"int152",51:"int160",52:"int168",53:"int176",54:"int184",55:"int192",56:"int200",57:"int208",58:"int216",59:"int224",60:"int232",61:"int240",62:"int248",63:"int256",64:"bytes1",65:"bytes2",66:"bytes3",67:"bytes4",68:"bytes5",69:"bytes6",70:"bytes7",71:"bytes8",72:"bytes9",73:"bytes10",74:"bytes11",75:"bytes12",76:"bytes13",77:"bytes14",78:"bytes15",79:"bytes16",80:"bytes17",81:"bytes18",82:"bytes19",83:"bytes20",84:"bytes21",85:"bytes22",86:"bytes23",87:"bytes24",88:"bytes25",89:"bytes26",90:"bytes27",91:"bytes28",92:"bytes29",93:"bytes30",94:"bytes31",95:"bytes32",96:"bool",97:"address",98:"uint8[]",99:"uint16[]",100:"uint24[]",101:"uint32[]",102:"uint40[]",103:"uint48[]",104:"uint56[]",105:"uint64[]",106:"uint72[]",107:"uint80[]",108:"uint88[]",109:"uint96[]",110:"uint104[]",111:"uint112[]",112:"uint120[]",113:"uint128[]",114:"uint136[]",115:"uint144[]",116:"uint152[]",117:"uint160[]",118:"uint168[]",119:"uint176[]",120:"uint184[]",121:"uint192[]",122:"uint200[]",123:"uint208[]",124:"uint216[]",125:"uint224[]",126:"uint232[]",127:"uint240[]",128:"uint248[]",129:"uint256[]",130:"int8[]",131:"int16[]",132:"int24[]",133:"int32[]",134:"int40[]",135:"int48[]",136:"int56[]",137:"int64[]",138:"int72[]",139:"int80[]",140:"int88[]",141:"int96[]",142:"int104[]",143:"int112[]",144:"int120[]",145:"int128[]",146:"int136[]",147:"int144[]",148:"int152[]",149:"int160[]",150:"int168[]",151:"int176[]",152:"int184[]",153:"int192[]",154:"int200[]",155:"int208[]",156:"int216[]",157:"int224[]",158:"int232[]",159:"int240[]",160:"int248[]",161:"int256[]",162:"bytes1[]",163:"bytes2[]",164:"bytes3[]",165:"bytes4[]",166:"bytes5[]",167:"bytes6[]",168:"bytes7[]",169:"bytes8[]",170:"bytes9[]",171:"bytes10[]",172:"bytes11[]",173:"bytes12[]",174:"bytes13[]",175:"bytes14[]",176:"bytes15[]",177:"bytes16[]",178:"bytes17[]",179:"bytes18[]",180:"bytes19[]",181:"bytes20[]",182:"bytes21[]",183:"bytes22[]",184:"bytes23[]",185:"bytes24[]",186:"bytes25[]",187:"bytes26[]",188:"bytes27[]",189:"bytes28[]",190:"bytes29[]",191:"bytes30[]",192:"bytes31[]",193:"bytes32[]",194:"bool[]",195:"address[]",196:"bytes",197:"string"},s$2=Object.values(Y$3),_$1=Object.fromEntries(Object.entries(Y$3).map(([_e,et])=>[et,parseInt(_e)]));function n$1(_e){let et=_e.valueOf();return et<32?et+1:et<64?et+1-32:et<96?et+1-64:_e==96?1:_e==97?20:0}var U$5=s$2.filter(_e=>n$1(_$1[_e])>0),util$5;(function(_e){_e.assertEqual=nt=>nt;function et(nt){}_e.assertIs=et;function tt(nt){throw new Error}_e.assertNever=tt,_e.arrayToEnum=nt=>{const it={};for(const at of nt)it[at]=at;return it},_e.getValidEnumValues=nt=>{const it=_e.objectKeys(nt).filter(st=>typeof nt[nt[st]]!="number"),at={};for(const st of it)at[st]=nt[st];return _e.objectValues(at)},_e.objectValues=nt=>_e.objectKeys(nt).map(function(it){return nt[it]}),_e.objectKeys=typeof Object.keys=="function"?nt=>Object.keys(nt):nt=>{const it=[];for(const at in nt)Object.prototype.hasOwnProperty.call(nt,at)&&it.push(at);return it},_e.find=(nt,it)=>{for(const at of nt)if(it(at))return at},_e.isInteger=typeof Number.isInteger=="function"?nt=>Number.isInteger(nt):nt=>typeof nt=="number"&&isFinite(nt)&&Math.floor(nt)===nt;function rt(nt,it=" | "){return nt.map(at=>typeof at=="string"?`'${at}'`:at).join(it)}_e.joinValues=rt,_e.jsonStringifyReplacer=(nt,it)=>typeof it=="bigint"?it.toString():it})(util$5||(util$5={}));var objectUtil;(function(_e){_e.mergeShapes=(et,tt)=>({...et,...tt})})(objectUtil||(objectUtil={}));const ZodParsedType=util$5.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=_e=>{switch(typeof _e){case"undefined":return ZodParsedType.undefined;case"string":return ZodParsedType.string;case"number":return isNaN(_e)?ZodParsedType.nan:ZodParsedType.number;case"boolean":return ZodParsedType.boolean;case"function":return ZodParsedType.function;case"bigint":return ZodParsedType.bigint;case"symbol":return ZodParsedType.symbol;case"object":return Array.isArray(_e)?ZodParsedType.array:_e===null?ZodParsedType.null:_e.then&&typeof _e.then=="function"&&_e.catch&&typeof _e.catch=="function"?ZodParsedType.promise:typeof Map<"u"&&_e instanceof Map?ZodParsedType.map:typeof Set<"u"&&_e instanceof Set?ZodParsedType.set:typeof Date<"u"&&_e instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util$5.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),quotelessJson=_e=>JSON.stringify(_e,null,2).replace(/"([^"]+)":/g,"$1:");class ZodError extends Error{constructor(et){super(),this.issues=[],this.addIssue=rt=>{this.issues=[...this.issues,rt]},this.addIssues=(rt=[])=>{this.issues=[...this.issues,...rt]};const tt=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,tt):this.__proto__=tt,this.name="ZodError",this.issues=et}get errors(){return this.issues}format(et){const tt=et||function(it){return it.message},rt={_errors:[]},nt=it=>{for(const at of it.issues)if(at.code==="invalid_union")at.unionErrors.map(nt);else if(at.code==="invalid_return_type")nt(at.returnTypeError);else if(at.code==="invalid_arguments")nt(at.argumentsError);else if(at.path.length===0)rt._errors.push(tt(at));else{let st=rt,lt=0;for(;lttt.message){const tt={},rt=[];for(const nt of this.issues)nt.path.length>0?(tt[nt.path[0]]=tt[nt.path[0]]||[],tt[nt.path[0]].push(et(nt))):rt.push(et(nt));return{formErrors:rt,fieldErrors:tt}}get formErrors(){return this.flatten()}}ZodError.create=_e=>new ZodError(_e);const errorMap=(_e,et)=>{let tt;switch(_e.code){case ZodIssueCode.invalid_type:_e.received===ZodParsedType.undefined?tt="Required":tt=`Expected ${_e.expected}, received ${_e.received}`;break;case ZodIssueCode.invalid_literal:tt=`Invalid literal value, expected ${JSON.stringify(_e.expected,util$5.jsonStringifyReplacer)}`;break;case ZodIssueCode.unrecognized_keys:tt=`Unrecognized key(s) in object: ${util$5.joinValues(_e.keys,", ")}`;break;case ZodIssueCode.invalid_union:tt="Invalid input";break;case ZodIssueCode.invalid_union_discriminator:tt=`Invalid discriminator value. Expected ${util$5.joinValues(_e.options)}`;break;case ZodIssueCode.invalid_enum_value:tt=`Invalid enum value. Expected ${util$5.joinValues(_e.options)}, received '${_e.received}'`;break;case ZodIssueCode.invalid_arguments:tt="Invalid function arguments";break;case ZodIssueCode.invalid_return_type:tt="Invalid function return type";break;case ZodIssueCode.invalid_date:tt="Invalid date";break;case ZodIssueCode.invalid_string:typeof _e.validation=="object"?"includes"in _e.validation?(tt=`Invalid input: must include "${_e.validation.includes}"`,typeof _e.validation.position=="number"&&(tt=`${tt} at one or more positions greater than or equal to ${_e.validation.position}`)):"startsWith"in _e.validation?tt=`Invalid input: must start with "${_e.validation.startsWith}"`:"endsWith"in _e.validation?tt=`Invalid input: must end with "${_e.validation.endsWith}"`:util$5.assertNever(_e.validation):_e.validation!=="regex"?tt=`Invalid ${_e.validation}`:tt="Invalid";break;case ZodIssueCode.too_small:_e.type==="array"?tt=`Array must contain ${_e.exact?"exactly":_e.inclusive?"at least":"more than"} ${_e.minimum} element(s)`:_e.type==="string"?tt=`String must contain ${_e.exact?"exactly":_e.inclusive?"at least":"over"} ${_e.minimum} character(s)`:_e.type==="number"?tt=`Number must be ${_e.exact?"exactly equal to ":_e.inclusive?"greater than or equal to ":"greater than "}${_e.minimum}`:_e.type==="date"?tt=`Date must be ${_e.exact?"exactly equal to ":_e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(_e.minimum))}`:tt="Invalid input";break;case ZodIssueCode.too_big:_e.type==="array"?tt=`Array must contain ${_e.exact?"exactly":_e.inclusive?"at most":"less than"} ${_e.maximum} element(s)`:_e.type==="string"?tt=`String must contain ${_e.exact?"exactly":_e.inclusive?"at most":"under"} ${_e.maximum} character(s)`:_e.type==="number"?tt=`Number must be ${_e.exact?"exactly":_e.inclusive?"less than or equal to":"less than"} ${_e.maximum}`:_e.type==="bigint"?tt=`BigInt must be ${_e.exact?"exactly":_e.inclusive?"less than or equal to":"less than"} ${_e.maximum}`:_e.type==="date"?tt=`Date must be ${_e.exact?"exactly":_e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(_e.maximum))}`:tt="Invalid input";break;case ZodIssueCode.custom:tt="Invalid input";break;case ZodIssueCode.invalid_intersection_types:tt="Intersection results could not be merged";break;case ZodIssueCode.not_multiple_of:tt=`Number must be a multiple of ${_e.multipleOf}`;break;case ZodIssueCode.not_finite:tt="Number must be finite";break;default:tt=et.defaultError,util$5.assertNever(_e)}return{message:tt}};let overrideErrorMap=errorMap;function setErrorMap(_e){overrideErrorMap=_e}function getErrorMap(){return overrideErrorMap}const makeIssue=_e=>{const{data:et,path:tt,errorMaps:rt,issueData:nt}=_e,it=[...tt,...nt.path||[]],at={...nt,path:it};let st="";const lt=rt.filter(dt=>!!dt).slice().reverse();for(const dt of lt)st=dt(at,{data:et,defaultError:st}).message;return{...nt,path:it,message:nt.message||st}},EMPTY_PATH=[];function addIssueToContext(_e,et){const tt=makeIssue({issueData:et,data:_e.data,path:_e.path,errorMaps:[_e.common.contextualErrorMap,_e.schemaErrorMap,getErrorMap(),errorMap].filter(rt=>!!rt)});_e.common.issues.push(tt)}class ParseStatus{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(et,tt){const rt=[];for(const nt of tt){if(nt.status==="aborted")return INVALID;nt.status==="dirty"&&et.dirty(),rt.push(nt.value)}return{status:et.value,value:rt}}static async mergeObjectAsync(et,tt){const rt=[];for(const nt of tt)rt.push({key:await nt.key,value:await nt.value});return ParseStatus.mergeObjectSync(et,rt)}static mergeObjectSync(et,tt){const rt={};for(const nt of tt){const{key:it,value:at}=nt;if(it.status==="aborted"||at.status==="aborted")return INVALID;it.status==="dirty"&&et.dirty(),at.status==="dirty"&&et.dirty(),it.value!=="__proto__"&&(typeof at.value<"u"||nt.alwaysSet)&&(rt[it.value]=at.value)}return{status:et.value,value:rt}}}const INVALID=Object.freeze({status:"aborted"}),DIRTY=_e=>({status:"dirty",value:_e}),OK=_e=>({status:"valid",value:_e}),isAborted=_e=>_e.status==="aborted",isDirty=_e=>_e.status==="dirty",isValid=_e=>_e.status==="valid",isAsync=_e=>typeof Promise<"u"&&_e instanceof Promise;var errorUtil;(function(_e){_e.errToObj=et=>typeof et=="string"?{message:et}:et||{},_e.toString=et=>typeof et=="string"?et:et?.message})(errorUtil||(errorUtil={}));class ParseInputLazyPath{constructor(et,tt,rt,nt){this._cachedPath=[],this.parent=et,this.data=tt,this._path=rt,this._key=nt}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(_e,et)=>{if(isValid(et))return{success:!0,data:et.value};if(!_e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const tt=new ZodError(_e.common.issues);return this._error=tt,this._error}}};function processCreateParams(_e){if(!_e)return{};const{errorMap:et,invalid_type_error:tt,required_error:rt,description:nt}=_e;if(et&&(tt||rt))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return et?{errorMap:et,description:nt}:{errorMap:(at,st)=>at.code!=="invalid_type"?{message:st.defaultError}:typeof st.data>"u"?{message:rt??st.defaultError}:{message:tt??st.defaultError},description:nt}}class ZodType{constructor(et){this.spa=this.safeParseAsync,this._def=et,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(et){return getParsedType(et.data)}_getOrReturnCtx(et,tt){return tt||{common:et.parent.common,data:et.data,parsedType:getParsedType(et.data),schemaErrorMap:this._def.errorMap,path:et.path,parent:et.parent}}_processInputParams(et){return{status:new ParseStatus,ctx:{common:et.parent.common,data:et.data,parsedType:getParsedType(et.data),schemaErrorMap:this._def.errorMap,path:et.path,parent:et.parent}}}_parseSync(et){const tt=this._parse(et);if(isAsync(tt))throw new Error("Synchronous parse encountered promise.");return tt}_parseAsync(et){const tt=this._parse(et);return Promise.resolve(tt)}parse(et,tt){const rt=this.safeParse(et,tt);if(rt.success)return rt.data;throw rt.error}safeParse(et,tt){var rt;const nt={common:{issues:[],async:(rt=tt?.async)!==null&&rt!==void 0?rt:!1,contextualErrorMap:tt?.errorMap},path:tt?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:et,parsedType:getParsedType(et)},it=this._parseSync({data:et,path:nt.path,parent:nt});return handleResult(nt,it)}async parseAsync(et,tt){const rt=await this.safeParseAsync(et,tt);if(rt.success)return rt.data;throw rt.error}async safeParseAsync(et,tt){const rt={common:{issues:[],contextualErrorMap:tt?.errorMap,async:!0},path:tt?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:et,parsedType:getParsedType(et)},nt=this._parse({data:et,path:rt.path,parent:rt}),it=await(isAsync(nt)?nt:Promise.resolve(nt));return handleResult(rt,it)}refine(et,tt){const rt=nt=>typeof tt=="string"||typeof tt>"u"?{message:tt}:typeof tt=="function"?tt(nt):tt;return this._refinement((nt,it)=>{const at=et(nt),st=()=>it.addIssue({code:ZodIssueCode.custom,...rt(nt)});return typeof Promise<"u"&&at instanceof Promise?at.then(lt=>lt?!0:(st(),!1)):at?!0:(st(),!1)})}refinement(et,tt){return this._refinement((rt,nt)=>et(rt)?!0:(nt.addIssue(typeof tt=="function"?tt(rt,nt):tt),!1))}_refinement(et){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:et}})}superRefine(et){return this._refinement(et)}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this,this._def)}promise(){return ZodPromise.create(this,this._def)}or(et){return ZodUnion.create([this,et],this._def)}and(et){return ZodIntersection.create(this,et,this._def)}transform(et){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:et}})}default(et){const tt=typeof et=="function"?et:()=>et;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:tt,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...processCreateParams(this._def)})}catch(et){const tt=typeof et=="function"?et:()=>et;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:tt,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(et){const tt=this.constructor;return new tt({...this._def,description:et})}pipe(et){return ZodPipeline.create(this,et)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[a-z][a-z0-9]*$/,ulidRegex=/^[0-9A-HJKMNP-TV-Z]{26}$/,uuidRegex=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_emojiRegex="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let emojiRegex;const ipv4Regex=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,ipv6Regex=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,datetimeRegex=_e=>_e.precision?_e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${_e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${_e.precision}}Z$`):_e.precision===0?_e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):_e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function isValidIP(_e,et){return!!((et==="v4"||!et)&&ipv4Regex.test(_e)||(et==="v6"||!et)&&ipv6Regex.test(_e))}class ZodString extends ZodType{_parse(et){if(this._def.coerce&&(et.data=String(et.data)),this._getType(et)!==ZodParsedType.string){const it=this._getOrReturnCtx(et);return addIssueToContext(it,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:it.parsedType}),INVALID}const rt=new ParseStatus;let nt;for(const it of this._def.checks)if(it.kind==="min")et.data.lengthit.value&&(nt=this._getOrReturnCtx(et,nt),addIssueToContext(nt,{code:ZodIssueCode.too_big,maximum:it.value,type:"string",inclusive:!0,exact:!1,message:it.message}),rt.dirty());else if(it.kind==="length"){const at=et.data.length>it.value,st=et.data.lengthet.test(nt),{validation:tt,code:ZodIssueCode.invalid_string,...errorUtil.errToObj(rt)})}_addCheck(et){return new ZodString({...this._def,checks:[...this._def.checks,et]})}email(et){return this._addCheck({kind:"email",...errorUtil.errToObj(et)})}url(et){return this._addCheck({kind:"url",...errorUtil.errToObj(et)})}emoji(et){return this._addCheck({kind:"emoji",...errorUtil.errToObj(et)})}uuid(et){return this._addCheck({kind:"uuid",...errorUtil.errToObj(et)})}cuid(et){return this._addCheck({kind:"cuid",...errorUtil.errToObj(et)})}cuid2(et){return this._addCheck({kind:"cuid2",...errorUtil.errToObj(et)})}ulid(et){return this._addCheck({kind:"ulid",...errorUtil.errToObj(et)})}ip(et){return this._addCheck({kind:"ip",...errorUtil.errToObj(et)})}datetime(et){var tt;return typeof et=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:et}):this._addCheck({kind:"datetime",precision:typeof et?.precision>"u"?null:et?.precision,offset:(tt=et?.offset)!==null&&tt!==void 0?tt:!1,...errorUtil.errToObj(et?.message)})}regex(et,tt){return this._addCheck({kind:"regex",regex:et,...errorUtil.errToObj(tt)})}includes(et,tt){return this._addCheck({kind:"includes",value:et,position:tt?.position,...errorUtil.errToObj(tt?.message)})}startsWith(et,tt){return this._addCheck({kind:"startsWith",value:et,...errorUtil.errToObj(tt)})}endsWith(et,tt){return this._addCheck({kind:"endsWith",value:et,...errorUtil.errToObj(tt)})}min(et,tt){return this._addCheck({kind:"min",value:et,...errorUtil.errToObj(tt)})}max(et,tt){return this._addCheck({kind:"max",value:et,...errorUtil.errToObj(tt)})}length(et,tt){return this._addCheck({kind:"length",value:et,...errorUtil.errToObj(tt)})}nonempty(et){return this.min(1,errorUtil.errToObj(et))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(et=>et.kind==="datetime")}get isEmail(){return!!this._def.checks.find(et=>et.kind==="email")}get isURL(){return!!this._def.checks.find(et=>et.kind==="url")}get isEmoji(){return!!this._def.checks.find(et=>et.kind==="emoji")}get isUUID(){return!!this._def.checks.find(et=>et.kind==="uuid")}get isCUID(){return!!this._def.checks.find(et=>et.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(et=>et.kind==="cuid2")}get isULID(){return!!this._def.checks.find(et=>et.kind==="ulid")}get isIP(){return!!this._def.checks.find(et=>et.kind==="ip")}get minLength(){let et=null;for(const tt of this._def.checks)tt.kind==="min"&&(et===null||tt.value>et)&&(et=tt.value);return et}get maxLength(){let et=null;for(const tt of this._def.checks)tt.kind==="max"&&(et===null||tt.value{var et;return new ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:(et=_e?.coerce)!==null&&et!==void 0?et:!1,...processCreateParams(_e)})};function floatSafeRemainder(_e,et){const tt=(_e.toString().split(".")[1]||"").length,rt=(et.toString().split(".")[1]||"").length,nt=tt>rt?tt:rt,it=parseInt(_e.toFixed(nt).replace(".","")),at=parseInt(et.toFixed(nt).replace(".",""));return it%at/Math.pow(10,nt)}class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(et){if(this._def.coerce&&(et.data=Number(et.data)),this._getType(et)!==ZodParsedType.number){const it=this._getOrReturnCtx(et);return addIssueToContext(it,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:it.parsedType}),INVALID}let rt;const nt=new ParseStatus;for(const it of this._def.checks)it.kind==="int"?util$5.isInteger(et.data)||(rt=this._getOrReturnCtx(et,rt),addIssueToContext(rt,{code:ZodIssueCode.invalid_type,expected:"integer",received:"float",message:it.message}),nt.dirty()):it.kind==="min"?(it.inclusive?et.datait.value:et.data>=it.value)&&(rt=this._getOrReturnCtx(et,rt),addIssueToContext(rt,{code:ZodIssueCode.too_big,maximum:it.value,type:"number",inclusive:it.inclusive,exact:!1,message:it.message}),nt.dirty()):it.kind==="multipleOf"?floatSafeRemainder(et.data,it.value)!==0&&(rt=this._getOrReturnCtx(et,rt),addIssueToContext(rt,{code:ZodIssueCode.not_multiple_of,multipleOf:it.value,message:it.message}),nt.dirty()):it.kind==="finite"?Number.isFinite(et.data)||(rt=this._getOrReturnCtx(et,rt),addIssueToContext(rt,{code:ZodIssueCode.not_finite,message:it.message}),nt.dirty()):util$5.assertNever(it);return{status:nt.value,value:et.data}}gte(et,tt){return this.setLimit("min",et,!0,errorUtil.toString(tt))}gt(et,tt){return this.setLimit("min",et,!1,errorUtil.toString(tt))}lte(et,tt){return this.setLimit("max",et,!0,errorUtil.toString(tt))}lt(et,tt){return this.setLimit("max",et,!1,errorUtil.toString(tt))}setLimit(et,tt,rt,nt){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:et,value:tt,inclusive:rt,message:errorUtil.toString(nt)}]})}_addCheck(et){return new ZodNumber({...this._def,checks:[...this._def.checks,et]})}int(et){return this._addCheck({kind:"int",message:errorUtil.toString(et)})}positive(et){return this._addCheck({kind:"min",value:0,inclusive:!1,message:errorUtil.toString(et)})}negative(et){return this._addCheck({kind:"max",value:0,inclusive:!1,message:errorUtil.toString(et)})}nonpositive(et){return this._addCheck({kind:"max",value:0,inclusive:!0,message:errorUtil.toString(et)})}nonnegative(et){return this._addCheck({kind:"min",value:0,inclusive:!0,message:errorUtil.toString(et)})}multipleOf(et,tt){return this._addCheck({kind:"multipleOf",value:et,message:errorUtil.toString(tt)})}finite(et){return this._addCheck({kind:"finite",message:errorUtil.toString(et)})}safe(et){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:errorUtil.toString(et)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:errorUtil.toString(et)})}get minValue(){let et=null;for(const tt of this._def.checks)tt.kind==="min"&&(et===null||tt.value>et)&&(et=tt.value);return et}get maxValue(){let et=null;for(const tt of this._def.checks)tt.kind==="max"&&(et===null||tt.valueet.kind==="int"||et.kind==="multipleOf"&&util$5.isInteger(et.value))}get isFinite(){let et=null,tt=null;for(const rt of this._def.checks){if(rt.kind==="finite"||rt.kind==="int"||rt.kind==="multipleOf")return!0;rt.kind==="min"?(tt===null||rt.value>tt)&&(tt=rt.value):rt.kind==="max"&&(et===null||rt.valuenew ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:_e?.coerce||!1,...processCreateParams(_e)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(et){if(this._def.coerce&&(et.data=BigInt(et.data)),this._getType(et)!==ZodParsedType.bigint){const it=this._getOrReturnCtx(et);return addIssueToContext(it,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:it.parsedType}),INVALID}let rt;const nt=new ParseStatus;for(const it of this._def.checks)it.kind==="min"?(it.inclusive?et.datait.value:et.data>=it.value)&&(rt=this._getOrReturnCtx(et,rt),addIssueToContext(rt,{code:ZodIssueCode.too_big,type:"bigint",maximum:it.value,inclusive:it.inclusive,message:it.message}),nt.dirty()):it.kind==="multipleOf"?et.data%it.value!==BigInt(0)&&(rt=this._getOrReturnCtx(et,rt),addIssueToContext(rt,{code:ZodIssueCode.not_multiple_of,multipleOf:it.value,message:it.message}),nt.dirty()):util$5.assertNever(it);return{status:nt.value,value:et.data}}gte(et,tt){return this.setLimit("min",et,!0,errorUtil.toString(tt))}gt(et,tt){return this.setLimit("min",et,!1,errorUtil.toString(tt))}lte(et,tt){return this.setLimit("max",et,!0,errorUtil.toString(tt))}lt(et,tt){return this.setLimit("max",et,!1,errorUtil.toString(tt))}setLimit(et,tt,rt,nt){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:et,value:tt,inclusive:rt,message:errorUtil.toString(nt)}]})}_addCheck(et){return new ZodBigInt({...this._def,checks:[...this._def.checks,et]})}positive(et){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:errorUtil.toString(et)})}negative(et){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:errorUtil.toString(et)})}nonpositive(et){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:errorUtil.toString(et)})}nonnegative(et){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:errorUtil.toString(et)})}multipleOf(et,tt){return this._addCheck({kind:"multipleOf",value:et,message:errorUtil.toString(tt)})}get minValue(){let et=null;for(const tt of this._def.checks)tt.kind==="min"&&(et===null||tt.value>et)&&(et=tt.value);return et}get maxValue(){let et=null;for(const tt of this._def.checks)tt.kind==="max"&&(et===null||tt.value{var et;return new ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:(et=_e?.coerce)!==null&&et!==void 0?et:!1,...processCreateParams(_e)})};class ZodBoolean extends ZodType{_parse(et){if(this._def.coerce&&(et.data=!!et.data),this._getType(et)!==ZodParsedType.boolean){const rt=this._getOrReturnCtx(et);return addIssueToContext(rt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:rt.parsedType}),INVALID}return OK(et.data)}}ZodBoolean.create=_e=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:_e?.coerce||!1,...processCreateParams(_e)});class ZodDate extends ZodType{_parse(et){if(this._def.coerce&&(et.data=new Date(et.data)),this._getType(et)!==ZodParsedType.date){const it=this._getOrReturnCtx(et);return addIssueToContext(it,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:it.parsedType}),INVALID}if(isNaN(et.data.getTime())){const it=this._getOrReturnCtx(et);return addIssueToContext(it,{code:ZodIssueCode.invalid_date}),INVALID}const rt=new ParseStatus;let nt;for(const it of this._def.checks)it.kind==="min"?et.data.getTime()it.value&&(nt=this._getOrReturnCtx(et,nt),addIssueToContext(nt,{code:ZodIssueCode.too_big,message:it.message,inclusive:!0,exact:!1,maximum:it.value,type:"date"}),rt.dirty()):util$5.assertNever(it);return{status:rt.value,value:new Date(et.data.getTime())}}_addCheck(et){return new ZodDate({...this._def,checks:[...this._def.checks,et]})}min(et,tt){return this._addCheck({kind:"min",value:et.getTime(),message:errorUtil.toString(tt)})}max(et,tt){return this._addCheck({kind:"max",value:et.getTime(),message:errorUtil.toString(tt)})}get minDate(){let et=null;for(const tt of this._def.checks)tt.kind==="min"&&(et===null||tt.value>et)&&(et=tt.value);return et!=null?new Date(et):null}get maxDate(){let et=null;for(const tt of this._def.checks)tt.kind==="max"&&(et===null||tt.valuenew ZodDate({checks:[],coerce:_e?.coerce||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...processCreateParams(_e)});class ZodSymbol extends ZodType{_parse(et){if(this._getType(et)!==ZodParsedType.symbol){const rt=this._getOrReturnCtx(et);return addIssueToContext(rt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:rt.parsedType}),INVALID}return OK(et.data)}}ZodSymbol.create=_e=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...processCreateParams(_e)});class ZodUndefined extends ZodType{_parse(et){if(this._getType(et)!==ZodParsedType.undefined){const rt=this._getOrReturnCtx(et);return addIssueToContext(rt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:rt.parsedType}),INVALID}return OK(et.data)}}ZodUndefined.create=_e=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...processCreateParams(_e)});class ZodNull extends ZodType{_parse(et){if(this._getType(et)!==ZodParsedType.null){const rt=this._getOrReturnCtx(et);return addIssueToContext(rt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:rt.parsedType}),INVALID}return OK(et.data)}}ZodNull.create=_e=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...processCreateParams(_e)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(et){return OK(et.data)}}ZodAny.create=_e=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...processCreateParams(_e)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(et){return OK(et.data)}}ZodUnknown.create=_e=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...processCreateParams(_e)});class ZodNever extends ZodType{_parse(et){const tt=this._getOrReturnCtx(et);return addIssueToContext(tt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:tt.parsedType}),INVALID}}ZodNever.create=_e=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...processCreateParams(_e)});class ZodVoid extends ZodType{_parse(et){if(this._getType(et)!==ZodParsedType.undefined){const rt=this._getOrReturnCtx(et);return addIssueToContext(rt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:rt.parsedType}),INVALID}return OK(et.data)}}ZodVoid.create=_e=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...processCreateParams(_e)});class ZodArray extends ZodType{_parse(et){const{ctx:tt,status:rt}=this._processInputParams(et),nt=this._def;if(tt.parsedType!==ZodParsedType.array)return addIssueToContext(tt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:tt.parsedType}),INVALID;if(nt.exactLength!==null){const at=tt.data.length>nt.exactLength.value,st=tt.data.lengthnt.maxLength.value&&(addIssueToContext(tt,{code:ZodIssueCode.too_big,maximum:nt.maxLength.value,type:"array",inclusive:!0,exact:!1,message:nt.maxLength.message}),rt.dirty()),tt.common.async)return Promise.all([...tt.data].map((at,st)=>nt.type._parseAsync(new ParseInputLazyPath(tt,at,tt.path,st)))).then(at=>ParseStatus.mergeArray(rt,at));const it=[...tt.data].map((at,st)=>nt.type._parseSync(new ParseInputLazyPath(tt,at,tt.path,st)));return ParseStatus.mergeArray(rt,it)}get element(){return this._def.type}min(et,tt){return new ZodArray({...this._def,minLength:{value:et,message:errorUtil.toString(tt)}})}max(et,tt){return new ZodArray({...this._def,maxLength:{value:et,message:errorUtil.toString(tt)}})}length(et,tt){return new ZodArray({...this._def,exactLength:{value:et,message:errorUtil.toString(tt)}})}nonempty(et){return this.min(1,et)}}ZodArray.create=(_e,et)=>new ZodArray({type:_e,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...processCreateParams(et)});function deepPartialify(_e){if(_e instanceof ZodObject){const et={};for(const tt in _e.shape){const rt=_e.shape[tt];et[tt]=ZodOptional.create(deepPartialify(rt))}return new ZodObject({..._e._def,shape:()=>et})}else return _e instanceof ZodArray?new ZodArray({..._e._def,type:deepPartialify(_e.element)}):_e instanceof ZodOptional?ZodOptional.create(deepPartialify(_e.unwrap())):_e instanceof ZodNullable?ZodNullable.create(deepPartialify(_e.unwrap())):_e instanceof ZodTuple?ZodTuple.create(_e.items.map(et=>deepPartialify(et))):_e}class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const et=this._def.shape(),tt=util$5.objectKeys(et);return this._cached={shape:et,keys:tt}}_parse(et){if(this._getType(et)!==ZodParsedType.object){const dt=this._getOrReturnCtx(et);return addIssueToContext(dt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:dt.parsedType}),INVALID}const{status:rt,ctx:nt}=this._processInputParams(et),{shape:it,keys:at}=this._getCached(),st=[];if(!(this._def.catchall instanceof ZodNever&&this._def.unknownKeys==="strip"))for(const dt in nt.data)at.includes(dt)||st.push(dt);const lt=[];for(const dt of at){const ht=it[dt],pt=nt.data[dt];lt.push({key:{status:"valid",value:dt},value:ht._parse(new ParseInputLazyPath(nt,pt,nt.path,dt)),alwaysSet:dt in nt.data})}if(this._def.catchall instanceof ZodNever){const dt=this._def.unknownKeys;if(dt==="passthrough")for(const ht of st)lt.push({key:{status:"valid",value:ht},value:{status:"valid",value:nt.data[ht]}});else if(dt==="strict")st.length>0&&(addIssueToContext(nt,{code:ZodIssueCode.unrecognized_keys,keys:st}),rt.dirty());else if(dt!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const dt=this._def.catchall;for(const ht of st){const pt=nt.data[ht];lt.push({key:{status:"valid",value:ht},value:dt._parse(new ParseInputLazyPath(nt,pt,nt.path,ht)),alwaysSet:ht in nt.data})}}return nt.common.async?Promise.resolve().then(async()=>{const dt=[];for(const ht of lt){const pt=await ht.key;dt.push({key:pt,value:await ht.value,alwaysSet:ht.alwaysSet})}return dt}).then(dt=>ParseStatus.mergeObjectSync(rt,dt)):ParseStatus.mergeObjectSync(rt,lt)}get shape(){return this._def.shape()}strict(et){return errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...et!==void 0?{errorMap:(tt,rt)=>{var nt,it,at,st;const lt=(at=(it=(nt=this._def).errorMap)===null||it===void 0?void 0:it.call(nt,tt,rt).message)!==null&&at!==void 0?at:rt.defaultError;return tt.code==="unrecognized_keys"?{message:(st=errorUtil.errToObj(et).message)!==null&&st!==void 0?st:lt}:{message:lt}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(et){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...et})})}merge(et){return new ZodObject({unknownKeys:et._def.unknownKeys,catchall:et._def.catchall,shape:()=>({...this._def.shape(),...et._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject})}setKey(et,tt){return this.augment({[et]:tt})}catchall(et){return new ZodObject({...this._def,catchall:et})}pick(et){const tt={};return util$5.objectKeys(et).forEach(rt=>{et[rt]&&this.shape[rt]&&(tt[rt]=this.shape[rt])}),new ZodObject({...this._def,shape:()=>tt})}omit(et){const tt={};return util$5.objectKeys(this.shape).forEach(rt=>{et[rt]||(tt[rt]=this.shape[rt])}),new ZodObject({...this._def,shape:()=>tt})}deepPartial(){return deepPartialify(this)}partial(et){const tt={};return util$5.objectKeys(this.shape).forEach(rt=>{const nt=this.shape[rt];et&&!et[rt]?tt[rt]=nt:tt[rt]=nt.optional()}),new ZodObject({...this._def,shape:()=>tt})}required(et){const tt={};return util$5.objectKeys(this.shape).forEach(rt=>{if(et&&!et[rt])tt[rt]=this.shape[rt];else{let it=this.shape[rt];for(;it instanceof ZodOptional;)it=it._def.innerType;tt[rt]=it}}),new ZodObject({...this._def,shape:()=>tt})}keyof(){return createZodEnum(util$5.objectKeys(this.shape))}}ZodObject.create=(_e,et)=>new ZodObject({shape:()=>_e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(et)});ZodObject.strictCreate=(_e,et)=>new ZodObject({shape:()=>_e,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(et)});ZodObject.lazycreate=(_e,et)=>new ZodObject({shape:_e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(et)});class ZodUnion extends ZodType{_parse(et){const{ctx:tt}=this._processInputParams(et),rt=this._def.options;function nt(it){for(const st of it)if(st.result.status==="valid")return st.result;for(const st of it)if(st.result.status==="dirty")return tt.common.issues.push(...st.ctx.common.issues),st.result;const at=it.map(st=>new ZodError(st.ctx.common.issues));return addIssueToContext(tt,{code:ZodIssueCode.invalid_union,unionErrors:at}),INVALID}if(tt.common.async)return Promise.all(rt.map(async it=>{const at={...tt,common:{...tt.common,issues:[]},parent:null};return{result:await it._parseAsync({data:tt.data,path:tt.path,parent:at}),ctx:at}})).then(nt);{let it;const at=[];for(const lt of rt){const dt={...tt,common:{...tt.common,issues:[]},parent:null},ht=lt._parseSync({data:tt.data,path:tt.path,parent:dt});if(ht.status==="valid")return ht;ht.status==="dirty"&&!it&&(it={result:ht,ctx:dt}),dt.common.issues.length&&at.push(dt.common.issues)}if(it)return tt.common.issues.push(...it.ctx.common.issues),it.result;const st=at.map(lt=>new ZodError(lt));return addIssueToContext(tt,{code:ZodIssueCode.invalid_union,unionErrors:st}),INVALID}}get options(){return this._def.options}}ZodUnion.create=(_e,et)=>new ZodUnion({options:_e,typeName:ZodFirstPartyTypeKind.ZodUnion,...processCreateParams(et)});const getDiscriminator=_e=>_e instanceof ZodLazy?getDiscriminator(_e.schema):_e instanceof ZodEffects?getDiscriminator(_e.innerType()):_e instanceof ZodLiteral?[_e.value]:_e instanceof ZodEnum?_e.options:_e instanceof ZodNativeEnum?Object.keys(_e.enum):_e instanceof ZodDefault?getDiscriminator(_e._def.innerType):_e instanceof ZodUndefined?[void 0]:_e instanceof ZodNull?[null]:null;class ZodDiscriminatedUnion extends ZodType{_parse(et){const{ctx:tt}=this._processInputParams(et);if(tt.parsedType!==ZodParsedType.object)return addIssueToContext(tt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:tt.parsedType}),INVALID;const rt=this.discriminator,nt=tt.data[rt],it=this.optionsMap.get(nt);return it?tt.common.async?it._parseAsync({data:tt.data,path:tt.path,parent:tt}):it._parseSync({data:tt.data,path:tt.path,parent:tt}):(addIssueToContext(tt,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[rt]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(et,tt,rt){const nt=new Map;for(const it of tt){const at=getDiscriminator(it.shape[et]);if(!at)throw new Error(`A discriminator value for key \`${et}\` could not be extracted from all schema options`);for(const st of at){if(nt.has(st))throw new Error(`Discriminator property ${String(et)} has duplicate value ${String(st)}`);nt.set(st,it)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator:et,options:tt,optionsMap:nt,...processCreateParams(rt)})}}function mergeValues(_e,et){const tt=getParsedType(_e),rt=getParsedType(et);if(_e===et)return{valid:!0,data:_e};if(tt===ZodParsedType.object&&rt===ZodParsedType.object){const nt=util$5.objectKeys(et),it=util$5.objectKeys(_e).filter(st=>nt.indexOf(st)!==-1),at={..._e,...et};for(const st of it){const lt=mergeValues(_e[st],et[st]);if(!lt.valid)return{valid:!1};at[st]=lt.data}return{valid:!0,data:at}}else if(tt===ZodParsedType.array&&rt===ZodParsedType.array){if(_e.length!==et.length)return{valid:!1};const nt=[];for(let it=0;it<_e.length;it++){const at=_e[it],st=et[it],lt=mergeValues(at,st);if(!lt.valid)return{valid:!1};nt.push(lt.data)}return{valid:!0,data:nt}}else return tt===ZodParsedType.date&&rt===ZodParsedType.date&&+_e==+et?{valid:!0,data:_e}:{valid:!1}}class ZodIntersection extends ZodType{_parse(et){const{status:tt,ctx:rt}=this._processInputParams(et),nt=(it,at)=>{if(isAborted(it)||isAborted(at))return INVALID;const st=mergeValues(it.value,at.value);return st.valid?((isDirty(it)||isDirty(at))&&tt.dirty(),{status:tt.value,value:st.data}):(addIssueToContext(rt,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return rt.common.async?Promise.all([this._def.left._parseAsync({data:rt.data,path:rt.path,parent:rt}),this._def.right._parseAsync({data:rt.data,path:rt.path,parent:rt})]).then(([it,at])=>nt(it,at)):nt(this._def.left._parseSync({data:rt.data,path:rt.path,parent:rt}),this._def.right._parseSync({data:rt.data,path:rt.path,parent:rt}))}}ZodIntersection.create=(_e,et,tt)=>new ZodIntersection({left:_e,right:et,typeName:ZodFirstPartyTypeKind.ZodIntersection,...processCreateParams(tt)});class ZodTuple extends ZodType{_parse(et){const{status:tt,ctx:rt}=this._processInputParams(et);if(rt.parsedType!==ZodParsedType.array)return addIssueToContext(rt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:rt.parsedType}),INVALID;if(rt.data.lengththis._def.items.length&&(addIssueToContext(rt,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),tt.dirty());const it=[...rt.data].map((at,st)=>{const lt=this._def.items[st]||this._def.rest;return lt?lt._parse(new ParseInputLazyPath(rt,at,rt.path,st)):null}).filter(at=>!!at);return rt.common.async?Promise.all(it).then(at=>ParseStatus.mergeArray(tt,at)):ParseStatus.mergeArray(tt,it)}get items(){return this._def.items}rest(et){return new ZodTuple({...this._def,rest:et})}}ZodTuple.create=(_e,et)=>{if(!Array.isArray(_e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:_e,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...processCreateParams(et)})};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(et){const{status:tt,ctx:rt}=this._processInputParams(et);if(rt.parsedType!==ZodParsedType.object)return addIssueToContext(rt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:rt.parsedType}),INVALID;const nt=[],it=this._def.keyType,at=this._def.valueType;for(const st in rt.data)nt.push({key:it._parse(new ParseInputLazyPath(rt,st,rt.path,st)),value:at._parse(new ParseInputLazyPath(rt,rt.data[st],rt.path,st))});return rt.common.async?ParseStatus.mergeObjectAsync(tt,nt):ParseStatus.mergeObjectSync(tt,nt)}get element(){return this._def.valueType}static create(et,tt,rt){return tt instanceof ZodType?new ZodRecord({keyType:et,valueType:tt,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(rt)}):new ZodRecord({keyType:ZodString.create(),valueType:et,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(tt)})}}class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(et){const{status:tt,ctx:rt}=this._processInputParams(et);if(rt.parsedType!==ZodParsedType.map)return addIssueToContext(rt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:rt.parsedType}),INVALID;const nt=this._def.keyType,it=this._def.valueType,at=[...rt.data.entries()].map(([st,lt],dt)=>({key:nt._parse(new ParseInputLazyPath(rt,st,rt.path,[dt,"key"])),value:it._parse(new ParseInputLazyPath(rt,lt,rt.path,[dt,"value"]))}));if(rt.common.async){const st=new Map;return Promise.resolve().then(async()=>{for(const lt of at){const dt=await lt.key,ht=await lt.value;if(dt.status==="aborted"||ht.status==="aborted")return INVALID;(dt.status==="dirty"||ht.status==="dirty")&&tt.dirty(),st.set(dt.value,ht.value)}return{status:tt.value,value:st}})}else{const st=new Map;for(const lt of at){const dt=lt.key,ht=lt.value;if(dt.status==="aborted"||ht.status==="aborted")return INVALID;(dt.status==="dirty"||ht.status==="dirty")&&tt.dirty(),st.set(dt.value,ht.value)}return{status:tt.value,value:st}}}}ZodMap.create=(_e,et,tt)=>new ZodMap({valueType:et,keyType:_e,typeName:ZodFirstPartyTypeKind.ZodMap,...processCreateParams(tt)});class ZodSet extends ZodType{_parse(et){const{status:tt,ctx:rt}=this._processInputParams(et);if(rt.parsedType!==ZodParsedType.set)return addIssueToContext(rt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:rt.parsedType}),INVALID;const nt=this._def;nt.minSize!==null&&rt.data.sizent.maxSize.value&&(addIssueToContext(rt,{code:ZodIssueCode.too_big,maximum:nt.maxSize.value,type:"set",inclusive:!0,exact:!1,message:nt.maxSize.message}),tt.dirty());const it=this._def.valueType;function at(lt){const dt=new Set;for(const ht of lt){if(ht.status==="aborted")return INVALID;ht.status==="dirty"&&tt.dirty(),dt.add(ht.value)}return{status:tt.value,value:dt}}const st=[...rt.data.values()].map((lt,dt)=>it._parse(new ParseInputLazyPath(rt,lt,rt.path,dt)));return rt.common.async?Promise.all(st).then(lt=>at(lt)):at(st)}min(et,tt){return new ZodSet({...this._def,minSize:{value:et,message:errorUtil.toString(tt)}})}max(et,tt){return new ZodSet({...this._def,maxSize:{value:et,message:errorUtil.toString(tt)}})}size(et,tt){return this.min(et,tt).max(et,tt)}nonempty(et){return this.min(1,et)}}ZodSet.create=(_e,et)=>new ZodSet({valueType:_e,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...processCreateParams(et)});class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(et){const{ctx:tt}=this._processInputParams(et);if(tt.parsedType!==ZodParsedType.function)return addIssueToContext(tt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:tt.parsedType}),INVALID;function rt(st,lt){return makeIssue({data:st,path:tt.path,errorMaps:[tt.common.contextualErrorMap,tt.schemaErrorMap,getErrorMap(),errorMap].filter(dt=>!!dt),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:lt}})}function nt(st,lt){return makeIssue({data:st,path:tt.path,errorMaps:[tt.common.contextualErrorMap,tt.schemaErrorMap,getErrorMap(),errorMap].filter(dt=>!!dt),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:lt}})}const it={errorMap:tt.common.contextualErrorMap},at=tt.data;if(this._def.returns instanceof ZodPromise){const st=this;return OK(async function(...lt){const dt=new ZodError([]),ht=await st._def.args.parseAsync(lt,it).catch(gt=>{throw dt.addIssue(rt(lt,gt)),dt}),pt=await Reflect.apply(at,this,ht);return await st._def.returns._def.type.parseAsync(pt,it).catch(gt=>{throw dt.addIssue(nt(pt,gt)),dt})})}else{const st=this;return OK(function(...lt){const dt=st._def.args.safeParse(lt,it);if(!dt.success)throw new ZodError([rt(lt,dt.error)]);const ht=Reflect.apply(at,this,dt.data),pt=st._def.returns.safeParse(ht,it);if(!pt.success)throw new ZodError([nt(ht,pt.error)]);return pt.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...et){return new ZodFunction({...this._def,args:ZodTuple.create(et).rest(ZodUnknown.create())})}returns(et){return new ZodFunction({...this._def,returns:et})}implement(et){return this.parse(et)}strictImplement(et){return this.parse(et)}static create(et,tt,rt){return new ZodFunction({args:et||ZodTuple.create([]).rest(ZodUnknown.create()),returns:tt||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...processCreateParams(rt)})}}class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(et){const{ctx:tt}=this._processInputParams(et);return this._def.getter()._parse({data:tt.data,path:tt.path,parent:tt})}}ZodLazy.create=(_e,et)=>new ZodLazy({getter:_e,typeName:ZodFirstPartyTypeKind.ZodLazy,...processCreateParams(et)});class ZodLiteral extends ZodType{_parse(et){if(et.data!==this._def.value){const tt=this._getOrReturnCtx(et);return addIssueToContext(tt,{received:tt.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:"valid",value:et.data}}get value(){return this._def.value}}ZodLiteral.create=(_e,et)=>new ZodLiteral({value:_e,typeName:ZodFirstPartyTypeKind.ZodLiteral,...processCreateParams(et)});function createZodEnum(_e,et){return new ZodEnum({values:_e,typeName:ZodFirstPartyTypeKind.ZodEnum,...processCreateParams(et)})}class ZodEnum extends ZodType{_parse(et){if(typeof et.data!="string"){const tt=this._getOrReturnCtx(et),rt=this._def.values;return addIssueToContext(tt,{expected:util$5.joinValues(rt),received:tt.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(this._def.values.indexOf(et.data)===-1){const tt=this._getOrReturnCtx(et),rt=this._def.values;return addIssueToContext(tt,{received:tt.data,code:ZodIssueCode.invalid_enum_value,options:rt}),INVALID}return OK(et.data)}get options(){return this._def.values}get enum(){const et={};for(const tt of this._def.values)et[tt]=tt;return et}get Values(){const et={};for(const tt of this._def.values)et[tt]=tt;return et}get Enum(){const et={};for(const tt of this._def.values)et[tt]=tt;return et}extract(et){return ZodEnum.create(et)}exclude(et){return ZodEnum.create(this.options.filter(tt=>!et.includes(tt)))}}ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{_parse(et){const tt=util$5.getValidEnumValues(this._def.values),rt=this._getOrReturnCtx(et);if(rt.parsedType!==ZodParsedType.string&&rt.parsedType!==ZodParsedType.number){const nt=util$5.objectValues(tt);return addIssueToContext(rt,{expected:util$5.joinValues(nt),received:rt.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(tt.indexOf(et.data)===-1){const nt=util$5.objectValues(tt);return addIssueToContext(rt,{received:rt.data,code:ZodIssueCode.invalid_enum_value,options:nt}),INVALID}return OK(et.data)}get enum(){return this._def.values}}ZodNativeEnum.create=(_e,et)=>new ZodNativeEnum({values:_e,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...processCreateParams(et)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(et){const{ctx:tt}=this._processInputParams(et);if(tt.parsedType!==ZodParsedType.promise&&tt.common.async===!1)return addIssueToContext(tt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:tt.parsedType}),INVALID;const rt=tt.parsedType===ZodParsedType.promise?tt.data:Promise.resolve(tt.data);return OK(rt.then(nt=>this._def.type.parseAsync(nt,{path:tt.path,errorMap:tt.common.contextualErrorMap})))}}ZodPromise.create=(_e,et)=>new ZodPromise({type:_e,typeName:ZodFirstPartyTypeKind.ZodPromise,...processCreateParams(et)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(et){const{status:tt,ctx:rt}=this._processInputParams(et),nt=this._def.effect||null,it={addIssue:at=>{addIssueToContext(rt,at),at.fatal?tt.abort():tt.dirty()},get path(){return rt.path}};if(it.addIssue=it.addIssue.bind(it),nt.type==="preprocess"){const at=nt.transform(rt.data,it);return rt.common.issues.length?{status:"dirty",value:rt.data}:rt.common.async?Promise.resolve(at).then(st=>this._def.schema._parseAsync({data:st,path:rt.path,parent:rt})):this._def.schema._parseSync({data:at,path:rt.path,parent:rt})}if(nt.type==="refinement"){const at=st=>{const lt=nt.refinement(st,it);if(rt.common.async)return Promise.resolve(lt);if(lt instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return st};if(rt.common.async===!1){const st=this._def.schema._parseSync({data:rt.data,path:rt.path,parent:rt});return st.status==="aborted"?INVALID:(st.status==="dirty"&&tt.dirty(),at(st.value),{status:tt.value,value:st.value})}else return this._def.schema._parseAsync({data:rt.data,path:rt.path,parent:rt}).then(st=>st.status==="aborted"?INVALID:(st.status==="dirty"&&tt.dirty(),at(st.value).then(()=>({status:tt.value,value:st.value}))))}if(nt.type==="transform")if(rt.common.async===!1){const at=this._def.schema._parseSync({data:rt.data,path:rt.path,parent:rt});if(!isValid(at))return at;const st=nt.transform(at.value,it);if(st instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:tt.value,value:st}}else return this._def.schema._parseAsync({data:rt.data,path:rt.path,parent:rt}).then(at=>isValid(at)?Promise.resolve(nt.transform(at.value,it)).then(st=>({status:tt.value,value:st})):at);util$5.assertNever(nt)}}ZodEffects.create=(_e,et,tt)=>new ZodEffects({schema:_e,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:et,...processCreateParams(tt)});ZodEffects.createWithPreprocess=(_e,et,tt)=>new ZodEffects({schema:et,effect:{type:"preprocess",transform:_e},typeName:ZodFirstPartyTypeKind.ZodEffects,...processCreateParams(tt)});class ZodOptional extends ZodType{_parse(et){return this._getType(et)===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(et)}unwrap(){return this._def.innerType}}ZodOptional.create=(_e,et)=>new ZodOptional({innerType:_e,typeName:ZodFirstPartyTypeKind.ZodOptional,...processCreateParams(et)});class ZodNullable extends ZodType{_parse(et){return this._getType(et)===ZodParsedType.null?OK(null):this._def.innerType._parse(et)}unwrap(){return this._def.innerType}}ZodNullable.create=(_e,et)=>new ZodNullable({innerType:_e,typeName:ZodFirstPartyTypeKind.ZodNullable,...processCreateParams(et)});class ZodDefault extends ZodType{_parse(et){const{ctx:tt}=this._processInputParams(et);let rt=tt.data;return tt.parsedType===ZodParsedType.undefined&&(rt=this._def.defaultValue()),this._def.innerType._parse({data:rt,path:tt.path,parent:tt})}removeDefault(){return this._def.innerType}}ZodDefault.create=(_e,et)=>new ZodDefault({innerType:_e,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:typeof et.default=="function"?et.default:()=>et.default,...processCreateParams(et)});class ZodCatch extends ZodType{_parse(et){const{ctx:tt}=this._processInputParams(et),rt={...tt,common:{...tt.common,issues:[]}},nt=this._def.innerType._parse({data:rt.data,path:rt.path,parent:{...rt}});return isAsync(nt)?nt.then(it=>({status:"valid",value:it.status==="valid"?it.value:this._def.catchValue({get error(){return new ZodError(rt.common.issues)},input:rt.data})})):{status:"valid",value:nt.status==="valid"?nt.value:this._def.catchValue({get error(){return new ZodError(rt.common.issues)},input:rt.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(_e,et)=>new ZodCatch({innerType:_e,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:typeof et.catch=="function"?et.catch:()=>et.catch,...processCreateParams(et)});class ZodNaN extends ZodType{_parse(et){if(this._getType(et)!==ZodParsedType.nan){const rt=this._getOrReturnCtx(et);return addIssueToContext(rt,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:rt.parsedType}),INVALID}return{status:"valid",value:et.data}}}ZodNaN.create=_e=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...processCreateParams(_e)});const BRAND=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(et){const{ctx:tt}=this._processInputParams(et),rt=tt.data;return this._def.type._parse({data:rt,path:tt.path,parent:tt})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(et){const{status:tt,ctx:rt}=this._processInputParams(et);if(rt.common.async)return(async()=>{const it=await this._def.in._parseAsync({data:rt.data,path:rt.path,parent:rt});return it.status==="aborted"?INVALID:it.status==="dirty"?(tt.dirty(),DIRTY(it.value)):this._def.out._parseAsync({data:it.value,path:rt.path,parent:rt})})();{const nt=this._def.in._parseSync({data:rt.data,path:rt.path,parent:rt});return nt.status==="aborted"?INVALID:nt.status==="dirty"?(tt.dirty(),{status:"dirty",value:nt.value}):this._def.out._parseSync({data:nt.value,path:rt.path,parent:rt})}}static create(et,tt){return new ZodPipeline({in:et,out:tt,typeName:ZodFirstPartyTypeKind.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(et){const tt=this._def.innerType._parse(et);return isValid(tt)&&(tt.value=Object.freeze(tt.value)),tt}}ZodReadonly.create=(_e,et)=>new ZodReadonly({innerType:_e,typeName:ZodFirstPartyTypeKind.ZodReadonly,...processCreateParams(et)});const custom=(_e,et={},tt)=>_e?ZodAny.create().superRefine((rt,nt)=>{var it,at;if(!_e(rt)){const st=typeof et=="function"?et(rt):typeof et=="string"?{message:et}:et,lt=(at=(it=st.fatal)!==null&&it!==void 0?it:tt)!==null&&at!==void 0?at:!0,dt=typeof st=="string"?{message:st}:st;nt.addIssue({code:"custom",...dt,fatal:lt})}}):ZodAny.create(),late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind;(function(_e){_e.ZodString="ZodString",_e.ZodNumber="ZodNumber",_e.ZodNaN="ZodNaN",_e.ZodBigInt="ZodBigInt",_e.ZodBoolean="ZodBoolean",_e.ZodDate="ZodDate",_e.ZodSymbol="ZodSymbol",_e.ZodUndefined="ZodUndefined",_e.ZodNull="ZodNull",_e.ZodAny="ZodAny",_e.ZodUnknown="ZodUnknown",_e.ZodNever="ZodNever",_e.ZodVoid="ZodVoid",_e.ZodArray="ZodArray",_e.ZodObject="ZodObject",_e.ZodUnion="ZodUnion",_e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",_e.ZodIntersection="ZodIntersection",_e.ZodTuple="ZodTuple",_e.ZodRecord="ZodRecord",_e.ZodMap="ZodMap",_e.ZodSet="ZodSet",_e.ZodFunction="ZodFunction",_e.ZodLazy="ZodLazy",_e.ZodLiteral="ZodLiteral",_e.ZodEnum="ZodEnum",_e.ZodEffects="ZodEffects",_e.ZodNativeEnum="ZodNativeEnum",_e.ZodOptional="ZodOptional",_e.ZodNullable="ZodNullable",_e.ZodDefault="ZodDefault",_e.ZodCatch="ZodCatch",_e.ZodPromise="ZodPromise",_e.ZodBranded="ZodBranded",_e.ZodPipeline="ZodPipeline",_e.ZodReadonly="ZodReadonly"})(ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={}));const instanceOfType=(_e,et={message:`Input not instance of ${_e.name}`})=>custom(tt=>tt instanceof _e,et),stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,ostring=()=>stringType().optional(),onumber=()=>numberType().optional(),oboolean=()=>booleanType().optional(),coerce={string:_e=>ZodString.create({..._e,coerce:!0}),number:_e=>ZodNumber.create({..._e,coerce:!0}),boolean:_e=>ZodBoolean.create({..._e,coerce:!0}),bigint:_e=>ZodBigInt.create({..._e,coerce:!0}),date:_e=>ZodDate.create({..._e,coerce:!0})},NEVER=INVALID;var z$4=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap,getErrorMap,makeIssue,EMPTY_PATH,addIssueToContext,ParseStatus,INVALID,DIRTY,OK,isAborted,isDirty,isValid,isAsync,get util(){return util$5},get objectUtil(){return objectUtil},ZodParsedType,getParsedType,ZodType,ZodString,ZodNumber,ZodBigInt,ZodBoolean,ZodDate,ZodSymbol,ZodUndefined,ZodNull,ZodAny,ZodUnknown,ZodNever,ZodVoid,ZodArray,ZodObject,ZodUnion,ZodDiscriminatedUnion,ZodIntersection,ZodTuple,ZodRecord,ZodMap,ZodSet,ZodFunction,ZodLazy,ZodLiteral,ZodEnum,ZodNativeEnum,ZodPromise,ZodEffects,ZodTransformer:ZodEffects,ZodOptional,ZodNullable,ZodDefault,ZodCatch,ZodNaN,BRAND,ZodBranded,ZodPipeline,ZodReadonly,custom,Schema:ZodType,ZodSchema:ZodType,late,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},coerce,any:anyType,array:arrayType,bigint:bigIntType,boolean:booleanType,date:dateType,discriminatedUnion:discriminatedUnionType,effect:effectsType,enum:enumType,function:functionType,instanceof:instanceOfType,intersection:intersectionType,lazy:lazyType,literal:literalType,map:mapType,nan:nanType,nativeEnum:nativeEnumType,never:neverType,null:nullType,nullable:nullableType,number:numberType,object:objectType,oboolean,onumber,optional:optionalType,ostring,pipeline:pipelineType,preprocess:preprocessType,promise:promiseType,record:recordType,set:setType,strictObject:strictObjectType,string:stringType,symbol:symbolType,transformer:effectsType,tuple:tupleType,undefined:undefinedType,union:unionType,unknown:unknownType,void:voidType,NEVER,ZodIssueCode,quotelessJson,ZodError});const ANSI_BACKGROUND_OFFSET=10,wrapAnsi16=(_e=0)=>et=>`\x1B[${et+_e}m`,wrapAnsi256=(_e=0)=>et=>`\x1B[${38+_e};5;${et}m`,wrapAnsi16m=(_e=0)=>(et,tt,rt)=>`\x1B[${38+_e};2;${et};${tt};${rt}m`,styles$h={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(styles$h.modifier);const foregroundColorNames=Object.keys(styles$h.color),backgroundColorNames=Object.keys(styles$h.bgColor);[...foregroundColorNames,...backgroundColorNames];function assembleStyles(){const _e=new Map;for(const[et,tt]of Object.entries(styles$h)){for(const[rt,nt]of Object.entries(tt))styles$h[rt]={open:`\x1B[${nt[0]}m`,close:`\x1B[${nt[1]}m`},tt[rt]=styles$h[rt],_e.set(nt[0],nt[1]);Object.defineProperty(styles$h,et,{value:tt,enumerable:!1})}return Object.defineProperty(styles$h,"codes",{value:_e,enumerable:!1}),styles$h.color.close="\x1B[39m",styles$h.bgColor.close="\x1B[49m",styles$h.color.ansi=wrapAnsi16(),styles$h.color.ansi256=wrapAnsi256(),styles$h.color.ansi16m=wrapAnsi16m(),styles$h.bgColor.ansi=wrapAnsi16(ANSI_BACKGROUND_OFFSET),styles$h.bgColor.ansi256=wrapAnsi256(ANSI_BACKGROUND_OFFSET),styles$h.bgColor.ansi16m=wrapAnsi16m(ANSI_BACKGROUND_OFFSET),Object.defineProperties(styles$h,{rgbToAnsi256:{value(et,tt,rt){return et===tt&&tt===rt?et<8?16:et>248?231:Math.round((et-8)/247*24)+232:16+36*Math.round(et/255*5)+6*Math.round(tt/255*5)+Math.round(rt/255*5)},enumerable:!1},hexToRgb:{value(et){const tt=/[a-f\d]{6}|[a-f\d]{3}/i.exec(et.toString(16));if(!tt)return[0,0,0];let[rt]=tt;rt.length===3&&(rt=[...rt].map(it=>it+it).join(""));const nt=Number.parseInt(rt,16);return[nt>>16&255,nt>>8&255,nt&255]},enumerable:!1},hexToAnsi256:{value:et=>styles$h.rgbToAnsi256(...styles$h.hexToRgb(et)),enumerable:!1},ansi256ToAnsi:{value(et){if(et<8)return 30+et;if(et<16)return 90+(et-8);let tt,rt,nt;if(et>=232)tt=((et-232)*10+8)/255,rt=tt,nt=tt;else{et-=16;const st=et%36;tt=Math.floor(et/36)/5,rt=Math.floor(st/6)/5,nt=st%6/5}const it=Math.max(tt,rt,nt)*2;if(it===0)return 30;let at=30+(Math.round(nt)<<2|Math.round(rt)<<1|Math.round(tt));return it===2&&(at+=60),at},enumerable:!1},rgbToAnsi:{value:(et,tt,rt)=>styles$h.ansi256ToAnsi(styles$h.rgbToAnsi256(et,tt,rt)),enumerable:!1},hexToAnsi:{value:et=>styles$h.ansi256ToAnsi(styles$h.hexToAnsi256(et)),enumerable:!1}}),styles$h}const ansiStyles=assembleStyles(),ansiStyles$1=ansiStyles,level=(()=>{if(navigator.userAgentData){const _e=navigator.userAgentData.brands.find(({brand:et})=>et==="Chromium");if(_e&&_e.version>93)return 3}return/\b(Chrome|Chromium)\//.test(navigator.userAgent)?1:0})(),colorSupport=level!==0&&{level,hasBasic:!0,has256:level>=2,has16m:level>=3},supportsColor={stdout:colorSupport,stderr:colorSupport},supportsColor$1=supportsColor;function stringReplaceAll(_e,et,tt){let rt=_e.indexOf(et);if(rt===-1)return _e;const nt=et.length;let it=0,at="";do at+=_e.slice(it,rt)+et+tt,it=rt+nt,rt=_e.indexOf(et,it);while(rt!==-1);return at+=_e.slice(it),at}function stringEncaseCRLFWithFirstIndex(_e,et,tt,rt){let nt=0,it="";do{const at=_e[rt-1]==="\r";it+=_e.slice(nt,at?rt-1:rt)+et+(at?`\r +`:` +`)+tt,nt=rt+1,rt=_e.indexOf(` +`,nt)}while(rt!==-1);return it+=_e.slice(nt),it}const{stdout:stdoutColor,stderr:stderrColor}=supportsColor$1,GENERATOR=Symbol("GENERATOR"),STYLER=Symbol("STYLER"),IS_EMPTY=Symbol("IS_EMPTY"),levelMapping=["ansi","ansi","ansi256","ansi16m"],styles$g=Object.create(null),applyOptions=(_e,et={})=>{if(et.level&&!(Number.isInteger(et.level)&&et.level>=0&&et.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const tt=stdoutColor?stdoutColor.level:0;_e.level=et.level===void 0?tt:et.level},chalkFactory=_e=>{const et=(...tt)=>tt.join(" ");return applyOptions(et,_e),Object.setPrototypeOf(et,createChalk.prototype),et};function createChalk(_e){return chalkFactory(_e)}Object.setPrototypeOf(createChalk.prototype,Function.prototype);for(const[_e,et]of Object.entries(ansiStyles$1))styles$g[_e]={get(){const tt=createBuilder(this,createStyler(et.open,et.close,this[STYLER]),this[IS_EMPTY]);return Object.defineProperty(this,_e,{value:tt}),tt}};styles$g.visible={get(){const _e=createBuilder(this,this[STYLER],!0);return Object.defineProperty(this,"visible",{value:_e}),_e}};const getModelAnsi=(_e,et,tt,...rt)=>_e==="rgb"?et==="ansi16m"?ansiStyles$1[tt].ansi16m(...rt):et==="ansi256"?ansiStyles$1[tt].ansi256(ansiStyles$1.rgbToAnsi256(...rt)):ansiStyles$1[tt].ansi(ansiStyles$1.rgbToAnsi(...rt)):_e==="hex"?getModelAnsi("rgb",et,tt,...ansiStyles$1.hexToRgb(...rt)):ansiStyles$1[tt][_e](...rt),usedModels=["rgb","hex","ansi256"];for(const _e of usedModels){styles$g[_e]={get(){const{level:tt}=this;return function(...rt){const nt=createStyler(getModelAnsi(_e,levelMapping[tt],"color",...rt),ansiStyles$1.color.close,this[STYLER]);return createBuilder(this,nt,this[IS_EMPTY])}}};const et="bg"+_e[0].toUpperCase()+_e.slice(1);styles$g[et]={get(){const{level:tt}=this;return function(...rt){const nt=createStyler(getModelAnsi(_e,levelMapping[tt],"bgColor",...rt),ansiStyles$1.bgColor.close,this[STYLER]);return createBuilder(this,nt,this[IS_EMPTY])}}}}const proto=Object.defineProperties(()=>{},{...styles$g,level:{enumerable:!0,get(){return this[GENERATOR].level},set(_e){this[GENERATOR].level=_e}}}),createStyler=(_e,et,tt)=>{let rt,nt;return tt===void 0?(rt=_e,nt=et):(rt=tt.openAll+_e,nt=et+tt.closeAll),{open:_e,close:et,openAll:rt,closeAll:nt,parent:tt}},createBuilder=(_e,et,tt)=>{const rt=(...nt)=>applyStyle(rt,nt.length===1?""+nt[0]:nt.join(" "));return Object.setPrototypeOf(rt,proto),rt[GENERATOR]=_e,rt[STYLER]=et,rt[IS_EMPTY]=tt,rt},applyStyle=(_e,et)=>{if(_e.level<=0||!et)return _e[IS_EMPTY]?"":et;let tt=_e[STYLER];if(tt===void 0)return et;const{openAll:rt,closeAll:nt}=tt;if(et.includes("\x1B"))for(;tt!==void 0;)et=stringReplaceAll(et,tt.close,tt.open),tt=tt.parent;const it=et.indexOf(` +`);return it!==-1&&(et=stringEncaseCRLFWithFirstIndex(et,nt,rt,it)),rt+et+nt};Object.defineProperties(createChalk.prototype,styles$g);const chalk=createChalk();createChalk({level:stderrColor?stderrColor.level:0});const d$4=chalk,identifierRegex=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function joinPath(_e){return _e.length===1?_e[0].toString():_e.reduce((et,tt)=>{if(typeof tt=="number")return et+"["+tt.toString()+"]";if(tt.includes('"'))return et+'["'+escapeQuotes(tt)+'"]';if(!identifierRegex.test(tt))return et+'["'+tt+'"]';const rt=et.length===0?"":".";return et+rt+tt},"")}function escapeQuotes(_e){return _e.replace(/"/g,'\\"')}function isNonEmptyArray(_e){return _e.length!==0}const MAX_ISSUES_IN_MESSAGE=99,ISSUE_SEPARATOR="; ",UNION_SEPARATOR=", or ",PREFIX="Validation error",PREFIX_SEPARATOR=": ";class ValidationError extends Error{details;name;constructor(et,tt=[]){super(et),this.details=tt,this.name="ZodValidationError"}toString(){return this.message}}function getMessageFromZodIssue(_e,et,tt){if(_e.code==="invalid_union")return _e.unionErrors.reduce((rt,nt)=>{const it=nt.issues.map(at=>getMessageFromZodIssue(at,et,tt)).join(et);return rt.includes(it)||rt.push(it),rt},[]).join(tt);if(isNonEmptyArray(_e.path)){if(_e.path.length===1){const rt=_e.path[0];if(typeof rt=="number")return`${_e.message} at index ${rt}`}return`${_e.message} at "${joinPath(_e.path)}"`}return _e.message}function conditionallyPrefixMessage(_e,et,tt){return et!==null?_e.length>0?[et,_e].join(tt):et:_e.length>0?_e:PREFIX}function fromZodError(_e,et={}){const{maxIssuesInMessage:tt=MAX_ISSUES_IN_MESSAGE,issueSeparator:rt=ISSUE_SEPARATOR,unionSeparator:nt=UNION_SEPARATOR,prefixSeparator:it=PREFIX_SEPARATOR,prefix:at=PREFIX}=et,st=_e.errors.slice(0,tt).map(dt=>getMessageFromZodIssue(dt,rt,nt)).join(rt),lt=conditionallyPrefixMessage(st,at,it);return new ValidationError(lt,_e.errors)}var a$3=Object.defineProperty,m$3=(_e,et,tt)=>et in _e?a$3(_e,et,{enumerable:!0,configurable:!0,writable:!0,value:tt}):_e[et]=tt,x$4=(_e,et,tt)=>(m$3(_e,typeof et!="symbol"?et+"":et,tt),tt),t$3=class extends Error{name="MUDContextAlreadyCreatedError";message="MUD context was already created"},s$1=class extends Error{name="MUDContextNotCreatedError";message="MUD context has not been created"};function l$3(_e,et){return fromZodError(_e,{prefix:d$4.red(et),prefixSeparator:` +- `,issueSeparator:` +- `})}var g$4=16;function d$3(_e,et){/^\w+$/.test(_e)||et.addIssue({code:ZodIssueCode.custom,message:"Name must contain only alphanumeric & underscore characters"})}function x$3(_e,et){d$3(_e,et),/^[A-Z]/.test(_e)||et.addIssue({code:ZodIssueCode.custom,message:"Name must start with a capital letter"})}function C$2(_e,et){d$3(_e,et),/^[a-z]/.test(_e)||et.addIssue({code:ZodIssueCode.custom,message:"Name must start with a lowercase letter"})}function h$4(_e,et){_e.length===0&&et.addIssue({code:ZodIssueCode.custom,message:"Enum must not be empty"}),_e.length>=256&&et.addIssue({code:ZodIssueCode.custom,message:"Length of enum must be < 256"});let tt=M$6(_e);tt.length>0&&et.addIssue({code:ZodIssueCode.custom,message:`Enum must not have duplicate names for: ${tt.join(", ")}`})}function c$2(_e,et){return(tt,rt)=>{if(tt===""){_e&&rt.addIssue({code:ZodIssueCode.custom,message:"Route must not be empty"});return}tt[0]!=="/"&&rt.addIssue({code:ZodIssueCode.custom,message:'Route must start with "/"'}),tt[tt.length-1]==="/"&&rt.addIssue({code:ZodIssueCode.custom,message:'Route must not end with "/"'});let nt=tt.split("/");et&&nt.length>2&&rt.addIssue({code:ZodIssueCode.custom,message:'Route must only have one level (e.g. "/foo")'});for(let it=1;itg$4&&et.addIssue({code:ZodIssueCode.custom,message:`Selector must be <= ${g$4} characters`}),/^\w*$/.test(_e)||et.addIssue({code:ZodIssueCode.custom,message:"Selector must contain only alphanumeric & underscore characters"})}function z$3(_e){let et=_e.match(/^(\w+)\[(\d+)\]$/);return et?{elementType:et[1],staticLength:Number.parseInt(et[2])}:null}var v$5=z$4.string().superRefine(x$3),$$2=z$4.string().superRefine(C$2);z$4.string().superRefine(d$3);var G$3=z$4.array(v$5).superRefine(h$4);z$4.string().superRefine(y$1);z$4.string().superRefine(b$2);z$4.string().superRefine(R$2);var k$2=z$4.string().superRefine(D$1),P$5=z$4.string().superRefine(U$4),l$2=class{static isCreated(){return this._global.__mudCoreContext!==void 0}static createContext(){if(this.isCreated())throw new t$3;let et=this._global,tt=new l$2;return et.__mudCoreContext=tt,tt}static getContext(){let et=this._global.__mudCoreContext;if(et===void 0)throw new s$1;return et}configExtenders=[]},i$1=l$2;x$4(i$1,"_global",typeof global>"u"?window.global??{}:global);function Y$2(_e){let et=_e,tt=i$1.getContext();for(let rt of tt.configExtenders)et=rt(et);return et}function q$2(_e){i$1.getContext().configExtenders.push(_e)}var w$1=(_e=>(_e[_e.TABLE_ID=0]="TABLE_ID",_e[_e.SYSTEM_ADDRESS=1]="SYSTEM_ADDRESS",_e))(w$1||{}),l$1={storeImportPath:"@latticexyz/store/src/",userTypesPath:"Types",codegenDirectory:"codegen"},g$3={namespace:"",enums:{}},m$2={directory:"tables",keySchema:{key:"bytes32"},tableIdArgument:!1,storeArgument:!0,ephemeral:!1},j=v$5,O$4=$$2,v$4=$$2,I$1=v$5,d$2=z$4.string(),_=z$4.string(),P$4=z$4.record(O$4,_).default(m$2.keySchema),U$3=z$4.record(v$4,d$2).refine(_e=>Object.keys(_e).length>0,"Table schema may not be empty"),K$2=d$2.transform(_e=>U$3.parse({value:_e})),q$1=U$3.or(K$2),h$3=z$4.object({directory:z$4.string().default(m$2.directory),name:P$5.optional(),tableIdArgument:z$4.boolean().default(m$2.tableIdArgument),storeArgument:z$4.boolean().default(m$2.storeArgument),dataStruct:z$4.boolean().optional(),keySchema:P$4,schema:q$1,ephemeral:z$4.boolean().default(m$2.ephemeral)}).transform(_e=>(Object.keys(_e.schema).length===1?_e.dataStruct??=!1:_e.dataStruct??=!0,_e)),B$2=d$2.transform(_e=>h$3.parse({schema:{value:_e}})),M$5=h$3.or(B$2),$$1=z$4.record(j,M$5).transform(_e=>{for(let et of Object.keys(_e)){let tt=_e[et];tt.name=et.slice(0,g$4),_e[et]=tt}return _e}),H$1=z$4.object({enums:z$4.record(I$1,G$3).default(g$3.enums)}),x$2=z$4.object({namespace:P$5.default(g$3.namespace),storeImportPath:z$4.string().default(l$1.storeImportPath),tables:$$1,userTypesPath:z$4.string().default(l$1.userTypesPath),codegenDirectory:z$4.string().default(l$1.codegenDirectory)}).merge(H$1);x$2.superRefine(C$1);var re$1=x$2.catchall(z$4.any()).superRefine(C$1);function C$1(_e,et){for(let dt of Object.values(_e.tables)){let ht=Object.keys(dt.keySchema),pt=Object.keys(dt.schema),mt=M$6([...ht,...pt]);mt.length>0&&et.addIssue({code:ZodIssueCode.custom,message:`Field and key names within one table must be unique: ${mt.join(", ")}`})}let tt=Object.keys(_e.tables),rt=Object.keys(_e.enums),nt=rt,it=[...tt,...nt],at=M$6(it);at.length>0&&et.addIssue({code:ZodIssueCode.custom,message:`Table library names, enum names must be globally unique: ${at.join(", ")}`});let st=Object.values(_e.tables).map(({name:dt})=>dt),lt=M$6(st);lt.length>0&&et.addIssue({code:ZodIssueCode.custom,message:`Table names must be unique: ${lt.join(", ")}`});for(let dt of Object.values(_e.tables)){for(let ht of Object.values(dt.keySchema))F$1(rt,ht,et);for(let ht of Object.values(dt.schema))G$2(nt,rt,ht,et)}}function G$2(_e,et,tt,rt){if(!s$2.includes(tt)&&!_e.includes(tt)){let nt=z$3(tt);nt?V$1(et,nt.elementType,nt.staticLength,rt):rt.addIssue({code:ZodIssueCode.custom,message:`${tt} is not a valid abi type, and is not defined in userTypes`})}}function F$1(_e,et,tt){!U$5.includes(et)&&!_e.includes(et)&&tt.addIssue({code:ZodIssueCode.custom,message:`${et} is not a static type`})}function V$1(_e,et,tt,rt){F$1(_e,et,rt),tt===0?rt.addIssue({code:ZodIssueCode.custom,message:"Static array length must not be 0"}):tt>=2**16&&rt.addIssue({code:ZodIssueCode.custom,message:"Static array length must be less than 2**16"})}i$1.isCreated()||i$1.createContext();q$2(_e=>{try{return re$1.parse(_e)}catch(et){throw et instanceof ZodError?l$3(et,"StoreConfig Validation Error"):et}});function s(_e){return Y$2(_e)}var a$2=s({storeImportPath:"../../",namespace:"mudstore",enums:{ExampleEnum:["None","First","Second","Third"]},tables:{Hooks:"address[]",Callbacks:"bytes24[]",Tables:{keySchema:{tableId:"bytes32"},schema:{keySchema:"bytes32",valueSchema:"bytes32",abiEncodedKeyNames:"bytes",abiEncodedFieldNames:"bytes"}},Mixed:{schema:{u32:"uint32",u128:"uint128",a32:"uint32[]",s:"string"}},Vector2:{schema:{x:"uint32",y:"uint32"}},KeyEncoding:{keySchema:{k1:"uint256",k2:"int32",k3:"bytes16",k4:"address",k5:"bool",k6:"ExampleEnum"},schema:"bool"}}}),g$2=g$5("mud:store-sync"),k$1=a$2.tables.Tables,A$2=He$1(a$2.namespace,k$1.name);function G$1({registerTables:_e,getTables:et,storeOperations:tt}){return async rt=>{let nt=rt.logs.map(lt=>{if(lt.eventName!=="StoreSetRecord"||lt.args.table!==A$2)return;let[dt,...ht]=lt.args.key;ht.length&&console.warn("registerSchema event is expected to have only one key in key tuple, but got multiple",lt);let pt=ye$1(dt),mt=ct(ne$2(Object.values(k$1.schema)),lt.args.data),gt=Object.fromEntries(Object.keys(k$1.schema).map((Et,$t)=>[Et,mt[$t]])),vt=D$2(gt.keySchema),xt=D$2(gt.valueSchema),yt=decodeAbiParameters(parseAbiParameters("string[]"),gt.abiEncodedKeyNames)[0],bt=decodeAbiParameters(parseAbiParameters("string[]"),gt.abiEncodedFieldNames)[0],wt=[...xt.staticFields,...xt.dynamicFields];return{address:lt.address,tableId:dt,namespace:pt.namespace,name:pt.name,keySchema:Object.fromEntries(vt.staticFields.map((Et,$t)=>[yt[$t],Et])),valueSchema:Object.fromEntries(wt.map((Et,$t)=>[bt[$t],Et]))}}).filter(P$7);nt.length>0&&await _e({blockNumber:rt.blockNumber,tables:nt});let it=Array.from(new Set(rt.logs.map(lt=>JSON.stringify({address:getAddress(lt.address),tableId:lt.args.table,...ye$1(lt.args.table)})))).map(lt=>JSON.parse(lt)),at=Object.fromEntries((await et({blockNumber:rt.blockNumber,tables:it})).map(lt=>[`${getAddress(lt.address)}:${lt.tableId}`,lt])),st=rt.logs.map(lt=>{let dt=at[`${getAddress(lt.address)}:${lt.args.table}`];if(!dt){g$2("no table found for event, skipping",ye$1(lt.args.table),lt);return}let ht=Object.keys(dt.keySchema),pt=ze$1({staticFields:Object.values(dt.keySchema),dynamicFields:[]},lt.args.key),mt=Object.fromEntries(pt.map((yt,bt)=>[ht[bt],yt])),gt=Object.values(dt.valueSchema),vt=ne$2(gt),xt=Object.keys(dt.valueSchema);if(lt.eventName==="StoreSetRecord"||lt.eventName==="StoreEphemeralRecord"){let yt=ct(vt,lt.args.data),bt=Object.fromEntries(xt.map((wt,Et)=>[wt,yt[Et]]));return{log:lt,address:getAddress(lt.address),namespace:dt.namespace,name:dt.name,type:"SetRecord",key:mt,value:bt}}if(lt.eventName==="StoreSetField"){let yt=xt[lt.args.schemaIndex],bt=ke$1(gt[lt.args.schemaIndex],lt.args.data);return{log:lt,address:getAddress(lt.address),namespace:dt.namespace,name:dt.name,type:"SetField",key:mt,fieldName:yt,fieldValue:bt}}if(lt.eventName==="StoreDeleteRecord")return{log:lt,address:getAddress(lt.address),namespace:dt.namespace,name:dt.name,type:"DeleteRecord",key:mt};g$2("unknown store event or log, skipping",lt)}).filter(P$7);return await tt({blockNumber:rt.blockNumber,operations:st}),{blockNumber:rt.blockNumber,operations:st}}}var w=(_e=>(_e.INITIALIZE="initialize",_e.SNAPSHOT="snapshot",_e.RPC="rpc",_e.LIVE="live",_e))(w||{});function invert(_e){const et=Object.create(null);for(const tt in _e){const rt=_e[tt];et[rt]=tt}return et}const TRPC_ERROR_CODES_BY_KEY={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,UNAUTHORIZED:-32001,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNPROCESSABLE_CONTENT:-32022,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};invert(TRPC_ERROR_CODES_BY_KEY);invert(TRPC_ERROR_CODES_BY_KEY);const noop$2=()=>{};function createInnerProxy(_e,et){return new Proxy(noop$2,{get(rt,nt){if(!(typeof nt!="string"||nt==="then"))return createInnerProxy(_e,[...et,nt])},apply(rt,nt,it){const at=et[et.length-1]==="apply";return _e({args:at?it.length>=2?it[1]:[]:it,path:at?et.slice(0,-1):et})}})}const createRecursiveProxy=_e=>createInnerProxy(_e,[]),createFlatProxy=_e=>new Proxy(noop$2,{get(et,tt){if(!(typeof tt!="string"||tt==="then"))return _e(tt)}});typeof window>"u"||"Deno"in window||globalThis.process?.env?.NODE_ENV==="test"||globalThis.process?.env?.JEST_WORKER_ID||globalThis.process?.env?.VITEST_WORKER_ID;var DoubleIndexedKV=function(){function _e(){this.keyToValue=new Map,this.valueToKey=new Map}return _e.prototype.set=function(et,tt){this.keyToValue.set(et,tt),this.valueToKey.set(tt,et)},_e.prototype.getByKey=function(et){return this.keyToValue.get(et)},_e.prototype.getByValue=function(et){return this.valueToKey.get(et)},_e.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},_e}(),Registry=function(){function _e(et){this.generateIdentifier=et,this.kv=new DoubleIndexedKV}return _e.prototype.register=function(et,tt){this.kv.getByValue(et)||(tt||(tt=this.generateIdentifier(et)),this.kv.set(tt,et))},_e.prototype.clear=function(){this.kv.clear()},_e.prototype.getIdentifier=function(et){return this.kv.getByValue(et)},_e.prototype.getValue=function(et){return this.kv.getByKey(et)},_e}(),__extends=globalThis&&globalThis.__extends||function(){var _e=function(et,tt){return _e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(rt,nt){rt.__proto__=nt}||function(rt,nt){for(var it in nt)Object.prototype.hasOwnProperty.call(nt,it)&&(rt[it]=nt[it])},_e(et,tt)};return function(et,tt){if(typeof tt!="function"&&tt!==null)throw new TypeError("Class extends value "+String(tt)+" is not a constructor or null");_e(et,tt);function rt(){this.constructor=et}et.prototype=tt===null?Object.create(tt):(rt.prototype=tt.prototype,new rt)}}(),ClassRegistry=function(_e){__extends(et,_e);function et(){var tt=_e.call(this,function(rt){return rt.name})||this;return tt.classToAllowedProps=new Map,tt}return et.prototype.register=function(tt,rt){typeof rt=="object"?(rt.allowProps&&this.classToAllowedProps.set(tt,rt.allowProps),_e.prototype.register.call(this,tt,rt.identifier)):_e.prototype.register.call(this,tt,rt)},et.prototype.getAllowedProps=function(tt){return this.classToAllowedProps.get(tt)},et}(Registry),__read$3=globalThis&&globalThis.__read||function(_e,et){var tt=typeof Symbol=="function"&&_e[Symbol.iterator];if(!tt)return _e;var rt=tt.call(_e),nt,it=[],at;try{for(;(et===void 0||et-- >0)&&!(nt=rt.next()).done;)it.push(nt.value)}catch(st){at={error:st}}finally{try{nt&&!nt.done&&(tt=rt.return)&&tt.call(rt)}finally{if(at)throw at.error}}return it};function valuesOfObj(_e){if("values"in Object)return Object.values(_e);var et=[];for(var tt in _e)_e.hasOwnProperty(tt)&&et.push(_e[tt]);return et}function find(_e,et){var tt=valuesOfObj(_e);if("find"in tt)return tt.find(et);for(var rt=tt,nt=0;nt"u"},isNull=function(_e){return _e===null},isPlainObject$1=function(_e){return typeof _e!="object"||_e===null||_e===Object.prototype?!1:Object.getPrototypeOf(_e)===null?!0:Object.getPrototypeOf(_e)===Object.prototype},isEmptyObject=function(_e){return isPlainObject$1(_e)&&Object.keys(_e).length===0},isArray$1=function(_e){return Array.isArray(_e)},isString$1=function(_e){return typeof _e=="string"},isNumber=function(_e){return typeof _e=="number"&&!isNaN(_e)},isBoolean=function(_e){return typeof _e=="boolean"},isRegExp=function(_e){return _e instanceof RegExp},isMap=function(_e){return _e instanceof Map},isSet=function(_e){return _e instanceof Set},isSymbol=function(_e){return getType$1(_e)==="Symbol"},isDate=function(_e){return _e instanceof Date&&!isNaN(_e.valueOf())},isError=function(_e){return _e instanceof Error},isNaNValue=function(_e){return typeof _e=="number"&&isNaN(_e)},isPrimitive=function(_e){return isBoolean(_e)||isNull(_e)||isUndefined(_e)||isNumber(_e)||isString$1(_e)||isSymbol(_e)},isBigint=function(_e){return typeof _e=="bigint"},isInfinite=function(_e){return _e===1/0||_e===-1/0},isTypedArray=function(_e){return ArrayBuffer.isView(_e)&&!(_e instanceof DataView)},isURL=function(_e){return _e instanceof URL},escapeKey=function(_e){return _e.replace(/\./g,"\\.")},stringifyPath=function(_e){return _e.map(String).map(escapeKey).join(".")},parsePath$1=function(_e){for(var et=[],tt="",rt=0;rt<_e.length;rt++){var nt=_e.charAt(rt),it=nt==="\\"&&_e.charAt(rt+1)===".";if(it){tt+=".",rt++;continue}var at=nt===".";if(at){et.push(tt),tt="";continue}tt+=nt}var st=tt;return et.push(st),et},__assign$1=globalThis&&globalThis.__assign||function(){return __assign$1=Object.assign||function(_e){for(var et,tt=1,rt=arguments.length;tt0)&&!(nt=rt.next()).done;)it.push(nt.value)}catch(st){at={error:st}}finally{try{nt&&!nt.done&&(tt=rt.return)&&tt.call(rt)}finally{if(at)throw at.error}}return it},__spreadArray$2=globalThis&&globalThis.__spreadArray||function(_e,et){for(var tt=0,rt=et.length,nt=_e.length;tt0?"Infinity":"-Infinity"},Number),simpleTransformation(function(_e){return _e===0&&1/_e===-1/0},"number",function(){return"-0"},Number),simpleTransformation(isURL,"URL",function(_e){return _e.toString()},function(_e){return new URL(_e)})];function compositeTransformation(_e,et,tt,rt){return{isApplicable:_e,annotation:et,transform:tt,untransform:rt}}var symbolRule=compositeTransformation(function(_e,et){if(isSymbol(_e)){var tt=!!et.symbolRegistry.getIdentifier(_e);return tt}return!1},function(_e,et){var tt=et.symbolRegistry.getIdentifier(_e);return["symbol",tt]},function(_e){return _e.description},function(_e,et,tt){var rt=tt.symbolRegistry.getValue(et[1]);if(!rt)throw new Error("Trying to deserialize unknown symbol");return rt}),constructorToName=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(_e,et){return _e[et.name]=et,_e},{}),typedArrayRule=compositeTransformation(isTypedArray,function(_e){return["typed-array",_e.constructor.name]},function(_e){return __spreadArray$2([],__read$2(_e))},function(_e,et){var tt=constructorToName[et[1]];if(!tt)throw new Error("Trying to deserialize unknown typed array");return new tt(_e)});function isInstanceOfRegisteredClass(_e,et){if(_e?.constructor){var tt=!!et.classRegistry.getIdentifier(_e.constructor);return tt}return!1}var classRule=compositeTransformation(isInstanceOfRegisteredClass,function(_e,et){var tt=et.classRegistry.getIdentifier(_e.constructor);return["class",tt]},function(_e,et){var tt=et.classRegistry.getAllowedProps(_e.constructor);if(!tt)return __assign$1({},_e);var rt={};return tt.forEach(function(nt){rt[nt]=_e[nt]}),rt},function(_e,et,tt){var rt=tt.classRegistry.getValue(et[1]);if(!rt)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(rt.prototype),_e)}),customRule=compositeTransformation(function(_e,et){return!!et.customTransformerRegistry.findApplicable(_e)},function(_e,et){var tt=et.customTransformerRegistry.findApplicable(_e);return["custom",tt.name]},function(_e,et){var tt=et.customTransformerRegistry.findApplicable(_e);return tt.serialize(_e)},function(_e,et,tt){var rt=tt.customTransformerRegistry.findByName(et[1]);if(!rt)throw new Error("Trying to deserialize unknown custom value");return rt.deserialize(_e)}),compositeRules=[classRule,symbolRule,customRule,typedArrayRule],transformValue=function(_e,et){var tt=findArr(compositeRules,function(nt){return nt.isApplicable(_e,et)});if(tt)return{value:tt.transform(_e,et),type:tt.annotation(_e,et)};var rt=findArr(simpleRules,function(nt){return nt.isApplicable(_e,et)});if(rt)return{value:rt.transform(_e,et),type:rt.annotation}},simpleRulesByAnnotation={};simpleRules.forEach(function(_e){simpleRulesByAnnotation[_e.annotation]=_e});var untransformValue=function(_e,et,tt){if(isArray$1(et))switch(et[0]){case"symbol":return symbolRule.untransform(_e,et,tt);case"class":return classRule.untransform(_e,et,tt);case"custom":return customRule.untransform(_e,et,tt);case"typed-array":return typedArrayRule.untransform(_e,et,tt);default:throw new Error("Unknown transformation: "+et)}else{var rt=simpleRulesByAnnotation[et];if(!rt)throw new Error("Unknown transformation: "+et);return rt.untransform(_e,tt)}},getNthKey=function(_e,et){for(var tt=_e.keys();et>0;)tt.next(),et--;return tt.next().value};function validatePath(_e){if(includes(_e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(includes(_e,"prototype"))throw new Error("prototype is not allowed as a property");if(includes(_e,"constructor"))throw new Error("constructor is not allowed as a property")}var getDeep=function(_e,et){validatePath(et);for(var tt=0;tt0)&&!(nt=rt.next()).done;)it.push(nt.value)}catch(st){at={error:st}}finally{try{nt&&!nt.done&&(tt=rt.return)&&tt.call(rt)}finally{if(at)throw at.error}}return it},__spreadArray$1=globalThis&&globalThis.__spreadArray||function(_e,et){for(var tt=0,rt=et.length,nt=_e.length;ttcopy$1(nt,et));if(!isPlainObject(_e))return _e;const tt=Object.getOwnPropertyNames(_e),rt=Object.getOwnPropertySymbols(_e);return[...tt,...rt].reduce((nt,it)=>{if(isArray(et.props)&&!et.props.includes(it))return nt;const at=_e[it],st=copy$1(at,et);return assignProp(nt,it,st,_e,et.nonenumerable),nt},{})}var __assign=globalThis&&globalThis.__assign||function(){return __assign=Object.assign||function(_e){for(var et,tt=1,rt=arguments.length;tt0)&&!(nt=rt.next()).done;)it.push(nt.value)}catch(st){at={error:st}}finally{try{nt&&!nt.done&&(tt=rt.return)&&tt.call(rt)}finally{if(at)throw at.error}}return it},__spreadArray=globalThis&&globalThis.__spreadArray||function(_e,et){for(var tt=0,rt=et.length,nt=_e.length;ttnt(rt),tt)}}function observable(_e){const et={subscribe(tt){let rt=null,nt=!1,it=!1,at=!1;function st(){if(rt===null){at=!0;return}it||(it=!0,typeof rt=="function"?rt():rt&&rt.unsubscribe())}return rt=_e({next(lt){nt||tt.next?.(lt)},error(lt){nt||(nt=!0,tt.error?.(lt),st())},complete(){nt||(nt=!0,tt.complete?.(),st())}}),at&&st(),{unsubscribe:st}},pipe(...tt){return pipeFromArray(tt)(et)}};return et}function share(_e){return et=>{let tt=0,rt=null;const nt=[];function it(){rt||(rt=et.subscribe({next(st){for(const lt of nt)lt.next?.(st)},error(st){for(const lt of nt)lt.error?.(st)},complete(){for(const st of nt)st.complete?.()}}))}function at(){if(tt===0&&rt){const st=rt;rt=null,st.unsubscribe()}}return{subscribe(st){return tt++,nt.push(st),it(),{unsubscribe(){tt--,at();const lt=nt.findIndex(dt=>dt===st);lt>-1&&nt.splice(lt,1)}}}}}}class ObservableAbortError extends Error{constructor(et){super(et),this.name="ObservableAbortError",Object.setPrototypeOf(this,ObservableAbortError.prototype)}}function observableToPromise(_e){let et;return{promise:new Promise((rt,nt)=>{let it=!1;function at(){it||(it=!0,nt(new ObservableAbortError("This operation was aborted.")),st.unsubscribe())}const st=_e.subscribe({next(lt){it=!0,rt(lt),at()},error(lt){it=!0,nt(lt),at()},complete(){it=!0,at()}});et=at}),abort:et}}function createChain(_e){return observable(et=>{function tt(nt=0,it=_e.op){const at=_e.links[nt];if(!at)throw new Error("No more links to execute - did you forget to add an ending link?");return at({op:it,next(lt){return tt(nt+1,lt)}})}return tt().subscribe(et)})}function isTRPCClientError(_e){return _e instanceof TRPCClientError||_e.name==="TRPCClientError"}class TRPCClientError extends Error{static from(et,tt={}){return et instanceof Error?isTRPCClientError(et)?(tt.meta&&(et.meta={...et.meta,...tt.meta}),et):new TRPCClientError(et.message,{...tt,cause:et,result:null}):new TRPCClientError(et.error.message??"",{...tt,cause:void 0,result:et})}constructor(et,tt){const rt=tt?.cause;super(et,{cause:rt}),this.meta=tt?.meta,this.cause=rt,this.shape=tt?.result?.error,this.data=tt?.result?.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,TRPCClientError.prototype)}}const isFunction$1=_e=>typeof _e=="function";function getFetch(_e){if(_e)return _e;if(typeof window<"u"&&isFunction$1(window.fetch))return window.fetch;if(typeof globalThis<"u"&&isFunction$1(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}function getAbortController(_e){return _e||(typeof window<"u"&&window.AbortController?window.AbortController:typeof globalThis<"u"&&globalThis.AbortController?globalThis.AbortController:null)}function resolveHTTPLinkOptions(_e){return{url:_e.url,fetch:_e.fetch,AbortController:getAbortController(_e.AbortController)}}function arrayToDict(_e){const et={};for(let tt=0;tt<_e.length;tt++){const rt=_e[tt];et[tt]=rt}return et}const METHOD={query:"GET",mutation:"POST"};function getInput(_e){return"input"in _e?_e.runtime.transformer.serialize(_e.input):arrayToDict(_e.inputs.map(et=>_e.runtime.transformer.serialize(et)))}const getUrl=_e=>{let et=_e.url+"/"+_e.path;const tt=[];if("inputs"in _e&&tt.push("batch=1"),_e.type==="query"){const rt=getInput(_e);rt!==void 0&&tt.push(`input=${encodeURIComponent(JSON.stringify(rt))}`)}return tt.length&&(et+="?"+tt.join("&")),et},getBody=_e=>{if(_e.type==="query")return;const et=getInput(_e);return et!==void 0?JSON.stringify(et):void 0},jsonHttpRequester=_e=>httpRequest({..._e,contentTypeHeader:"application/json",getUrl,getBody});async function fetchHTTPResponse(_e,et){const tt=_e.getUrl(_e),rt=_e.getBody(_e),{type:nt}=_e,it=await _e.headers();/* istanbul ignore if -- @preserve */if(nt==="subscription")throw new Error("Subscriptions should use wsLink");const at={..._e.contentTypeHeader?{"content-type":_e.contentTypeHeader}:{},..._e.batchModeHeader?{"trpc-batch-mode":_e.batchModeHeader}:{},...it};return getFetch(_e.fetch)(tt,{method:METHOD[nt],signal:et?.signal,body:rt,headers:at})}function httpRequest(_e){const et=_e.AbortController?new _e.AbortController:null,tt={};return{promise:new Promise((it,at)=>{fetchHTTPResponse(_e,et).then(st=>(tt.response=st,st.json())).then(st=>{tt.responseJSON=st,it({json:st,meta:tt})}).catch(st=>{at(TRPCClientError.from(st,{meta:tt}))})}),cancel:()=>{et?.abort()}}}function isObject$1(_e){return!!_e&&!Array.isArray(_e)&&typeof _e=="object"}function transformResultInner(_e,et){if("error"in _e){const rt=et.transformer.deserialize(_e.error);return{ok:!1,error:{..._e,error:rt}}}return{ok:!0,result:{..._e.result,...(!_e.result.type||_e.result.type==="data")&&{type:"data",data:et.transformer.deserialize(_e.result.data)}}}}class TransformResultError extends Error{constructor(){super("Unable to transform response from server")}}function transformResult(_e,et){let tt;try{tt=transformResultInner(_e,et)}catch{throw new TransformResultError}if(!tt.ok&&(!isObject$1(tt.error.error)||typeof tt.error.error.code!="number"))throw new TransformResultError;if(tt.ok&&!isObject$1(tt.result))throw new TransformResultError;return tt}const throwFatalError=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function dataLoader(_e){let et=null,tt=null;const rt=()=>{clearTimeout(tt),tt=null,et=null};function nt(st){const lt=[[]];let dt=0;for(;;){const ht=st[dt];if(!ht)break;const pt=lt[lt.length-1];if(ht.aborted){ht.reject?.(new Error("Aborted")),dt++;continue}if(_e.validate(pt.concat(ht).map(gt=>gt.key))){pt.push(ht),dt++;continue}if(pt.length===0){ht.reject?.(new Error("Input is too big for a single dispatch")),dt++;continue}lt.push([])}return lt}function it(){const st=nt(et);rt();for(const lt of st){if(!lt.length)continue;const dt={items:lt,cancel:throwFatalError};for(const gt of lt)gt.batch=dt;const ht=(gt,vt)=>{const xt=dt.items[gt];xt.resolve?.(vt),xt.batch=null,xt.reject=null,xt.resolve=null},{promise:pt,cancel:mt}=_e.fetch(dt.items.map(gt=>gt.key),ht);dt.cancel=mt,pt.then(gt=>{for(let vt=0;vt{for(const vt of dt.items)vt.reject?.(gt),vt.batch=null})}}function at(st){const lt={aborted:!1,key:st,batch:null,resolve:throwFatalError,reject:throwFatalError},dt=new Promise((pt,mt)=>{lt.reject=mt,lt.resolve=pt,et||(et=[]),et.push(lt)});return tt||(tt=setTimeout(it)),{promise:dt,cancel:()=>{lt.aborted=!0,lt.batch?.items.every(pt=>pt.aborted)&&(lt.batch.cancel(),lt.batch=null)}}}return{load:at}}function createHTTPBatchLink(_e){return function(tt){const rt=resolveHTTPLinkOptions(tt),nt=tt.maxURLLength??1/0;return it=>{const at=pt=>{const mt=vt=>{if(nt===1/0)return!0;const xt=vt.map(wt=>wt.path).join(","),yt=vt.map(wt=>wt.input);return getUrl({...rt,runtime:it,type:pt,path:xt,inputs:yt}).length<=nt},gt=_e({...rt,runtime:it,type:pt,opts:tt});return{validate:mt,fetch:gt}},st=dataLoader(at("query")),lt=dataLoader(at("mutation")),dt=dataLoader(at("subscription")),ht={query:st,subscription:dt,mutation:lt};return({op:pt})=>observable(mt=>{const gt=ht[pt.type],{promise:vt,cancel:xt}=gt.load(pt);let yt;return vt.then(bt=>{yt=bt;const wt=transformResult(bt.json,it);if(!wt.ok){mt.error(TRPCClientError.from(wt.error,{meta:bt.meta}));return}mt.next({context:bt.meta,result:wt.result}),mt.complete()}).catch(bt=>{mt.error(TRPCClientError.from(bt,{meta:yt?.meta}))}),()=>{xt()}})}}}const batchRequester=_e=>et=>{const tt=et.map(at=>at.path).join(","),rt=et.map(at=>at.input),{promise:nt,cancel:it}=jsonHttpRequester({..._e,path:tt,inputs:rt,headers(){return _e.opts.headers?typeof _e.opts.headers=="function"?_e.opts.headers({opList:et}):_e.opts.headers:{}}});return{promise:nt.then(at=>(Array.isArray(at.json)?at.json:et.map(()=>at.json)).map(dt=>({meta:at.meta,json:dt}))),cancel:it}},httpBatchLink=createHTTPBatchLink(batchRequester);class TRPCUntypedClient{$request({type:et,input:tt,path:rt,context:nt={}}){return createChain({links:this.links,op:{id:++this.requestId,type:et,path:rt,input:tt,context:nt}}).pipe(share())}requestAsPromise(et){const tt=this.$request(et),{promise:rt,abort:nt}=observableToPromise(tt);return new Promise((at,st)=>{et.signal?.addEventListener("abort",nt),rt.then(lt=>{at(lt.result.data)}).catch(lt=>{st(TRPCClientError.from(lt))})})}query(et,tt,rt){return this.requestAsPromise({type:"query",path:et,input:tt,context:rt?.context,signal:rt?.signal})}mutation(et,tt,rt){return this.requestAsPromise({type:"mutation",path:et,input:tt,context:rt?.context,signal:rt?.signal})}subscription(et,tt,rt){return this.$request({type:"subscription",path:et,input:tt,context:rt?.context}).subscribe({next(it){it.result.type==="started"?rt.onStarted?.():it.result.type==="stopped"?rt.onStopped?.():rt.onData?.(it.result.data)},error(it){rt.onError?.(it)},complete(){rt.onComplete?.()}})}constructor(et){this.requestId=0;const tt=(()=>{const rt=et.transformer;return rt?"input"in rt?et.transformer:{input:rt,output:rt}:{input:{serialize:nt=>nt,deserialize:nt=>nt},output:{serialize:nt=>nt,deserialize:nt=>nt}}})();this.runtime={transformer:{serialize:rt=>tt.input.serialize(rt),deserialize:rt=>tt.output.deserialize(rt)},combinedTransformer:tt},this.links=et.links.map(rt=>rt(this.runtime))}}const clientCallTypeMap={query:"query",mutate:"mutation",subscribe:"subscription"},clientCallTypeToProcedureType=_e=>clientCallTypeMap[_e];function createTRPCClientProxy(_e){return createFlatProxy(et=>_e.hasOwnProperty(et)?_e[et]:et==="__untypedClient"?_e:createRecursiveProxy(({path:tt,args:rt})=>{const nt=[et,...tt],it=clientCallTypeToProcedureType(nt.pop()),at=nt.join(".");return _e[it](at,...rt)}))}function createTRPCProxyClient(_e){const et=new TRPCUntypedClient(_e);return createTRPCClientProxy(et)}function P$3({url:_e}){return createTRPCProxyClient({transformer:SuperJSON,links:[httpBatchLink({url:_e})]})}var e$1=["event StoreDeleteRecord(bytes32 table, bytes32[] key)","event StoreSetField(bytes32 table, bytes32[] key, uint8 schemaIndex, bytes data)","event StoreSetRecord(bytes32 table, bytes32[] key, bytes data)","event StoreEphemeralRecord(bytes32 table, bytes32[] key, bytes data)"],f$2=parseAbi(e$1),u$2=g$5("mud:block-events-stream");async function*a$1({maxBlockRange:_e=1000n,maxRetryCount:et=3,publicClient:tt,...rt}){let nt=rt.fromBlock,it=u$3(_e,rt.toBlock-nt),at=0;for(;nt<=rt.toBlock;)try{let st=nt+it,lt=await tt.getLogs({...rt,fromBlock:nt,toBlock:st,strict:!0});yield{fromBlock:nt,toBlock:st,logs:lt},nt=st+1n,it=u$3(_e,rt.toBlock-nt)}catch(st){if(!(st instanceof Error))throw st;if(st.message.includes("rate limit exceeded")&&at{nt??=st,it=at}),concatMap(()=>nt>it?EMPTY:from$1(a$1({publicClient:_e,address:et,events:tt,fromBlock:nt,toBlock:it,maxBlockRange:rt})).pipe(tap(({toBlock:at})=>{nt=at+1n}))))}function O$3({publicClient:_e,blockTag:et}){return new Observable(function(tt){return _e.watchBlocks({blockTag:et,emitOnBegin:!0,onBlock:rt=>tt.next(rt),onError:rt=>tt.error(rt)})})}function M$4(_e,et){let tt=Array.from(new Set(_e.map(it=>it.blockNumber)));tt.sort(m$5);let rt=tt.map(it=>{let at=_e.filter(st=>st.blockNumber===it);if(at.length&&(at.sort((st,lt)=>st.logIndexlt.logIndex?1:0),!!at.length))return{blockNumber:it,logs:at}}).filter(P$7),nt=tt.length>0?tt[tt.length-1]:null;return et!=null&&(nt==null||et>nt)&&rt.push({blockNumber:et,logs:[]}),rt}function U$2(_e){return Object.fromEntries(Object.entries(_e).map(([et,tt])=>[et,P$8[tt]]))}var r$1=g$2.extend("createStoreSync");async function be$1({storageAdapter:_e,onProgress:et,address:tt,publicClient:rt,startBlock:nt=0n,maxBlockRange:it,initialState:at,indexerUrl:st}){let lt=defer(async()=>{if(at)return at;if(!st)return;r$1("fetching initial state from indexer",st),et?.({step:"snapshot",percentage:0,latestBlockNumber:0n,lastBlockNumberProcessed:0n,message:"Fetching snapshot from indexer"});let Et=P$3({url:st}),$t=rt.chain?.id??await rt.getChainId(),Pt=await Et.findAll.query({chainId:$t,address:tt});return et?.({step:"snapshot",percentage:100,latestBlockNumber:0n,lastBlockNumberProcessed:0n,message:"Fetched snapshot from indexer"}),Pt}).pipe(catchError(Et=>(r$1("error fetching initial state from indexer",Et),et?.({step:"snapshot",percentage:100,latestBlockNumber:0n,lastBlockNumberProcessed:nt,message:"Failed to fetch snapshot from indexer"}),of$1(void 0))),shareReplay(1)),dt=lt.pipe(map(Et=>Et?.blockNumber??nt),tap(Et=>r$1("starting sync from block",Et))),ht=lt.pipe(filter(Et=>Et!=null&&Et.blockNumber!=null&&Et.tables.length>0),concatMap(async({blockNumber:Et,tables:$t})=>{r$1("hydrating from initial state to block",Et),et?.({step:"snapshot",percentage:0,latestBlockNumber:0n,lastBlockNumberProcessed:Et,message:"Hydrating from snapshot"}),await _e.registerTables({blockNumber:Et,tables:$t});let Pt=$t.flatMap(jt=>jt.records.map(qt=>({type:"SetRecord",address:jt.address,namespace:jt.namespace,name:jt.name,key:qt.key,value:qt.value}))),kt=Math.max(100,Math.floor(Pt.length/50)),Lt=Array.from(f$4(Pt,kt));for(let[jt,qt]of Lt.entries())await _e.storeOperations({blockNumber:Et,operations:qt}),et?.({step:"snapshot",percentage:(jt+qt.length)/Lt.length,latestBlockNumber:0n,lastBlockNumberProcessed:Et,message:"Hydrating from snapshot"});return et?.({step:"snapshot",percentage:100,latestBlockNumber:0n,lastBlockNumberProcessed:Et,message:"Hydrated from snapshot"}),{blockNumber:Et,operations:Pt}}),shareReplay(1)),pt=O$3({publicClient:rt,blockTag:"latest"}).pipe(shareReplay(1)),mt=pt.pipe(map(Et=>Et.number),tap(Et=>{r$1("latest block number",Et)}),shareReplay(1)),gt=null,vt=null,xt=combineLatest([dt,mt]).pipe(map(([Et,$t])=>({startBlock:Et,endBlock:$t})),tap(Et=>{gt=Et.startBlock,vt=Et.endBlock}),P$2({publicClient:rt,address:tt,events:f$2,maxBlockRange:it}),mergeMap(({toBlock:Et,logs:$t})=>from$1(M$4($t,Et))),share$1()),yt=null,bt=concat$2(ht,xt.pipe(concatMap(G$1(_e)),tap(({blockNumber:Et,operations:$t})=>{if(r$1("stored",$t.length,"operations for block",Et),yt=Et,gt!=null&&vt!=null)if(Et(r$1("waiting for tx receipt",Et,"attempt",Pt),rt.waitForTransactionReceipt({hash:Et,timeout:rt.pollingInterval*2*Pt})),{retries:3,onFailedAttempt:Pt=>{if(Pt instanceof WaitForTransactionReceiptTimeoutError){r$1("timed out waiting for tx receipt, trying again",Et);return}throw Pt}});return r$1("got tx receipt",Et,$t),(yt==null||yt<$t.blockNumber)&&(r$1("waiting for tx block to be processed",Et,$t.blockNumber),await firstValueFrom(bt.pipe(filter(({blockNumber:Pt})=>Pt>=$t.blockNumber)))),r$1("tx block was processed",Et,$t.blockNumber),{receipt:$t}}return{latestBlock$:pt,latestBlockNumber$:mt,blockLogs$:xt,blockStorageOperations$:bt,waitForTransaction:wt}}var d$1={registerFunctionSelector:!0,openAccess:!0,accessList:[]},o={worldContractName:void 0,worldInterfaceName:"IWorld",systems:{},excludeSystems:[],postDeployScript:"PostDeploy",deploysDirectory:"./deploys",worldsFile:"./worlds.json",worldgenDirectory:"world",worldImportPath:"@latticexyz/world/src/",modules:[]},y=v$5,h$2=v$5,z$2=z$4.array(y.or(k$2)).default(d$1.accessList),v$3=z$4.intersection(z$4.object({name:P$5.optional(),registerFunctionSelectors:z$4.boolean().default(d$1.registerFunctionSelector)}),z$4.discriminatedUnion("openAccess",[z$4.object({openAccess:z$4.literal(!0).default(d$1.openAccess)}),z$4.object({openAccess:z$4.literal(!1),accessList:z$2})])),x$1=z$4.object({value:z$4.union([z$4.string(),z$4.number(),z$4.instanceof(Uint8Array)]),type:z$4.string()}),E$1=z$4.object({type:z$4.nativeEnum(w$1),input:z$4.string()}),N$2=z$4.object({name:h$2,root:z$4.boolean().default(!1),args:z$4.array(z$4.union([x$1,E$1])).default([])}),T$3=z$4.object({worldContractName:z$4.string().optional(),worldInterfaceName:z$4.string().default(o.worldInterfaceName),systems:z$4.record(y,v$3).default(o.systems),excludeSystems:z$4.array(y).default(o.excludeSystems),postDeployScript:z$4.string().default(o.postDeployScript),deploysDirectory:z$4.string().default(o.deploysDirectory),worldsFile:z$4.string().default(o.worldsFile),worldgenDirectory:z$4.string().default(o.worldgenDirectory),worldImportPath:z$4.string().default(o.worldImportPath),modules:z$4.array(N$2).default(o.modules)}),M$3=T$3.catchall(z$4.any());q$2(_e=>{try{return M$3.parse(_e)}catch(et){throw et instanceof ZodError?l$3(et,"WorldConfig Validation Error"):et}});var t$2=s({worldImportPath:"../",worldgenDirectory:"interfaces",worldInterfaceName:"IBaseWorld",codegenDirectory:"",tables:{NamespaceOwner:{keySchema:{namespace:"bytes16"},schema:{owner:"address"}},ResourceAccess:{keySchema:{resourceSelector:"bytes32",caller:"address"},schema:{access:"bool"}},InstalledModules:{keySchema:{moduleName:"bytes16",argumentsHash:"bytes32"},schema:{moduleAddress:"address"},dataStruct:!0},Systems:{directory:"modules/core/tables",keySchema:{resourceSelector:"bytes32"},schema:{system:"address",publicAccess:"bool"},dataStruct:!1},SystemRegistry:{directory:"modules/core/tables",keySchema:{system:"address"},schema:{resourceSelector:"bytes32"}},SystemHooks:{directory:"modules/core/tables",keySchema:{resourceSelector:"bytes32"},schema:"address[]"},ResourceType:{directory:"modules/core/tables",keySchema:{resourceSelector:"bytes32"},schema:{resourceType:"Resource"}},FunctionSelectors:{directory:"modules/core/tables",keySchema:{functionSelector:"bytes4"},schema:{resourceSelector:"bytes32",systemFunctionSelector:"bytes4"},dataStruct:!1},KeysWithValue:{directory:"modules/keyswithvalue/tables",keySchema:{valueHash:"bytes32"},schema:{keysWithValue:"bytes32[]"},tableIdArgument:!0},KeysInTable:{directory:"modules/keysintable/tables",keySchema:{sourceTable:"bytes32"},schema:{keys0:"bytes32[]",keys1:"bytes32[]",keys2:"bytes32[]",keys3:"bytes32[]",keys4:"bytes32[]"}},UsedKeysIndex:{directory:"modules/keysintable/tables",keySchema:{sourceTable:"bytes32",keysHash:"bytes32"},schema:{has:"bool",index:"uint40"},dataStruct:!1},UniqueEntity:{directory:"modules/uniqueentity/tables",keySchema:{},schema:"uint256",tableIdArgument:!0,storeArgument:!0},Bool:{directory:"../test/tables",keySchema:{},schema:{value:"bool"},tableIdArgument:!0},AddressArray:{directory:"../test/tables",schema:"address[]",tableIdArgument:!0}},enums:{Resource:["NONE","NAMESPACE","TABLE","SYSTEM"]},excludeSystems:["UniqueEntitySystem","StoreRegistrationSystem","EphemeralRecordSystem"]});function T$2(_e){if(!isHex(_e))throw new Error(`entity ${_e} is not a hex string`);let et=size$1(_e);if(et%32!==0)throw new Error(`entity length ${et} is not a multiple of 32 bytes`);return new Array(et/32).fill(0).map((tt,rt)=>sliceHex(_e,rt*32,(rt+1)*32))}function ot(_e,et){let tt=T$2(et);if(tt.length!==Object.keys(_e).length)throw new Error(`entity key tuple length ${tt.length} does not match key schema length ${Object.keys(_e).length}`);return Object.fromEntries(Object.entries(_e).map(([rt,nt],it)=>[rt,decodeAbiParameters([{type:nt}],tt[it])[0]]))}function c$1(_e){return concatHex(_e)}function u$1(_e,et){if(Object.keys(_e).length!==Object.keys(et).length)throw new Error(`key length ${Object.keys(et).length} does not match key schema length ${Object.keys(_e).length}`);return c$1(Object.entries(_e).map(([tt,rt])=>encodeAbiParameters([{type:rt}],[et[tt]])))}function ut(_e){return _e.metadata?.componentName!=null&&_e.metadata?.tableName!=null&&_e.metadata?.keySchema!=null&&_e.metadata?.valueSchema!=null}var g$1=g$2.extend("recs");function b$1(_e){return u$1({address:"address",namespace:"bytes16",name:"bytes16"},{address:_e.address,namespace:stringToHex(_e.namespace,{size:16}),name:stringToHex(_e.name,{size:16})})}function R$1({components:_e}){let et=Object.fromEntries(Object.entries(_e).map(([tt,rt])=>[rt.id,rt]));return{async registerTables({tables:tt}){for(let rt of tt)E$3(_e.RegisteredTables,b$1(rt),{table:rt})},async getTables({tables:tt}){return tt.map(rt=>g$7(_e.RegisteredTables,b$1(rt))?.table).filter(P$7)},async storeOperations({operations:tt}){for(let rt of tt){let nt=g$7(_e.RegisteredTables,b$1({address:rt.address,namespace:rt.namespace,name:rt.name}))?.table;if(!nt){g$1(`skipping update for unknown table: ${rt.namespace}:${rt.name} at ${rt.address}`);continue}let it=He$1(rt.namespace,rt.name),at=et[it];if(!at){g$1(`skipping update for unknown component: ${it}. Available components: ${Object.keys(_e)}`);continue}let st=u$1(nt.keySchema,rt.key);rt.type==="SetRecord"?(g$1("setting component",it,st,rt.value),E$3(at,st,rt.value)):rt.type==="SetField"?(g$1("updating component",it,st,{[rt.fieldName]:rt.fieldValue}),ue$1(at,st,{[rt.fieldName]:rt.fieldValue},U$2(nt.valueSchema))):rt.type==="DeleteRecord"&&(g$1("deleting component",it,st),se$1(at,st))}}}}var f$1=c$1([]);function N$1(_e){return{RegisteredTables:ie$1(_e,{table:P$a.T},{metadata:{componentName:"RegisteredTables"}}),SyncProgress:ie$1(_e,{step:P$a.String,message:P$a.String,percentage:P$a.Number,latestBlockNumber:P$a.BigInt,lastBlockNumberProcessed:P$a.BigInt},{metadata:{componentName:"SyncProgress"}})}}var O$2={uint8:P$a.Number,uint16:P$a.Number,uint24:P$a.Number,uint32:P$a.Number,uint40:P$a.Number,uint48:P$a.Number,uint56:P$a.BigInt,uint64:P$a.BigInt,uint72:P$a.BigInt,uint80:P$a.BigInt,uint88:P$a.BigInt,uint96:P$a.BigInt,uint104:P$a.BigInt,uint112:P$a.BigInt,uint120:P$a.BigInt,uint128:P$a.BigInt,uint136:P$a.BigInt,uint144:P$a.BigInt,uint152:P$a.BigInt,uint160:P$a.BigInt,uint168:P$a.BigInt,uint176:P$a.BigInt,uint184:P$a.BigInt,uint192:P$a.BigInt,uint200:P$a.BigInt,uint208:P$a.BigInt,uint216:P$a.BigInt,uint224:P$a.BigInt,uint232:P$a.BigInt,uint240:P$a.BigInt,uint248:P$a.BigInt,uint256:P$a.BigInt,int8:P$a.Number,int16:P$a.Number,int24:P$a.Number,int32:P$a.Number,int40:P$a.Number,int48:P$a.Number,int56:P$a.BigInt,int64:P$a.BigInt,int72:P$a.BigInt,int80:P$a.BigInt,int88:P$a.BigInt,int96:P$a.BigInt,int104:P$a.BigInt,int112:P$a.BigInt,int120:P$a.BigInt,int128:P$a.BigInt,int136:P$a.BigInt,int144:P$a.BigInt,int152:P$a.BigInt,int160:P$a.BigInt,int168:P$a.BigInt,int176:P$a.BigInt,int184:P$a.BigInt,int192:P$a.BigInt,int200:P$a.BigInt,int208:P$a.BigInt,int216:P$a.BigInt,int224:P$a.BigInt,int232:P$a.BigInt,int240:P$a.BigInt,int248:P$a.BigInt,int256:P$a.BigInt,bytes1:P$a.String,bytes2:P$a.String,bytes3:P$a.String,bytes4:P$a.String,bytes5:P$a.String,bytes6:P$a.String,bytes7:P$a.String,bytes8:P$a.String,bytes9:P$a.String,bytes10:P$a.String,bytes11:P$a.String,bytes12:P$a.String,bytes13:P$a.String,bytes14:P$a.String,bytes15:P$a.String,bytes16:P$a.String,bytes17:P$a.String,bytes18:P$a.String,bytes19:P$a.String,bytes20:P$a.String,bytes21:P$a.String,bytes22:P$a.String,bytes23:P$a.String,bytes24:P$a.String,bytes25:P$a.String,bytes26:P$a.String,bytes27:P$a.String,bytes28:P$a.String,bytes29:P$a.String,bytes30:P$a.String,bytes31:P$a.String,bytes32:P$a.String,bool:P$a.Boolean,address:P$a.String,"uint8[]":P$a.NumberArray,"uint16[]":P$a.NumberArray,"uint24[]":P$a.NumberArray,"uint32[]":P$a.NumberArray,"uint40[]":P$a.NumberArray,"uint48[]":P$a.NumberArray,"uint56[]":P$a.BigIntArray,"uint64[]":P$a.BigIntArray,"uint72[]":P$a.BigIntArray,"uint80[]":P$a.BigIntArray,"uint88[]":P$a.BigIntArray,"uint96[]":P$a.BigIntArray,"uint104[]":P$a.BigIntArray,"uint112[]":P$a.BigIntArray,"uint120[]":P$a.BigIntArray,"uint128[]":P$a.BigIntArray,"uint136[]":P$a.BigIntArray,"uint144[]":P$a.BigIntArray,"uint152[]":P$a.BigIntArray,"uint160[]":P$a.BigIntArray,"uint168[]":P$a.BigIntArray,"uint176[]":P$a.BigIntArray,"uint184[]":P$a.BigIntArray,"uint192[]":P$a.BigIntArray,"uint200[]":P$a.BigIntArray,"uint208[]":P$a.BigIntArray,"uint216[]":P$a.BigIntArray,"uint224[]":P$a.BigIntArray,"uint232[]":P$a.BigIntArray,"uint240[]":P$a.BigIntArray,"uint248[]":P$a.BigIntArray,"uint256[]":P$a.BigIntArray,"int8[]":P$a.NumberArray,"int16[]":P$a.NumberArray,"int24[]":P$a.NumberArray,"int32[]":P$a.NumberArray,"int40[]":P$a.NumberArray,"int48[]":P$a.NumberArray,"int56[]":P$a.BigIntArray,"int64[]":P$a.BigIntArray,"int72[]":P$a.BigIntArray,"int80[]":P$a.BigIntArray,"int88[]":P$a.BigIntArray,"int96[]":P$a.BigIntArray,"int104[]":P$a.BigIntArray,"int112[]":P$a.BigIntArray,"int120[]":P$a.BigIntArray,"int128[]":P$a.BigIntArray,"int136[]":P$a.BigIntArray,"int144[]":P$a.BigIntArray,"int152[]":P$a.BigIntArray,"int160[]":P$a.BigIntArray,"int168[]":P$a.BigIntArray,"int176[]":P$a.BigIntArray,"int184[]":P$a.BigIntArray,"int192[]":P$a.BigIntArray,"int200[]":P$a.BigIntArray,"int208[]":P$a.BigIntArray,"int216[]":P$a.BigIntArray,"int224[]":P$a.BigIntArray,"int232[]":P$a.BigIntArray,"int240[]":P$a.BigIntArray,"int248[]":P$a.BigIntArray,"int256[]":P$a.BigIntArray,"bytes1[]":P$a.StringArray,"bytes2[]":P$a.StringArray,"bytes3[]":P$a.StringArray,"bytes4[]":P$a.StringArray,"bytes5[]":P$a.StringArray,"bytes6[]":P$a.StringArray,"bytes7[]":P$a.StringArray,"bytes8[]":P$a.StringArray,"bytes9[]":P$a.StringArray,"bytes10[]":P$a.StringArray,"bytes11[]":P$a.StringArray,"bytes12[]":P$a.StringArray,"bytes13[]":P$a.StringArray,"bytes14[]":P$a.StringArray,"bytes15[]":P$a.StringArray,"bytes16[]":P$a.StringArray,"bytes17[]":P$a.StringArray,"bytes18[]":P$a.StringArray,"bytes19[]":P$a.StringArray,"bytes20[]":P$a.StringArray,"bytes21[]":P$a.StringArray,"bytes22[]":P$a.StringArray,"bytes23[]":P$a.StringArray,"bytes24[]":P$a.StringArray,"bytes25[]":P$a.StringArray,"bytes26[]":P$a.StringArray,"bytes27[]":P$a.StringArray,"bytes28[]":P$a.StringArray,"bytes29[]":P$a.StringArray,"bytes30[]":P$a.StringArray,"bytes31[]":P$a.StringArray,"bytes32[]":P$a.StringArray,"bool[]":P$a.T,"address[]":P$a.StringArray,bytes:P$a.String,string:P$a.String};function S$2(_e,et){return Object.fromEntries(Object.entries(et.tables).map(([tt,rt])=>[tt,ie$1(_e,Object.fromEntries(Object.entries(rt.schema).map(([nt,it])=>[nt,O$2[it]])),{id:He$1(et.namespace,tt),metadata:{componentName:tt,tableName:`${et.namespace}:${tt}`,keySchema:rt.keySchema,valueSchema:rt.schema}})]))}async function ae$1({world:_e,config:et,address:tt,publicClient:rt,startBlock:nt,maxBlockRange:it,initialState:at,indexerUrl:st,startSync:lt=!0}){let dt={...S$2(_e,et),...S$2(_e,a$2),...S$2(_e,t$2),...N$1(_e)};_e.registerEntity({id:f$1});let ht=await be$1({storageAdapter:R$1({components:dt,config:et}),config:et,address:tt,publicClient:rt,startBlock:nt,maxBlockRange:it,indexerUrl:st,initialState:at,onProgress:({step:gt,percentage:vt,latestBlockNumber:xt,lastBlockNumberProcessed:yt,message:bt})=>{g$7(dt.SyncProgress,f$1)?.step!=="live"&&E$3(dt.SyncProgress,f$1,{step:gt,percentage:vt,latestBlockNumber:xt,lastBlockNumberProcessed:yt,message:bt})}}),pt=lt?ht.blockStorageOperations$.subscribe():null,mt=()=>{pt?.unsubscribe()};return _e.registerDisposer(mt),{...ht,components:dt,stopSync:mt}}var classnames={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(_e){(function(){var et={}.hasOwnProperty;function tt(){for(var rt=[],nt=0;nt1&&arguments[1]!==void 0?arguments[1]:{},tt=[];return React.Children.forEach(_e,function(rt){rt==null&&!et.keepEmpty||(Array.isArray(rt)?tt=tt.concat(toArray$1(rt)):reactIsExports.isFragment(rt)&&rt.props?tt=tt.concat(toArray$1(rt.props.children,et)):tt.push(rt))}),tt}var warned={},preMessage=function(et){};function warning$3(_e,et){}function note(_e,et){}function resetWarned(){warned={}}function call(_e,et,tt){!et&&!warned[tt]&&(_e(!1,tt),warned[tt]=!0)}function warningOnce(_e,et){call(warning$3,_e,et)}function noteOnce(_e,et){call(note,_e,et)}warningOnce.preMessage=preMessage;warningOnce.resetWarned=resetWarned;warningOnce.noteOnce=noteOnce;function _typeof$1(_e){"@babel/helpers - typeof";return _typeof$1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$1(_e)}function _toPrimitive(_e,et){if(_typeof$1(_e)!=="object"||_e===null)return _e;var tt=_e[Symbol.toPrimitive];if(tt!==void 0){var rt=tt.call(_e,et||"default");if(_typeof$1(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(_e)}function _toPropertyKey(_e){var et=_toPrimitive(_e,"string");return _typeof$1(et)==="symbol"?et:String(et)}function _defineProperty$1(_e,et,tt){return et=_toPropertyKey(et),et in _e?Object.defineProperty(_e,et,{value:tt,enumerable:!0,configurable:!0,writable:!0}):_e[et]=tt,_e}function ownKeys$1(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(_e);et&&(rt=rt.filter(function(nt){return Object.getOwnPropertyDescriptor(_e,nt).enumerable})),tt.push.apply(tt,rt)}return tt}function _objectSpread2(_e){for(var et=1;et>>1,St=Ot[Ct];if(0>>1;Ctnt(Rt,Wt))Ktnt(Zt,Rt)?(Ot[Ct]=Zt,Ot[Kt]=Wt,Ct=Kt):(Ot[Ct]=Rt,Ot[Vt]=Wt,Ct=Vt);else if(Ktnt(Zt,Wt))Ot[Ct]=Zt,Ot[Kt]=Wt,Ct=Kt;else break e}}return Ut}function nt(Ot,Ut){var Wt=Ot.sortIndex-Ut.sortIndex;return Wt!==0?Wt:Ot.id-Ut.id}if(typeof performance=="object"&&typeof performance.now=="function"){var it=performance;_e.unstable_now=function(){return it.now()}}else{var at=Date,st=at.now();_e.unstable_now=function(){return at.now()-st}}var lt=[],dt=[],ht=1,pt=null,mt=3,gt=!1,vt=!1,xt=!1,yt=typeof setTimeout=="function"?setTimeout:null,bt=typeof clearTimeout=="function"?clearTimeout:null,wt=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Et(Ot){for(var Ut=tt(dt);Ut!==null;){if(Ut.callback===null)rt(dt);else if(Ut.startTime<=Ot)rt(dt),Ut.sortIndex=Ut.expirationTime,et(lt,Ut);else break;Ut=tt(dt)}}function $t(Ot){if(xt=!1,Et(Ot),!vt)if(tt(lt)!==null)vt=!0,Tt(Pt);else{var Ut=tt(dt);Ut!==null&&Bt($t,Ut.startTime-Ot)}}function Pt(Ot,Ut){vt=!1,xt&&(xt=!1,bt(jt),jt=-1),gt=!0;var Wt=mt;try{for(Et(Ut),pt=tt(lt);pt!==null&&(!(pt.expirationTime>Ut)||Ot&&!Ht());){var Ct=pt.callback;if(typeof Ct=="function"){pt.callback=null,mt=pt.priorityLevel;var St=Ct(pt.expirationTime<=Ut);Ut=_e.unstable_now(),typeof St=="function"?pt.callback=St:pt===tt(lt)&&rt(lt),Et(Ut)}else rt(lt);pt=tt(lt)}if(pt!==null)var Ft=!0;else{var Vt=tt(dt);Vt!==null&&Bt($t,Vt.startTime-Ut),Ft=!1}return Ft}finally{pt=null,mt=Wt,gt=!1}}var kt=!1,Lt=null,jt=-1,qt=5,Dt=-1;function Ht(){return!(_e.unstable_now()-DtOt||125Ct?(Ot.sortIndex=Wt,et(dt,Ot),tt(lt)===null&&Ot===tt(dt)&&(xt?(bt(jt),jt=-1):xt=!0,Bt($t,Wt-Ct))):(Ot.sortIndex=St,et(lt,Ot),vt||gt||(vt=!0,Tt(Pt))),Ot},_e.unstable_shouldYield=Ht,_e.unstable_wrapCallback=function(Ot){var Ut=mt;return function(){var Wt=mt;mt=Ut;try{return Ot.apply(this,arguments)}finally{mt=Wt}}}})(scheduler_production_min);scheduler.exports=scheduler_production_min;var schedulerExports=scheduler.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var aa=reactExports,ca=schedulerExports;function p(_e){for(var et="https://reactjs.org/docs/error-decoder.html?invariant="+_e,tt=1;tt"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ja=Object.prototype.hasOwnProperty,ka=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,la={},ma={};function oa(_e){return ja.call(ma,_e)?!0:ja.call(la,_e)?!1:ka.test(_e)?ma[_e]=!0:(la[_e]=!0,!1)}function pa(_e,et,tt,rt){if(tt!==null&&tt.type===0)return!1;switch(typeof et){case"function":case"symbol":return!0;case"boolean":return rt?!1:tt!==null?!tt.acceptsBooleans:(_e=_e.toLowerCase().slice(0,5),_e!=="data-"&&_e!=="aria-");default:return!1}}function qa(_e,et,tt,rt){if(et===null||typeof et>"u"||pa(_e,et,tt,rt))return!0;if(rt)return!1;if(tt!==null)switch(tt.type){case 3:return!et;case 4:return et===!1;case 5:return isNaN(et);case 6:return isNaN(et)||1>et}return!1}function v$1(_e,et,tt,rt,nt,it,at){this.acceptsBooleans=et===2||et===3||et===4,this.attributeName=rt,this.attributeNamespace=nt,this.mustUseProperty=tt,this.propertyName=_e,this.type=et,this.sanitizeURL=it,this.removeEmptyString=at}var z$1={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(_e){z$1[_e]=new v$1(_e,0,!1,_e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(_e){var et=_e[0];z$1[et]=new v$1(et,1,!1,_e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(_e){z$1[_e]=new v$1(_e,2,!1,_e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(_e){z$1[_e]=new v$1(_e,2,!1,_e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(_e){z$1[_e]=new v$1(_e,3,!1,_e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(_e){z$1[_e]=new v$1(_e,3,!0,_e,null,!1,!1)});["capture","download"].forEach(function(_e){z$1[_e]=new v$1(_e,4,!1,_e,null,!1,!1)});["cols","rows","size","span"].forEach(function(_e){z$1[_e]=new v$1(_e,6,!1,_e,null,!1,!1)});["rowSpan","start"].forEach(function(_e){z$1[_e]=new v$1(_e,5,!1,_e.toLowerCase(),null,!1,!1)});var ra=/[\-:]([a-z])/g;function sa(_e){return _e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(_e){var et=_e.replace(ra,sa);z$1[et]=new v$1(et,1,!1,_e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(_e){var et=_e.replace(ra,sa);z$1[et]=new v$1(et,1,!1,_e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(_e){var et=_e.replace(ra,sa);z$1[et]=new v$1(et,1,!1,_e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(_e){z$1[_e]=new v$1(_e,1,!1,_e.toLowerCase(),null,!1,!1)});z$1.xlinkHref=new v$1("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(_e){z$1[_e]=new v$1(_e,1,!1,_e.toLowerCase(),null,!0,!0)});function ta(_e,et,tt,rt){var nt=z$1.hasOwnProperty(et)?z$1[et]:null;(nt!==null?nt.type!==0:rt||!(2st||nt[at]!==it[st]){var lt=` +`+nt[at].replace(" at new "," at ");return _e.displayName&<.includes("")&&(lt=lt.replace("",_e.displayName)),lt}while(1<=at&&0<=st);break}}}finally{Na=!1,Error.prepareStackTrace=tt}return(_e=_e?_e.displayName||_e.name:"")?Ma(_e):""}function Pa(_e){switch(_e.tag){case 5:return Ma(_e.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return _e=Oa(_e.type,!1),_e;case 11:return _e=Oa(_e.type.render,!1),_e;case 1:return _e=Oa(_e.type,!0),_e;default:return""}}function Qa(_e){if(_e==null)return null;if(typeof _e=="function")return _e.displayName||_e.name||null;if(typeof _e=="string")return _e;switch(_e){case ya:return"Fragment";case wa:return"Portal";case Aa:return"Profiler";case za:return"StrictMode";case Ea:return"Suspense";case Fa:return"SuspenseList"}if(typeof _e=="object")switch(_e.$$typeof){case Ca:return(_e.displayName||"Context")+".Consumer";case Ba:return(_e._context.displayName||"Context")+".Provider";case Da:var et=_e.render;return _e=_e.displayName,_e||(_e=et.displayName||et.name||"",_e=_e!==""?"ForwardRef("+_e+")":"ForwardRef"),_e;case Ga:return et=_e.displayName||null,et!==null?et:Qa(_e.type)||"Memo";case Ha:et=_e._payload,_e=_e._init;try{return Qa(_e(et))}catch{}}return null}function Ra(_e){var et=_e.type;switch(_e.tag){case 24:return"Cache";case 9:return(et.displayName||"Context")+".Consumer";case 10:return(et._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return _e=et.render,_e=_e.displayName||_e.name||"",et.displayName||(_e!==""?"ForwardRef("+_e+")":"ForwardRef");case 7:return"Fragment";case 5:return et;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(et);case 8:return et===za?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof et=="function")return et.displayName||et.name||null;if(typeof et=="string")return et}return null}function Sa(_e){switch(typeof _e){case"boolean":case"number":case"string":case"undefined":return _e;case"object":return _e;default:return""}}function Ta(_e){var et=_e.type;return(_e=_e.nodeName)&&_e.toLowerCase()==="input"&&(et==="checkbox"||et==="radio")}function Ua(_e){var et=Ta(_e)?"checked":"value",tt=Object.getOwnPropertyDescriptor(_e.constructor.prototype,et),rt=""+_e[et];if(!_e.hasOwnProperty(et)&&typeof tt<"u"&&typeof tt.get=="function"&&typeof tt.set=="function"){var nt=tt.get,it=tt.set;return Object.defineProperty(_e,et,{configurable:!0,get:function(){return nt.call(this)},set:function(at){rt=""+at,it.call(this,at)}}),Object.defineProperty(_e,et,{enumerable:tt.enumerable}),{getValue:function(){return rt},setValue:function(at){rt=""+at},stopTracking:function(){_e._valueTracker=null,delete _e[et]}}}}function Va(_e){_e._valueTracker||(_e._valueTracker=Ua(_e))}function Wa(_e){if(!_e)return!1;var et=_e._valueTracker;if(!et)return!0;var tt=et.getValue(),rt="";return _e&&(rt=Ta(_e)?_e.checked?"true":"false":_e.value),_e=rt,_e!==tt?(et.setValue(_e),!0):!1}function Xa(_e){if(_e=_e||(typeof document<"u"?document:void 0),typeof _e>"u")return null;try{return _e.activeElement||_e.body}catch{return _e.body}}function Ya(_e,et){var tt=et.checked;return A$1({},et,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:tt??_e._wrapperState.initialChecked})}function Za(_e,et){var tt=et.defaultValue==null?"":et.defaultValue,rt=et.checked!=null?et.checked:et.defaultChecked;tt=Sa(et.value!=null?et.value:tt),_e._wrapperState={initialChecked:rt,initialValue:tt,controlled:et.type==="checkbox"||et.type==="radio"?et.checked!=null:et.value!=null}}function ab(_e,et){et=et.checked,et!=null&&ta(_e,"checked",et,!1)}function bb(_e,et){ab(_e,et);var tt=Sa(et.value),rt=et.type;if(tt!=null)rt==="number"?(tt===0&&_e.value===""||_e.value!=tt)&&(_e.value=""+tt):_e.value!==""+tt&&(_e.value=""+tt);else if(rt==="submit"||rt==="reset"){_e.removeAttribute("value");return}et.hasOwnProperty("value")?cb(_e,et.type,tt):et.hasOwnProperty("defaultValue")&&cb(_e,et.type,Sa(et.defaultValue)),et.checked==null&&et.defaultChecked!=null&&(_e.defaultChecked=!!et.defaultChecked)}function db(_e,et,tt){if(et.hasOwnProperty("value")||et.hasOwnProperty("defaultValue")){var rt=et.type;if(!(rt!=="submit"&&rt!=="reset"||et.value!==void 0&&et.value!==null))return;et=""+_e._wrapperState.initialValue,tt||et===_e.value||(_e.value=et),_e.defaultValue=et}tt=_e.name,tt!==""&&(_e.name=""),_e.defaultChecked=!!_e._wrapperState.initialChecked,tt!==""&&(_e.name=tt)}function cb(_e,et,tt){(et!=="number"||Xa(_e.ownerDocument)!==_e)&&(tt==null?_e.defaultValue=""+_e._wrapperState.initialValue:_e.defaultValue!==""+tt&&(_e.defaultValue=""+tt))}var eb=Array.isArray;function fb(_e,et,tt,rt){if(_e=_e.options,et){et={};for(var nt=0;nt"+et.valueOf().toString()+"",et=mb.firstChild;_e.firstChild;)_e.removeChild(_e.firstChild);for(;et.firstChild;)_e.appendChild(et.firstChild)}});function ob(_e,et){if(et){var tt=_e.firstChild;if(tt&&tt===_e.lastChild&&tt.nodeType===3){tt.nodeValue=et;return}}_e.textContent=et}var pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(_e){qb.forEach(function(et){et=et+_e.charAt(0).toUpperCase()+_e.substring(1),pb[et]=pb[_e]})});function rb(_e,et,tt){return et==null||typeof et=="boolean"||et===""?"":tt||typeof et!="number"||et===0||pb.hasOwnProperty(_e)&&pb[_e]?(""+et).trim():et+"px"}function sb(_e,et){_e=_e.style;for(var tt in et)if(et.hasOwnProperty(tt)){var rt=tt.indexOf("--")===0,nt=rb(tt,et[tt],rt);tt==="float"&&(tt="cssFloat"),rt?_e.setProperty(tt,nt):_e[tt]=nt}}var tb=A$1({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ub(_e,et){if(et){if(tb[_e]&&(et.children!=null||et.dangerouslySetInnerHTML!=null))throw Error(p(137,_e));if(et.dangerouslySetInnerHTML!=null){if(et.children!=null)throw Error(p(60));if(typeof et.dangerouslySetInnerHTML!="object"||!("__html"in et.dangerouslySetInnerHTML))throw Error(p(61))}if(et.style!=null&&typeof et.style!="object")throw Error(p(62))}}function vb(_e,et){if(_e.indexOf("-")===-1)return typeof et.is=="string";switch(_e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wb=null;function xb(_e){return _e=_e.target||_e.srcElement||window,_e.correspondingUseElement&&(_e=_e.correspondingUseElement),_e.nodeType===3?_e.parentNode:_e}var yb=null,zb=null,Ab=null;function Bb(_e){if(_e=Cb(_e)){if(typeof yb!="function")throw Error(p(280));var et=_e.stateNode;et&&(et=Db(et),yb(_e.stateNode,_e.type,et))}}function Eb(_e){zb?Ab?Ab.push(_e):Ab=[_e]:zb=_e}function Fb(){if(zb){var _e=zb,et=Ab;if(Ab=zb=null,Bb(_e),et)for(_e=0;_e>>=0,_e===0?32:31-(pc(_e)/qc|0)|0}var rc=64,sc=4194304;function tc(_e){switch(_e&-_e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return _e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return _e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return _e}}function uc(_e,et){var tt=_e.pendingLanes;if(tt===0)return 0;var rt=0,nt=_e.suspendedLanes,it=_e.pingedLanes,at=tt&268435455;if(at!==0){var st=at&~nt;st!==0?rt=tc(st):(it&=at,it!==0&&(rt=tc(it)))}else at=tt&~nt,at!==0?rt=tc(at):it!==0&&(rt=tc(it));if(rt===0)return 0;if(et!==0&&et!==rt&&!(et&nt)&&(nt=rt&-rt,it=et&-et,nt>=it||nt===16&&(it&4194240)!==0))return et;if(rt&4&&(rt|=tt&16),et=_e.entangledLanes,et!==0)for(_e=_e.entanglements,et&=rt;0tt;tt++)et.push(_e);return et}function Ac(_e,et,tt){_e.pendingLanes|=et,et!==536870912&&(_e.suspendedLanes=0,_e.pingedLanes=0),_e=_e.eventTimes,et=31-oc(et),_e[et]=tt}function Bc(_e,et){var tt=_e.pendingLanes&~et;_e.pendingLanes=et,_e.suspendedLanes=0,_e.pingedLanes=0,_e.expiredLanes&=et,_e.mutableReadLanes&=et,_e.entangledLanes&=et,et=_e.entanglements;var rt=_e.eventTimes;for(_e=_e.expirationTimes;0=be),ee=String.fromCharCode(32),fe$1=!1;function ge(_e,et){switch(_e){case"keyup":return $d.indexOf(et.keyCode)!==-1;case"keydown":return et.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function he(_e){return _e=_e.detail,typeof _e=="object"&&"data"in _e?_e.data:null}var ie=!1;function je(_e,et){switch(_e){case"compositionend":return he(et);case"keypress":return et.which!==32?null:(fe$1=!0,ee);case"textInput":return _e=et.data,_e===ee&&fe$1?null:_e;default:return null}}function ke(_e,et){if(ie)return _e==="compositionend"||!ae&&ge(_e,et)?(_e=nd(),md=ld=kd=null,ie=!1,_e):null;switch(_e){case"paste":return null;case"keypress":if(!(et.ctrlKey||et.altKey||et.metaKey)||et.ctrlKey&&et.altKey){if(et.char&&1=et)return{node:tt,offset:et-_e};_e=rt}e:{for(;tt;){if(tt.nextSibling){tt=tt.nextSibling;break e}tt=tt.parentNode}tt=void 0}tt=Je(tt)}}function Le(_e,et){return _e&&et?_e===et?!0:_e&&_e.nodeType===3?!1:et&&et.nodeType===3?Le(_e,et.parentNode):"contains"in _e?_e.contains(et):_e.compareDocumentPosition?!!(_e.compareDocumentPosition(et)&16):!1:!1}function Me(){for(var _e=window,et=Xa();et instanceof _e.HTMLIFrameElement;){try{var tt=typeof et.contentWindow.location.href=="string"}catch{tt=!1}if(tt)_e=et.contentWindow;else break;et=Xa(_e.document)}return et}function Ne(_e){var et=_e&&_e.nodeName&&_e.nodeName.toLowerCase();return et&&(et==="input"&&(_e.type==="text"||_e.type==="search"||_e.type==="tel"||_e.type==="url"||_e.type==="password")||et==="textarea"||_e.contentEditable==="true")}function Oe$1(_e){var et=Me(),tt=_e.focusedElem,rt=_e.selectionRange;if(et!==tt&&tt&&tt.ownerDocument&&Le(tt.ownerDocument.documentElement,tt)){if(rt!==null&&Ne(tt)){if(et=rt.start,_e=rt.end,_e===void 0&&(_e=et),"selectionStart"in tt)tt.selectionStart=et,tt.selectionEnd=Math.min(_e,tt.value.length);else if(_e=(et=tt.ownerDocument||document)&&et.defaultView||window,_e.getSelection){_e=_e.getSelection();var nt=tt.textContent.length,it=Math.min(rt.start,nt);rt=rt.end===void 0?it:Math.min(rt.end,nt),!_e.extend&&it>rt&&(nt=rt,rt=it,it=nt),nt=Ke(tt,it);var at=Ke(tt,rt);nt&&at&&(_e.rangeCount!==1||_e.anchorNode!==nt.node||_e.anchorOffset!==nt.offset||_e.focusNode!==at.node||_e.focusOffset!==at.offset)&&(et=et.createRange(),et.setStart(nt.node,nt.offset),_e.removeAllRanges(),it>rt?(_e.addRange(et),_e.extend(at.node,at.offset)):(et.setEnd(at.node,at.offset),_e.addRange(et)))}}for(et=[],_e=tt;_e=_e.parentNode;)_e.nodeType===1&&et.push({element:_e,left:_e.scrollLeft,top:_e.scrollTop});for(typeof tt.focus=="function"&&tt.focus(),tt=0;tt=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;function Ue(_e,et,tt){var rt=tt.window===tt?tt.document:tt.nodeType===9?tt:tt.ownerDocument;Te||Qe==null||Qe!==Xa(rt)||(rt=Qe,"selectionStart"in rt&&Ne(rt)?rt={start:rt.selectionStart,end:rt.selectionEnd}:(rt=(rt.ownerDocument&&rt.ownerDocument.defaultView||window).getSelection(),rt={anchorNode:rt.anchorNode,anchorOffset:rt.anchorOffset,focusNode:rt.focusNode,focusOffset:rt.focusOffset}),Se&&Ie(Se,rt)||(Se=rt,rt=oe(Re,"onSelect"),0Tf||(_e.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(_e,et){Tf++,Sf[Tf]=_e.current,_e.current=et}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(_e,et){var tt=_e.type.contextTypes;if(!tt)return Vf;var rt=_e.stateNode;if(rt&&rt.__reactInternalMemoizedUnmaskedChildContext===et)return rt.__reactInternalMemoizedMaskedChildContext;var nt={},it;for(it in tt)nt[it]=et[it];return rt&&(_e=_e.stateNode,_e.__reactInternalMemoizedUnmaskedChildContext=et,_e.__reactInternalMemoizedMaskedChildContext=nt),nt}function Zf(_e){return _e=_e.childContextTypes,_e!=null}function $f(){E(Wf),E(H)}function ag(_e,et,tt){if(H.current!==Vf)throw Error(p(168));G(H,et),G(Wf,tt)}function bg(_e,et,tt){var rt=_e.stateNode;if(et=et.childContextTypes,typeof rt.getChildContext!="function")return tt;rt=rt.getChildContext();for(var nt in rt)if(!(nt in et))throw Error(p(108,Ra(_e)||"Unknown",nt));return A$1({},tt,rt)}function cg(_e){return _e=(_e=_e.stateNode)&&_e.__reactInternalMemoizedMergedChildContext||Vf,Xf=H.current,G(H,_e),G(Wf,Wf.current),!0}function dg(_e,et,tt){var rt=_e.stateNode;if(!rt)throw Error(p(169));tt?(_e=bg(_e,et,Xf),rt.__reactInternalMemoizedMergedChildContext=_e,E(Wf),E(H),G(H,_e)):E(Wf),G(Wf,tt)}var eg=null,fg=!1,gg=!1;function hg(_e){eg===null?eg=[_e]:eg.push(_e)}function ig(_e){fg=!0,hg(_e)}function jg(){if(!gg&&eg!==null){gg=!0;var _e=0,et=C;try{var tt=eg;for(C=1;_e>=at,nt-=at,rg=1<<32-oc(et)+nt|tt<jt?(qt=Lt,Lt=null):qt=Lt.sibling;var Dt=mt(bt,Lt,Et[jt],$t);if(Dt===null){Lt===null&&(Lt=qt);break}_e&&Lt&&Dt.alternate===null&&et(bt,Lt),wt=it(Dt,wt,jt),kt===null?Pt=Dt:kt.sibling=Dt,kt=Dt,Lt=qt}if(jt===Et.length)return tt(bt,Lt),I&&tg(bt,jt),Pt;if(Lt===null){for(;jtjt?(qt=Lt,Lt=null):qt=Lt.sibling;var Ht=mt(bt,Lt,Dt.value,$t);if(Ht===null){Lt===null&&(Lt=qt);break}_e&&Lt&&Ht.alternate===null&&et(bt,Lt),wt=it(Ht,wt,jt),kt===null?Pt=Ht:kt.sibling=Ht,kt=Ht,Lt=qt}if(Dt.done)return tt(bt,Lt),I&&tg(bt,jt),Pt;if(Lt===null){for(;!Dt.done;jt++,Dt=Et.next())Dt=pt(bt,Dt.value,$t),Dt!==null&&(wt=it(Dt,wt,jt),kt===null?Pt=Dt:kt.sibling=Dt,kt=Dt);return I&&tg(bt,jt),Pt}for(Lt=rt(bt,Lt);!Dt.done;jt++,Dt=Et.next())Dt=gt(Lt,bt,jt,Dt.value,$t),Dt!==null&&(_e&&Dt.alternate!==null&&Lt.delete(Dt.key===null?jt:Dt.key),wt=it(Dt,wt,jt),kt===null?Pt=Dt:kt.sibling=Dt,kt=Dt);return _e&&Lt.forEach(function(Xt){return et(bt,Xt)}),I&&tg(bt,jt),Pt}function yt(bt,wt,Et,$t){if(typeof Et=="object"&&Et!==null&&Et.type===ya&&Et.key===null&&(Et=Et.props.children),typeof Et=="object"&&Et!==null){switch(Et.$$typeof){case va:e:{for(var Pt=Et.key,kt=wt;kt!==null;){if(kt.key===Pt){if(Pt=Et.type,Pt===ya){if(kt.tag===7){tt(bt,kt.sibling),wt=nt(kt,Et.props.children),wt.return=bt,bt=wt;break e}}else if(kt.elementType===Pt||typeof Pt=="object"&&Pt!==null&&Pt.$$typeof===Ha&&uh(Pt)===kt.type){tt(bt,kt.sibling),wt=nt(kt,Et.props),wt.ref=sh(bt,kt,Et),wt.return=bt,bt=wt;break e}tt(bt,kt);break}else et(bt,kt);kt=kt.sibling}Et.type===ya?(wt=Ah(Et.props.children,bt.mode,$t,Et.key),wt.return=bt,bt=wt):($t=yh(Et.type,Et.key,Et.props,null,bt.mode,$t),$t.ref=sh(bt,wt,Et),$t.return=bt,bt=$t)}return at(bt);case wa:e:{for(kt=Et.key;wt!==null;){if(wt.key===kt)if(wt.tag===4&&wt.stateNode.containerInfo===Et.containerInfo&&wt.stateNode.implementation===Et.implementation){tt(bt,wt.sibling),wt=nt(wt,Et.children||[]),wt.return=bt,bt=wt;break e}else{tt(bt,wt);break}else et(bt,wt);wt=wt.sibling}wt=zh(Et,bt.mode,$t),wt.return=bt,bt=wt}return at(bt);case Ha:return kt=Et._init,yt(bt,wt,kt(Et._payload),$t)}if(eb(Et))return vt(bt,wt,Et,$t);if(Ka(Et))return xt(bt,wt,Et,$t);th(bt,Et)}return typeof Et=="string"&&Et!==""||typeof Et=="number"?(Et=""+Et,wt!==null&&wt.tag===6?(tt(bt,wt.sibling),wt=nt(wt,Et),wt.return=bt,bt=wt):(tt(bt,wt),wt=xh(Et,bt.mode,$t),wt.return=bt,bt=wt),at(bt)):tt(bt,wt)}return yt}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(_e){if(_e===Dh)throw Error(p(174));return _e}function Ih(_e,et){switch(G(Gh,et),G(Fh,_e),G(Eh,Dh),_e=et.nodeType,_e){case 9:case 11:et=(et=et.documentElement)?et.namespaceURI:lb(null,"");break;default:_e=_e===8?et.parentNode:et,et=_e.namespaceURI||null,_e=_e.tagName,et=lb(et,_e)}E(Eh),G(Eh,et)}function Jh(){E(Eh),E(Fh),E(Gh)}function Kh(_e){Hh(Gh.current);var et=Hh(Eh.current),tt=lb(et,_e.type);et!==tt&&(G(Fh,_e),G(Eh,tt))}function Lh(_e){Fh.current===_e&&(E(Eh),E(Fh))}var M$2=Uf(0);function Mh(_e){for(var et=_e;et!==null;){if(et.tag===13){var tt=et.memoizedState;if(tt!==null&&(tt=tt.dehydrated,tt===null||tt.data==="$?"||tt.data==="$!"))return et}else if(et.tag===19&&et.memoizedProps.revealOrder!==void 0){if(et.flags&128)return et}else if(et.child!==null){et.child.return=et,et=et.child;continue}if(et===_e)break;for(;et.sibling===null;){if(et.return===null||et.return===_e)return null;et=et.return}et.sibling.return=et.return,et=et.sibling}return null}var Nh=[];function Oh(){for(var _e=0;_ett?tt:4,_e(!0);var rt=Qh.transition;Qh.transition={};try{_e(!1),et()}finally{C=tt,Qh.transition=rt}}function Fi(){return di().memoizedState}function Gi(_e,et,tt){var rt=lh(_e);if(tt={lane:rt,action:tt,hasEagerState:!1,eagerState:null,next:null},Hi(_e))Ii(et,tt);else if(tt=Yg(_e,et,tt,rt),tt!==null){var nt=L$1();mh(tt,_e,rt,nt),Ji(tt,et,rt)}}function ri(_e,et,tt){var rt=lh(_e),nt={lane:rt,action:tt,hasEagerState:!1,eagerState:null,next:null};if(Hi(_e))Ii(et,nt);else{var it=_e.alternate;if(_e.lanes===0&&(it===null||it.lanes===0)&&(it=et.lastRenderedReducer,it!==null))try{var at=et.lastRenderedState,st=it(at,tt);if(nt.hasEagerState=!0,nt.eagerState=st,He(st,at)){var lt=et.interleaved;lt===null?(nt.next=nt,Xg(et)):(nt.next=lt.next,lt.next=nt),et.interleaved=nt;return}}catch{}finally{}tt=Yg(_e,et,nt,rt),tt!==null&&(nt=L$1(),mh(tt,_e,rt,nt),Ji(tt,et,rt))}}function Hi(_e){var et=_e.alternate;return _e===N||et!==null&&et===N}function Ii(_e,et){Th=Sh=!0;var tt=_e.pending;tt===null?et.next=et:(et.next=tt.next,tt.next=et),_e.pending=et}function Ji(_e,et,tt){if(tt&4194240){var rt=et.lanes;rt&=_e.pendingLanes,tt|=rt,et.lanes=tt,Cc(_e,tt)}}var ai={readContext:Vg,useCallback:Q$1,useContext:Q$1,useEffect:Q$1,useImperativeHandle:Q$1,useInsertionEffect:Q$1,useLayoutEffect:Q$1,useMemo:Q$1,useReducer:Q$1,useRef:Q$1,useState:Q$1,useDebugValue:Q$1,useDeferredValue:Q$1,useTransition:Q$1,useMutableSource:Q$1,useSyncExternalStore:Q$1,useId:Q$1,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(_e,et){return ci().memoizedState=[_e,et===void 0?null:et],_e},useContext:Vg,useEffect:vi,useImperativeHandle:function(_e,et,tt){return tt=tt!=null?tt.concat([_e]):null,ti(4194308,4,yi.bind(null,et,_e),tt)},useLayoutEffect:function(_e,et){return ti(4194308,4,_e,et)},useInsertionEffect:function(_e,et){return ti(4,2,_e,et)},useMemo:function(_e,et){var tt=ci();return et=et===void 0?null:et,_e=_e(),tt.memoizedState=[_e,et],_e},useReducer:function(_e,et,tt){var rt=ci();return et=tt!==void 0?tt(et):et,rt.memoizedState=rt.baseState=et,_e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_e,lastRenderedState:et},rt.queue=_e,_e=_e.dispatch=Gi.bind(null,N,_e),[rt.memoizedState,_e]},useRef:function(_e){var et=ci();return _e={current:_e},et.memoizedState=_e},useState:qi,useDebugValue:Ai,useDeferredValue:function(_e){return ci().memoizedState=_e},useTransition:function(){var _e=qi(!1),et=_e[0];return _e=Ei.bind(null,_e[1]),ci().memoizedState=_e,[et,_e]},useMutableSource:function(){},useSyncExternalStore:function(_e,et,tt){var rt=N,nt=ci();if(I){if(tt===void 0)throw Error(p(407));tt=tt()}else{if(tt=et(),R===null)throw Error(p(349));Rh&30||ni(rt,et,tt)}nt.memoizedState=tt;var it={value:tt,getSnapshot:et};return nt.queue=it,vi(ki.bind(null,rt,it,_e),[_e]),rt.flags|=2048,li(9,mi.bind(null,rt,it,tt,et),void 0,null),tt},useId:function(){var _e=ci(),et=R.identifierPrefix;if(I){var tt=sg,rt=rg;tt=(rt&~(1<<32-oc(rt)-1)).toString(32)+tt,et=":"+et+"R"+tt,tt=Uh++,0<\/script>",_e=_e.removeChild(_e.firstChild)):typeof rt.is=="string"?_e=at.createElement(tt,{is:rt.is}):(_e=at.createElement(tt),tt==="select"&&(at=_e,rt.multiple?at.multiple=!0:rt.size&&(at.size=rt.size))):_e=at.createElementNS(_e,tt),_e[Of]=et,_e[Pf]=rt,Aj(_e,et,!1,!1),et.stateNode=_e;e:{switch(at=vb(tt,rt),tt){case"dialog":D("cancel",_e),D("close",_e),nt=rt;break;case"iframe":case"object":case"embed":D("load",_e),nt=rt;break;case"video":case"audio":for(nt=0;ntHj&&(et.flags|=128,rt=!0,Ej(it,!1),et.lanes=4194304)}else{if(!rt)if(_e=Mh(at),_e!==null){if(et.flags|=128,rt=!0,tt=_e.updateQueue,tt!==null&&(et.updateQueue=tt,et.flags|=4),Ej(it,!0),it.tail===null&&it.tailMode==="hidden"&&!at.alternate&&!I)return S$1(et),null}else 2*B$1()-it.renderingStartTime>Hj&&tt!==1073741824&&(et.flags|=128,rt=!0,Ej(it,!1),et.lanes=4194304);it.isBackwards?(at.sibling=et.child,et.child=at):(tt=it.last,tt!==null?tt.sibling=at:et.child=at,it.last=at)}return it.tail!==null?(et=it.tail,it.rendering=et,it.tail=et.sibling,it.renderingStartTime=B$1(),et.sibling=null,tt=M$2.current,G(M$2,rt?tt&1|2:tt&1),et):(S$1(et),null);case 22:case 23:return Ij(),rt=et.memoizedState!==null,_e!==null&&_e.memoizedState!==null!==rt&&(et.flags|=8192),rt&&et.mode&1?gj&1073741824&&(S$1(et),et.subtreeFlags&6&&(et.flags|=8192)):S$1(et),null;case 24:return null;case 25:return null}throw Error(p(156,et.tag))}function Jj(_e,et){switch(wg(et),et.tag){case 1:return Zf(et.type)&&$f(),_e=et.flags,_e&65536?(et.flags=_e&-65537|128,et):null;case 3:return Jh(),E(Wf),E(H),Oh(),_e=et.flags,_e&65536&&!(_e&128)?(et.flags=_e&-65537|128,et):null;case 5:return Lh(et),null;case 13:if(E(M$2),_e=et.memoizedState,_e!==null&&_e.dehydrated!==null){if(et.alternate===null)throw Error(p(340));Ig()}return _e=et.flags,_e&65536?(et.flags=_e&-65537|128,et):null;case 19:return E(M$2),null;case 4:return Jh(),null;case 10:return Rg(et.type._context),null;case 22:case 23:return Ij(),null;case 24:return null;default:return null}}var Kj=!1,U$1=!1,Lj=typeof WeakSet=="function"?WeakSet:Set,V=null;function Mj(_e,et){var tt=_e.ref;if(tt!==null)if(typeof tt=="function")try{tt(null)}catch(rt){W$1(_e,et,rt)}else tt.current=null}function Nj(_e,et,tt){try{tt()}catch(rt){W$1(_e,et,rt)}}var Oj=!1;function Pj(_e,et){if(Cf=dd,_e=Me(),Ne(_e)){if("selectionStart"in _e)var tt={start:_e.selectionStart,end:_e.selectionEnd};else e:{tt=(tt=_e.ownerDocument)&&tt.defaultView||window;var rt=tt.getSelection&&tt.getSelection();if(rt&&rt.rangeCount!==0){tt=rt.anchorNode;var nt=rt.anchorOffset,it=rt.focusNode;rt=rt.focusOffset;try{tt.nodeType,it.nodeType}catch{tt=null;break e}var at=0,st=-1,lt=-1,dt=0,ht=0,pt=_e,mt=null;t:for(;;){for(var gt;pt!==tt||nt!==0&&pt.nodeType!==3||(st=at+nt),pt!==it||rt!==0&&pt.nodeType!==3||(lt=at+rt),pt.nodeType===3&&(at+=pt.nodeValue.length),(gt=pt.firstChild)!==null;)mt=pt,pt=gt;for(;;){if(pt===_e)break t;if(mt===tt&&++dt===nt&&(st=at),mt===it&&++ht===rt&&(lt=at),(gt=pt.nextSibling)!==null)break;pt=mt,mt=pt.parentNode}pt=gt}tt=st===-1||lt===-1?null:{start:st,end:lt}}else tt=null}tt=tt||{start:0,end:0}}else tt=null;for(Df={focusedElem:_e,selectionRange:tt},dd=!1,V=et;V!==null;)if(et=V,_e=et.child,(et.subtreeFlags&1028)!==0&&_e!==null)_e.return=et,V=_e;else for(;V!==null;){et=V;try{var vt=et.alternate;if(et.flags&1024)switch(et.tag){case 0:case 11:case 15:break;case 1:if(vt!==null){var xt=vt.memoizedProps,yt=vt.memoizedState,bt=et.stateNode,wt=bt.getSnapshotBeforeUpdate(et.elementType===et.type?xt:Lg(et.type,xt),yt);bt.__reactInternalSnapshotBeforeUpdate=wt}break;case 3:var Et=et.stateNode.containerInfo;Et.nodeType===1?Et.textContent="":Et.nodeType===9&&Et.documentElement&&Et.removeChild(Et.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163))}}catch($t){W$1(et,et.return,$t)}if(_e=et.sibling,_e!==null){_e.return=et.return,V=_e;break}V=et.return}return vt=Oj,Oj=!1,vt}function Qj(_e,et,tt){var rt=et.updateQueue;if(rt=rt!==null?rt.lastEffect:null,rt!==null){var nt=rt=rt.next;do{if((nt.tag&_e)===_e){var it=nt.destroy;nt.destroy=void 0,it!==void 0&&Nj(et,tt,it)}nt=nt.next}while(nt!==rt)}}function Rj(_e,et){if(et=et.updateQueue,et=et!==null?et.lastEffect:null,et!==null){var tt=et=et.next;do{if((tt.tag&_e)===_e){var rt=tt.create;tt.destroy=rt()}tt=tt.next}while(tt!==et)}}function Sj(_e){var et=_e.ref;if(et!==null){var tt=_e.stateNode;switch(_e.tag){case 5:_e=tt;break;default:_e=tt}typeof et=="function"?et(_e):et.current=_e}}function Tj(_e){var et=_e.alternate;et!==null&&(_e.alternate=null,Tj(et)),_e.child=null,_e.deletions=null,_e.sibling=null,_e.tag===5&&(et=_e.stateNode,et!==null&&(delete et[Of],delete et[Pf],delete et[of],delete et[Qf],delete et[Rf])),_e.stateNode=null,_e.return=null,_e.dependencies=null,_e.memoizedProps=null,_e.memoizedState=null,_e.pendingProps=null,_e.stateNode=null,_e.updateQueue=null}function Uj(_e){return _e.tag===5||_e.tag===3||_e.tag===4}function Vj(_e){e:for(;;){for(;_e.sibling===null;){if(_e.return===null||Uj(_e.return))return null;_e=_e.return}for(_e.sibling.return=_e.return,_e=_e.sibling;_e.tag!==5&&_e.tag!==6&&_e.tag!==18;){if(_e.flags&2||_e.child===null||_e.tag===4)continue e;_e.child.return=_e,_e=_e.child}if(!(_e.flags&2))return _e.stateNode}}function Wj(_e,et,tt){var rt=_e.tag;if(rt===5||rt===6)_e=_e.stateNode,et?tt.nodeType===8?tt.parentNode.insertBefore(_e,et):tt.insertBefore(_e,et):(tt.nodeType===8?(et=tt.parentNode,et.insertBefore(_e,tt)):(et=tt,et.appendChild(_e)),tt=tt._reactRootContainer,tt!=null||et.onclick!==null||(et.onclick=Bf));else if(rt!==4&&(_e=_e.child,_e!==null))for(Wj(_e,et,tt),_e=_e.sibling;_e!==null;)Wj(_e,et,tt),_e=_e.sibling}function Xj(_e,et,tt){var rt=_e.tag;if(rt===5||rt===6)_e=_e.stateNode,et?tt.insertBefore(_e,et):tt.appendChild(_e);else if(rt!==4&&(_e=_e.child,_e!==null))for(Xj(_e,et,tt),_e=_e.sibling;_e!==null;)Xj(_e,et,tt),_e=_e.sibling}var X=null,Yj=!1;function Zj(_e,et,tt){for(tt=tt.child;tt!==null;)ak(_e,et,tt),tt=tt.sibling}function ak(_e,et,tt){if(lc&&typeof lc.onCommitFiberUnmount=="function")try{lc.onCommitFiberUnmount(kc,tt)}catch{}switch(tt.tag){case 5:U$1||Mj(tt,et);case 6:var rt=X,nt=Yj;X=null,Zj(_e,et,tt),X=rt,Yj=nt,X!==null&&(Yj?(_e=X,tt=tt.stateNode,_e.nodeType===8?_e.parentNode.removeChild(tt):_e.removeChild(tt)):X.removeChild(tt.stateNode));break;case 18:X!==null&&(Yj?(_e=X,tt=tt.stateNode,_e.nodeType===8?Kf(_e.parentNode,tt):_e.nodeType===1&&Kf(_e,tt),bd(_e)):Kf(X,tt.stateNode));break;case 4:rt=X,nt=Yj,X=tt.stateNode.containerInfo,Yj=!0,Zj(_e,et,tt),X=rt,Yj=nt;break;case 0:case 11:case 14:case 15:if(!U$1&&(rt=tt.updateQueue,rt!==null&&(rt=rt.lastEffect,rt!==null))){nt=rt=rt.next;do{var it=nt,at=it.destroy;it=it.tag,at!==void 0&&(it&2||it&4)&&Nj(tt,et,at),nt=nt.next}while(nt!==rt)}Zj(_e,et,tt);break;case 1:if(!U$1&&(Mj(tt,et),rt=tt.stateNode,typeof rt.componentWillUnmount=="function"))try{rt.props=tt.memoizedProps,rt.state=tt.memoizedState,rt.componentWillUnmount()}catch(st){W$1(tt,et,st)}Zj(_e,et,tt);break;case 21:Zj(_e,et,tt);break;case 22:tt.mode&1?(U$1=(rt=U$1)||tt.memoizedState!==null,Zj(_e,et,tt),U$1=rt):Zj(_e,et,tt);break;default:Zj(_e,et,tt)}}function bk(_e){var et=_e.updateQueue;if(et!==null){_e.updateQueue=null;var tt=_e.stateNode;tt===null&&(tt=_e.stateNode=new Lj),et.forEach(function(rt){var nt=ck.bind(null,_e,rt);tt.has(rt)||(tt.add(rt),rt.then(nt,nt))})}}function dk(_e,et){var tt=et.deletions;if(tt!==null)for(var rt=0;rtnt&&(nt=at),rt&=~it}if(rt=nt,rt=B$1()-rt,rt=(120>rt?120:480>rt?480:1080>rt?1080:1920>rt?1920:3e3>rt?3e3:4320>rt?4320:1960*mk(rt/1960))-rt,10_e?16:_e,xk===null)var rt=!1;else{if(_e=xk,xk=null,yk=0,K$1&6)throw Error(p(331));var nt=K$1;for(K$1|=4,V=_e.current;V!==null;){var it=V,at=it.child;if(V.flags&16){var st=it.deletions;if(st!==null){for(var lt=0;ltB$1()-gk?Lk(_e,0):sk|=tt),Ek(_e,et)}function Zk(_e,et){et===0&&(_e.mode&1?(et=sc,sc<<=1,!(sc&130023424)&&(sc=4194304)):et=1);var tt=L$1();_e=Zg(_e,et),_e!==null&&(Ac(_e,et,tt),Ek(_e,tt))}function vj(_e){var et=_e.memoizedState,tt=0;et!==null&&(tt=et.retryLane),Zk(_e,tt)}function ck(_e,et){var tt=0;switch(_e.tag){case 13:var rt=_e.stateNode,nt=_e.memoizedState;nt!==null&&(tt=nt.retryLane);break;case 19:rt=_e.stateNode;break;default:throw Error(p(314))}rt!==null&&rt.delete(et),Zk(_e,tt)}var Wk;Wk=function(_e,et,tt){if(_e!==null)if(_e.memoizedProps!==et.pendingProps||Wf.current)Ug=!0;else{if(!(_e.lanes&tt)&&!(et.flags&128))return Ug=!1,zj(_e,et,tt);Ug=!!(_e.flags&131072)}else Ug=!1,I&&et.flags&1048576&&ug(et,ng,et.index);switch(et.lanes=0,et.tag){case 2:var rt=et.type;jj(_e,et),_e=et.pendingProps;var nt=Yf(et,H.current);Tg(et,tt),nt=Xh(null,et,rt,_e,nt,tt);var it=bi();return et.flags|=1,typeof nt=="object"&&nt!==null&&typeof nt.render=="function"&&nt.$$typeof===void 0?(et.tag=1,et.memoizedState=null,et.updateQueue=null,Zf(rt)?(it=!0,cg(et)):it=!1,et.memoizedState=nt.state!==null&&nt.state!==void 0?nt.state:null,ah(et),nt.updater=nh,et.stateNode=nt,nt._reactInternals=et,rh(et,rt,_e,tt),et=kj(null,et,rt,!0,it,tt)):(et.tag=0,I&&it&&vg(et),Yi(null,et,nt,tt),et=et.child),et;case 16:rt=et.elementType;e:{switch(jj(_e,et),_e=et.pendingProps,nt=rt._init,rt=nt(rt._payload),et.type=rt,nt=et.tag=$k(rt),_e=Lg(rt,_e),nt){case 0:et=dj(null,et,rt,_e,tt);break e;case 1:et=ij(null,et,rt,_e,tt);break e;case 11:et=Zi(null,et,rt,_e,tt);break e;case 14:et=aj(null,et,rt,Lg(rt.type,_e),tt);break e}throw Error(p(306,rt,""))}return et;case 0:return rt=et.type,nt=et.pendingProps,nt=et.elementType===rt?nt:Lg(rt,nt),dj(_e,et,rt,nt,tt);case 1:return rt=et.type,nt=et.pendingProps,nt=et.elementType===rt?nt:Lg(rt,nt),ij(_e,et,rt,nt,tt);case 3:e:{if(lj(et),_e===null)throw Error(p(387));rt=et.pendingProps,it=et.memoizedState,nt=it.element,bh(_e,et),gh(et,rt,null,tt);var at=et.memoizedState;if(rt=at.element,it.isDehydrated)if(it={element:rt,isDehydrated:!1,cache:at.cache,pendingSuspenseBoundaries:at.pendingSuspenseBoundaries,transitions:at.transitions},et.updateQueue.baseState=it,et.memoizedState=it,et.flags&256){nt=Ki(Error(p(423)),et),et=mj(_e,et,rt,tt,nt);break e}else if(rt!==nt){nt=Ki(Error(p(424)),et),et=mj(_e,et,rt,tt,nt);break e}else for(yg=Lf(et.stateNode.containerInfo.firstChild),xg=et,I=!0,zg=null,tt=Ch(et,null,rt,tt),et.child=tt;tt;)tt.flags=tt.flags&-3|4096,tt=tt.sibling;else{if(Ig(),rt===nt){et=$i(_e,et,tt);break e}Yi(_e,et,rt,tt)}et=et.child}return et;case 5:return Kh(et),_e===null&&Eg(et),rt=et.type,nt=et.pendingProps,it=_e!==null?_e.memoizedProps:null,at=nt.children,Ef(rt,nt)?at=null:it!==null&&Ef(rt,it)&&(et.flags|=32),hj(_e,et),Yi(_e,et,at,tt),et.child;case 6:return _e===null&&Eg(et),null;case 13:return pj(_e,et,tt);case 4:return Ih(et,et.stateNode.containerInfo),rt=et.pendingProps,_e===null?et.child=Bh(et,null,rt,tt):Yi(_e,et,rt,tt),et.child;case 11:return rt=et.type,nt=et.pendingProps,nt=et.elementType===rt?nt:Lg(rt,nt),Zi(_e,et,rt,nt,tt);case 7:return Yi(_e,et,et.pendingProps,tt),et.child;case 8:return Yi(_e,et,et.pendingProps.children,tt),et.child;case 12:return Yi(_e,et,et.pendingProps.children,tt),et.child;case 10:e:{if(rt=et.type._context,nt=et.pendingProps,it=et.memoizedProps,at=nt.value,G(Mg,rt._currentValue),rt._currentValue=at,it!==null)if(He(it.value,at)){if(it.children===nt.children&&!Wf.current){et=$i(_e,et,tt);break e}}else for(it=et.child,it!==null&&(it.return=et);it!==null;){var st=it.dependencies;if(st!==null){at=it.child;for(var lt=st.firstContext;lt!==null;){if(lt.context===rt){if(it.tag===1){lt=ch(-1,tt&-tt),lt.tag=2;var dt=it.updateQueue;if(dt!==null){dt=dt.shared;var ht=dt.pending;ht===null?lt.next=lt:(lt.next=ht.next,ht.next=lt),dt.pending=lt}}it.lanes|=tt,lt=it.alternate,lt!==null&&(lt.lanes|=tt),Sg(it.return,tt,et),st.lanes|=tt;break}lt=lt.next}}else if(it.tag===10)at=it.type===et.type?null:it.child;else if(it.tag===18){if(at=it.return,at===null)throw Error(p(341));at.lanes|=tt,st=at.alternate,st!==null&&(st.lanes|=tt),Sg(at,tt,et),at=it.sibling}else at=it.child;if(at!==null)at.return=it;else for(at=it;at!==null;){if(at===et){at=null;break}if(it=at.sibling,it!==null){it.return=at.return,at=it;break}at=at.return}it=at}Yi(_e,et,nt.children,tt),et=et.child}return et;case 9:return nt=et.type,rt=et.pendingProps.children,Tg(et,tt),nt=Vg(nt),rt=rt(nt),et.flags|=1,Yi(_e,et,rt,tt),et.child;case 14:return rt=et.type,nt=Lg(rt,et.pendingProps),nt=Lg(rt.type,nt),aj(_e,et,rt,nt,tt);case 15:return cj(_e,et,et.type,et.pendingProps,tt);case 17:return rt=et.type,nt=et.pendingProps,nt=et.elementType===rt?nt:Lg(rt,nt),jj(_e,et),et.tag=1,Zf(rt)?(_e=!0,cg(et)):_e=!1,Tg(et,tt),ph(et,rt,nt),rh(et,rt,nt,tt),kj(null,et,rt,!0,_e,tt);case 19:return yj(_e,et,tt);case 22:return ej(_e,et,tt)}throw Error(p(156,et.tag))};function Gk(_e,et){return ac(_e,et)}function al(_e,et,tt,rt){this.tag=_e,this.key=tt,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=et,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=rt,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(_e,et,tt,rt){return new al(_e,et,tt,rt)}function bj(_e){return _e=_e.prototype,!(!_e||!_e.isReactComponent)}function $k(_e){if(typeof _e=="function")return bj(_e)?1:0;if(_e!=null){if(_e=_e.$$typeof,_e===Da)return 11;if(_e===Ga)return 14}return 2}function wh(_e,et){var tt=_e.alternate;return tt===null?(tt=Bg(_e.tag,et,_e.key,_e.mode),tt.elementType=_e.elementType,tt.type=_e.type,tt.stateNode=_e.stateNode,tt.alternate=_e,_e.alternate=tt):(tt.pendingProps=et,tt.type=_e.type,tt.flags=0,tt.subtreeFlags=0,tt.deletions=null),tt.flags=_e.flags&14680064,tt.childLanes=_e.childLanes,tt.lanes=_e.lanes,tt.child=_e.child,tt.memoizedProps=_e.memoizedProps,tt.memoizedState=_e.memoizedState,tt.updateQueue=_e.updateQueue,et=_e.dependencies,tt.dependencies=et===null?null:{lanes:et.lanes,firstContext:et.firstContext},tt.sibling=_e.sibling,tt.index=_e.index,tt.ref=_e.ref,tt}function yh(_e,et,tt,rt,nt,it){var at=2;if(rt=_e,typeof _e=="function")bj(_e)&&(at=1);else if(typeof _e=="string")at=5;else e:switch(_e){case ya:return Ah(tt.children,nt,it,et);case za:at=8,nt|=8;break;case Aa:return _e=Bg(12,tt,et,nt|2),_e.elementType=Aa,_e.lanes=it,_e;case Ea:return _e=Bg(13,tt,et,nt),_e.elementType=Ea,_e.lanes=it,_e;case Fa:return _e=Bg(19,tt,et,nt),_e.elementType=Fa,_e.lanes=it,_e;case Ia:return qj(tt,nt,it,et);default:if(typeof _e=="object"&&_e!==null)switch(_e.$$typeof){case Ba:at=10;break e;case Ca:at=9;break e;case Da:at=11;break e;case Ga:at=14;break e;case Ha:at=16,rt=null;break e}throw Error(p(130,_e==null?_e:typeof _e,""))}return et=Bg(at,tt,et,nt),et.elementType=_e,et.type=rt,et.lanes=it,et}function Ah(_e,et,tt,rt){return _e=Bg(7,_e,rt,et),_e.lanes=tt,_e}function qj(_e,et,tt,rt){return _e=Bg(22,_e,rt,et),_e.elementType=Ia,_e.lanes=tt,_e.stateNode={isHidden:!1},_e}function xh(_e,et,tt){return _e=Bg(6,_e,null,et),_e.lanes=tt,_e}function zh(_e,et,tt){return et=Bg(4,_e.children!==null?_e.children:[],_e.key,et),et.lanes=tt,et.stateNode={containerInfo:_e.containerInfo,pendingChildren:null,implementation:_e.implementation},et}function bl(_e,et,tt,rt,nt){this.tag=et,this.containerInfo=_e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=rt,this.onRecoverableError=nt,this.mutableSourceEagerHydrationData=null}function cl(_e,et,tt,rt,nt,it,at,st,lt){return _e=new bl(_e,et,tt,st,lt),et===1?(et=1,it===!0&&(et|=8)):et=0,it=Bg(3,null,null,et),_e.current=it,it.stateNode=_e,it.memoizedState={element:rt,isDehydrated:tt,cache:null,transitions:null,pendingSuspenseBoundaries:null},ah(it),_e}function dl(_e,et,tt){var rt=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(_e){console.error(_e)}}checkDCE(),reactDom.exports=reactDom_production_min;var reactDomExports=reactDom.exports;const ReactDOM=getDefaultExportFromCjs(reactDomExports),ReactDOM$1=_mergeNamespaces({__proto__:null,default:ReactDOM},[reactDomExports]);function isDOM(_e){return _e instanceof HTMLElement||_e instanceof SVGElement}function findDOMNode(_e){return isDOM(_e)?_e:_e instanceof React.Component?ReactDOM.findDOMNode(_e):null}function _classCallCheck$1(_e,et){if(!(_e instanceof et))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(_e,et){for(var tt=0;tt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _assertThisInitialized$1(_e){if(_e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _e}function _possibleConstructorReturn$1(_e,et){if(et&&(_typeof$1(et)==="object"||typeof et=="function"))return et;if(et!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$1(_e)}function _createSuper$1(_e){var et=_isNativeReflectConstruct$2();return function(){var rt=_getPrototypeOf$2(_e),nt;if(et){var it=_getPrototypeOf$2(this).constructor;nt=Reflect.construct(rt,arguments,it)}else nt=rt.apply(this,arguments);return _possibleConstructorReturn$1(this,nt)}}function omit(_e,et){var tt=_objectSpread2({},_e);return Array.isArray(et)&&et.forEach(function(rt){delete tt[rt]}),tt}function _arrayLikeToArray(_e,et){(et==null||et>_e.length)&&(et=_e.length);for(var tt=0,rt=new Array(et);tt1&&arguments[1]!==void 0?arguments[1]:1;rafUUID+=1;var rt=rafUUID;function nt(it){if(it===0)cleanup(rt),et();else{var at=raf(function(){nt(it-1)});rafIds.set(rt,at)}}return nt(tt),rt};wrapperRaf.cancel=function(_e){var et=rafIds.get(_e);return cleanup(et),caf(et)};function murmur2(_e){for(var et=0,tt,rt=0,nt=_e.length;nt>=4;++rt,nt-=4)tt=_e.charCodeAt(rt)&255|(_e.charCodeAt(++rt)&255)<<8|(_e.charCodeAt(++rt)&255)<<16|(_e.charCodeAt(++rt)&255)<<24,tt=(tt&65535)*1540483477+((tt>>>16)*59797<<16),tt^=tt>>>24,et=(tt&65535)*1540483477+((tt>>>16)*59797<<16)^(et&65535)*1540483477+((et>>>16)*59797<<16);switch(nt){case 3:et^=(_e.charCodeAt(rt+2)&255)<<16;case 2:et^=(_e.charCodeAt(rt+1)&255)<<8;case 1:et^=_e.charCodeAt(rt)&255,et=(et&65535)*1540483477+((et>>>16)*59797<<16)}return et^=et>>>13,et=(et&65535)*1540483477+((et>>>16)*59797<<16),((et^et>>>15)>>>0).toString(36)}function _objectWithoutPropertiesLoose$1(_e,et){if(_e==null)return{};var tt={},rt=Object.keys(_e),nt,it;for(it=0;it=0)&&(tt[nt]=_e[nt]);return tt}function _objectWithoutProperties$1(_e,et){if(_e==null)return{};var tt=_objectWithoutPropertiesLoose$1(_e,et),rt,nt;if(Object.getOwnPropertySymbols){var it=Object.getOwnPropertySymbols(_e);for(nt=0;nt=0)&&Object.prototype.propertyIsEnumerable.call(_e,rt)&&(tt[rt]=_e[rt])}return tt}function isEqual(_e,et){var tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,rt=new Set;function nt(it,at){var st=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,lt=rt.has(it);if(warningOnce(!lt,"Warning: There may be circular references"),lt)return!1;if(it===at)return!0;if(tt&&st>1)return!1;rt.add(it);var dt=st+1;if(Array.isArray(it)){if(!Array.isArray(at)||it.length!==at.length)return!1;for(var ht=0;ht0&&arguments[0]!==void 0?arguments[0]:{},et=_e.mark;return et?et.startsWith("data-")?et:"data-".concat(et):MARK_KEY}function getContainer(_e){if(_e.attachTo)return _e.attachTo;var et=document.querySelector("head");return et||document.body}function getOrder(_e){return _e==="queue"?"prependQueue":_e?"prepend":"append"}function findStyles(_e){return Array.from((containerCache.get(_e)||_e).children).filter(function(et){return et.tagName==="STYLE"})}function injectCSS(_e){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!canUseDom())return null;var tt=et.csp,rt=et.prepend,nt=et.priority,it=nt===void 0?0:nt,at=getOrder(rt),st=at==="prependQueue",lt=document.createElement("style");lt.setAttribute(APPEND_ORDER,at),st&&it&<.setAttribute(APPEND_PRIORITY,"".concat(it)),tt!=null&&tt.nonce&&(lt.nonce=tt?.nonce),lt.innerHTML=_e;var dt=getContainer(et),ht=dt.firstChild;if(rt){if(st){var pt=findStyles(dt).filter(function(mt){if(!["prepend","prependQueue"].includes(mt.getAttribute(APPEND_ORDER)))return!1;var gt=Number(mt.getAttribute(APPEND_PRIORITY)||0);return it>=gt});if(pt.length)return dt.insertBefore(lt,pt[pt.length-1].nextSibling),lt}dt.insertBefore(lt,ht)}else dt.appendChild(lt);return lt}function findExistNode(_e){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tt=getContainer(et);return findStyles(tt).find(function(rt){return rt.getAttribute(getMark(et))===_e})}function removeCSS(_e){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tt=findExistNode(_e,et);if(tt){var rt=getContainer(et);rt.removeChild(tt)}}function syncRealContainer(_e,et){var tt=containerCache.get(_e);if(!tt||!contains(document,tt)){var rt=injectCSS("",et),nt=rt.parentNode;containerCache.set(_e,nt),_e.removeChild(rt)}}function updateCSS(_e,et){var tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},rt=getContainer(tt);syncRealContainer(rt,tt);var nt=findExistNode(et,tt);if(nt){var it,at;if((it=tt.csp)!==null&&it!==void 0&&it.nonce&&nt.nonce!==((at=tt.csp)===null||at===void 0?void 0:at.nonce)){var st;nt.nonce=(st=tt.csp)===null||st===void 0?void 0:st.nonce}return nt.innerHTML!==_e&&(nt.innerHTML=_e),nt}var lt=injectCSS(_e,tt);return lt.setAttribute(getMark(tt),et),lt}function _arrayWithHoles(_e){if(Array.isArray(_e))return _e}function _iterableToArrayLimit(_e,et){var tt=_e==null?null:typeof Symbol<"u"&&_e[Symbol.iterator]||_e["@@iterator"];if(tt!=null){var rt,nt,it,at,st=[],lt=!0,dt=!1;try{if(it=(tt=tt.call(_e)).next,et===0){if(Object(tt)!==tt)return;lt=!1}else for(;!(lt=(rt=it.call(tt)).done)&&(st.push(rt.value),st.length!==et);lt=!0);}catch(ht){dt=!0,nt=ht}finally{try{if(!lt&&tt.return!=null&&(at=tt.return(),Object(at)!==at))return}finally{if(dt)throw nt}}return st}}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _slicedToArray(_e,et){return _arrayWithHoles(_e)||_iterableToArrayLimit(_e,et)||_unsupportedIterableToArray(_e,et)||_nonIterableRest()}function sameDerivativeOption(_e,et){if(_e.length!==et.length)return!1;for(var tt=0;tt<_e.length;tt++)if(_e[tt]!==et[tt])return!1;return!0}var ThemeCache=function(){function _e(){_classCallCheck$1(this,_e),_defineProperty$1(this,"cache",void 0),_defineProperty$1(this,"keys",void 0),_defineProperty$1(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return _createClass$1(_e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(tt){var rt,nt,it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,at={map:this.cache};return tt.forEach(function(st){if(!at)at=void 0;else{var lt,dt;at=(lt=at)===null||lt===void 0||(dt=lt.map)===null||dt===void 0?void 0:dt.get(st)}}),(rt=at)!==null&&rt!==void 0&&rt.value&&it&&(at.value[1]=this.cacheCallTimes++),(nt=at)===null||nt===void 0?void 0:nt.value}},{key:"get",value:function(tt){var rt;return(rt=this.internalGet(tt,!0))===null||rt===void 0?void 0:rt[0]}},{key:"has",value:function(tt){return!!this.internalGet(tt)}},{key:"set",value:function(tt,rt){var nt=this;if(!this.has(tt)){if(this.size()+1>_e.MAX_CACHE_SIZE+_e.MAX_CACHE_OFFSET){var it=this.keys.reduce(function(dt,ht){var pt=_slicedToArray(dt,2),mt=pt[1];return nt.internalGet(ht)[1]0,void 0),uuid$3+=1}return _createClass$1(_e,[{key:"getDerivativeToken",value:function(tt){return this.derivatives.reduce(function(rt,nt){return nt(tt,rt)},void 0)}}]),_e}(),cacheThemes=new ThemeCache;function createTheme(_e){var et=Array.isArray(_e)?_e:[_e];return cacheThemes.has(et)||cacheThemes.set(et,new Theme(et)),cacheThemes.get(et)}var resultCache=new WeakMap,RESULT_VALUE={};function memoResult(_e,et){for(var tt=resultCache,rt=0;rtTOKEN_THRESHOLD&&rt.forEach(function(nt){removeStyleTags(nt,et),tokenKeys.delete(nt)})}var getComputedToken$1=function(et,tt,rt,nt){var it=rt.getDerivativeToken(et),at=_objectSpread2(_objectSpread2({},it),tt);return nt&&(at=nt(at)),at};function useCacheToken(_e,et){var tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},rt=reactExports.useContext(StyleContext$1),nt=rt.cache.instanceId,it=tt.salt,at=it===void 0?"":it,st=tt.override,lt=st===void 0?EMPTY_OVERRIDE:st,dt=tt.formatToken,ht=tt.getComputedToken,pt=memoResult(function(){return Object.assign.apply(Object,[{}].concat(_toConsumableArray(et)))},et),mt=flattenToken(pt),gt=flattenToken(lt),vt=useGlobalCache("token",[at,_e.id,mt,gt],function(){var xt=ht?ht(pt,lt,_e):getComputedToken$1(pt,lt,_e,dt),yt=token2key(xt,at);xt._tokenKey=yt,recordCleanToken(yt);var bt="".concat(hashPrefix,"-").concat(murmur2(yt));return xt._hashId=bt,[xt,bt]},function(xt){cleanTokenStyle(xt[0]._tokenKey,nt)});return vt}var unitlessKeys={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},COMMENT="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",LAYER="@layer",abs=Math.abs,from=String.fromCharCode;function trim(_e){return _e.trim()}function replace(_e,et,tt){return _e.replace(et,tt)}function indexof(_e,et){return _e.indexOf(et)}function charat(_e,et){return _e.charCodeAt(et)|0}function substr(_e,et,tt){return _e.slice(et,tt)}function strlen(_e){return _e.length}function sizeof(_e){return _e.length}function append(_e,et){return et.push(_e),_e}var line$1=1,column=1,length=0,position=0,character=0,characters="";function node(_e,et,tt,rt,nt,it,at,st){return{value:_e,root:et,parent:tt,type:rt,props:nt,children:it,line:line$1,column,length:at,return:"",siblings:st}}function char(){return character}function prev(){return character=position>0?charat(characters,--position):0,column--,character===10&&(column=1,line$1--),character}function next(){return character=position2||token(character)>3?"":" "}function escaping(_e,et){for(;--et&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(_e,caret()+(et<6&&peek()==32&&next()==32))}function delimiter(_e){for(;next();)switch(character){case _e:return position;case 34:case 39:_e!==34&&_e!==39&&delimiter(character);break;case 40:_e===41&&delimiter(_e);break;case 92:next();break}return position}function commenter(_e,et){for(;next()&&_e+character!==47+10;)if(_e+character===42+42&&peek()===47)break;return"/*"+slice(et,position-1)+"*"+from(_e===47?_e:next())}function identifier(_e){for(;!token(peek());)next();return slice(_e,position)}function compile(_e){return dealloc(parse("",null,null,null,[""],_e=alloc(_e),0,[0],_e))}function parse(_e,et,tt,rt,nt,it,at,st,lt){for(var dt=0,ht=0,pt=at,mt=0,gt=0,vt=0,xt=1,yt=1,bt=1,wt=0,Et="",$t=nt,Pt=it,kt=rt,Lt=Et;yt;)switch(vt=wt,wt=next()){case 40:if(vt!=108&&charat(Lt,pt-1)==58){indexof(Lt+=replace(delimit(wt),"&","&\f"),"&\f")!=-1&&(bt=-1);break}case 34:case 39:case 91:Lt+=delimit(wt);break;case 9:case 10:case 13:case 32:Lt+=whitespace$1(vt);break;case 92:Lt+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),et,tt,lt),lt);break;default:Lt+="/"}break;case 123*xt:st[dt++]=strlen(Lt)*bt;case 125*xt:case 59:case 0:switch(wt){case 0:case 125:yt=0;case 59+ht:bt==-1&&(Lt=replace(Lt,/\f/g,"")),gt>0&&strlen(Lt)-pt&&append(gt>32?declaration(Lt+";",rt,tt,pt-1,lt):declaration(replace(Lt," ","")+";",rt,tt,pt-2,lt),lt);break;case 59:Lt+=";";default:if(append(kt=ruleset(Lt,et,tt,dt,ht,nt,st,Et,$t=[],Pt=[],pt,it),it),wt===123)if(ht===0)parse(Lt,et,kt,kt,$t,it,pt,st,Pt);else switch(mt===99&&charat(Lt,3)===110?100:mt){case 100:case 108:case 109:case 115:parse(_e,kt,kt,rt&&append(ruleset(_e,kt,kt,0,0,nt,st,Et,nt,$t=[],pt,Pt),Pt),nt,Pt,pt,st,rt?$t:Pt);break;default:parse(Lt,kt,kt,kt,[""],Pt,0,st,Pt)}}dt=ht=gt=0,xt=bt=1,Et=Lt="",pt=at;break;case 58:pt=1+strlen(Lt),gt=vt;default:if(xt<1){if(wt==123)--xt;else if(wt==125&&xt++==0&&prev()==125)continue}switch(Lt+=from(wt),wt*xt){case 38:bt=ht>0?1:(Lt+="\f",-1);break;case 44:st[dt++]=(strlen(Lt)-1)*bt,bt=1;break;case 64:peek()===45&&(Lt+=delimit(next())),mt=peek(),ht=pt=strlen(Et=Lt+=identifier(caret())),wt++;break;case 45:vt===45&&strlen(Lt)==2&&(xt=0)}}return it}function ruleset(_e,et,tt,rt,nt,it,at,st,lt,dt,ht,pt){for(var mt=nt-1,gt=nt===0?it:[""],vt=sizeof(gt),xt=0,yt=0,bt=0;xt0?gt[wt]+" "+Et:replace(Et,/&\f/g,gt[wt])))&&(lt[bt++]=$t);return node(_e,et,tt,nt===0?RULESET:st,lt,dt,ht,pt)}function comment(_e,et,tt,rt){return node(_e,et,tt,COMMENT,from(char()),substr(_e,2,-2),0,rt)}function declaration(_e,et,tt,rt,nt){return node(_e,et,tt,DECLARATION,substr(_e,0,rt),substr(_e,rt+1,-1),rt,nt)}function serialize(_e,et){for(var tt="",rt=0;rt<_e.length;rt++)tt+=et(_e[rt],rt,_e,et)||"";return tt}function stringify$1(_e,et,tt,rt){switch(_e.type){case LAYER:if(_e.children.length)break;case IMPORT:case DECLARATION:return _e.return=_e.return||_e.value;case COMMENT:return"";case KEYFRAMES:return _e.return=_e.value+"{"+serialize(_e.children,rt)+"}";case RULESET:if(!strlen(_e.value=_e.props.join(",")))return""}return strlen(tt=serialize(_e.children,rt))?_e.return=_e.value+"{"+tt+"}":""}var ATTR_CACHE_MAP="data-ant-cssinjs-cache-path",CSS_FILE_STYLE="_FILE_STYLE__",cachePathMap,fromCSSFile=!0;function prepare(){if(!cachePathMap&&(cachePathMap={},canUseDom())){var _e=document.createElement("div");_e.className=ATTR_CACHE_MAP,_e.style.position="fixed",_e.style.visibility="hidden",_e.style.top="-9999px",document.body.appendChild(_e);var et=getComputedStyle(_e).content||"";et=et.replace(/^"/,"").replace(/"$/,""),et.split(";").forEach(function(nt){var it=nt.split(":"),at=_slicedToArray(it,2),st=at[0],lt=at[1];cachePathMap[st]=lt});var tt=document.querySelector("style[".concat(ATTR_CACHE_MAP,"]"));if(tt){var rt;fromCSSFile=!1,(rt=tt.parentNode)===null||rt===void 0||rt.removeChild(tt)}document.body.removeChild(_e)}}function existPath(_e){return prepare(),!!cachePathMap[_e]}function getStyleAndHash(_e){var et=cachePathMap[_e],tt=null;if(et&&canUseDom())if(fromCSSFile)tt=CSS_FILE_STYLE;else{var rt=document.querySelector("style[".concat(ATTR_MARK,'="').concat(cachePathMap[_e],'"]'));rt?tt=rt.innerHTML:delete cachePathMap[_e]}return[tt,et]}var isClientSide=canUseDom(),SKIP_CHECK="_skip_check_",MULTI_VALUE="_multi_value_";function normalizeStyle(_e){var et=serialize(compile(_e),stringify$1);return et.replace(/\{%%%\:[^;];}/g,";")}function isCompoundCSSProperty(_e){return _typeof$1(_e)==="object"&&_e&&(SKIP_CHECK in _e||MULTI_VALUE in _e)}function injectSelectorHash(_e,et,tt){if(!et)return _e;var rt=".".concat(et),nt=tt==="low"?":where(".concat(rt,")"):rt,it=_e.split(",").map(function(at){var st,lt=at.trim().split(/\s+/),dt=lt[0]||"",ht=((st=dt.match(/^\w+/))===null||st===void 0?void 0:st[0])||"";return dt="".concat(ht).concat(nt).concat(dt.slice(ht.length)),[dt].concat(_toConsumableArray(lt.slice(1))).join(" ")});return it.join(",")}var parseStyle=function _e(et){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},rt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},nt=rt.root,it=rt.injectHash,at=rt.parentSelectors,st=tt.hashId,lt=tt.layer;tt.path;var dt=tt.hashPriority,ht=tt.transformers,pt=ht===void 0?[]:ht;tt.linters;var mt="",gt={};function vt(Et){var $t=Et.getName(st);if(!gt[$t]){var Pt=_e(Et.style,tt,{root:!1,parentSelectors:at}),kt=_slicedToArray(Pt,1),Lt=kt[0];gt[$t]="@keyframes ".concat(Et.getName(st)).concat(Lt)}}function xt(Et){var $t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Et.forEach(function(Pt){Array.isArray(Pt)?xt(Pt,$t):Pt&&$t.push(Pt)}),$t}var yt=xt(Array.isArray(et)?et:[et]);if(yt.forEach(function(Et){var $t=typeof Et=="string"&&!nt?{}:Et;if(typeof $t=="string")mt+="".concat($t,` +`);else if($t._keyframe)vt($t);else{var Pt=pt.reduce(function(kt,Lt){var jt;return(Lt==null||(jt=Lt.visit)===null||jt===void 0?void 0:jt.call(Lt,kt))||kt},$t);Object.keys(Pt).forEach(function(kt){var Lt=Pt[kt];if(_typeof$1(Lt)==="object"&&Lt&&(kt!=="animationName"||!Lt._keyframe)&&!isCompoundCSSProperty(Lt)){var jt=!1,qt=kt.trim(),Dt=!1;(nt||it)&&st?qt.startsWith("@")?jt=!0:qt=injectSelectorHash(kt,st,dt):nt&&!st&&(qt==="&"||qt==="")&&(qt="",Dt=!0);var Ht=_e(Lt,tt,{root:Dt,injectHash:jt,parentSelectors:[].concat(_toConsumableArray(at),[qt])}),Xt=_slicedToArray(Ht,2),Mt=Xt[0],_t=Xt[1];gt=_objectSpread2(_objectSpread2({},gt),_t),mt+="".concat(qt).concat(Mt)}else{let Bt=function(Ot,Ut){var Wt=Ot.replace(/[A-Z]/g,function(St){return"-".concat(St.toLowerCase())}),Ct=Ut;!unitlessKeys[Ot]&&typeof Ct=="number"&&Ct!==0&&(Ct="".concat(Ct,"px")),Ot==="animationName"&&Ut!==null&&Ut!==void 0&&Ut._keyframe&&(vt(Ut),Ct=Ut.getName(st)),mt+="".concat(Wt,":").concat(Ct,";")};var At,Tt=(At=Lt?.value)!==null&&At!==void 0?At:Lt;_typeof$1(Lt)==="object"&&Lt!==null&&Lt!==void 0&&Lt[MULTI_VALUE]&&Array.isArray(Tt)?Tt.forEach(function(Ot){Bt(kt,Ot)}):Bt(kt,Tt)}})}}),!nt)mt="{".concat(mt,"}");else if(lt&&supportLayer()){var bt=lt.split(","),wt=bt[bt.length-1].trim();mt="@layer ".concat(wt," {").concat(mt,"}"),bt.length>1&&(mt="@layer ".concat(lt,"{%%%:%}").concat(mt))}return[mt,gt]};function uniqueHash(_e,et){return murmur2("".concat(_e.join("%")).concat(et))}function Empty(){return null}function useStyleRegister(_e,et){var tt=_e.token,rt=_e.path,nt=_e.hashId,it=_e.layer,at=_e.nonce,st=_e.clientOnly,lt=_e.order,dt=lt===void 0?0:lt,ht=reactExports.useContext(StyleContext$1),pt=ht.autoClear;ht.mock;var mt=ht.defaultCache,gt=ht.hashPriority,vt=ht.container,xt=ht.ssrInline,yt=ht.transformers,bt=ht.linters,wt=ht.cache,Et=tt._tokenKey,$t=[Et].concat(_toConsumableArray(rt)),Pt=isClientSide,kt=useGlobalCache("style",$t,function(){var Ht=$t.join("|");if(existPath(Ht)){var Xt=getStyleAndHash(Ht),Mt=_slicedToArray(Xt,2),_t=Mt[0],At=Mt[1];if(_t)return[_t,Et,At,{},st,dt]}var Tt=et(),Bt=parseStyle(Tt,{hashId:nt,hashPriority:gt,layer:it,path:rt.join("-"),transformers:yt,linters:bt}),Ot=_slicedToArray(Bt,2),Ut=Ot[0],Wt=Ot[1],Ct=normalizeStyle(Ut),St=uniqueHash($t,Ct);return[Ct,Et,St,Wt,st,dt]},function(Ht,Xt){var Mt=_slicedToArray(Ht,3),_t=Mt[2];(Xt||pt)&&isClientSide&&removeCSS(_t,{mark:ATTR_MARK})},function(Ht){var Xt=_slicedToArray(Ht,4),Mt=Xt[0];Xt[1];var _t=Xt[2],At=Xt[3];if(Pt&&Mt!==CSS_FILE_STYLE){var Tt={mark:ATTR_MARK,prepend:"queue",attachTo:vt,priority:dt},Bt=typeof at=="function"?at():at;Bt&&(Tt.csp={nonce:Bt});var Ot=updateCSS(Mt,_t,Tt);Ot[CSS_IN_JS_INSTANCE]=wt.instanceId,Ot.setAttribute(ATTR_TOKEN,Et),Object.keys(At).forEach(function(Ut){updateCSS(normalizeStyle(At[Ut]),"_effect-".concat(Ut),Tt)})}}),Lt=_slicedToArray(kt,3),jt=Lt[0],qt=Lt[1],Dt=Lt[2];return function(Ht){var Xt;if(!xt||Pt||!mt)Xt=reactExports.createElement(Empty,null);else{var Mt;Xt=reactExports.createElement("style",_extends$3({},(Mt={},_defineProperty$1(Mt,ATTR_TOKEN,qt),_defineProperty$1(Mt,ATTR_MARK,Dt),Mt),{dangerouslySetInnerHTML:{__html:jt}}))}return reactExports.createElement(reactExports.Fragment,null,Xt,Ht)}}var Keyframe=function(){function _e(et,tt){_classCallCheck$1(this,_e),_defineProperty$1(this,"name",void 0),_defineProperty$1(this,"style",void 0),_defineProperty$1(this,"_keyframe",!0),this.name=et,this.style=tt}return _createClass$1(_e,[{key:"getName",value:function(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return tt?"".concat(tt,"-").concat(this.name):this.name}}]),_e}();function noSplit(_e){return _e.notSplit=!0,_e}noSplit(["borderTop","borderBottom"]),noSplit(["borderTop"]),noSplit(["borderBottom"]),noSplit(["borderLeft","borderRight"]),noSplit(["borderLeft"]),noSplit(["borderRight"]);var IconContext=reactExports.createContext({});const Context$2=IconContext;function _toArray(_e){return _arrayWithHoles(_e)||_iterableToArray(_e)||_unsupportedIterableToArray(_e)||_nonIterableRest()}function get(_e,et){for(var tt=_e,rt=0;rt3&&arguments[3]!==void 0?arguments[3]:!1;return et.length&&rt&&tt===void 0&&!get(_e,et.slice(0,-1))?_e:internalSet(_e,et,tt,rt)}function isObject(_e){return _typeof$1(_e)==="object"&&_e!==null&&Object.getPrototypeOf(_e)===Object.prototype}function createEmpty(_e){return Array.isArray(_e)?[]:{}}var keys=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function merge$1(){for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];var rt=createEmpty(et[0]);return et.forEach(function(nt){function it(at,st){var lt=new Set(st),dt=get(nt,at),ht=Array.isArray(dt);if(ht||isObject(dt)){if(!lt.has(dt)){lt.add(dt);var pt=get(rt,at);ht?rt=set(rt,at,[]):(!pt||_typeof$1(pt)!=="object")&&(rt=set(rt,at,createEmpty(dt))),keys(dt).forEach(function(mt){it([].concat(_toConsumableArray(at),[mt]),lt)})}}else rt=set(rt,at,dt)}it([])}),rt}const WarningContext=reactExports.createContext({}),ValidateMessagesContext=reactExports.createContext(void 0),enUS$1={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var locale$2={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};const locale$1={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},TimePicker=locale$1,locale={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},locale$2),timePickerLocale:Object.assign({},TimePicker)},enUS=locale,typeTemplate$1="${label} is not a valid ${type}",localeValues={locale:"en",Pagination:enUS$1,DatePicker:enUS,TimePicker,Calendar:enUS,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:typeTemplate$1,method:typeTemplate$1,array:typeTemplate$1,object:typeTemplate$1,number:typeTemplate$1,date:typeTemplate$1,boolean:typeTemplate$1,integer:typeTemplate$1,float:typeTemplate$1,regexp:typeTemplate$1,email:typeTemplate$1,url:typeTemplate$1,hex:typeTemplate$1},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh"},ColorPicker:{presetEmpty:"Empty"}},defaultLocale=localeValues;let runtimeLocale=Object.assign({},defaultLocale.Modal),localeList=[];const generateLocale=()=>localeList.reduce((_e,et)=>Object.assign(Object.assign({},_e),et),defaultLocale.Modal);function changeConfirmLocale(_e){if(_e){const et=Object.assign({},_e);return localeList.push(et),runtimeLocale=generateLocale(),()=>{localeList=localeList.filter(tt=>tt!==et),runtimeLocale=generateLocale()}}runtimeLocale=Object.assign({},defaultLocale.Modal)}function getConfirmLocale(){return runtimeLocale}const LocaleContext=reactExports.createContext(void 0),LocaleContext$1=LocaleContext,useLocale=(_e,et)=>{const tt=reactExports.useContext(LocaleContext$1),rt=reactExports.useMemo(()=>{var it;const at=et||defaultLocale[_e],st=(it=tt?.[_e])!==null&&it!==void 0?it:{};return Object.assign(Object.assign({},typeof at=="function"?at():at),st||{})},[_e,et,tt]),nt=reactExports.useMemo(()=>{const it=tt?.locale;return tt?.exist&&!it?defaultLocale.locale:it},[tt]);return[rt,nt]},useLocale$1=useLocale,ANT_MARK="internalMark",LocaleProvider=_e=>{const{locale:et={},children:tt,_ANT_MARK__:rt}=_e;reactExports.useEffect(()=>changeConfirmLocale(et&&et.Modal),[et]);const nt=reactExports.useMemo(()=>Object.assign(Object.assign({},et),{exist:!0}),[et]);return reactExports.createElement(LocaleContext$1.Provider,{value:nt},tt)},LocaleProvider$1=LocaleProvider;function bound01(_e,et){isOnePointZero(_e)&&(_e="100%");var tt=isPercentage(_e);return _e=et===360?_e:Math.min(et,Math.max(0,parseFloat(_e))),tt&&(_e=parseInt(String(_e*et),10)/100),Math.abs(_e-et)<1e-6?1:(et===360?_e=(_e<0?_e%et+et:_e%et)/parseFloat(String(et)):_e=_e%et/parseFloat(String(et)),_e)}function clamp01(_e){return Math.min(1,Math.max(0,_e))}function isOnePointZero(_e){return typeof _e=="string"&&_e.indexOf(".")!==-1&&parseFloat(_e)===1}function isPercentage(_e){return typeof _e=="string"&&_e.indexOf("%")!==-1}function boundAlpha(_e){return _e=parseFloat(_e),(isNaN(_e)||_e<0||_e>1)&&(_e=1),_e}function convertToPercentage(_e){return _e<=1?"".concat(Number(_e)*100,"%"):_e}function pad2(_e){return _e.length===1?"0"+_e:String(_e)}function rgbToRgb(_e,et,tt){return{r:bound01(_e,255)*255,g:bound01(et,255)*255,b:bound01(tt,255)*255}}function rgbToHsl(_e,et,tt){_e=bound01(_e,255),et=bound01(et,255),tt=bound01(tt,255);var rt=Math.max(_e,et,tt),nt=Math.min(_e,et,tt),it=0,at=0,st=(rt+nt)/2;if(rt===nt)at=0,it=0;else{var lt=rt-nt;switch(at=st>.5?lt/(2-rt-nt):lt/(rt+nt),rt){case _e:it=(et-tt)/lt+(et1&&(tt-=1),tt<1/6?_e+(et-_e)*(6*tt):tt<1/2?et:tt<2/3?_e+(et-_e)*(2/3-tt)*6:_e}function hslToRgb(_e,et,tt){var rt,nt,it;if(_e=bound01(_e,360),et=bound01(et,100),tt=bound01(tt,100),et===0)nt=tt,it=tt,rt=tt;else{var at=tt<.5?tt*(1+et):tt+et-tt*et,st=2*tt-at;rt=hue2rgb(st,at,_e+1/3),nt=hue2rgb(st,at,_e),it=hue2rgb(st,at,_e-1/3)}return{r:rt*255,g:nt*255,b:it*255}}function rgbToHsv(_e,et,tt){_e=bound01(_e,255),et=bound01(et,255),tt=bound01(tt,255);var rt=Math.max(_e,et,tt),nt=Math.min(_e,et,tt),it=0,at=rt,st=rt-nt,lt=rt===0?0:st/rt;if(rt===nt)it=0;else{switch(rt){case _e:it=(et-tt)/st+(et>16,g:(_e&65280)>>8,b:_e&255}}var names={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function inputToRGB(_e){var et={r:0,g:0,b:0},tt=1,rt=null,nt=null,it=null,at=!1,st=!1;return typeof _e=="string"&&(_e=stringInputToObject(_e)),typeof _e=="object"&&(isValidCSSUnit(_e.r)&&isValidCSSUnit(_e.g)&&isValidCSSUnit(_e.b)?(et=rgbToRgb(_e.r,_e.g,_e.b),at=!0,st=String(_e.r).substr(-1)==="%"?"prgb":"rgb"):isValidCSSUnit(_e.h)&&isValidCSSUnit(_e.s)&&isValidCSSUnit(_e.v)?(rt=convertToPercentage(_e.s),nt=convertToPercentage(_e.v),et=hsvToRgb(_e.h,rt,nt),at=!0,st="hsv"):isValidCSSUnit(_e.h)&&isValidCSSUnit(_e.s)&&isValidCSSUnit(_e.l)&&(rt=convertToPercentage(_e.s),it=convertToPercentage(_e.l),et=hslToRgb(_e.h,rt,it),at=!0,st="hsl"),Object.prototype.hasOwnProperty.call(_e,"a")&&(tt=_e.a)),tt=boundAlpha(tt),{ok:at,format:_e.format||st,r:Math.min(255,Math.max(et.r,0)),g:Math.min(255,Math.max(et.g,0)),b:Math.min(255,Math.max(et.b,0)),a:tt}}var CSS_INTEGER="[-\\+]?\\d+%?",CSS_NUMBER="[-\\+]?\\d*\\.\\d+%?",CSS_UNIT="(?:".concat(CSS_NUMBER,")|(?:").concat(CSS_INTEGER,")"),PERMISSIVE_MATCH3="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),PERMISSIVE_MATCH4="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),matchers={CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function stringInputToObject(_e){if(_e=_e.trim().toLowerCase(),_e.length===0)return!1;var et=!1;if(names[_e])_e=names[_e],et=!0;else if(_e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var tt=matchers.rgb.exec(_e);return tt?{r:tt[1],g:tt[2],b:tt[3]}:(tt=matchers.rgba.exec(_e),tt?{r:tt[1],g:tt[2],b:tt[3],a:tt[4]}:(tt=matchers.hsl.exec(_e),tt?{h:tt[1],s:tt[2],l:tt[3]}:(tt=matchers.hsla.exec(_e),tt?{h:tt[1],s:tt[2],l:tt[3],a:tt[4]}:(tt=matchers.hsv.exec(_e),tt?{h:tt[1],s:tt[2],v:tt[3]}:(tt=matchers.hsva.exec(_e),tt?{h:tt[1],s:tt[2],v:tt[3],a:tt[4]}:(tt=matchers.hex8.exec(_e),tt?{r:parseIntFromHex(tt[1]),g:parseIntFromHex(tt[2]),b:parseIntFromHex(tt[3]),a:convertHexToDecimal(tt[4]),format:et?"name":"hex8"}:(tt=matchers.hex6.exec(_e),tt?{r:parseIntFromHex(tt[1]),g:parseIntFromHex(tt[2]),b:parseIntFromHex(tt[3]),format:et?"name":"hex"}:(tt=matchers.hex4.exec(_e),tt?{r:parseIntFromHex(tt[1]+tt[1]),g:parseIntFromHex(tt[2]+tt[2]),b:parseIntFromHex(tt[3]+tt[3]),a:convertHexToDecimal(tt[4]+tt[4]),format:et?"name":"hex8"}:(tt=matchers.hex3.exec(_e),tt?{r:parseIntFromHex(tt[1]+tt[1]),g:parseIntFromHex(tt[2]+tt[2]),b:parseIntFromHex(tt[3]+tt[3]),format:et?"name":"hex"}:!1)))))))))}function isValidCSSUnit(_e){return!!matchers.CSS_UNIT.exec(String(_e))}var TinyColor=function(){function _e(et,tt){et===void 0&&(et=""),tt===void 0&&(tt={});var rt;if(et instanceof _e)return et;typeof et=="number"&&(et=numberInputToObject(et)),this.originalInput=et;var nt=inputToRGB(et);this.originalInput=et,this.r=nt.r,this.g=nt.g,this.b=nt.b,this.a=nt.a,this.roundA=Math.round(100*this.a)/100,this.format=(rt=tt.format)!==null&&rt!==void 0?rt:nt.format,this.gradientType=tt.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=nt.ok}return _e.prototype.isDark=function(){return this.getBrightness()<128},_e.prototype.isLight=function(){return!this.isDark()},_e.prototype.getBrightness=function(){var et=this.toRgb();return(et.r*299+et.g*587+et.b*114)/1e3},_e.prototype.getLuminance=function(){var et=this.toRgb(),tt,rt,nt,it=et.r/255,at=et.g/255,st=et.b/255;return it<=.03928?tt=it/12.92:tt=Math.pow((it+.055)/1.055,2.4),at<=.03928?rt=at/12.92:rt=Math.pow((at+.055)/1.055,2.4),st<=.03928?nt=st/12.92:nt=Math.pow((st+.055)/1.055,2.4),.2126*tt+.7152*rt+.0722*nt},_e.prototype.getAlpha=function(){return this.a},_e.prototype.setAlpha=function(et){return this.a=boundAlpha(et),this.roundA=Math.round(100*this.a)/100,this},_e.prototype.isMonochrome=function(){var et=this.toHsl().s;return et===0},_e.prototype.toHsv=function(){var et=rgbToHsv(this.r,this.g,this.b);return{h:et.h*360,s:et.s,v:et.v,a:this.a}},_e.prototype.toHsvString=function(){var et=rgbToHsv(this.r,this.g,this.b),tt=Math.round(et.h*360),rt=Math.round(et.s*100),nt=Math.round(et.v*100);return this.a===1?"hsv(".concat(tt,", ").concat(rt,"%, ").concat(nt,"%)"):"hsva(".concat(tt,", ").concat(rt,"%, ").concat(nt,"%, ").concat(this.roundA,")")},_e.prototype.toHsl=function(){var et=rgbToHsl(this.r,this.g,this.b);return{h:et.h*360,s:et.s,l:et.l,a:this.a}},_e.prototype.toHslString=function(){var et=rgbToHsl(this.r,this.g,this.b),tt=Math.round(et.h*360),rt=Math.round(et.s*100),nt=Math.round(et.l*100);return this.a===1?"hsl(".concat(tt,", ").concat(rt,"%, ").concat(nt,"%)"):"hsla(".concat(tt,", ").concat(rt,"%, ").concat(nt,"%, ").concat(this.roundA,")")},_e.prototype.toHex=function(et){return et===void 0&&(et=!1),rgbToHex(this.r,this.g,this.b,et)},_e.prototype.toHexString=function(et){return et===void 0&&(et=!1),"#"+this.toHex(et)},_e.prototype.toHex8=function(et){return et===void 0&&(et=!1),rgbaToHex(this.r,this.g,this.b,this.a,et)},_e.prototype.toHex8String=function(et){return et===void 0&&(et=!1),"#"+this.toHex8(et)},_e.prototype.toHexShortString=function(et){return et===void 0&&(et=!1),this.a===1?this.toHexString(et):this.toHex8String(et)},_e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},_e.prototype.toRgbString=function(){var et=Math.round(this.r),tt=Math.round(this.g),rt=Math.round(this.b);return this.a===1?"rgb(".concat(et,", ").concat(tt,", ").concat(rt,")"):"rgba(".concat(et,", ").concat(tt,", ").concat(rt,", ").concat(this.roundA,")")},_e.prototype.toPercentageRgb=function(){var et=function(tt){return"".concat(Math.round(bound01(tt,255)*100),"%")};return{r:et(this.r),g:et(this.g),b:et(this.b),a:this.a}},_e.prototype.toPercentageRgbString=function(){var et=function(tt){return Math.round(bound01(tt,255)*100)};return this.a===1?"rgb(".concat(et(this.r),"%, ").concat(et(this.g),"%, ").concat(et(this.b),"%)"):"rgba(".concat(et(this.r),"%, ").concat(et(this.g),"%, ").concat(et(this.b),"%, ").concat(this.roundA,")")},_e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var et="#"+rgbToHex(this.r,this.g,this.b,!1),tt=0,rt=Object.entries(names);tt=0,it=!tt&&nt&&(et.startsWith("hex")||et==="name");return it?et==="name"&&this.a===0?this.toName():this.toRgbString():(et==="rgb"&&(rt=this.toRgbString()),et==="prgb"&&(rt=this.toPercentageRgbString()),(et==="hex"||et==="hex6")&&(rt=this.toHexString()),et==="hex3"&&(rt=this.toHexString(!0)),et==="hex4"&&(rt=this.toHex8String(!0)),et==="hex8"&&(rt=this.toHex8String()),et==="name"&&(rt=this.toName()),et==="hsl"&&(rt=this.toHslString()),et==="hsv"&&(rt=this.toHsvString()),rt||this.toHexString())},_e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},_e.prototype.clone=function(){return new _e(this.toString())},_e.prototype.lighten=function(et){et===void 0&&(et=10);var tt=this.toHsl();return tt.l+=et/100,tt.l=clamp01(tt.l),new _e(tt)},_e.prototype.brighten=function(et){et===void 0&&(et=10);var tt=this.toRgb();return tt.r=Math.max(0,Math.min(255,tt.r-Math.round(255*-(et/100)))),tt.g=Math.max(0,Math.min(255,tt.g-Math.round(255*-(et/100)))),tt.b=Math.max(0,Math.min(255,tt.b-Math.round(255*-(et/100)))),new _e(tt)},_e.prototype.darken=function(et){et===void 0&&(et=10);var tt=this.toHsl();return tt.l-=et/100,tt.l=clamp01(tt.l),new _e(tt)},_e.prototype.tint=function(et){return et===void 0&&(et=10),this.mix("white",et)},_e.prototype.shade=function(et){return et===void 0&&(et=10),this.mix("black",et)},_e.prototype.desaturate=function(et){et===void 0&&(et=10);var tt=this.toHsl();return tt.s-=et/100,tt.s=clamp01(tt.s),new _e(tt)},_e.prototype.saturate=function(et){et===void 0&&(et=10);var tt=this.toHsl();return tt.s+=et/100,tt.s=clamp01(tt.s),new _e(tt)},_e.prototype.greyscale=function(){return this.desaturate(100)},_e.prototype.spin=function(et){var tt=this.toHsl(),rt=(tt.h+et)%360;return tt.h=rt<0?360+rt:rt,new _e(tt)},_e.prototype.mix=function(et,tt){tt===void 0&&(tt=50);var rt=this.toRgb(),nt=new _e(et).toRgb(),it=tt/100,at={r:(nt.r-rt.r)*it+rt.r,g:(nt.g-rt.g)*it+rt.g,b:(nt.b-rt.b)*it+rt.b,a:(nt.a-rt.a)*it+rt.a};return new _e(at)},_e.prototype.analogous=function(et,tt){et===void 0&&(et=6),tt===void 0&&(tt=30);var rt=this.toHsl(),nt=360/tt,it=[this];for(rt.h=(rt.h-(nt*et>>1)+720)%360;--et;)rt.h=(rt.h+nt)%360,it.push(new _e(rt));return it},_e.prototype.complement=function(){var et=this.toHsl();return et.h=(et.h+180)%360,new _e(et)},_e.prototype.monochromatic=function(et){et===void 0&&(et=6);for(var tt=this.toHsv(),rt=tt.h,nt=tt.s,it=tt.v,at=[],st=1/et;et--;)at.push(new _e({h:rt,s:nt,v:it})),it=(it+st)%1;return at},_e.prototype.splitcomplement=function(){var et=this.toHsl(),tt=et.h;return[this,new _e({h:(tt+72)%360,s:et.s,l:et.l}),new _e({h:(tt+216)%360,s:et.s,l:et.l})]},_e.prototype.onBackground=function(et){var tt=this.toRgb(),rt=new _e(et).toRgb(),nt=tt.a+rt.a*(1-tt.a);return new _e({r:(tt.r*tt.a+rt.r*rt.a*(1-tt.a))/nt,g:(tt.g*tt.a+rt.g*rt.a*(1-tt.a))/nt,b:(tt.b*tt.a+rt.b*rt.a*(1-tt.a))/nt,a:nt})},_e.prototype.triad=function(){return this.polyad(3)},_e.prototype.tetrad=function(){return this.polyad(4)},_e.prototype.polyad=function(et){for(var tt=this.toHsl(),rt=tt.h,nt=[this],it=360/et,at=1;at=60&&Math.round(_e.h)<=240?rt=tt?Math.round(_e.h)-hueStep*et:Math.round(_e.h)+hueStep*et:rt=tt?Math.round(_e.h)+hueStep*et:Math.round(_e.h)-hueStep*et,rt<0?rt+=360:rt>=360&&(rt-=360),rt}function getSaturation(_e,et,tt){if(_e.h===0&&_e.s===0)return _e.s;var rt;return tt?rt=_e.s-saturationStep*et:et===darkColorCount?rt=_e.s+saturationStep:rt=_e.s+saturationStep2*et,rt>1&&(rt=1),tt&&et===lightColorCount&&rt>.1&&(rt=.1),rt<.06&&(rt=.06),Number(rt.toFixed(2))}function getValue$1(_e,et,tt){var rt;return tt?rt=_e.v+brightnessStep1*et:rt=_e.v-brightnessStep2*et,rt>1&&(rt=1),Number(rt.toFixed(2))}function generate$1(_e){for(var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tt=[],rt=inputToRGB(_e),nt=lightColorCount;nt>0;nt-=1){var it=toHsv(rt),at=toHex(inputToRGB({h:getHue(it,nt,!0),s:getSaturation(it,nt,!0),v:getValue$1(it,nt,!0)}));tt.push(at)}tt.push(toHex(rt));for(var st=1;st<=darkColorCount;st+=1){var lt=toHsv(rt),dt=toHex(inputToRGB({h:getHue(lt,st),s:getSaturation(lt,st),v:getValue$1(lt,st)}));tt.push(dt)}return et.theme==="dark"?darkColorMap.map(function(ht){var pt=ht.index,mt=ht.opacity,gt=toHex(mix(inputToRGB(et.backgroundColor||"#141414"),inputToRGB(tt[pt]),mt*100));return gt}):tt}var presetPrimaryColors={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},presetPalettes={},presetDarkPalettes={};Object.keys(presetPrimaryColors).forEach(function(_e){presetPalettes[_e]=generate$1(presetPrimaryColors[_e]),presetPalettes[_e].primary=presetPalettes[_e][5],presetDarkPalettes[_e]=generate$1(presetPrimaryColors[_e],{theme:"dark",backgroundColor:"#141414"}),presetDarkPalettes[_e].primary=presetDarkPalettes[_e][5]});var blue=presetPalettes.blue;const genControlHeight=_e=>{const{controlHeight:et}=_e;return{controlHeightSM:et*.75,controlHeightXS:et*.5,controlHeightLG:et*1.25}},genControlHeight$1=genControlHeight;function genSizeMapToken(_e){const{sizeUnit:et,sizeStep:tt}=_e;return{sizeXXL:et*(tt+8),sizeXL:et*(tt+4),sizeLG:et*(tt+2),sizeMD:et*(tt+1),sizeMS:et*tt,size:et*tt,sizeSM:et*(tt-1),sizeXS:et*(tt-2),sizeXXS:et*(tt-3)}}const defaultPresetColors={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},seedToken=Object.assign(Object.assign({},defaultPresetColors),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, +'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', +'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),seedToken$1=seedToken;function genColorMapToken(_e,et){let{generateColorPalettes:tt,generateNeutralColorPalettes:rt}=et;const{colorSuccess:nt,colorWarning:it,colorError:at,colorInfo:st,colorPrimary:lt,colorBgBase:dt,colorTextBase:ht}=_e,pt=tt(lt),mt=tt(nt),gt=tt(it),vt=tt(at),xt=tt(st),yt=rt(dt,ht),bt=_e.colorLink||_e.colorInfo,wt=tt(bt);return Object.assign(Object.assign({},yt),{colorPrimaryBg:pt[1],colorPrimaryBgHover:pt[2],colorPrimaryBorder:pt[3],colorPrimaryBorderHover:pt[4],colorPrimaryHover:pt[5],colorPrimary:pt[6],colorPrimaryActive:pt[7],colorPrimaryTextHover:pt[8],colorPrimaryText:pt[9],colorPrimaryTextActive:pt[10],colorSuccessBg:mt[1],colorSuccessBgHover:mt[2],colorSuccessBorder:mt[3],colorSuccessBorderHover:mt[4],colorSuccessHover:mt[4],colorSuccess:mt[6],colorSuccessActive:mt[7],colorSuccessTextHover:mt[8],colorSuccessText:mt[9],colorSuccessTextActive:mt[10],colorErrorBg:vt[1],colorErrorBgHover:vt[2],colorErrorBorder:vt[3],colorErrorBorderHover:vt[4],colorErrorHover:vt[5],colorError:vt[6],colorErrorActive:vt[7],colorErrorTextHover:vt[8],colorErrorText:vt[9],colorErrorTextActive:vt[10],colorWarningBg:gt[1],colorWarningBgHover:gt[2],colorWarningBorder:gt[3],colorWarningBorderHover:gt[4],colorWarningHover:gt[4],colorWarning:gt[6],colorWarningActive:gt[7],colorWarningTextHover:gt[8],colorWarningText:gt[9],colorWarningTextActive:gt[10],colorInfoBg:xt[1],colorInfoBgHover:xt[2],colorInfoBorder:xt[3],colorInfoBorderHover:xt[4],colorInfoHover:xt[4],colorInfo:xt[6],colorInfoActive:xt[7],colorInfoTextHover:xt[8],colorInfoText:xt[9],colorInfoTextActive:xt[10],colorLinkHover:wt[4],colorLink:wt[6],colorLinkActive:wt[7],colorBgMask:new TinyColor("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const genRadius=_e=>{let et=_e,tt=_e,rt=_e,nt=_e;return _e<6&&_e>=5?et=_e+1:_e<16&&_e>=6?et=_e+2:_e>=16&&(et=16),_e<7&&_e>=5?tt=4:_e<8&&_e>=7?tt=5:_e<14&&_e>=8?tt=6:_e<16&&_e>=14?tt=7:_e>=16&&(tt=8),_e<6&&_e>=2?rt=1:_e>=6&&(rt=2),_e>4&&_e<8?nt=4:_e>=8&&(nt=6),{borderRadius:_e,borderRadiusXS:rt,borderRadiusSM:tt,borderRadiusLG:et,borderRadiusOuter:nt}},genRadius$1=genRadius;function genCommonMapToken(_e){const{motionUnit:et,motionBase:tt,borderRadius:rt,lineWidth:nt}=_e;return Object.assign({motionDurationFast:`${(tt+et).toFixed(1)}s`,motionDurationMid:`${(tt+et*2).toFixed(1)}s`,motionDurationSlow:`${(tt+et*3).toFixed(1)}s`,lineWidthBold:nt+1},genRadius$1(rt))}const getAlphaColor$1=(_e,et)=>new TinyColor(_e).setAlpha(et).toRgbString(),getSolidColor=(_e,et)=>new TinyColor(_e).darken(et).toHexString(),generateColorPalettes=_e=>{const et=generate$1(_e);return{1:et[0],2:et[1],3:et[2],4:et[3],5:et[4],6:et[5],7:et[6],8:et[4],9:et[5],10:et[6]}},generateNeutralColorPalettes=(_e,et)=>{const tt=_e||"#fff",rt=et||"#000";return{colorBgBase:tt,colorTextBase:rt,colorText:getAlphaColor$1(rt,.88),colorTextSecondary:getAlphaColor$1(rt,.65),colorTextTertiary:getAlphaColor$1(rt,.45),colorTextQuaternary:getAlphaColor$1(rt,.25),colorFill:getAlphaColor$1(rt,.15),colorFillSecondary:getAlphaColor$1(rt,.06),colorFillTertiary:getAlphaColor$1(rt,.04),colorFillQuaternary:getAlphaColor$1(rt,.02),colorBgLayout:getSolidColor(tt,4),colorBgContainer:getSolidColor(tt,0),colorBgElevated:getSolidColor(tt,0),colorBgSpotlight:getAlphaColor$1(rt,.85),colorBgBlur:"transparent",colorBorder:getSolidColor(tt,15),colorBorderSecondary:getSolidColor(tt,6)}};function getFontSizes(_e){const et=new Array(10).fill(null).map((tt,rt)=>{const nt=rt-1,it=_e*Math.pow(2.71828,nt/5),at=rt>1?Math.floor(it):Math.ceil(it);return Math.floor(at/2)*2});return et[1]=_e,et.map(tt=>{const rt=tt+8;return{size:tt,lineHeight:rt/tt}})}const genFontMapToken=_e=>{const et=getFontSizes(_e),tt=et.map(nt=>nt.size),rt=et.map(nt=>nt.lineHeight);return{fontSizeSM:tt[0],fontSize:tt[1],fontSizeLG:tt[2],fontSizeXL:tt[3],fontSizeHeading1:tt[6],fontSizeHeading2:tt[5],fontSizeHeading3:tt[4],fontSizeHeading4:tt[3],fontSizeHeading5:tt[2],lineHeight:rt[1],lineHeightLG:rt[2],lineHeightSM:rt[0],lineHeightHeading1:rt[6],lineHeightHeading2:rt[5],lineHeightHeading3:rt[4],lineHeightHeading4:rt[3],lineHeightHeading5:rt[2]}},genFontMapToken$1=genFontMapToken;function derivative(_e){const et=Object.keys(defaultPresetColors).map(tt=>{const rt=generate$1(_e[tt]);return new Array(10).fill(1).reduce((nt,it,at)=>(nt[`${tt}-${at+1}`]=rt[at],nt[`${tt}${at+1}`]=rt[at],nt),{})}).reduce((tt,rt)=>(tt=Object.assign(Object.assign({},tt),rt),tt),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},_e),et),genColorMapToken(_e,{generateColorPalettes,generateNeutralColorPalettes})),genFontMapToken$1(_e.fontSize)),genSizeMapToken(_e)),genControlHeight$1(_e)),genCommonMapToken(_e))}const defaultTheme=createTheme(derivative),defaultConfig={token:seedToken$1,hashed:!0},DesignTokenContext=React.createContext(defaultConfig),defaultIconPrefixCls="anticon",defaultGetPrefixCls=(_e,et)=>et||(_e?`ant-${_e}`:"ant"),ConfigContext=reactExports.createContext({getPrefixCls:defaultGetPrefixCls,iconPrefixCls:defaultIconPrefixCls}),dynamicStyleMark=`-ant-${Date.now()}-${Math.random()}`;function getStyle(_e,et){const tt={},rt=(at,st)=>{let lt=at.clone();return lt=st?.(lt)||lt,lt.toRgbString()},nt=(at,st)=>{const lt=new TinyColor(at),dt=generate$1(lt.toRgbString());tt[`${st}-color`]=rt(lt),tt[`${st}-color-disabled`]=dt[1],tt[`${st}-color-hover`]=dt[4],tt[`${st}-color-active`]=dt[6],tt[`${st}-color-outline`]=lt.clone().setAlpha(.2).toRgbString(),tt[`${st}-color-deprecated-bg`]=dt[0],tt[`${st}-color-deprecated-border`]=dt[2]};if(et.primaryColor){nt(et.primaryColor,"primary");const at=new TinyColor(et.primaryColor),st=generate$1(at.toRgbString());st.forEach((dt,ht)=>{tt[`primary-${ht+1}`]=dt}),tt["primary-color-deprecated-l-35"]=rt(at,dt=>dt.lighten(35)),tt["primary-color-deprecated-l-20"]=rt(at,dt=>dt.lighten(20)),tt["primary-color-deprecated-t-20"]=rt(at,dt=>dt.tint(20)),tt["primary-color-deprecated-t-50"]=rt(at,dt=>dt.tint(50)),tt["primary-color-deprecated-f-12"]=rt(at,dt=>dt.setAlpha(dt.getAlpha()*.12));const lt=new TinyColor(st[0]);tt["primary-color-active-deprecated-f-30"]=rt(lt,dt=>dt.setAlpha(dt.getAlpha()*.3)),tt["primary-color-active-deprecated-d-02"]=rt(lt,dt=>dt.darken(2))}return et.successColor&&nt(et.successColor,"success"),et.warningColor&&nt(et.warningColor,"warning"),et.errorColor&&nt(et.errorColor,"error"),et.infoColor&&nt(et.infoColor,"info"),` + :root { + ${Object.keys(tt).map(at=>`--${_e}-${at}: ${tt[at]};`).join(` +`)} + } + `.trim()}function registerTheme(_e,et){const tt=getStyle(_e,et);canUseDom()&&updateCSS(tt,`${dynamicStyleMark}-dynamic-theme`)}const DisabledContext=reactExports.createContext(!1),DisabledContextProvider=_e=>{let{children:et,disabled:tt}=_e;const rt=reactExports.useContext(DisabledContext);return reactExports.createElement(DisabledContext.Provider,{value:tt??rt},et)},SizeContext=reactExports.createContext(void 0),SizeContextProvider=_e=>{let{children:et,size:tt}=_e;const rt=reactExports.useContext(SizeContext);return reactExports.createElement(SizeContext.Provider,{value:tt||rt},et)},SizeContext$1=SizeContext;function useConfig(){const _e=reactExports.useContext(DisabledContext),et=reactExports.useContext(SizeContext$1);return{componentDisabled:_e,componentSize:et}}const version$1="5.10.0";function isStableColor(_e){return _e>=0&&_e<=255}function getAlphaColor(_e,et){const{r:tt,g:rt,b:nt,a:it}=new TinyColor(_e).toRgb();if(it<1)return _e;const{r:at,g:st,b:lt}=new TinyColor(et).toRgb();for(let dt=.01;dt<=1;dt+=.01){const ht=Math.round((tt-at*(1-dt))/dt),pt=Math.round((rt-st*(1-dt))/dt),mt=Math.round((nt-lt*(1-dt))/dt);if(isStableColor(ht)&&isStableColor(pt)&&isStableColor(mt))return new TinyColor({r:ht,g:pt,b:mt,a:Math.round(dt*100)/100}).toRgbString()}return new TinyColor({r:tt,g:rt,b:nt,a:1}).toRgbString()}var __rest$b=globalThis&&globalThis.__rest||function(_e,et){var tt={};for(var rt in _e)Object.prototype.hasOwnProperty.call(_e,rt)&&et.indexOf(rt)<0&&(tt[rt]=_e[rt]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,rt=Object.getOwnPropertySymbols(_e);nt{delete rt[mt]});const nt=Object.assign(Object.assign({},tt),rt),it=480,at=576,st=768,lt=992,dt=1200,ht=1600;if(nt.motion===!1){const mt="0s";nt.motionDurationFast=mt,nt.motionDurationMid=mt,nt.motionDurationSlow=mt}return Object.assign(Object.assign(Object.assign({},nt),{colorFillContent:nt.colorFillSecondary,colorFillContentHover:nt.colorFill,colorFillAlter:nt.colorFillQuaternary,colorBgContainerDisabled:nt.colorFillTertiary,colorBorderBg:nt.colorBgContainer,colorSplit:getAlphaColor(nt.colorBorderSecondary,nt.colorBgContainer),colorTextPlaceholder:nt.colorTextQuaternary,colorTextDisabled:nt.colorTextQuaternary,colorTextHeading:nt.colorText,colorTextLabel:nt.colorTextSecondary,colorTextDescription:nt.colorTextTertiary,colorTextLightSolid:nt.colorWhite,colorHighlight:nt.colorError,colorBgTextHover:nt.colorFillSecondary,colorBgTextActive:nt.colorFill,colorIcon:nt.colorTextTertiary,colorIconHover:nt.colorText,colorErrorOutline:getAlphaColor(nt.colorErrorBg,nt.colorBgContainer),colorWarningOutline:getAlphaColor(nt.colorWarningBg,nt.colorBgContainer),fontSizeIcon:nt.fontSizeSM,lineWidthFocus:nt.lineWidth*4,lineWidth:nt.lineWidth,controlOutlineWidth:nt.lineWidth*2,controlInteractiveSize:nt.controlHeight/2,controlItemBgHover:nt.colorFillTertiary,controlItemBgActive:nt.colorPrimaryBg,controlItemBgActiveHover:nt.colorPrimaryBgHover,controlItemBgActiveDisabled:nt.colorFill,controlTmpOutline:nt.colorFillQuaternary,controlOutline:getAlphaColor(nt.colorPrimaryBg,nt.colorBgContainer),lineType:nt.lineType,borderRadius:nt.borderRadius,borderRadiusXS:nt.borderRadiusXS,borderRadiusSM:nt.borderRadiusSM,borderRadiusLG:nt.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:nt.sizeXXS,paddingXS:nt.sizeXS,paddingSM:nt.sizeSM,padding:nt.size,paddingMD:nt.sizeMD,paddingLG:nt.sizeLG,paddingXL:nt.sizeXL,paddingContentHorizontalLG:nt.sizeLG,paddingContentVerticalLG:nt.sizeMS,paddingContentHorizontal:nt.sizeMS,paddingContentVertical:nt.sizeSM,paddingContentHorizontalSM:nt.size,paddingContentVerticalSM:nt.sizeXS,marginXXS:nt.sizeXXS,marginXS:nt.sizeXS,marginSM:nt.sizeSM,margin:nt.size,marginMD:nt.sizeMD,marginLG:nt.sizeLG,marginXL:nt.sizeXL,marginXXL:nt.sizeXXL,boxShadow:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowSecondary:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTertiary:` + 0 1px 2px 0 rgba(0, 0, 0, 0.03), + 0 1px 6px -1px rgba(0, 0, 0, 0.02), + 0 2px 4px 0 rgba(0, 0, 0, 0.02) + `,screenXS:it,screenXSMin:it,screenXSMax:at-1,screenSM:at,screenSMMin:at,screenSMMax:st-1,screenMD:st,screenMDMin:st,screenMDMax:lt-1,screenLG:lt,screenLGMin:lt,screenLGMax:dt-1,screenXL:dt,screenXLMin:dt,screenXLMax:ht-1,screenXXL:ht,screenXXLMin:ht,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:` + 0 1px 2px -2px ${new TinyColor("rgba(0, 0, 0, 0.16)").toRgbString()}, + 0 3px 6px 0 ${new TinyColor("rgba(0, 0, 0, 0.12)").toRgbString()}, + 0 5px 12px 4px ${new TinyColor("rgba(0, 0, 0, 0.09)").toRgbString()} + `,boxShadowDrawerRight:` + -6px 0 16px 0 rgba(0, 0, 0, 0.08), + -3px 0 6px -4px rgba(0, 0, 0, 0.12), + -9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerLeft:` + 6px 0 16px 0 rgba(0, 0, 0, 0.08), + 3px 0 6px -4px rgba(0, 0, 0, 0.12), + 9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerUp:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerDown:` + 0 -6px 16px 0 rgba(0, 0, 0, 0.08), + 0 -3px 6px -4px rgba(0, 0, 0, 0.12), + 0 -9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),rt)}var __rest$a=globalThis&&globalThis.__rest||function(_e,et){var tt={};for(var rt in _e)Object.prototype.hasOwnProperty.call(_e,rt)&&et.indexOf(rt)<0&&(tt[rt]=_e[rt]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,rt=Object.getOwnPropertySymbols(_e);nt{const rt=tt.getDerivativeToken(_e),{override:nt}=et,it=__rest$a(et,["override"]);let at=Object.assign(Object.assign({},rt),{override:nt});return at=formatToken(at),it&&Object.entries(it).forEach(st=>{let[lt,dt]=st;const{theme:ht}=dt,pt=__rest$a(dt,["theme"]);let mt=pt;ht&&(mt=getComputedToken(Object.assign(Object.assign({},at),pt),{override:pt},ht)),at[lt]=mt}),at};function useToken(){const{token:_e,hashed:et,theme:tt,components:rt}=React.useContext(DesignTokenContext),nt=`${version$1}-${et||""}`,it=tt||defaultTheme,[at,st]=useCacheToken(it,[seedToken$1,_e],{salt:nt,override:Object.assign({override:_e},rt),getComputedToken,formatToken});return[it,at,et?st:""]}function useEvent(_e){var et=reactExports.useRef();et.current=_e;var tt=reactExports.useCallback(function(){for(var rt,nt=arguments.length,it=new Array(nt),at=0;at1&&arguments[1]!==void 0?arguments[1]:!1;return{boxSizing:"border-box",margin:0,padding:0,color:_e.colorText,fontSize:_e.fontSize,lineHeight:_e.lineHeight,listStyle:"none",fontFamily:et?"inherit":_e.fontFamily}},resetIcon=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),clearFix=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),genLinkStyle=_e=>({a:{color:_e.colorLink,textDecoration:_e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${_e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:_e.colorLinkHover},"&:active":{color:_e.colorLinkActive},"&:active,\n &:hover":{textDecoration:_e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:_e.linkFocusDecoration,outline:0},"&[disabled]":{color:_e.colorTextDisabled,cursor:"not-allowed"}}}),genCommonStyle=(_e,et)=>{const{fontFamily:tt,fontSize:rt}=_e,nt=`[class^="${et}"], [class*=" ${et}"]`;return{[nt]:{fontFamily:tt,fontSize:rt,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[nt]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},genFocusOutline=_e=>({outline:`${_e.lineWidthFocus}px solid ${_e.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),genFocusStyle=_e=>({"&:focus-visible":Object.assign({},genFocusOutline(_e))}),enableStatistic=typeof CSSINJS_STATISTIC<"u";let recording=!0;function merge(){for(var _e=arguments.length,et=new Array(_e),tt=0;tt<_e;tt++)et[tt]=arguments[tt];if(!enableStatistic)return Object.assign.apply(Object,[{}].concat(et));recording=!1;const rt={};return et.forEach(nt=>{Object.keys(nt).forEach(at=>{Object.defineProperty(rt,at,{configurable:!0,enumerable:!0,get:()=>nt[at]})})}),recording=!0,rt}const statistic={};function noop$1(){}function statisticToken(_e){let et,tt=_e,rt=noop$1;return enableStatistic&&(et=new Set,tt=new Proxy(_e,{get(nt,it){return recording&&et.add(it),nt[it]}}),rt=(nt,it)=>{var at;statistic[nt]={global:Array.from(et),component:Object.assign(Object.assign({},(at=statistic[nt])===null||at===void 0?void 0:at.component),it)}}),{token:tt,keys:et,flush:rt}}const useResetIconStyle=(_e,et)=>{const[tt,rt]=useToken();return useStyleRegister({theme:tt,token:rt,hashId:"",path:["ant-design-icons",_e],nonce:()=>et?.nonce},()=>[{[`.${_e}`]:Object.assign(Object.assign({},resetIcon()),{[`.${_e} .${_e}-icon`]:{display:"block"}})}])},useStyle$4=useResetIconStyle;function genComponentStyleHook(_e,et,tt){let rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const nt=Array.isArray(_e)?_e:[_e,_e],[it]=nt,at=nt.join("-");return st=>{const[lt,dt,ht]=useToken(),{getPrefixCls:pt,iconPrefixCls:mt,csp:gt}=reactExports.useContext(ConfigContext),vt=pt(),xt={theme:lt,token:dt,hashId:ht,nonce:()=>gt?.nonce,clientOnly:rt.clientOnly,order:rt.order||-999};return useStyleRegister(Object.assign(Object.assign({},xt),{clientOnly:!1,path:["Shared",vt]}),()=>[{"&":genLinkStyle(dt)}]),useStyle$4(mt),[useStyleRegister(Object.assign(Object.assign({},xt),{path:[at,st,mt]}),()=>{const{token:yt,flush:bt}=statisticToken(dt),wt=Object.assign({},dt[it]);if(rt.deprecatedTokens){const{deprecatedTokens:jt}=rt;jt.forEach(qt=>{let[Dt,Ht]=qt;var Xt;(wt?.[Dt]||wt?.[Ht])&&((Xt=wt[Ht])!==null&&Xt!==void 0||(wt[Ht]=wt?.[Dt]))})}const Et=typeof tt=="function"?tt(merge(yt,wt??{})):tt,$t=Object.assign(Object.assign({},Et),wt),Pt=`.${st}`,kt=merge(yt,{componentCls:Pt,prefixCls:st,iconCls:`.${mt}`,antCls:`.${vt}`},$t),Lt=et(kt,{hashId:ht,prefixCls:st,rootPrefixCls:vt,iconPrefixCls:mt,overrideComponentToken:wt});return bt(it,$t),[rt.resetStyle===!1?null:genCommonStyle(dt,st),Lt]}),ht]}}const genSubStyleComponent=(_e,et,tt,rt)=>{const nt=genComponentStyleHook(_e,et,tt,Object.assign({resetStyle:!1,order:-998},rt));return at=>{let{prefixCls:st}=at;return nt(st),null}};function useTheme(_e,et){const tt=_e||{},rt=tt.inherit===!1||!et?defaultConfig:et;return useMemo(()=>{if(!_e)return et;const nt=Object.assign({},rt.components);return Object.keys(_e.components||{}).forEach(it=>{nt[it]=Object.assign(Object.assign({},nt[it]),_e.components[it])}),Object.assign(Object.assign(Object.assign({},rt),tt),{token:Object.assign(Object.assign({},rt.token),tt.token),components:nt})},[tt,rt],(nt,it)=>nt.some((at,st)=>{const lt=it[st];return!isEqual(at,lt,!0)}))}var _excluded$8=["children"],Context$1=reactExports.createContext({});function MotionProvider(_e){var et=_e.children,tt=_objectWithoutProperties$1(_e,_excluded$8);return reactExports.createElement(Context$1.Provider,{value:tt},et)}var DomWrapper=function(_e){_inherits$1(tt,_e);var et=_createSuper$1(tt);function tt(){return _classCallCheck$1(this,tt),et.apply(this,arguments)}return _createClass$1(tt,[{key:"render",value:function(){return this.props.children}}]),tt}(reactExports.Component),STATUS_NONE="none",STATUS_APPEAR="appear",STATUS_ENTER="enter",STATUS_LEAVE="leave",STEP_NONE="none",STEP_PREPARE="prepare",STEP_START="start",STEP_ACTIVE="active",STEP_ACTIVATED="end",STEP_PREPARED="prepared";function makePrefixMap(_e,et){var tt={};return tt[_e.toLowerCase()]=et.toLowerCase(),tt["Webkit".concat(_e)]="webkit".concat(et),tt["Moz".concat(_e)]="moz".concat(et),tt["ms".concat(_e)]="MS".concat(et),tt["O".concat(_e)]="o".concat(et.toLowerCase()),tt}function getVendorPrefixes(_e,et){var tt={animationend:makePrefixMap("Animation","AnimationEnd"),transitionend:makePrefixMap("Transition","TransitionEnd")};return _e&&("AnimationEvent"in et||delete tt.animationend.animation,"TransitionEvent"in et||delete tt.transitionend.transition),tt}var vendorPrefixes=getVendorPrefixes(canUseDom(),typeof window<"u"?window:{}),style$1={};if(canUseDom()){var _document$createEleme=document.createElement("div");style$1=_document$createEleme.style}var prefixedEventNames={};function getVendorPrefixedEventName(_e){if(prefixedEventNames[_e])return prefixedEventNames[_e];var et=vendorPrefixes[_e];if(et)for(var tt=Object.keys(et),rt=tt.length,nt=0;nt1&&arguments[1]!==void 0?arguments[1]:2;et();var it=wrapperRaf(function(){nt<=1?rt({isCanceled:function(){return it!==_e.current}}):tt(rt,nt-1)});_e.current=it}return reactExports.useEffect(function(){return function(){et()}},[]),[tt,et]};var FULL_STEP_QUEUE=[STEP_PREPARE,STEP_START,STEP_ACTIVE,STEP_ACTIVATED],SIMPLE_STEP_QUEUE=[STEP_PREPARE,STEP_PREPARED],SkipStep=!1,DoStep=!0;function isActive(_e){return _e===STEP_ACTIVE||_e===STEP_ACTIVATED}const useStepQueue=function(_e,et,tt){var rt=useSafeState(STEP_NONE),nt=_slicedToArray(rt,2),it=nt[0],at=nt[1],st=useNextFrame(),lt=_slicedToArray(st,2),dt=lt[0],ht=lt[1];function pt(){at(STEP_PREPARE,!0)}var mt=et?SIMPLE_STEP_QUEUE:FULL_STEP_QUEUE;return useIsomorphicLayoutEffect$1(function(){if(it!==STEP_NONE&&it!==STEP_ACTIVATED){var gt=mt.indexOf(it),vt=mt[gt+1],xt=tt(it);xt===SkipStep?at(vt,!0):vt&&dt(function(yt){function bt(){yt.isCanceled()||at(vt,!0)}xt===!0?bt():Promise.resolve(xt).then(bt)})}},[_e,it]),reactExports.useEffect(function(){return function(){ht()}},[]),[pt,it]};function useStatus(_e,et,tt,rt){var nt=rt.motionEnter,it=nt===void 0?!0:nt,at=rt.motionAppear,st=at===void 0?!0:at,lt=rt.motionLeave,dt=lt===void 0?!0:lt,ht=rt.motionDeadline,pt=rt.motionLeaveImmediately,mt=rt.onAppearPrepare,gt=rt.onEnterPrepare,vt=rt.onLeavePrepare,xt=rt.onAppearStart,yt=rt.onEnterStart,bt=rt.onLeaveStart,wt=rt.onAppearActive,Et=rt.onEnterActive,$t=rt.onLeaveActive,Pt=rt.onAppearEnd,kt=rt.onEnterEnd,Lt=rt.onLeaveEnd,jt=rt.onVisibleChanged,qt=useSafeState(),Dt=_slicedToArray(qt,2),Ht=Dt[0],Xt=Dt[1],Mt=useSafeState(STATUS_NONE),_t=_slicedToArray(Mt,2),At=_t[0],Tt=_t[1],Bt=useSafeState(null),Ot=_slicedToArray(Bt,2),Ut=Ot[0],Wt=Ot[1],Ct=reactExports.useRef(!1),St=reactExports.useRef(null);function Ft(){return tt()}var Vt=reactExports.useRef(!1);function Rt(){Tt(STATUS_NONE,!0),Wt(null,!0)}function Kt(wr){var gr=Ft();if(!(wr&&!wr.deadline&&wr.target!==gr)){var yr=Vt.current,Er;At===STATUS_APPEAR&&yr?Er=Pt?.(gr,wr):At===STATUS_ENTER&&yr?Er=kt?.(gr,wr):At===STATUS_LEAVE&&yr&&(Er=Lt?.(gr,wr)),At!==STATUS_NONE&&yr&&Er!==!1&&Rt()}}var Zt=useDomMotionEvents(Kt),Jt=_slicedToArray(Zt,1),rr=Jt[0],or=function(gr){var yr,Er,_r;switch(gr){case STATUS_APPEAR:return yr={},_defineProperty$1(yr,STEP_PREPARE,mt),_defineProperty$1(yr,STEP_START,xt),_defineProperty$1(yr,STEP_ACTIVE,wt),yr;case STATUS_ENTER:return Er={},_defineProperty$1(Er,STEP_PREPARE,gt),_defineProperty$1(Er,STEP_START,yt),_defineProperty$1(Er,STEP_ACTIVE,Et),Er;case STATUS_LEAVE:return _r={},_defineProperty$1(_r,STEP_PREPARE,vt),_defineProperty$1(_r,STEP_START,bt),_defineProperty$1(_r,STEP_ACTIVE,$t),_r;default:return{}}},ar=reactExports.useMemo(function(){return or(At)},[At]),ir=useStepQueue(At,!_e,function(wr){if(wr===STEP_PREPARE){var gr=ar[STEP_PREPARE];return gr?gr(Ft()):SkipStep}if(hr in ar){var yr;Wt(((yr=ar[hr])===null||yr===void 0?void 0:yr.call(ar,Ft(),null))||null)}return hr===STEP_ACTIVE&&(rr(Ft()),ht>0&&(clearTimeout(St.current),St.current=setTimeout(function(){Kt({deadline:!0})},ht))),hr===STEP_PREPARED&&Rt(),DoStep}),pr=_slicedToArray(ir,2),nr=pr[0],hr=pr[1],Ar=isActive(hr);Vt.current=Ar,useIsomorphicLayoutEffect$1(function(){Xt(et);var wr=Ct.current;Ct.current=!0;var gr;!wr&&et&&st&&(gr=STATUS_APPEAR),wr&&et&&it&&(gr=STATUS_ENTER),(wr&&!et&&dt||!wr&&pt&&!et&&dt)&&(gr=STATUS_LEAVE);var yr=or(gr);gr&&(_e||yr[STEP_PREPARE])?(Tt(gr),nr()):Tt(STATUS_NONE)},[et]),reactExports.useEffect(function(){(At===STATUS_APPEAR&&!st||At===STATUS_ENTER&&!it||At===STATUS_LEAVE&&!dt)&&Tt(STATUS_NONE)},[st,it,dt]),reactExports.useEffect(function(){return function(){Ct.current=!1,clearTimeout(St.current)}},[]);var ur=reactExports.useRef(!1);reactExports.useEffect(function(){Ht&&(ur.current=!0),Ht!==void 0&&At===STATUS_NONE&&((ur.current||Ht)&&jt?.(Ht),ur.current=!0)},[Ht,At]);var vr=Ut;return ar[STEP_PREPARE]&&hr===STEP_START&&(vr=_objectSpread2({transition:"none"},vr)),[At,hr,vr,Ht??et]}function genCSSMotion(_e){var et=_e;_typeof$1(_e)==="object"&&(et=_e.transitionSupport);function tt(nt,it){return!!(nt.motionName&&et&&it!==!1)}var rt=reactExports.forwardRef(function(nt,it){var at=nt.visible,st=at===void 0?!0:at,lt=nt.removeOnLeave,dt=lt===void 0?!0:lt,ht=nt.forceRender,pt=nt.children,mt=nt.motionName,gt=nt.leavedClassName,vt=nt.eventProps,xt=reactExports.useContext(Context$1),yt=xt.motion,bt=tt(nt,yt),wt=reactExports.useRef(),Et=reactExports.useRef();function $t(){try{return wt.current instanceof HTMLElement?wt.current:findDOMNode(Et.current)}catch{return null}}var Pt=useStatus(bt,st,$t,nt),kt=_slicedToArray(Pt,4),Lt=kt[0],jt=kt[1],qt=kt[2],Dt=kt[3],Ht=reactExports.useRef(Dt);Dt&&(Ht.current=!0);var Xt=reactExports.useCallback(function(Wt){wt.current=Wt,fillRef(it,Wt)},[it]),Mt,_t=_objectSpread2(_objectSpread2({},vt),{},{visible:st});if(!pt)Mt=null;else if(Lt===STATUS_NONE)Dt?Mt=pt(_objectSpread2({},_t),Xt):!dt&&Ht.current&>?Mt=pt(_objectSpread2(_objectSpread2({},_t),{},{className:gt}),Xt):ht||!dt&&!gt?Mt=pt(_objectSpread2(_objectSpread2({},_t),{},{style:{display:"none"}}),Xt):Mt=null;else{var At,Tt;jt===STEP_PREPARE?Tt="prepare":isActive(jt)?Tt="active":jt===STEP_START&&(Tt="start");var Bt=getTransitionName$1(mt,"".concat(Lt,"-").concat(Tt));Mt=pt(_objectSpread2(_objectSpread2({},_t),{},{className:classNames(getTransitionName$1(mt,Lt),(At={},_defineProperty$1(At,Bt,Bt&&Tt),_defineProperty$1(At,mt,typeof mt=="string"),At)),style:qt}),Xt)}if(reactExports.isValidElement(Mt)&&supportRef(Mt)){var Ot=Mt,Ut=Ot.ref;Ut||(Mt=reactExports.cloneElement(Mt,{ref:Xt}))}return reactExports.createElement(DomWrapper,{ref:Et},Mt)});return rt.displayName="CSSMotion",rt}const CSSMotion=genCSSMotion(supportTransition);var STATUS_ADD="add",STATUS_KEEP="keep",STATUS_REMOVE="remove",STATUS_REMOVED="removed";function wrapKeyToObject(_e){var et;return _e&&_typeof$1(_e)==="object"&&"key"in _e?et=_e:et={key:_e},_objectSpread2(_objectSpread2({},et),{},{key:String(et.key)})}function parseKeys(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return _e.map(wrapKeyToObject)}function diffKeys(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],tt=[],rt=0,nt=et.length,it=parseKeys(_e),at=parseKeys(et);it.forEach(function(dt){for(var ht=!1,pt=rt;pt1});return lt.forEach(function(dt){tt=tt.filter(function(ht){var pt=ht.key,mt=ht.status;return pt!==dt||mt!==STATUS_REMOVE}),tt.forEach(function(ht){ht.key===dt&&(ht.status=STATUS_KEEP)})}),tt}var _excluded$7=["component","children","onVisibleChanged","onAllRemoved"],_excluded2=["status"],MOTION_PROP_NAMES=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function genCSSMotionList(_e){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:CSSMotion,tt=function(rt){_inherits$1(it,rt);var nt=_createSuper$1(it);function it(){var at;_classCallCheck$1(this,it);for(var st=arguments.length,lt=new Array(st),dt=0;dtnull;var __rest$9=globalThis&&globalThis.__rest||function(_e,et){var tt={};for(var rt in _e)Object.prototype.hasOwnProperty.call(_e,rt)&&et.indexOf(rt)<0&&(tt[rt]=_e[rt]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,rt=Object.getOwnPropertySymbols(_e);ntet.endsWith("Color"))}const setGlobalConfig=_e=>{let{prefixCls:et,iconPrefixCls:tt,theme:rt}=_e;et!==void 0&&(globalPrefixCls=et),tt!==void 0&&(globalIconPrefixCls=tt),rt&&(isLegacyTheme(rt)?registerTheme(getGlobalPrefixCls(),rt):globalTheme=rt)},globalConfig=()=>({getPrefixCls:(_e,et)=>et||(_e?`${getGlobalPrefixCls()}-${_e}`:getGlobalPrefixCls()),getIconPrefixCls:getGlobalIconPrefixCls,getRootPrefixCls:()=>globalPrefixCls||getGlobalPrefixCls(),getTheme:()=>globalTheme}),ProviderChildren=_e=>{const{children:et,csp:tt,autoInsertSpaceInButton:rt,alert:nt,anchor:it,form:at,locale:st,componentSize:lt,direction:dt,space:ht,virtual:pt,dropdownMatchSelectWidth:mt,popupMatchSelectWidth:gt,popupOverflow:vt,legacyLocale:xt,parentContext:yt,iconPrefixCls:bt,theme:wt,componentDisabled:Et,segmented:$t,statistic:Pt,spin:kt,calendar:Lt,carousel:jt,cascader:qt,collapse:Dt,typography:Ht,checkbox:Xt,descriptions:Mt,divider:_t,drawer:At,skeleton:Tt,steps:Bt,image:Ot,layout:Ut,list:Wt,mentions:Ct,modal:St,progress:Ft,result:Vt,slider:Rt,breadcrumb:Kt,menu:Zt,pagination:Jt,input:rr,empty:or,badge:ar,radio:ir,rate:pr,switch:nr,transfer:hr,avatar:Ar,message:ur,tag:vr,table:wr,card:gr,tabs:yr,timeline:Er,timePicker:_r,upload:$r,notification:Dr,tree:kr,colorPicker:zt,datePicker:It,flex:Nt,wave:Gt,warning:er}=_e,Yt=reactExports.useCallback((Or,Tr)=>{const{prefixCls:Ir}=_e;if(Tr)return Tr;const Ur=Ir||yt.getPrefixCls("");return Or?`${Ur}-${Or}`:Ur},[yt.getPrefixCls,_e.prefixCls]),tr=bt||yt.iconPrefixCls||defaultIconPrefixCls,dr=tt||yt.csp;useStyle$4(tr,dr);const br=useTheme(wt,yt.theme),Qt={csp:dr,autoInsertSpaceInButton:rt,alert:nt,anchor:it,locale:st||xt,direction:dt,space:ht,virtual:pt,popupMatchSelectWidth:gt??mt,popupOverflow:vt,getPrefixCls:Yt,iconPrefixCls:tr,theme:br,segmented:$t,statistic:Pt,spin:kt,calendar:Lt,carousel:jt,cascader:qt,collapse:Dt,typography:Ht,checkbox:Xt,descriptions:Mt,divider:_t,drawer:At,skeleton:Tt,steps:Bt,image:Ot,input:rr,layout:Ut,list:Wt,mentions:Ct,modal:St,progress:Ft,result:Vt,slider:Rt,breadcrumb:Kt,menu:Zt,pagination:Jt,empty:or,badge:ar,radio:ir,rate:pr,switch:nr,transfer:hr,avatar:Ar,message:ur,tag:vr,table:wr,card:gr,tabs:yr,timeline:Er,timePicker:_r,upload:$r,notification:Dr,tree:kr,colorPicker:zt,datePicker:It,flex:Nt,wave:Gt,warning:er},sr=Object.assign({},yt);Object.keys(Qt).forEach(Or=>{Qt[Or]!==void 0&&(sr[Or]=Qt[Or])}),PASSED_PROPS.forEach(Or=>{const Tr=_e[Or];Tr&&(sr[Or]=Tr)});const cr=useMemo(()=>sr,sr,(Or,Tr)=>{const Ir=Object.keys(Or),Ur=Object.keys(Tr);return Ir.length!==Ur.length||Ir.some(Br=>Or[Br]!==Tr[Br])}),xr=reactExports.useMemo(()=>({prefixCls:tr,csp:dr}),[tr,dr]);let Sr=reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(PropWarning,{dropdownMatchSelectWidth:mt}),et);const Pr=reactExports.useMemo(()=>{var Or,Tr,Ir,Ur;return merge$1(((Or=defaultLocale.Form)===null||Or===void 0?void 0:Or.defaultValidateMessages)||{},((Ir=(Tr=cr.locale)===null||Tr===void 0?void 0:Tr.Form)===null||Ir===void 0?void 0:Ir.defaultValidateMessages)||{},((Ur=cr.form)===null||Ur===void 0?void 0:Ur.validateMessages)||{},at?.validateMessages||{})},[cr,at?.validateMessages]);Object.keys(Pr).length>0&&(Sr=reactExports.createElement(ValidateMessagesContext.Provider,{value:Pr},Sr)),st&&(Sr=reactExports.createElement(LocaleProvider$1,{locale:st,_ANT_MARK__:ANT_MARK},Sr)),(tr||dr)&&(Sr=reactExports.createElement(Context$2.Provider,{value:xr},Sr)),lt&&(Sr=reactExports.createElement(SizeContextProvider,{size:lt},Sr)),Sr=reactExports.createElement(MotionWrapper,null,Sr);const Nr=reactExports.useMemo(()=>{const Or=br||{},{algorithm:Tr,token:Ir,components:Ur}=Or,Br=__rest$9(Or,["algorithm","token","components"]),Mr=Tr&&(!Array.isArray(Tr)||Tr.length>0)?createTheme(Tr):defaultTheme,Kr={};return Object.entries(Ur||{}).forEach(Lr=>{let[Fr,Zr]=Lr;const Rr=Object.assign({},Zr);"algorithm"in Rr&&(Rr.algorithm===!0?Rr.theme=Mr:(Array.isArray(Rr.algorithm)||typeof Rr.algorithm=="function")&&(Rr.theme=createTheme(Rr.algorithm)),delete Rr.algorithm),Kr[Fr]=Rr}),Object.assign(Object.assign({},Br),{theme:Mr,token:Object.assign(Object.assign({},seedToken$1),Ir),components:Kr})},[br]);return wt&&(Sr=reactExports.createElement(DesignTokenContext.Provider,{value:Nr},Sr)),cr.warning&&(Sr=reactExports.createElement(WarningContext.Provider,{value:cr.warning},Sr)),Et!==void 0&&(Sr=reactExports.createElement(DisabledContextProvider,{disabled:Et},Sr)),reactExports.createElement(ConfigContext.Provider,{value:cr},Sr)},ConfigProvider=_e=>{const et=reactExports.useContext(ConfigContext),tt=reactExports.useContext(LocaleContext$1);return reactExports.createElement(ProviderChildren,Object.assign({parentContext:et,legacyLocale:tt},_e))};ConfigProvider.ConfigContext=ConfigContext;ConfigProvider.SizeContext=SizeContext$1;ConfigProvider.config=setGlobalConfig;ConfigProvider.useConfig=useConfig;Object.defineProperty(ConfigProvider,"SizeContext",{get:()=>SizeContext$1});const ConfigProvider$1=ConfigProvider;var CheckCircleFilled$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};const CheckCircleFilledSvg=CheckCircleFilled$2;function getRoot(_e){var et;return _e==null||(et=_e.getRootNode)===null||et===void 0?void 0:et.call(_e)}function inShadow(_e){return getRoot(_e)instanceof ShadowRoot}function getShadowRoot(_e){return inShadow(_e)?getRoot(_e):null}function camelCase(_e){return _e.replace(/-(.)/g,function(et,tt){return tt.toUpperCase()})}function warning$2(_e,et){warningOnce(_e,"[@ant-design/icons] ".concat(et))}function isIconDefinition(_e){return _typeof$1(_e)==="object"&&typeof _e.name=="string"&&typeof _e.theme=="string"&&(_typeof$1(_e.icon)==="object"||typeof _e.icon=="function")}function normalizeAttrs(){var _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(_e).reduce(function(et,tt){var rt=_e[tt];switch(tt){case"class":et.className=rt,delete et.class;break;default:delete et[tt],et[camelCase(tt)]=rt}return et},{})}function generate(_e,et,tt){return tt?React.createElement(_e.tag,_objectSpread2(_objectSpread2({key:et},normalizeAttrs(_e.attrs)),tt),(_e.children||[]).map(function(rt,nt){return generate(rt,"".concat(et,"-").concat(_e.tag,"-").concat(nt))})):React.createElement(_e.tag,_objectSpread2({key:et},normalizeAttrs(_e.attrs)),(_e.children||[]).map(function(rt,nt){return generate(rt,"".concat(et,"-").concat(_e.tag,"-").concat(nt))}))}function getSecondaryColor(_e){return generate$1(_e)[0]}function normalizeTwoToneColors(_e){return _e?Array.isArray(_e)?_e:[_e]:[]}var iconStyles=` +.anticon { + display: inline-block; + color: inherit; + font-style: normal; + line-height: 0; + text-align: center; + text-transform: none; + vertical-align: -0.125em; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.anticon > * { + line-height: 1; +} + +.anticon svg { + display: inline-block; +} + +.anticon::before { + display: none; +} + +.anticon .anticon-icon { + display: block; +} + +.anticon[tabindex] { + cursor: pointer; +} + +.anticon-spin::before, +.anticon-spin { + display: inline-block; + -webkit-animation: loadingCircle 1s infinite linear; + animation: loadingCircle 1s infinite linear; +} + +@-webkit-keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +`,useInsertStyles=function(et){var tt=reactExports.useContext(Context$2),rt=tt.csp,nt=tt.prefixCls,it=iconStyles;nt&&(it=it.replace(/anticon/g,nt)),reactExports.useEffect(function(){var at=et.current,st=getShadowRoot(at);updateCSS(it,"@ant-design-icons",{prepend:!0,csp:rt,attachTo:st})},[])},_excluded$6=["icon","className","onClick","style","primaryColor","secondaryColor"],twoToneColorPalette={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function setTwoToneColors(_e){var et=_e.primaryColor,tt=_e.secondaryColor;twoToneColorPalette.primaryColor=et,twoToneColorPalette.secondaryColor=tt||getSecondaryColor(et),twoToneColorPalette.calculated=!!tt}function getTwoToneColors(){return _objectSpread2({},twoToneColorPalette)}var IconBase=function(et){var tt=et.icon,rt=et.className,nt=et.onClick,it=et.style,at=et.primaryColor,st=et.secondaryColor,lt=_objectWithoutProperties$1(et,_excluded$6),dt=reactExports.useRef(),ht=twoToneColorPalette;if(at&&(ht={primaryColor:at,secondaryColor:st||getSecondaryColor(at)}),useInsertStyles(dt),warning$2(isIconDefinition(tt),"icon should be icon definiton, but got ".concat(tt)),!isIconDefinition(tt))return null;var pt=tt;return pt&&typeof pt.icon=="function"&&(pt=_objectSpread2(_objectSpread2({},pt),{},{icon:pt.icon(ht.primaryColor,ht.secondaryColor)})),generate(pt.icon,"svg-".concat(pt.name),_objectSpread2(_objectSpread2({className:rt,onClick:nt,style:it,"data-icon":pt.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},lt),{},{ref:dt}))};IconBase.displayName="IconReact";IconBase.getTwoToneColors=getTwoToneColors;IconBase.setTwoToneColors=setTwoToneColors;const ReactIcon=IconBase;function setTwoToneColor(_e){var et=normalizeTwoToneColors(_e),tt=_slicedToArray(et,2),rt=tt[0],nt=tt[1];return ReactIcon.setTwoToneColors({primaryColor:rt,secondaryColor:nt})}function getTwoToneColor(){var _e=ReactIcon.getTwoToneColors();return _e.calculated?[_e.primaryColor,_e.secondaryColor]:_e.primaryColor}var _excluded$5=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];setTwoToneColor(blue.primary);var Icon=reactExports.forwardRef(function(_e,et){var tt,rt=_e.className,nt=_e.icon,it=_e.spin,at=_e.rotate,st=_e.tabIndex,lt=_e.onClick,dt=_e.twoToneColor,ht=_objectWithoutProperties$1(_e,_excluded$5),pt=reactExports.useContext(Context$2),mt=pt.prefixCls,gt=mt===void 0?"anticon":mt,vt=pt.rootClassName,xt=classNames(vt,gt,(tt={},_defineProperty$1(tt,"".concat(gt,"-").concat(nt.name),!!nt.name),_defineProperty$1(tt,"".concat(gt,"-spin"),!!it||nt.name==="loading"),tt),rt),yt=st;yt===void 0&<&&(yt=-1);var bt=at?{msTransform:"rotate(".concat(at,"deg)"),transform:"rotate(".concat(at,"deg)")}:void 0,wt=normalizeTwoToneColors(dt),Et=_slicedToArray(wt,2),$t=Et[0],Pt=Et[1];return reactExports.createElement("span",_extends$3({role:"img","aria-label":nt.name},ht,{ref:et,tabIndex:yt,onClick:lt,className:xt}),reactExports.createElement(ReactIcon,{icon:nt,primaryColor:$t,secondaryColor:Pt,style:bt}))});Icon.displayName="AntdIcon";Icon.getTwoToneColor=getTwoToneColor;Icon.setTwoToneColor=setTwoToneColor;const AntdIcon=Icon;var CheckCircleFilled=function(et,tt){return reactExports.createElement(AntdIcon,_extends$3({},et,{ref:tt,icon:CheckCircleFilledSvg}))};const CheckCircleFilled$1=reactExports.forwardRef(CheckCircleFilled);var CloseCircleFilled$2={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};const CloseCircleFilledSvg=CloseCircleFilled$2;var CloseCircleFilled=function(et,tt){return reactExports.createElement(AntdIcon,_extends$3({},et,{ref:tt,icon:CloseCircleFilledSvg}))};const CloseCircleFilled$1=reactExports.forwardRef(CloseCircleFilled);var CloseOutlined$2={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};const CloseOutlinedSvg=CloseOutlined$2;var CloseOutlined=function(et,tt){return reactExports.createElement(AntdIcon,_extends$3({},et,{ref:tt,icon:CloseOutlinedSvg}))};const CloseOutlined$1=reactExports.forwardRef(CloseOutlined);var ExclamationCircleFilled$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};const ExclamationCircleFilledSvg=ExclamationCircleFilled$2;var ExclamationCircleFilled=function(et,tt){return reactExports.createElement(AntdIcon,_extends$3({},et,{ref:tt,icon:ExclamationCircleFilledSvg}))};const ExclamationCircleFilled$1=reactExports.forwardRef(ExclamationCircleFilled);var InfoCircleFilled$2={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};const InfoCircleFilledSvg=InfoCircleFilled$2;var InfoCircleFilled=function(et,tt){return reactExports.createElement(AntdIcon,_extends$3({},et,{ref:tt,icon:InfoCircleFilledSvg}))};const InfoCircleFilled$1=reactExports.forwardRef(InfoCircleFilled);var attributes=`accept acceptCharset accessKey action allowFullScreen allowTransparency + alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge + charSet checked classID className colSpan cols content contentEditable contextMenu + controls coords crossOrigin data dateTime default defer dir disabled download draggable + encType form formAction formEncType formMethod formNoValidate formTarget frameBorder + headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity + is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media + mediaGroup method min minLength multiple muted name noValidate nonce open + optimum pattern placeholder poster preload radioGroup readOnly rel required + reversed role rowSpan rows sandbox scope scoped scrolling seamless selected + shape size sizes span spellCheck src srcDoc srcLang srcSet start step style + summary tabIndex target title type useMap value width wmode wrap`,eventsName=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown + onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick + onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown + onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel + onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough + onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata + onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,propList="".concat(attributes," ").concat(eventsName).split(/[\s\n]+/),ariaPrefix="aria-",dataPrefix="data-";function match(_e,et){return _e.indexOf(et)===0}function pickAttrs(_e){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tt;et===!1?tt={aria:!0,data:!0,attr:!0}:et===!0?tt={aria:!0}:tt=_objectSpread2({},et);var rt={};return Object.keys(_e).forEach(function(nt){(tt.aria&&(nt==="role"||match(nt,ariaPrefix))||tt.data&&match(nt,dataPrefix)||tt.attr&&propList.includes(nt))&&(rt[nt]=_e[nt])}),rt}const{isValidElement}=React$1;function isFragment(_e){return _e&&isValidElement(_e)&&_e.type===reactExports.Fragment}function replaceElement(_e,et,tt){return isValidElement(_e)?reactExports.cloneElement(_e,typeof tt=="function"?tt(_e.props||{}):tt):et}function cloneElement(_e,et){return replaceElement(_e,_e,et)}var KeyCode={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(et){var tt=et.keyCode;if(et.altKey&&!et.ctrlKey||et.metaKey||tt>=KeyCode.F1&&tt<=KeyCode.F12)return!1;switch(tt){case KeyCode.ALT:case KeyCode.CAPS_LOCK:case KeyCode.CONTEXT_MENU:case KeyCode.CTRL:case KeyCode.DOWN:case KeyCode.END:case KeyCode.ESC:case KeyCode.HOME:case KeyCode.INSERT:case KeyCode.LEFT:case KeyCode.MAC_FF_META:case KeyCode.META:case KeyCode.NUMLOCK:case KeyCode.NUM_CENTER:case KeyCode.PAGE_DOWN:case KeyCode.PAGE_UP:case KeyCode.PAUSE:case KeyCode.PRINT_SCREEN:case KeyCode.RIGHT:case KeyCode.SHIFT:case KeyCode.UP:case KeyCode.WIN_KEY:case KeyCode.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(et){if(et>=KeyCode.ZERO&&et<=KeyCode.NINE||et>=KeyCode.NUM_ZERO&&et<=KeyCode.NUM_MULTIPLY||et>=KeyCode.A&&et<=KeyCode.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&et===0)return!0;switch(et){case KeyCode.SPACE:case KeyCode.QUESTION_MARK:case KeyCode.NUM_PLUS:case KeyCode.NUM_MINUS:case KeyCode.NUM_PERIOD:case KeyCode.NUM_DIVISION:case KeyCode.SEMICOLON:case KeyCode.DASH:case KeyCode.EQUALS:case KeyCode.COMMA:case KeyCode.PERIOD:case KeyCode.SLASH:case KeyCode.APOSTROPHE:case KeyCode.SINGLE_QUOTE:case KeyCode.OPEN_SQUARE_BRACKET:case KeyCode.BACKSLASH:case KeyCode.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Notify=reactExports.forwardRef(function(_e,et){var tt=_e.prefixCls,rt=_e.style,nt=_e.className,it=_e.duration,at=it===void 0?4.5:it,st=_e.eventKey,lt=_e.content,dt=_e.closable,ht=_e.closeIcon,pt=ht===void 0?"x":ht,mt=_e.props,gt=_e.onClick,vt=_e.onNoticeClose,xt=_e.times,yt=_e.hovering,bt=reactExports.useState(!1),wt=_slicedToArray(bt,2),Et=wt[0],$t=wt[1],Pt=yt||Et,kt=function(){vt(st)},Lt=function(Dt){(Dt.key==="Enter"||Dt.code==="Enter"||Dt.keyCode===KeyCode.ENTER)&&kt()};reactExports.useEffect(function(){if(!Pt&&at>0){var qt=setTimeout(function(){kt()},at*1e3);return function(){clearTimeout(qt)}}},[at,Pt,xt]);var jt="".concat(tt,"-notice");return reactExports.createElement("div",_extends$3({},mt,{ref:et,className:classNames(jt,nt,_defineProperty$1({},"".concat(jt,"-closable"),dt)),style:rt,onMouseEnter:function(Dt){var Ht;$t(!0),mt==null||(Ht=mt.onMouseEnter)===null||Ht===void 0||Ht.call(mt,Dt)},onMouseLeave:function(Dt){var Ht;$t(!1),mt==null||(Ht=mt.onMouseLeave)===null||Ht===void 0||Ht.call(mt,Dt)},onClick:gt}),reactExports.createElement("div",{className:"".concat(jt,"-content")},lt),dt&&reactExports.createElement("a",{tabIndex:0,className:"".concat(jt,"-close"),onKeyDown:Lt,onClick:function(Dt){Dt.preventDefault(),Dt.stopPropagation(),kt()}},pt))}),NotificationContext=React.createContext({}),NotificationProvider=function(et){var tt=et.children,rt=et.classNames;return React.createElement(NotificationContext.Provider,{value:{classNames:rt}},tt)},DEFAULT_OFFSET$1=8,DEFAULT_THRESHOLD=3,DEFAULT_GAP=16,useStack=function(et){var tt={offset:DEFAULT_OFFSET$1,threshold:DEFAULT_THRESHOLD,gap:DEFAULT_GAP};if(et&&_typeof$1(et)==="object"){var rt,nt,it;tt.offset=(rt=et.offset)!==null&&rt!==void 0?rt:DEFAULT_OFFSET$1,tt.threshold=(nt=et.threshold)!==null&&nt!==void 0?nt:DEFAULT_THRESHOLD,tt.gap=(it=et.gap)!==null&&it!==void 0?it:DEFAULT_GAP}return[!!et,tt]},NoticeList=function(et){var tt,rt=et.configList,nt=et.placement,it=et.prefixCls,at=et.className,st=et.style,lt=et.motion,dt=et.onAllNoticeRemoved,ht=et.onNoticeClose,pt=et.stack,mt=reactExports.useContext(NotificationContext),gt=mt.classNames,vt=reactExports.useRef({}),xt=reactExports.useState(null),yt=_slicedToArray(xt,2),bt=yt[0],wt=yt[1],Et=reactExports.useState([]),$t=_slicedToArray(Et,2),Pt=$t[0],kt=$t[1],Lt=rt.map(function(Bt){return{config:Bt,key:Bt.key}}),jt=useStack(pt),qt=_slicedToArray(jt,2),Dt=qt[0],Ht=qt[1],Xt=Ht.offset,Mt=Ht.threshold,_t=Ht.gap,At=Dt&&(Pt.length>0||Lt.length<=Mt),Tt=typeof lt=="function"?lt(nt):lt;return reactExports.useEffect(function(){Dt&&Pt.length>1&&kt(function(Bt){return Bt.filter(function(Ot){return Lt.some(function(Ut){var Wt=Ut.key;return Ot===Wt})})})},[Pt,Lt,Dt]),reactExports.useEffect(function(){var Bt;if(Dt&&vt.current[(Bt=Lt[Lt.length-1])===null||Bt===void 0?void 0:Bt.key]){var Ot;wt(vt.current[(Ot=Lt[Lt.length-1])===null||Ot===void 0?void 0:Ot.key])}},[Lt,Dt]),React.createElement(CSSMotionList,_extends$3({key:nt,className:classNames(it,"".concat(it,"-").concat(nt),gt?.list,at,(tt={},_defineProperty$1(tt,"".concat(it,"-stack"),!!Dt),_defineProperty$1(tt,"".concat(it,"-stack-expanded"),At),tt)),style:st,keys:Lt,motionAppear:!0},Tt,{onAllRemoved:function(){dt(nt)}}),function(Bt,Ot){var Ut=Bt.config,Wt=Bt.className,Ct=Bt.style,St=Bt.index,Ft=Ut,Vt=Ft.key,Rt=Ft.times,Kt=Ut,Zt=Kt.className,Jt=Kt.style,rr=Lt.findIndex(function(yr){return yr.key===Vt}),or={};if(Dt){var ar=Lt.length-1-(rr>-1?rr:St-1),ir=nt==="top"||nt==="bottom"?"-50%":"0";if(ar>0){var pr,nr,hr;or.height=At?(pr=vt.current[Vt])===null||pr===void 0?void 0:pr.offsetHeight:bt?.offsetHeight;for(var Ar=0,ur=0;ur-1?vt.current[Vt]=Er:delete vt.current[Vt]},prefixCls:it,className:classNames(Zt,gt?.notice),times:Rt,key:Vt,eventKey:Vt,onNoticeClose:ht,hovering:Dt&&Pt.length>0})))})},Notifications=reactExports.forwardRef(function(_e,et){var tt=_e.prefixCls,rt=tt===void 0?"rc-notification":tt,nt=_e.container,it=_e.motion,at=_e.maxCount,st=_e.className,lt=_e.style,dt=_e.onAllRemoved,ht=_e.stack,pt=_e.renderNotifications,mt=reactExports.useState([]),gt=_slicedToArray(mt,2),vt=gt[0],xt=gt[1],yt=function(qt){var Dt,Ht=vt.find(function(Xt){return Xt.key===qt});Ht==null||(Dt=Ht.onClose)===null||Dt===void 0||Dt.call(Ht),xt(function(Xt){return Xt.filter(function(Mt){return Mt.key!==qt})})};reactExports.useImperativeHandle(et,function(){return{open:function(qt){xt(function(Dt){var Ht=_toConsumableArray(Dt),Xt=Ht.findIndex(function(At){return At.key===qt.key}),Mt=_objectSpread2({},qt);if(Xt>=0){var _t;Mt.times=(((_t=Dt[Xt])===null||_t===void 0?void 0:_t.times)||0)+1,Ht[Xt]=Mt}else Mt.times=0,Ht.push(Mt);return at>0&&Ht.length>at&&(Ht=Ht.slice(-at)),Ht})},close:function(qt){yt(qt)},destroy:function(){xt([])}}});var bt=reactExports.useState({}),wt=_slicedToArray(bt,2),Et=wt[0],$t=wt[1];reactExports.useEffect(function(){var jt={};vt.forEach(function(qt){var Dt=qt.placement,Ht=Dt===void 0?"topRight":Dt;Ht&&(jt[Ht]=jt[Ht]||[],jt[Ht].push(qt))}),Object.keys(Et).forEach(function(qt){jt[qt]=jt[qt]||[]}),$t(jt)},[vt]);var Pt=function(qt){$t(function(Dt){var Ht=_objectSpread2({},Dt),Xt=Ht[qt]||[];return Xt.length||delete Ht[qt],Ht})},kt=reactExports.useRef(!1);if(reactExports.useEffect(function(){Object.keys(Et).length>0?kt.current=!0:kt.current&&(dt?.(),kt.current=!1)},[Et]),!nt)return null;var Lt=Object.keys(Et);return reactDomExports.createPortal(reactExports.createElement(reactExports.Fragment,null,Lt.map(function(jt){var qt=Et[jt],Dt=reactExports.createElement(NoticeList,{key:jt,configList:qt,placement:jt,prefixCls:rt,className:st?.(jt),style:lt?.(jt),motion:it,onNoticeClose:yt,onAllNoticeRemoved:Pt,stack:ht});return pt?pt(Dt,{prefixCls:rt,key:jt}):Dt})),nt)}),_excluded$4=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],defaultGetContainer=function(){return document.body},uniqueKey=0;function mergeConfig(){for(var _e={},et=arguments.length,tt=new Array(et),rt=0;rt0&&arguments[0]!==void 0?arguments[0]:{},et=_e.getContainer,tt=et===void 0?defaultGetContainer:et,rt=_e.motion,nt=_e.prefixCls,it=_e.maxCount,at=_e.className,st=_e.style,lt=_e.onAllRemoved,dt=_e.stack,ht=_e.renderNotifications,pt=_objectWithoutProperties$1(_e,_excluded$4),mt=reactExports.useState(),gt=_slicedToArray(mt,2),vt=gt[0],xt=gt[1],yt=reactExports.useRef(),bt=reactExports.createElement(Notifications,{container:vt,ref:yt,prefixCls:nt,motion:rt,maxCount:it,className:at,style:st,onAllRemoved:lt,stack:dt,renderNotifications:ht}),wt=reactExports.useState([]),Et=_slicedToArray(wt,2),$t=Et[0],Pt=Et[1],kt=reactExports.useMemo(function(){return{open:function(jt){var qt=mergeConfig(pt,jt);(qt.key===null||qt.key===void 0)&&(qt.key="rc-notification-".concat(uniqueKey),uniqueKey+=1),Pt(function(Dt){return[].concat(_toConsumableArray(Dt),[{type:"open",config:qt}])})},close:function(jt){Pt(function(qt){return[].concat(_toConsumableArray(qt),[{type:"close",key:jt}])})},destroy:function(){Pt(function(jt){return[].concat(_toConsumableArray(jt),[{type:"destroy"}])})}}},[]);return reactExports.useEffect(function(){xt(tt())}),reactExports.useEffect(function(){yt.current&&$t.length&&($t.forEach(function(Lt){switch(Lt.type){case"open":yt.current.open(Lt.config);break;case"close":yt.current.close(Lt.key);break;case"destroy":yt.current.destroy();break}}),Pt(function(Lt){return Lt.filter(function(jt){return!$t.includes(jt)})}))},[$t]),[kt,bt]}var LoadingOutlined$2={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};const LoadingOutlinedSvg=LoadingOutlined$2;var LoadingOutlined=function(et,tt){return reactExports.createElement(AntdIcon,_extends$3({},et,{ref:tt,icon:LoadingOutlinedSvg}))};const LoadingOutlined$1=reactExports.forwardRef(LoadingOutlined),genMessageStyle=_e=>{const{componentCls:et,iconCls:tt,boxShadow:rt,colorText:nt,colorSuccess:it,colorError:at,colorWarning:st,colorInfo:lt,fontSizeLG:dt,motionEaseInOutCirc:ht,motionDurationSlow:pt,marginXS:mt,paddingXS:gt,borderRadiusLG:vt,zIndexPopup:xt,contentPadding:yt,contentBg:bt}=_e,wt=`${et}-notice`,Et=new Keyframe("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:gt,transform:"translateY(0)",opacity:1}}),$t=new Keyframe("MessageMoveOut",{"0%":{maxHeight:_e.height,padding:gt,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),Pt={padding:gt,textAlign:"center",[`${et}-custom-content > ${tt}`]:{verticalAlign:"text-bottom",marginInlineEnd:mt,fontSize:dt},[`${wt}-content`]:{display:"inline-block",padding:yt,background:bt,borderRadius:vt,boxShadow:rt,pointerEvents:"all"},[`${et}-success > ${tt}`]:{color:it},[`${et}-error > ${tt}`]:{color:at},[`${et}-warning > ${tt}`]:{color:st},[`${et}-info > ${tt}, + ${et}-loading > ${tt}`]:{color:lt}};return[{[et]:Object.assign(Object.assign({},resetComponent(_e)),{color:nt,position:"fixed",top:mt,width:"100%",pointerEvents:"none",zIndex:xt,[`${et}-move-up`]:{animationFillMode:"forwards"},[` + ${et}-move-up-appear, + ${et}-move-up-enter + `]:{animationName:Et,animationDuration:pt,animationPlayState:"paused",animationTimingFunction:ht},[` + ${et}-move-up-appear${et}-move-up-appear-active, + ${et}-move-up-enter${et}-move-up-enter-active + `]:{animationPlayState:"running"},[`${et}-move-up-leave`]:{animationName:$t,animationDuration:pt,animationPlayState:"paused",animationTimingFunction:ht},[`${et}-move-up-leave${et}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[et]:{[`${wt}-wrapper`]:Object.assign({},Pt)}},{[`${et}-notice-pure-panel`]:Object.assign(Object.assign({},Pt),{padding:0,textAlign:"start"})}]},useStyle$3=genComponentStyleHook("Message",_e=>{const et=merge(_e,{height:150});return[genMessageStyle(et)]},_e=>({zIndexPopup:_e.zIndexPopupBase+10,contentBg:_e.colorBgElevated,contentPadding:`${(_e.controlHeightLG-_e.fontSize*_e.lineHeight)/2}px ${_e.paddingSM}px`}));var __rest$8=globalThis&&globalThis.__rest||function(_e,et){var tt={};for(var rt in _e)Object.prototype.hasOwnProperty.call(_e,rt)&&et.indexOf(rt)<0&&(tt[rt]=_e[rt]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,rt=Object.getOwnPropertySymbols(_e);nt{let{prefixCls:et,type:tt,icon:rt,children:nt}=_e;return reactExports.createElement("div",{className:classNames(`${et}-custom-content`,`${et}-${tt}`)},rt||TypeIcon[tt],reactExports.createElement("span",null,nt))},PurePanel$2=_e=>{const{prefixCls:et,className:tt,type:rt,icon:nt,content:it}=_e,at=__rest$8(_e,["prefixCls","className","type","icon","content"]),{getPrefixCls:st}=reactExports.useContext(ConfigContext),lt=et||st("message"),[,dt]=useStyle$3(lt);return reactExports.createElement(Notify,Object.assign({},at,{prefixCls:lt,className:classNames(tt,dt,`${lt}-notice-pure-panel`),eventKey:"pure",duration:null,content:reactExports.createElement(PureContent,{prefixCls:lt,type:rt,icon:nt},it)}))},PurePanel$3=PurePanel$2;function getMotion(_e,et){return{motionName:et??`${_e}-move-up`}}function wrapPromiseFn(_e){let et;const tt=new Promise(nt=>{et=_e(()=>{nt(!0)})}),rt=()=>{et?.()};return rt.then=(nt,it)=>tt.then(nt,it),rt.promise=tt,rt}var __rest$7=globalThis&&globalThis.__rest||function(_e,et){var tt={};for(var rt in _e)Object.prototype.hasOwnProperty.call(_e,rt)&&et.indexOf(rt)<0&&(tt[rt]=_e[rt]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,rt=Object.getOwnPropertySymbols(_e);nt{let{children:et,prefixCls:tt}=_e;const[,rt]=useStyle$3(tt);return reactExports.createElement(NotificationProvider,{classNames:{list:rt,notice:rt}},et)},renderNotifications=(_e,et)=>{let{prefixCls:tt,key:rt}=et;return reactExports.createElement(Wrapper,{prefixCls:tt,key:rt},_e)},Holder=reactExports.forwardRef((_e,et)=>{const{top:tt,prefixCls:rt,getContainer:nt,maxCount:it,duration:at=DEFAULT_DURATION,rtl:st,transitionName:lt,onAllRemoved:dt}=_e,{getPrefixCls:ht,getPopupContainer:pt,message:mt}=reactExports.useContext(ConfigContext),gt=rt||ht("message"),vt=()=>({left:"50%",transform:"translateX(-50%)",top:tt??DEFAULT_OFFSET}),xt=()=>classNames({[`${gt}-rtl`]:st}),yt=()=>getMotion(gt,lt),bt=reactExports.createElement("span",{className:`${gt}-close-x`},reactExports.createElement(CloseOutlined$1,{className:`${gt}-close-icon`})),[wt,Et]=useNotification({prefixCls:gt,style:vt,className:xt,motion:yt,closable:!1,closeIcon:bt,duration:at,getContainer:()=>nt?.()||pt?.()||document.body,maxCount:it,onAllRemoved:dt,renderNotifications});return reactExports.useImperativeHandle(et,()=>Object.assign(Object.assign({},wt),{prefixCls:gt,message:mt})),Et});let keyIndex=0;function useInternalMessage(_e){const et=reactExports.useRef(null);return[reactExports.useMemo(()=>{const rt=lt=>{var dt;(dt=et.current)===null||dt===void 0||dt.close(lt)},nt=lt=>{if(!et.current){const kt=()=>{};return kt.then=()=>{},kt}const{open:dt,prefixCls:ht,message:pt}=et.current,mt=`${ht}-notice`,{content:gt,icon:vt,type:xt,key:yt,className:bt,style:wt,onClose:Et}=lt,$t=__rest$7(lt,["content","icon","type","key","className","style","onClose"]);let Pt=yt;return Pt==null&&(keyIndex+=1,Pt=`antd-message-${keyIndex}`),wrapPromiseFn(kt=>(dt(Object.assign(Object.assign({},$t),{key:Pt,content:reactExports.createElement(PureContent,{prefixCls:ht,type:xt,icon:vt},gt),placement:"top",className:classNames(xt&&`${mt}-${xt}`,bt,pt?.className),style:Object.assign(Object.assign({},pt?.style),wt),onClose:()=>{Et?.(),kt()}})),()=>{rt(Pt)}))},at={open:nt,destroy:lt=>{var dt;lt!==void 0?rt(lt):(dt=et.current)===null||dt===void 0||dt.destroy()}};return["info","success","warning","error","loading"].forEach(lt=>{const dt=(ht,pt,mt)=>{let gt;ht&&typeof ht=="object"&&"content"in ht?gt=ht:gt={content:ht};let vt,xt;typeof pt=="function"?xt=pt:(vt=pt,xt=mt);const yt=Object.assign(Object.assign({onClose:xt,duration:vt},gt),{type:lt});return nt(yt)};at[lt]=dt}),at},[]),reactExports.createElement(Holder,Object.assign({key:"message-holder"},_e,{ref:et}))]}function useMessage(_e){return useInternalMessage(_e)}function usePatchElement(){const[_e,et]=reactExports.useState([]),tt=reactExports.useCallback(rt=>(et(nt=>[].concat(_toConsumableArray(nt),[rt])),()=>{et(nt=>nt.filter(it=>it!==rt))}),[]);return[_e,tt]}function _regeneratorRuntime(){_regeneratorRuntime=function(){return et};var _e,et={},tt=Object.prototype,rt=tt.hasOwnProperty,nt=Object.defineProperty||function(Tt,Bt,Ot){Tt[Bt]=Ot.value},it=typeof Symbol=="function"?Symbol:{},at=it.iterator||"@@iterator",st=it.asyncIterator||"@@asyncIterator",lt=it.toStringTag||"@@toStringTag";function dt(Tt,Bt,Ot){return Object.defineProperty(Tt,Bt,{value:Ot,enumerable:!0,configurable:!0,writable:!0}),Tt[Bt]}try{dt({},"")}catch{dt=function(Ot,Ut,Wt){return Ot[Ut]=Wt}}function ht(Tt,Bt,Ot,Ut){var Wt=Bt&&Bt.prototype instanceof bt?Bt:bt,Ct=Object.create(Wt.prototype),St=new _t(Ut||[]);return nt(Ct,"_invoke",{value:Dt(Tt,Ot,St)}),Ct}function pt(Tt,Bt,Ot){try{return{type:"normal",arg:Tt.call(Bt,Ot)}}catch(Ut){return{type:"throw",arg:Ut}}}et.wrap=ht;var mt="suspendedStart",gt="suspendedYield",vt="executing",xt="completed",yt={};function bt(){}function wt(){}function Et(){}var $t={};dt($t,at,function(){return this});var Pt=Object.getPrototypeOf,kt=Pt&&Pt(Pt(At([])));kt&&kt!==tt&&rt.call(kt,at)&&($t=kt);var Lt=Et.prototype=bt.prototype=Object.create($t);function jt(Tt){["next","throw","return"].forEach(function(Bt){dt(Tt,Bt,function(Ot){return this._invoke(Bt,Ot)})})}function qt(Tt,Bt){function Ot(Wt,Ct,St,Ft){var Vt=pt(Tt[Wt],Tt,Ct);if(Vt.type!=="throw"){var Rt=Vt.arg,Kt=Rt.value;return Kt&&_typeof$1(Kt)=="object"&&rt.call(Kt,"__await")?Bt.resolve(Kt.__await).then(function(Zt){Ot("next",Zt,St,Ft)},function(Zt){Ot("throw",Zt,St,Ft)}):Bt.resolve(Kt).then(function(Zt){Rt.value=Zt,St(Rt)},function(Zt){return Ot("throw",Zt,St,Ft)})}Ft(Vt.arg)}var Ut;nt(this,"_invoke",{value:function(Ct,St){function Ft(){return new Bt(function(Vt,Rt){Ot(Ct,St,Vt,Rt)})}return Ut=Ut?Ut.then(Ft,Ft):Ft()}})}function Dt(Tt,Bt,Ot){var Ut=mt;return function(Wt,Ct){if(Ut===vt)throw new Error("Generator is already running");if(Ut===xt){if(Wt==="throw")throw Ct;return{value:_e,done:!0}}for(Ot.method=Wt,Ot.arg=Ct;;){var St=Ot.delegate;if(St){var Ft=Ht(St,Ot);if(Ft){if(Ft===yt)continue;return Ft}}if(Ot.method==="next")Ot.sent=Ot._sent=Ot.arg;else if(Ot.method==="throw"){if(Ut===mt)throw Ut=xt,Ot.arg;Ot.dispatchException(Ot.arg)}else Ot.method==="return"&&Ot.abrupt("return",Ot.arg);Ut=vt;var Vt=pt(Tt,Bt,Ot);if(Vt.type==="normal"){if(Ut=Ot.done?xt:gt,Vt.arg===yt)continue;return{value:Vt.arg,done:Ot.done}}Vt.type==="throw"&&(Ut=xt,Ot.method="throw",Ot.arg=Vt.arg)}}}function Ht(Tt,Bt){var Ot=Bt.method,Ut=Tt.iterator[Ot];if(Ut===_e)return Bt.delegate=null,Ot==="throw"&&Tt.iterator.return&&(Bt.method="return",Bt.arg=_e,Ht(Tt,Bt),Bt.method==="throw")||Ot!=="return"&&(Bt.method="throw",Bt.arg=new TypeError("The iterator does not provide a '"+Ot+"' method")),yt;var Wt=pt(Ut,Tt.iterator,Bt.arg);if(Wt.type==="throw")return Bt.method="throw",Bt.arg=Wt.arg,Bt.delegate=null,yt;var Ct=Wt.arg;return Ct?Ct.done?(Bt[Tt.resultName]=Ct.value,Bt.next=Tt.nextLoc,Bt.method!=="return"&&(Bt.method="next",Bt.arg=_e),Bt.delegate=null,yt):Ct:(Bt.method="throw",Bt.arg=new TypeError("iterator result is not an object"),Bt.delegate=null,yt)}function Xt(Tt){var Bt={tryLoc:Tt[0]};1 in Tt&&(Bt.catchLoc=Tt[1]),2 in Tt&&(Bt.finallyLoc=Tt[2],Bt.afterLoc=Tt[3]),this.tryEntries.push(Bt)}function Mt(Tt){var Bt=Tt.completion||{};Bt.type="normal",delete Bt.arg,Tt.completion=Bt}function _t(Tt){this.tryEntries=[{tryLoc:"root"}],Tt.forEach(Xt,this),this.reset(!0)}function At(Tt){if(Tt||Tt===""){var Bt=Tt[at];if(Bt)return Bt.call(Tt);if(typeof Tt.next=="function")return Tt;if(!isNaN(Tt.length)){var Ot=-1,Ut=function Wt(){for(;++Ot=0;--Wt){var Ct=this.tryEntries[Wt],St=Ct.completion;if(Ct.tryLoc==="root")return Ut("end");if(Ct.tryLoc<=this.prev){var Ft=rt.call(Ct,"catchLoc"),Vt=rt.call(Ct,"finallyLoc");if(Ft&&Vt){if(this.prev=0;--Ut){var Wt=this.tryEntries[Ut];if(Wt.tryLoc<=this.prev&&rt.call(Wt,"finallyLoc")&&this.prev=0;--Ot){var Ut=this.tryEntries[Ot];if(Ut.finallyLoc===Bt)return this.complete(Ut.completion,Ut.afterLoc),Mt(Ut),yt}},catch:function(Bt){for(var Ot=this.tryEntries.length-1;Ot>=0;--Ot){var Ut=this.tryEntries[Ot];if(Ut.tryLoc===Bt){var Wt=Ut.completion;if(Wt.type==="throw"){var Ct=Wt.arg;Mt(Ut)}return Ct}}throw new Error("illegal catch attempt")},delegateYield:function(Bt,Ot,Ut){return this.delegate={iterator:At(Bt),resultName:Ot,nextLoc:Ut},this.method==="next"&&(this.arg=_e),yt}},et}function asyncGeneratorStep(_e,et,tt,rt,nt,it,at){try{var st=_e[it](at),lt=st.value}catch(dt){tt(dt);return}st.done?et(lt):Promise.resolve(lt).then(rt,nt)}function _asyncToGenerator(_e){return function(){var et=this,tt=arguments;return new Promise(function(rt,nt){var it=_e.apply(et,tt);function at(lt){asyncGeneratorStep(it,rt,nt,at,st,"next",lt)}function st(lt){asyncGeneratorStep(it,rt,nt,at,st,"throw",lt)}at(void 0)})}}var fullClone=_objectSpread2({},ReactDOM$1),version=fullClone.version,reactRender=fullClone.render,unmountComponentAtNode=fullClone.unmountComponentAtNode,createRoot;try{var mainVersion=Number((version||"").split(".")[0]);mainVersion>=18&&(createRoot=fullClone.createRoot)}catch{}function toggleWarning(_e){var et=fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;et&&_typeof$1(et)==="object"&&(et.usingClientEntryPoint=_e)}var MARK="__rc_react_root__";function modernRender(_e,et){toggleWarning(!0);var tt=et[MARK]||createRoot(et);toggleWarning(!1),tt.render(_e),et[MARK]=tt}function legacyRender(_e,et){reactRender(_e,et)}function render(_e,et){if(createRoot){modernRender(_e,et);return}legacyRender(_e,et)}function modernUnmount(_e){return _modernUnmount.apply(this,arguments)}function _modernUnmount(){return _modernUnmount=_asyncToGenerator(_regeneratorRuntime().mark(function _e(et){return _regeneratorRuntime().wrap(function(rt){for(;;)switch(rt.prev=rt.next){case 0:return rt.abrupt("return",Promise.resolve().then(function(){var nt;(nt=et[MARK])===null||nt===void 0||nt.unmount(),delete et[MARK]}));case 1:case"end":return rt.stop()}},_e)})),_modernUnmount.apply(this,arguments)}function legacyUnmount(_e){unmountComponentAtNode(_e)}function unmount(_e){return _unmount.apply(this,arguments)}function _unmount(){return _unmount=_asyncToGenerator(_regeneratorRuntime().mark(function _e(et){return _regeneratorRuntime().wrap(function(rt){for(;;)switch(rt.prev=rt.next){case 0:if(createRoot===void 0){rt.next=2;break}return rt.abrupt("return",modernUnmount(et));case 2:legacyUnmount(et);case 3:case"end":return rt.stop()}},_e)})),_unmount.apply(this,arguments)}const getTransitionName=(_e,et,tt)=>tt!==void 0?tt:`${_e}-${et}`,isVisible=function(_e){if(!_e)return!1;if(_e instanceof Element){if(_e.offsetParent)return!0;if(_e.getBBox){var et=_e.getBBox(),tt=et.width,rt=et.height;if(tt||rt)return!0}if(_e.getBoundingClientRect){var nt=_e.getBoundingClientRect(),it=nt.width,at=nt.height;if(it||at)return!0}}return!1},genWaveStyle=_e=>{const{componentCls:et,colorPrimary:tt}=_e;return{[et]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${tt})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${_e.motionEaseOutCirc}`,`opacity 2s ${_e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow 0.3s ${_e.motionEaseInOut}`,`opacity 0.35s ${_e.motionEaseInOut}`].join(",")}}}}},useStyle$2=genComponentStyleHook("Wave",_e=>[genWaveStyle(_e)]);function isNotGrey(_e){const et=(_e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return et&&et[1]&&et[2]&&et[3]?!(et[1]===et[2]&&et[2]===et[3]):!0}function isValidWaveColor(_e){return _e&&_e!=="#fff"&&_e!=="#ffffff"&&_e!=="rgb(255, 255, 255)"&&_e!=="rgba(255, 255, 255, 1)"&&isNotGrey(_e)&&!/rgba\((?:\d*, ){3}0\)/.test(_e)&&_e!=="transparent"}function getTargetWaveColor(_e){const{borderTopColor:et,borderColor:tt,backgroundColor:rt}=getComputedStyle(_e);return isValidWaveColor(et)?et:isValidWaveColor(tt)?tt:isValidWaveColor(rt)?rt:null}const TARGET_CLS="ant-wave-target";function validateNum(_e){return Number.isNaN(_e)?0:_e}const WaveEffect=_e=>{const{className:et,target:tt,component:rt}=_e,nt=reactExports.useRef(null),[it,at]=reactExports.useState(null),[st,lt]=reactExports.useState([]),[dt,ht]=reactExports.useState(0),[pt,mt]=reactExports.useState(0),[gt,vt]=reactExports.useState(0),[xt,yt]=reactExports.useState(0),[bt,wt]=reactExports.useState(!1),Et={left:dt,top:pt,width:gt,height:xt,borderRadius:st.map(kt=>`${kt}px`).join(" ")};it&&(Et["--wave-color"]=it);function $t(){const kt=getComputedStyle(tt);at(getTargetWaveColor(tt));const Lt=kt.position==="static",{borderLeftWidth:jt,borderTopWidth:qt}=kt;ht(Lt?tt.offsetLeft:validateNum(-parseFloat(jt))),mt(Lt?tt.offsetTop:validateNum(-parseFloat(qt))),vt(tt.offsetWidth),yt(tt.offsetHeight);const{borderTopLeftRadius:Dt,borderTopRightRadius:Ht,borderBottomLeftRadius:Xt,borderBottomRightRadius:Mt}=kt;lt([Dt,Ht,Mt,Xt].map(_t=>validateNum(parseFloat(_t))))}if(reactExports.useEffect(()=>{if(tt){const kt=wrapperRaf(()=>{$t(),wt(!0)});let Lt;return typeof ResizeObserver<"u"&&(Lt=new ResizeObserver($t),Lt.observe(tt)),()=>{wrapperRaf.cancel(kt),Lt?.disconnect()}}},[]),!bt)return null;const Pt=(rt==="Checkbox"||rt==="Radio")&&tt?.classList.contains(TARGET_CLS);return reactExports.createElement(CSSMotion,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(kt,Lt)=>{var jt;if(Lt.deadline||Lt.propertyName==="opacity"){const qt=(jt=nt.current)===null||jt===void 0?void 0:jt.parentElement;unmount(qt).then(()=>{qt?.remove()})}return!1}},kt=>{let{className:Lt}=kt;return reactExports.createElement("div",{ref:nt,className:classNames(et,{"wave-quick":Pt},Lt),style:Et})})},showWaveEffect=(_e,et)=>{var tt;const{component:rt}=et;if(rt==="Checkbox"&&!(!((tt=_e.querySelector("input"))===null||tt===void 0)&&tt.checked))return;const nt=document.createElement("div");nt.style.position="absolute",nt.style.left="0px",nt.style.top="0px",_e?.insertBefore(nt,_e?.firstChild),render(reactExports.createElement(WaveEffect,Object.assign({},et,{target:_e})),nt)},showWaveEffect$1=showWaveEffect;function useWave(_e,et,tt){const{wave:rt}=reactExports.useContext(ConfigContext),[,nt,it]=useToken(),at=useEvent(dt=>{const ht=_e.current;if(rt?.disabled||!ht)return;const pt=ht.querySelector(`.${TARGET_CLS}`)||ht,{showEffect:mt}=rt||{};(mt||showWaveEffect$1)(pt,{className:et,token:nt,component:tt,event:dt,hashId:it})}),st=reactExports.useRef();return dt=>{wrapperRaf.cancel(st.current),st.current=wrapperRaf(()=>{at(dt)})}}const Wave=_e=>{const{children:et,disabled:tt,component:rt}=_e,{getPrefixCls:nt}=reactExports.useContext(ConfigContext),it=reactExports.useRef(null),at=nt("wave"),[,st]=useStyle$2(at),lt=useWave(it,classNames(at,st),rt);if(React.useEffect(()=>{const ht=it.current;if(!ht||ht.nodeType!==1||tt)return;const pt=mt=>{!isVisible(mt.target)||!ht.getAttribute||ht.getAttribute("disabled")||ht.disabled||ht.className.includes("disabled")||ht.className.includes("-leave")||lt(mt)};return ht.addEventListener("click",pt,!0),()=>{ht.removeEventListener("click",pt,!0)}},[tt]),!React.isValidElement(et))return et??null;const dt=supportRef(et)?composeRef(et.ref,it):it;return cloneElement(et,{ref:dt})},Wave$1=Wave,useSize=_e=>{const et=React.useContext(SizeContext$1);return React.useMemo(()=>_e?typeof _e=="string"?_e??et:_e instanceof Function?_e(et):et:et,[_e,et])},useSize$1=useSize;globalThis&&globalThis.__rest;const SpaceCompactItemContext=reactExports.createContext(null),useCompactItemContext=(_e,et)=>{const tt=reactExports.useContext(SpaceCompactItemContext),rt=reactExports.useMemo(()=>{if(!tt)return"";const{compactDirection:nt,isFirstItem:it,isLastItem:at}=tt,st=nt==="vertical"?"-vertical-":"-";return classNames(`${_e}-compact${st}item`,{[`${_e}-compact${st}first-item`]:it,[`${_e}-compact${st}last-item`]:at,[`${_e}-compact${st}item-rtl`]:et==="rtl"})},[_e,et,tt]);return{compactSize:tt?.compactSize,compactDirection:tt?.compactDirection,compactItemClassnames:rt}},NoCompactStyle=_e=>{let{children:et}=_e;return reactExports.createElement(SpaceCompactItemContext.Provider,{value:null},et)};var __rest$6=globalThis&&globalThis.__rest||function(_e,et){var tt={};for(var rt in _e)Object.prototype.hasOwnProperty.call(_e,rt)&&et.indexOf(rt)<0&&(tt[rt]=_e[rt]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,rt=Object.getOwnPropertySymbols(_e);nt{const{getPrefixCls:et,direction:tt}=reactExports.useContext(ConfigContext),{prefixCls:rt,size:nt,className:it}=_e,at=__rest$6(_e,["prefixCls","size","className"]),st=et("btn-group",rt),[,,lt]=useToken();let dt="";switch(nt){case"large":dt="lg";break;case"small":dt="sm";break}const ht=classNames(st,{[`${st}-${dt}`]:dt,[`${st}-rtl`]:tt==="rtl"},it,lt);return reactExports.createElement(GroupSizeContext.Provider,{value:nt},reactExports.createElement("div",Object.assign({},at,{className:ht})))},Group=ButtonGroup,rxTwoCNChar=/^[\u4e00-\u9fa5]{2}$/,isTwoCNChar=rxTwoCNChar.test.bind(rxTwoCNChar);function convertLegacyProps(_e){return _e==="danger"?{danger:!0}:{type:_e}}function isString(_e){return typeof _e=="string"}function isUnBorderedButtonType(_e){return _e==="text"||_e==="link"}function splitCNCharsBySpace(_e,et){if(_e==null)return;const tt=et?" ":"";return typeof _e!="string"&&typeof _e!="number"&&isString(_e.type)&&isTwoCNChar(_e.props.children)?cloneElement(_e,{children:_e.props.children.split("").join(tt)}):isString(_e)?isTwoCNChar(_e)?React.createElement("span",null,_e.split("").join(tt)):React.createElement("span",null,_e):isFragment(_e)?React.createElement("span",null,_e):_e}function spaceChildren(_e,et){let tt=!1;const rt=[];return React.Children.forEach(_e,nt=>{const it=typeof nt,at=it==="string"||it==="number";if(tt&&at){const st=rt.length-1,lt=rt[st];rt[st]=`${lt}${nt}`}else rt.push(nt);tt=at}),React.Children.map(rt,nt=>splitCNCharsBySpace(nt,et))}const IconWrapper=reactExports.forwardRef((_e,et)=>{const{className:tt,style:rt,children:nt,prefixCls:it}=_e,at=classNames(`${it}-icon`,tt);return React.createElement("span",{ref:et,className:at,style:rt},nt)}),IconWrapper$1=IconWrapper,InnerLoadingIcon=reactExports.forwardRef((_e,et)=>{let{prefixCls:tt,className:rt,style:nt,iconClassName:it}=_e;const at=classNames(`${tt}-loading-icon`,rt);return React.createElement(IconWrapper$1,{prefixCls:tt,className:at,style:nt,ref:et},React.createElement(LoadingOutlined$1,{className:it}))}),getCollapsedWidth=()=>({width:0,opacity:0,transform:"scale(0)"}),getRealWidth=_e=>({width:_e.scrollWidth,opacity:1,transform:"scale(1)"}),LoadingIcon=_e=>{const{prefixCls:et,loading:tt,existIcon:rt,className:nt,style:it}=_e,at=!!tt;return rt?React.createElement(InnerLoadingIcon,{prefixCls:et,className:nt,style:it}):React.createElement(CSSMotion,{visible:at,motionName:`${et}-loading-icon-motion`,motionLeave:at,removeOnLeave:!0,onAppearStart:getCollapsedWidth,onAppearActive:getRealWidth,onEnterStart:getCollapsedWidth,onEnterActive:getRealWidth,onLeaveStart:getRealWidth,onLeaveActive:getCollapsedWidth},(st,lt)=>{let{className:dt,style:ht}=st;return React.createElement(InnerLoadingIcon,{prefixCls:et,className:nt,style:Object.assign(Object.assign({},it),ht),ref:lt,iconClassName:dt})})},LoadingIcon$1=LoadingIcon,genButtonBorderStyle=(_e,et)=>({[`> span, > ${_e}`]:{"&:not(:last-child)":{[`&, & > ${_e}`]:{"&:not(:disabled)":{borderInlineEndColor:et}}},"&:not(:first-child)":{[`&, & > ${_e}`]:{"&:not(:disabled)":{borderInlineStartColor:et}}}}}),genGroupStyle=_e=>{const{componentCls:et,fontSize:tt,lineWidth:rt,groupBorderColor:nt,colorErrorHover:it}=_e;return{[`${et}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${et}`]:{"&:not(:last-child)":{[`&, & > ${et}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-rt,[`&, & > ${et}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[et]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${et}-icon-only`]:{fontSize:tt}},genButtonBorderStyle(`${et}-primary`,nt),genButtonBorderStyle(`${et}-danger`,it)]}},genGroupStyle$1=genGroupStyle,genSharedButtonStyle=_e=>{const{componentCls:et,iconCls:tt,fontWeight:rt}=_e;return{[et]:{outline:"none",position:"relative",display:"inline-block",fontWeight:rt,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${_e.lineWidth}px ${_e.lineType} transparent`,cursor:"pointer",transition:`all ${_e.motionDurationMid} ${_e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:_e.lineHeight,color:_e.colorText,"&:disabled > *":{pointerEvents:"none"},"> span":{display:"inline-block"},[`${et}-icon`]:{lineHeight:0},[`> ${tt} + span, > span + ${tt}`]:{marginInlineStart:_e.marginXS},[`&:not(${et}-icon-only) > ${et}-icon`]:{[`&${et}-loading-icon, &:not(:last-child)`]:{marginInlineEnd:_e.marginXS}},"> a":{color:"currentColor"},"&:not(:disabled)":Object.assign({},genFocusStyle(_e)),[`&${et}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${et}-two-chinese-chars > *:not(${tt})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&-icon-only${et}-compact-item`]:{flex:"none"},[`&-compact-item${et}-primary`]:{[`&:not([disabled]) + ${et}-compact-item${et}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-_e.lineWidth,insetInlineStart:-_e.lineWidth,display:"inline-block",width:_e.lineWidth,height:`calc(100% + ${_e.lineWidth*2}px)`,backgroundColor:_e.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${et}-primary`]:{[`&:not([disabled]) + ${et}-compact-vertical-item${et}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-_e.lineWidth,insetInlineStart:-_e.lineWidth,display:"inline-block",width:`calc(100% + ${_e.lineWidth*2}px)`,height:_e.lineWidth,backgroundColor:_e.colorPrimaryHover,content:'""'}}}}}}},genHoverActiveButtonStyle=(_e,et,tt)=>({[`&:not(:disabled):not(${_e}-disabled)`]:{"&:hover":et,"&:active":tt}}),genCircleButtonStyle=_e=>({minWidth:_e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),genRoundButtonStyle=_e=>({borderRadius:_e.controlHeight,paddingInlineStart:_e.controlHeight/2,paddingInlineEnd:_e.controlHeight/2}),genDisabledStyle=_e=>({cursor:"not-allowed",borderColor:_e.borderColorDisabled,color:_e.colorTextDisabled,backgroundColor:_e.colorBgContainerDisabled,boxShadow:"none"}),genGhostButtonStyle=(_e,et,tt,rt,nt,it,at,st)=>({[`&${_e}-background-ghost`]:Object.assign(Object.assign({color:tt||void 0,backgroundColor:et,borderColor:rt||void 0,boxShadow:"none"},genHoverActiveButtonStyle(_e,Object.assign({backgroundColor:et},at),Object.assign({backgroundColor:et},st))),{"&:disabled":{cursor:"not-allowed",color:nt||void 0,borderColor:it||void 0}})}),genSolidDisabledButtonStyle=_e=>({[`&:disabled, &${_e.componentCls}-disabled`]:Object.assign({},genDisabledStyle(_e))}),genSolidButtonStyle=_e=>Object.assign({},genSolidDisabledButtonStyle(_e)),genPureDisabledButtonStyle=_e=>({[`&:disabled, &${_e.componentCls}-disabled`]:{cursor:"not-allowed",color:_e.colorTextDisabled}}),genDefaultButtonStyle=_e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},genSolidButtonStyle(_e)),{backgroundColor:_e.defaultBg,borderColor:_e.defaultBorderColor,color:_e.defaultColor,boxShadow:_e.defaultShadow}),genHoverActiveButtonStyle(_e.componentCls,{color:_e.colorPrimaryHover,borderColor:_e.colorPrimaryHover},{color:_e.colorPrimaryActive,borderColor:_e.colorPrimaryActive})),genGhostButtonStyle(_e.componentCls,_e.ghostBg,_e.defaultGhostColor,_e.defaultGhostBorderColor,_e.colorTextDisabled,_e.colorBorder)),{[`&${_e.componentCls}-dangerous`]:Object.assign(Object.assign(Object.assign({color:_e.colorError,borderColor:_e.colorError},genHoverActiveButtonStyle(_e.componentCls,{color:_e.colorErrorHover,borderColor:_e.colorErrorBorderHover},{color:_e.colorErrorActive,borderColor:_e.colorErrorActive})),genGhostButtonStyle(_e.componentCls,_e.ghostBg,_e.colorError,_e.colorError,_e.colorTextDisabled,_e.colorBorder)),genSolidDisabledButtonStyle(_e))}),genPrimaryButtonStyle=_e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},genSolidButtonStyle(_e)),{color:_e.primaryColor,backgroundColor:_e.colorPrimary,boxShadow:_e.primaryShadow}),genHoverActiveButtonStyle(_e.componentCls,{color:_e.colorTextLightSolid,backgroundColor:_e.colorPrimaryHover},{color:_e.colorTextLightSolid,backgroundColor:_e.colorPrimaryActive})),genGhostButtonStyle(_e.componentCls,_e.ghostBg,_e.colorPrimary,_e.colorPrimary,_e.colorTextDisabled,_e.colorBorder,{color:_e.colorPrimaryHover,borderColor:_e.colorPrimaryHover},{color:_e.colorPrimaryActive,borderColor:_e.colorPrimaryActive})),{[`&${_e.componentCls}-dangerous`]:Object.assign(Object.assign(Object.assign({backgroundColor:_e.colorError,boxShadow:_e.dangerShadow,color:_e.dangerColor},genHoverActiveButtonStyle(_e.componentCls,{backgroundColor:_e.colorErrorHover},{backgroundColor:_e.colorErrorActive})),genGhostButtonStyle(_e.componentCls,_e.ghostBg,_e.colorError,_e.colorError,_e.colorTextDisabled,_e.colorBorder,{color:_e.colorErrorHover,borderColor:_e.colorErrorHover},{color:_e.colorErrorActive,borderColor:_e.colorErrorActive})),genSolidDisabledButtonStyle(_e))}),genDashedButtonStyle=_e=>Object.assign(Object.assign({},genDefaultButtonStyle(_e)),{borderStyle:"dashed"}),genLinkButtonStyle=_e=>Object.assign(Object.assign(Object.assign({color:_e.colorLink},genHoverActiveButtonStyle(_e.componentCls,{color:_e.colorLinkHover,backgroundColor:_e.linkHoverBg},{color:_e.colorLinkActive})),genPureDisabledButtonStyle(_e)),{[`&${_e.componentCls}-dangerous`]:Object.assign(Object.assign({color:_e.colorError},genHoverActiveButtonStyle(_e.componentCls,{color:_e.colorErrorHover},{color:_e.colorErrorActive})),genPureDisabledButtonStyle(_e))}),genTextButtonStyle=_e=>Object.assign(Object.assign(Object.assign({},genHoverActiveButtonStyle(_e.componentCls,{color:_e.colorText,backgroundColor:_e.textHoverBg},{color:_e.colorText,backgroundColor:_e.colorBgTextActive})),genPureDisabledButtonStyle(_e)),{[`&${_e.componentCls}-dangerous`]:Object.assign(Object.assign({color:_e.colorError},genPureDisabledButtonStyle(_e)),genHoverActiveButtonStyle(_e.componentCls,{color:_e.colorErrorHover,backgroundColor:_e.colorErrorBg},{color:_e.colorErrorHover,backgroundColor:_e.colorErrorBg}))}),genTypeButtonStyle=_e=>{const{componentCls:et}=_e;return{[`${et}-default`]:genDefaultButtonStyle(_e),[`${et}-primary`]:genPrimaryButtonStyle(_e),[`${et}-dashed`]:genDashedButtonStyle(_e),[`${et}-link`]:genLinkButtonStyle(_e),[`${et}-text`]:genTextButtonStyle(_e),[`${et}-ghost`]:genGhostButtonStyle(_e.componentCls,_e.ghostBg,_e.colorBgContainer,_e.colorBgContainer,_e.colorTextDisabled,_e.colorBorder)}},genSizeButtonStyle=function(_e){let et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:tt,controlHeight:rt,fontSize:nt,lineHeight:it,lineWidth:at,borderRadius:st,buttonPaddingHorizontal:lt,iconCls:dt}=_e,ht=Math.max(0,(rt-nt*it)/2-at),pt=`${tt}-icon-only`;return[{[`${tt}${et}`]:{fontSize:nt,height:rt,padding:`${ht}px ${lt}px`,borderRadius:st,[`&${pt}`]:{width:rt,paddingInlineStart:0,paddingInlineEnd:0,[`&${tt}-round`]:{width:"auto"},[dt]:{fontSize:_e.buttonIconOnlyFontSize}},[`&${tt}-loading`]:{opacity:_e.opacityLoading,cursor:"default"},[`${tt}-loading-icon`]:{transition:`width ${_e.motionDurationSlow} ${_e.motionEaseInOut}, opacity ${_e.motionDurationSlow} ${_e.motionEaseInOut}`}}},{[`${tt}${tt}-circle${et}`]:genCircleButtonStyle(_e)},{[`${tt}${tt}-round${et}`]:genRoundButtonStyle(_e)}]},genSizeBaseButtonStyle=_e=>genSizeButtonStyle(merge(_e,{fontSize:_e.contentFontSize})),genSizeSmallButtonStyle=_e=>{const et=merge(_e,{controlHeight:_e.controlHeightSM,fontSize:_e.contentFontSizeSM,padding:_e.paddingXS,buttonPaddingHorizontal:_e.paddingInlineSM,borderRadius:_e.borderRadiusSM,buttonIconOnlyFontSize:_e.onlyIconSizeSM});return genSizeButtonStyle(et,`${_e.componentCls}-sm`)},genSizeLargeButtonStyle=_e=>{const et=merge(_e,{controlHeight:_e.controlHeightLG,fontSize:_e.contentFontSizeLG,buttonPaddingHorizontal:_e.paddingInlineLG,borderRadius:_e.borderRadiusLG,buttonIconOnlyFontSize:_e.onlyIconSizeLG});return genSizeButtonStyle(et,`${_e.componentCls}-lg`)},genBlockButtonStyle=_e=>{const{componentCls:et}=_e;return{[et]:{[`&${et}-block`]:{width:"100%"}}}},prepareToken$1=_e=>{const{paddingInline:et,onlyIconSize:tt}=_e;return merge(_e,{buttonPaddingHorizontal:et,buttonIconOnlyFontSize:tt})},prepareComponentToken$1=_e=>({fontWeight:400,defaultShadow:`0 ${_e.controlOutlineWidth}px 0 ${_e.controlTmpOutline}`,primaryShadow:`0 ${_e.controlOutlineWidth}px 0 ${_e.controlOutline}`,dangerShadow:`0 ${_e.controlOutlineWidth}px 0 ${_e.colorErrorOutline}`,primaryColor:_e.colorTextLightSolid,dangerColor:_e.colorTextLightSolid,borderColorDisabled:_e.colorBorder,defaultGhostColor:_e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:_e.colorBgContainer,paddingInline:_e.paddingContentHorizontal-_e.lineWidth,paddingInlineLG:_e.paddingContentHorizontal-_e.lineWidth,paddingInlineSM:8-_e.lineWidth,onlyIconSize:_e.fontSizeLG,onlyIconSizeSM:_e.fontSizeLG-2,onlyIconSizeLG:_e.fontSizeLG+2,groupBorderColor:_e.colorPrimaryHover,linkHoverBg:"transparent",textHoverBg:_e.colorBgTextHover,defaultColor:_e.colorText,defaultBg:_e.colorBgContainer,defaultBorderColor:_e.colorBorder,defaultBorderColorDisabled:_e.colorBorder,contentFontSize:_e.fontSize,contentFontSizeSM:_e.fontSize,contentFontSizeLG:_e.fontSizeLG}),useStyle$1=genComponentStyleHook("Button",_e=>{const et=prepareToken$1(_e);return[genSharedButtonStyle(et),genSizeSmallButtonStyle(et),genSizeBaseButtonStyle(et),genSizeLargeButtonStyle(et),genBlockButtonStyle(et),genTypeButtonStyle(et),genGroupStyle$1(et)]},prepareComponentToken$1);function compactItemBorder(_e,et,tt){const{focusElCls:rt,focus:nt,borderElCls:it}=tt,at=it?"> *":"",st=["hover",nt?"focus":null,"active"].filter(Boolean).map(lt=>`&:${lt} ${at}`).join(",");return{[`&-item:not(${et}-last-item)`]:{marginInlineEnd:-_e.lineWidth},"&-item":Object.assign(Object.assign({[st]:{zIndex:2}},rt?{[`&${rt}`]:{zIndex:2}}:{}),{[`&[disabled] ${at}`]:{zIndex:0}})}}function compactItemBorderRadius(_e,et,tt){const{borderElCls:rt}=tt,nt=rt?`> ${rt}`:"";return{[`&-item:not(${et}-first-item):not(${et}-last-item) ${nt}`]:{borderRadius:0},[`&-item:not(${et}-last-item)${et}-first-item`]:{[`& ${nt}, &${_e}-sm ${nt}, &${_e}-lg ${nt}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${et}-first-item)${et}-last-item`]:{[`& ${nt}, &${_e}-sm ${nt}, &${_e}-lg ${nt}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function genCompactItemStyle(_e){let et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:tt}=_e,rt=`${tt}-compact`;return{[rt]:Object.assign(Object.assign({},compactItemBorder(_e,rt,et)),compactItemBorderRadius(tt,rt,et))}}function compactItemVerticalBorder(_e,et){return{[`&-item:not(${et}-last-item)`]:{marginBottom:-_e.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function compactItemBorderVerticalRadius(_e,et){return{[`&-item:not(${et}-first-item):not(${et}-last-item)`]:{borderRadius:0},[`&-item${et}-first-item:not(${et}-last-item)`]:{[`&, &${_e}-sm, &${_e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${et}-last-item:not(${et}-first-item)`]:{[`&, &${_e}-sm, &${_e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function genCompactItemVerticalStyle(_e){const et=`${_e.componentCls}-compact-vertical`;return{[et]:Object.assign(Object.assign({},compactItemVerticalBorder(_e,et)),compactItemBorderVerticalRadius(_e.componentCls,et))}}const CompactCmp=genSubStyleComponent(["Button","compact"],_e=>{const et=prepareToken$1(_e);return[genCompactItemStyle(et),genCompactItemVerticalStyle(et)]},prepareComponentToken$1);var __rest$5=globalThis&&globalThis.__rest||function(_e,et){var tt={};for(var rt in _e)Object.prototype.hasOwnProperty.call(_e,rt)&&et.indexOf(rt)<0&&(tt[rt]=_e[rt]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,rt=Object.getOwnPropertySymbols(_e);nt{var tt,rt;const{loading:nt=!1,prefixCls:it,type:at="default",danger:st,shape:lt="default",size:dt,styles:ht,disabled:pt,className:mt,rootClassName:gt,children:vt,icon:xt,ghost:yt=!1,block:bt=!1,htmlType:wt="button",classNames:Et,style:$t={}}=_e,Pt=__rest$5(_e,["loading","prefixCls","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","ghost","block","htmlType","classNames","style"]),{getPrefixCls:kt,autoInsertSpaceInButton:Lt,direction:jt,button:qt}=reactExports.useContext(ConfigContext),Dt=kt("btn",it),[Ht,Xt]=useStyle$1(Dt),Mt=reactExports.useContext(DisabledContext),_t=pt??Mt,At=reactExports.useContext(GroupSizeContext),Tt=reactExports.useMemo(()=>getLoadingConfig(nt),[nt]),[Bt,Ot]=reactExports.useState(Tt.loading),[Ut,Wt]=reactExports.useState(!1),St=composeRef(et,reactExports.createRef()),Ft=reactExports.Children.count(vt)===1&&!xt&&!isUnBorderedButtonType(at);reactExports.useEffect(()=>{let gr=null;Tt.delay>0?gr=setTimeout(()=>{gr=null,Ot(!0)},Tt.delay):Ot(Tt.loading);function yr(){gr&&(clearTimeout(gr),gr=null)}return yr},[Tt]),reactExports.useEffect(()=>{if(!St||!St.current||Lt===!1)return;const gr=St.current.textContent;Ft&&isTwoCNChar(gr)?Ut||Wt(!0):Ut&&Wt(!1)},[St]);const Vt=gr=>{const{onClick:yr}=_e;if(Bt||_t){gr.preventDefault();return}yr?.(gr)},Rt=Lt!==!1,{compactSize:Kt,compactItemClassnames:Zt}=useCompactItemContext(Dt,jt),Jt={large:"lg",small:"sm",middle:void 0},rr=useSize$1(gr=>{var yr,Er;return(Er=(yr=dt??Kt)!==null&&yr!==void 0?yr:At)!==null&&Er!==void 0?Er:gr}),or=rr&&Jt[rr]||"",ar=Bt?"loading":xt,ir=omit(Pt,["navigate"]),pr=classNames(Dt,Xt,{[`${Dt}-${lt}`]:lt!=="default"&<,[`${Dt}-${at}`]:at,[`${Dt}-${or}`]:or,[`${Dt}-icon-only`]:!vt&&vt!==0&&!!ar,[`${Dt}-background-ghost`]:yt&&!isUnBorderedButtonType(at),[`${Dt}-loading`]:Bt,[`${Dt}-two-chinese-chars`]:Ut&&Rt&&!Bt,[`${Dt}-block`]:bt,[`${Dt}-dangerous`]:!!st,[`${Dt}-rtl`]:jt==="rtl"},Zt,mt,gt,qt?.className),nr=Object.assign(Object.assign({},qt?.style),$t),hr=classNames(Et?.icon,(tt=qt?.classNames)===null||tt===void 0?void 0:tt.icon),Ar=Object.assign(Object.assign({},ht?.icon||{}),((rt=qt?.styles)===null||rt===void 0?void 0:rt.icon)||{}),ur=xt&&!Bt?React.createElement(IconWrapper$1,{prefixCls:Dt,className:hr,style:Ar},xt):React.createElement(LoadingIcon$1,{existIcon:!!xt,prefixCls:Dt,loading:!!Bt}),vr=vt||vt===0?spaceChildren(vt,Ft&&Rt):null;if(ir.href!==void 0)return Ht(React.createElement("a",Object.assign({},ir,{className:classNames(pr,{[`${Dt}-disabled`]:_t}),style:nr,onClick:Vt,ref:St}),ur,vr));let wr=React.createElement("button",Object.assign({},Pt,{type:wt,className:pr,style:nr,onClick:Vt,disabled:_t,ref:St}),ur,vr,Zt&&React.createElement(CompactCmp,{key:"compact",prefixCls:Dt}));return isUnBorderedButtonType(at)||(wr=React.createElement(Wave$1,{component:"Button",disabled:!!Bt},wr)),Ht(wr)},Button=reactExports.forwardRef(InternalButton);Button.Group=Group;Button.__ANT_BUTTON=!0;const Button$1=Button;function isThenable(_e){return!!(_e&&_e.then)}const ActionButton=_e=>{const{type:et,children:tt,prefixCls:rt,buttonProps:nt,close:it,autoFocus:at,emitEvent:st,isSilent:lt,quitOnNullishReturnValue:dt,actionFn:ht}=_e,pt=reactExports.useRef(!1),mt=reactExports.useRef(null),[gt,vt]=useSafeState(!1),xt=function(){it?.apply(void 0,arguments)};reactExports.useEffect(()=>{let wt=null;return at&&(wt=setTimeout(()=>{var Et;(Et=mt.current)===null||Et===void 0||Et.focus()})),()=>{wt&&clearTimeout(wt)}},[]);const yt=wt=>{isThenable(wt)&&(vt(!0),wt.then(function(){vt(!1,!0),xt.apply(void 0,arguments),pt.current=!1},Et=>{if(vt(!1,!0),pt.current=!1,!lt?.())return Promise.reject(Et)}))},bt=wt=>{if(pt.current)return;if(pt.current=!0,!ht){xt();return}let Et;if(st){if(Et=ht(wt),dt&&!isThenable(Et)){pt.current=!1,xt(wt);return}}else if(ht.length)Et=ht(it),pt.current=!1;else if(Et=ht(),!Et){xt();return}yt(Et)};return reactExports.createElement(Button$1,Object.assign({},convertLegacyProps(et),{onClick:bt,loading:gt,prefixCls:rt},nt,{ref:mt}),tt)},ActionButton$1=ActionButton,ModalContext=React.createContext({}),{Provider:ModalContextProvider}=ModalContext,ConfirmCancelBtn=()=>{const{autoFocusButton:_e,cancelButtonProps:et,cancelTextLocale:tt,isSilent:rt,mergedOkCancel:nt,rootPrefixCls:it,close:at,onCancel:st,onConfirm:lt}=reactExports.useContext(ModalContext);return nt?React.createElement(ActionButton$1,{isSilent:rt,actionFn:st,close:function(){at?.apply(void 0,arguments),lt?.(!1)},autoFocus:_e==="cancel",buttonProps:et,prefixCls:`${it}-btn`},tt):null},CancelBtn=ConfirmCancelBtn,ConfirmOkBtn=()=>{const{autoFocusButton:_e,close:et,isSilent:tt,okButtonProps:rt,rootPrefixCls:nt,okTextLocale:it,okType:at,onConfirm:st,onOk:lt}=reactExports.useContext(ModalContext);return React.createElement(ActionButton$1,{isSilent:tt,type:at||"primary",actionFn:lt,close:function(){et?.apply(void 0,arguments),st?.(!0)},autoFocus:_e==="ok",buttonProps:rt,prefixCls:`${nt}-btn`},it)},OkBtn=ConfirmOkBtn;var OrderContext=reactExports.createContext(null),EMPTY_LIST=[];function useDom(_e,et){var tt=reactExports.useState(function(){if(!canUseDom())return null;var vt=document.createElement("div");return vt}),rt=_slicedToArray(tt,1),nt=rt[0],it=reactExports.useRef(!1),at=reactExports.useContext(OrderContext),st=reactExports.useState(EMPTY_LIST),lt=_slicedToArray(st,2),dt=lt[0],ht=lt[1],pt=at||(it.current?void 0:function(vt){ht(function(xt){var yt=[vt].concat(_toConsumableArray(xt));return yt})});function mt(){nt.parentElement||document.body.appendChild(nt),it.current=!0}function gt(){var vt;(vt=nt.parentElement)===null||vt===void 0||vt.removeChild(nt),it.current=!1}return useLayoutEffect(function(){return _e?at?at(mt):mt():gt(),gt},[_e]),useLayoutEffect(function(){dt.length&&(dt.forEach(function(vt){return vt()}),ht(EMPTY_LIST))},[dt]),[nt,pt]}var cached;function getScrollBarSize(_e){if(typeof document>"u")return 0;if(_e||cached===void 0){var et=document.createElement("div");et.style.width="100%",et.style.height="200px";var tt=document.createElement("div"),rt=tt.style;rt.position="absolute",rt.top="0",rt.left="0",rt.pointerEvents="none",rt.visibility="hidden",rt.width="200px",rt.height="150px",rt.overflow="hidden",tt.appendChild(et),document.body.appendChild(tt);var nt=et.offsetWidth;tt.style.overflow="scroll";var it=et.offsetWidth;nt===it&&(it=tt.clientWidth),document.body.removeChild(tt),cached=nt-it}return cached}function ensureSize(_e){var et=_e.match(/^(.*)px$/),tt=Number(et?.[1]);return Number.isNaN(tt)?getScrollBarSize():tt}function getTargetScrollBarSize(_e){if(typeof document>"u"||!_e||!(_e instanceof Element))return{width:0,height:0};var et=getComputedStyle(_e,"::-webkit-scrollbar"),tt=et.width,rt=et.height;return{width:ensureSize(tt),height:ensureSize(rt)}}function isBodyOverflowing(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var UNIQUE_ID="rc-util-locker-".concat(Date.now()),uuid$2=0;function useScrollLocker(_e){var et=!!_e,tt=reactExports.useState(function(){return uuid$2+=1,"".concat(UNIQUE_ID,"_").concat(uuid$2)}),rt=_slicedToArray(tt,1),nt=rt[0];useLayoutEffect(function(){if(et){var it=getTargetScrollBarSize(document.body).width,at=isBodyOverflowing();updateCSS(` +html body { + overflow-y: hidden; + `.concat(at?"width: calc(100% - ".concat(it,"px);"):"",` +}`),nt)}else removeCSS(nt);return function(){removeCSS(nt)}},[et,nt])}var inline=!1;function inlineMock(_e){return typeof _e=="boolean"&&(inline=_e),inline}var getPortalContainer=function(et){return et===!1?!1:!canUseDom()||!et?null:typeof et=="string"?document.querySelector(et):typeof et=="function"?et():et},Portal=reactExports.forwardRef(function(_e,et){var tt=_e.open,rt=_e.autoLock,nt=_e.getContainer;_e.debug;var it=_e.autoDestroy,at=it===void 0?!0:it,st=_e.children,lt=reactExports.useState(tt),dt=_slicedToArray(lt,2),ht=dt[0],pt=dt[1],mt=ht||tt;reactExports.useEffect(function(){(at||tt)&&pt(tt)},[tt,at]);var gt=reactExports.useState(function(){return getPortalContainer(nt)}),vt=_slicedToArray(gt,2),xt=vt[0],yt=vt[1];reactExports.useEffect(function(){var Ht=getPortalContainer(nt);yt(Ht??null)});var bt=useDom(mt&&!xt),wt=_slicedToArray(bt,2),Et=wt[0],$t=wt[1],Pt=xt??Et;useScrollLocker(rt&&tt&&canUseDom()&&(Pt===Et||Pt===document.body));var kt=null;if(st&&supportRef(st)&&et){var Lt=st;kt=Lt.ref}var jt=useComposeRef(kt,et);if(!mt||!canUseDom()||xt===void 0)return null;var qt=Pt===!1||inlineMock(),Dt=st;return et&&(Dt=reactExports.cloneElement(st,{ref:jt})),reactExports.createElement(OrderContext.Provider,{value:$t},qt?Dt:reactDomExports.createPortal(Dt,Pt))}),RefContext=reactExports.createContext({});function getUseId(){var _e=_objectSpread2({},React$1);return _e.useId}var uuid$1=0,useOriginId=getUseId();const useId=useOriginId?function(et){var tt=useOriginId();return et||tt}:function(et){var tt=reactExports.useState("ssr-id"),rt=_slicedToArray(tt,2),nt=rt[0],it=rt[1];return reactExports.useEffect(function(){var at=uuid$1;uuid$1+=1,it("rc_unique_".concat(at))},[]),et||nt};function getMotionName(_e,et,tt){var rt=et;return!rt&&tt&&(rt="".concat(_e,"-").concat(tt)),rt}function getScroll(_e,et){var tt=_e["page".concat(et?"Y":"X","Offset")],rt="scroll".concat(et?"Top":"Left");if(typeof tt!="number"){var nt=_e.document;tt=nt.documentElement[rt],typeof tt!="number"&&(tt=nt.body[rt])}return tt}function offset(_e){var et=_e.getBoundingClientRect(),tt={left:et.left,top:et.top},rt=_e.ownerDocument,nt=rt.defaultView||rt.parentWindow;return tt.left+=getScroll(nt),tt.top+=getScroll(nt,!0),tt}const MemoChildren=reactExports.memo(function(_e){var et=_e.children;return et},function(_e,et){var tt=et.shouldUpdate;return!tt});var sentinelStyle={width:0,height:0,overflow:"hidden",outline:"none"},Panel=React.forwardRef(function(_e,et){var tt=_e.prefixCls,rt=_e.className,nt=_e.style,it=_e.title,at=_e.ariaId,st=_e.footer,lt=_e.closable,dt=_e.closeIcon,ht=_e.onClose,pt=_e.children,mt=_e.bodyStyle,gt=_e.bodyProps,vt=_e.modalRender,xt=_e.onMouseDown,yt=_e.onMouseUp,bt=_e.holderRef,wt=_e.visible,Et=_e.forceRender,$t=_e.width,Pt=_e.height,kt=_e.classNames,Lt=_e.styles,jt=React.useContext(RefContext),qt=jt.panel,Dt=useComposeRef(bt,qt),Ht=reactExports.useRef(),Xt=reactExports.useRef();React.useImperativeHandle(et,function(){return{focus:function(){var Ut;(Ut=Ht.current)===null||Ut===void 0||Ut.focus()},changeActive:function(Ut){var Wt=document,Ct=Wt.activeElement;Ut&&Ct===Xt.current?Ht.current.focus():!Ut&&Ct===Ht.current&&Xt.current.focus()}}});var Mt={};$t!==void 0&&(Mt.width=$t),Pt!==void 0&&(Mt.height=Pt);var _t;st&&(_t=React.createElement("div",{className:classNames("".concat(tt,"-footer"),kt?.footer),style:_objectSpread2({},Lt?.footer)},st));var At;it&&(At=React.createElement("div",{className:classNames("".concat(tt,"-header"),kt?.header),style:_objectSpread2({},Lt?.header)},React.createElement("div",{className:"".concat(tt,"-title"),id:at},it)));var Tt;lt&&(Tt=React.createElement("button",{type:"button",onClick:ht,"aria-label":"Close",className:"".concat(tt,"-close")},dt||React.createElement("span",{className:"".concat(tt,"-close-x")})));var Bt=React.createElement("div",{className:classNames("".concat(tt,"-content"),kt?.content),style:Lt?.content},Tt,At,React.createElement("div",_extends$3({className:classNames("".concat(tt,"-body"),kt?.body),style:_objectSpread2(_objectSpread2({},mt),Lt?.body)},gt),pt),_t);return React.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":it?at:null,"aria-modal":"true",ref:Dt,style:_objectSpread2(_objectSpread2({},nt),Mt),className:classNames(tt,rt),onMouseDown:xt,onMouseUp:yt},React.createElement("div",{tabIndex:0,ref:Ht,style:sentinelStyle,"aria-hidden":"true"}),React.createElement(MemoChildren,{shouldUpdate:wt||Et},vt?vt(Bt):Bt),React.createElement("div",{tabIndex:0,ref:Xt,style:sentinelStyle,"aria-hidden":"true"}))}),Content=reactExports.forwardRef(function(_e,et){var tt=_e.prefixCls,rt=_e.title,nt=_e.style,it=_e.className,at=_e.visible,st=_e.forceRender,lt=_e.destroyOnClose,dt=_e.motionName,ht=_e.ariaId,pt=_e.onVisibleChanged,mt=_e.mousePosition,gt=reactExports.useRef(),vt=reactExports.useState(),xt=_slicedToArray(vt,2),yt=xt[0],bt=xt[1],wt={};yt&&(wt.transformOrigin=yt);function Et(){var $t=offset(gt.current);bt(mt?"".concat(mt.x-$t.left,"px ").concat(mt.y-$t.top,"px"):"")}return reactExports.createElement(CSSMotion,{visible:at,onVisibleChanged:pt,onAppearPrepare:Et,onEnterPrepare:Et,forceRender:st,motionName:dt,removeOnLeave:lt,ref:gt},function($t,Pt){var kt=$t.className,Lt=$t.style;return reactExports.createElement(Panel,_extends$3({},_e,{ref:et,title:rt,ariaId:ht,prefixCls:tt,holderRef:Pt,style:_objectSpread2(_objectSpread2(_objectSpread2({},Lt),nt),wt),className:classNames(it,kt)}))})});Content.displayName="Content";function Mask(_e){var et=_e.prefixCls,tt=_e.style,rt=_e.visible,nt=_e.maskProps,it=_e.motionName,at=_e.className;return reactExports.createElement(CSSMotion,{key:"mask",visible:rt,motionName:it,leavedClassName:"".concat(et,"-mask-hidden")},function(st,lt){var dt=st.className,ht=st.style;return reactExports.createElement("div",_extends$3({ref:lt,style:_objectSpread2(_objectSpread2({},ht),tt),className:classNames("".concat(et,"-mask"),dt,at)},nt))})}function Dialog(_e){var et=_e.prefixCls,tt=et===void 0?"rc-dialog":et,rt=_e.zIndex,nt=_e.visible,it=nt===void 0?!1:nt,at=_e.keyboard,st=at===void 0?!0:at,lt=_e.focusTriggerAfterClose,dt=lt===void 0?!0:lt,ht=_e.wrapStyle,pt=_e.wrapClassName,mt=_e.wrapProps,gt=_e.onClose,vt=_e.afterOpenChange,xt=_e.afterClose,yt=_e.transitionName,bt=_e.animation,wt=_e.closable,Et=wt===void 0?!0:wt,$t=_e.mask,Pt=$t===void 0?!0:$t,kt=_e.maskTransitionName,Lt=_e.maskAnimation,jt=_e.maskClosable,qt=jt===void 0?!0:jt,Dt=_e.maskStyle,Ht=_e.maskProps,Xt=_e.rootClassName,Mt=_e.classNames,_t=_e.styles,At=reactExports.useRef(),Tt=reactExports.useRef(),Bt=reactExports.useRef(),Ot=reactExports.useState(it),Ut=_slicedToArray(Ot,2),Wt=Ut[0],Ct=Ut[1],St=useId();function Ft(){contains(Tt.current,document.activeElement)||(At.current=document.activeElement)}function Vt(){if(!contains(Tt.current,document.activeElement)){var pr;(pr=Bt.current)===null||pr===void 0||pr.focus()}}function Rt(pr){if(pr)Vt();else{if(Ct(!1),Pt&&At.current&&dt){try{At.current.focus({preventScroll:!0})}catch{}At.current=null}Wt&&xt?.()}vt?.(pr)}function Kt(pr){gt?.(pr)}var Zt=reactExports.useRef(!1),Jt=reactExports.useRef(),rr=function(){clearTimeout(Jt.current),Zt.current=!0},or=function(){Jt.current=setTimeout(function(){Zt.current=!1})},ar=null;qt&&(ar=function(nr){Zt.current?Zt.current=!1:Tt.current===nr.target&&Kt(nr)});function ir(pr){if(st&&pr.keyCode===KeyCode.ESC){pr.stopPropagation(),Kt(pr);return}it&&pr.keyCode===KeyCode.TAB&&Bt.current.changeActive(!pr.shiftKey)}return reactExports.useEffect(function(){it&&(Ct(!0),Ft())},[it]),reactExports.useEffect(function(){return function(){clearTimeout(Jt.current)}},[]),reactExports.createElement("div",_extends$3({className:classNames("".concat(tt,"-root"),Xt)},pickAttrs(_e,{data:!0})),reactExports.createElement(Mask,{prefixCls:tt,visible:Pt&&it,motionName:getMotionName(tt,kt,Lt),style:_objectSpread2(_objectSpread2({zIndex:rt},Dt),_t?.mask),maskProps:Ht,className:Mt?.mask}),reactExports.createElement("div",_extends$3({tabIndex:-1,onKeyDown:ir,className:classNames("".concat(tt,"-wrap"),pt,Mt?.wrapper),ref:Tt,onClick:ar,style:_objectSpread2(_objectSpread2(_objectSpread2({zIndex:rt},ht),_t?.wrapper),{},{display:Wt?null:"none"})},mt),reactExports.createElement(Content,_extends$3({},_e,{onMouseDown:rr,onMouseUp:or,ref:Bt,closable:Et,ariaId:St,prefixCls:tt,visible:it&&Wt,onClose:Kt,onVisibleChanged:Rt,motionName:getMotionName(tt,yt,bt)}))))}var DialogWrap=function(et){var tt=et.visible,rt=et.getContainer,nt=et.forceRender,it=et.destroyOnClose,at=it===void 0?!1:it,st=et.afterClose,lt=et.panelRef,dt=reactExports.useState(tt),ht=_slicedToArray(dt,2),pt=ht[0],mt=ht[1],gt=reactExports.useMemo(function(){return{panel:lt}},[lt]);return reactExports.useEffect(function(){tt&&mt(!0)},[tt]),!nt&&at&&!pt?null:reactExports.createElement(RefContext.Provider,{value:gt},reactExports.createElement(Portal,{open:tt||nt||pt,autoDestroy:!1,getContainer:rt,autoLock:tt||pt},reactExports.createElement(Dialog,_extends$3({},et,{destroyOnClose:at,afterClose:function(){st?.(),mt(!1)}}))))};DialogWrap.displayName="Dialog";function useInnerClosable(_e,et,tt){return typeof _e=="boolean"?_e:et===void 0?!!tt:et!==!1&&et!==null}function useClosable(_e,et,tt){let rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:React.createElement(CloseOutlined$1,null),nt=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(!useInnerClosable(_e,et,nt))return[!1,null];const at=typeof et=="boolean"||et===void 0||et===null?rt:et;return[!0,tt?tt(at):at]}const canUseDocElement=()=>canUseDom()&&window.document.documentElement;var HOOK_MARK="RC_FORM_INTERNAL_HOOKS",warningFunc=function(){warningOnce(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Context=reactExports.createContext({getFieldValue:warningFunc,getFieldsValue:warningFunc,getFieldError:warningFunc,getFieldWarning:warningFunc,getFieldsError:warningFunc,isFieldsTouched:warningFunc,isFieldTouched:warningFunc,isFieldValidating:warningFunc,isFieldsValidating:warningFunc,resetFields:warningFunc,setFields:warningFunc,setFieldValue:warningFunc,setFieldsValue:warningFunc,validateFields:warningFunc,submit:warningFunc,getInternalHooks:function(){return warningFunc(),{dispatch:warningFunc,initEntityValue:warningFunc,registerField:warningFunc,useSubscribe:warningFunc,setInitialValues:warningFunc,destroyForm:warningFunc,setCallbacks:warningFunc,registerWatch:warningFunc,getFields:warningFunc,setValidateMessages:warningFunc,setPreserve:warningFunc,getInitialValue:warningFunc}}}),ListContext=reactExports.createContext(null);function toArray(_e){return _e==null?[]:Array.isArray(_e)?_e:[_e]}function isFormInstance(_e){return _e&&!!_e._init}function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(_e){for(var et=1;et"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _construct(_e,et,tt){return _isNativeReflectConstruct$1()?_construct=Reflect.construct.bind():_construct=function(nt,it,at){var st=[null];st.push.apply(st,it);var lt=Function.bind.apply(nt,st),dt=new lt;return at&&_setPrototypeOf$1(dt,at.prototype),dt},_construct.apply(null,arguments)}function _isNativeFunction(_e){return Function.toString.call(_e).indexOf("[native code]")!==-1}function _wrapNativeSuper(_e){var et=typeof Map=="function"?new Map:void 0;return _wrapNativeSuper=function(rt){if(rt===null||!_isNativeFunction(rt))return rt;if(typeof rt!="function")throw new TypeError("Super expression must either be null or a function");if(typeof et<"u"){if(et.has(rt))return et.get(rt);et.set(rt,nt)}function nt(){return _construct(rt,arguments,_getPrototypeOf$1(this).constructor)}return nt.prototype=Object.create(rt.prototype,{constructor:{value:nt,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$1(nt,rt)},_wrapNativeSuper(_e)}var formatRegExp=/%[sdj%]/g,warning$1=function(){};typeof process<"u"&&process.env;function convertFieldsError(_e){if(!_e||!_e.length)return null;var et={};return _e.forEach(function(tt){var rt=tt.field;et[rt]=et[rt]||[],et[rt].push(tt)}),et}function format$1(_e){for(var et=arguments.length,tt=new Array(et>1?et-1:0),rt=1;rt=it)return st;switch(st){case"%s":return String(tt[nt++]);case"%d":return Number(tt[nt++]);case"%j":try{return JSON.stringify(tt[nt++])}catch{return"[Circular]"}break;default:return st}});return at}return _e}function isNativeStringType(_e){return _e==="string"||_e==="url"||_e==="hex"||_e==="email"||_e==="date"||_e==="pattern"}function isEmptyValue(_e,et){return!!(_e==null||et==="array"&&Array.isArray(_e)&&!_e.length||isNativeStringType(et)&&typeof _e=="string"&&!_e)}function asyncParallelArray(_e,et,tt){var rt=[],nt=0,it=_e.length;function at(st){rt.push.apply(rt,st||[]),nt++,nt===it&&tt(rt)}_e.forEach(function(st){et(st,at)})}function asyncSerialArray(_e,et,tt){var rt=0,nt=_e.length;function it(at){if(at&&at.length){tt(at);return}var st=rt;rt=rt+1,st()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},types={integer:function(et){return types.number(et)&&parseInt(et,10)===et},float:function(et){return types.number(et)&&!types.integer(et)},array:function(et){return Array.isArray(et)},regexp:function(et){if(et instanceof RegExp)return!0;try{return!!new RegExp(et)}catch{return!1}},date:function(et){return typeof et.getTime=="function"&&typeof et.getMonth=="function"&&typeof et.getYear=="function"&&!isNaN(et.getTime())},number:function(et){return isNaN(et)?!1:typeof et=="number"},object:function(et){return typeof et=="object"&&!types.array(et)},method:function(et){return typeof et=="function"},email:function(et){return typeof et=="string"&&et.length<=320&&!!et.match(pattern$2.email)},url:function(et){return typeof et=="string"&&et.length<=2048&&!!et.match(getUrlRegex())},hex:function(et){return typeof et=="string"&&!!et.match(pattern$2.hex)}},type$1=function(et,tt,rt,nt,it){if(et.required&&tt===void 0){required$1(et,tt,rt,nt,it);return}var at=["integer","float","array","regexp","object","method","email","number","date","url","hex"],st=et.type;at.indexOf(st)>-1?types[st](tt)||nt.push(format$1(it.messages.types[st],et.fullField,et.type)):st&&typeof tt!==et.type&&nt.push(format$1(it.messages.types[st],et.fullField,et.type))},range=function(et,tt,rt,nt,it){var at=typeof et.len=="number",st=typeof et.min=="number",lt=typeof et.max=="number",dt=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ht=tt,pt=null,mt=typeof tt=="number",gt=typeof tt=="string",vt=Array.isArray(tt);if(mt?pt="number":gt?pt="string":vt&&(pt="array"),!pt)return!1;vt&&(ht=tt.length),gt&&(ht=tt.replace(dt,"_").length),at?ht!==et.len&&nt.push(format$1(it.messages[pt].len,et.fullField,et.len)):st&&!lt&&htet.max?nt.push(format$1(it.messages[pt].max,et.fullField,et.max)):st&<&&(htet.max)&&nt.push(format$1(it.messages[pt].range,et.fullField,et.min,et.max))},ENUM$1="enum",enumerable$1=function(et,tt,rt,nt,it){et[ENUM$1]=Array.isArray(et[ENUM$1])?et[ENUM$1]:[],et[ENUM$1].indexOf(tt)===-1&&nt.push(format$1(it.messages[ENUM$1],et.fullField,et[ENUM$1].join(", ")))},pattern$1=function(et,tt,rt,nt,it){if(et.pattern){if(et.pattern instanceof RegExp)et.pattern.lastIndex=0,et.pattern.test(tt)||nt.push(format$1(it.messages.pattern.mismatch,et.fullField,tt,et.pattern));else if(typeof et.pattern=="string"){var at=new RegExp(et.pattern);at.test(tt)||nt.push(format$1(it.messages.pattern.mismatch,et.fullField,tt,et.pattern))}}},rules={required:required$1,whitespace,type:type$1,range,enum:enumerable$1,pattern:pattern$1},string=function(et,tt,rt,nt,it){var at=[],st=et.required||!et.required&&nt.hasOwnProperty(et.field);if(st){if(isEmptyValue(tt,"string")&&!et.required)return rt();rules.required(et,tt,nt,at,it,"string"),isEmptyValue(tt,"string")||(rules.type(et,tt,nt,at,it),rules.range(et,tt,nt,at,it),rules.pattern(et,tt,nt,at,it),et.whitespace===!0&&rules.whitespace(et,tt,nt,at,it))}rt(at)},method=function(et,tt,rt,nt,it){var at=[],st=et.required||!et.required&&nt.hasOwnProperty(et.field);if(st){if(isEmptyValue(tt)&&!et.required)return rt();rules.required(et,tt,nt,at,it),tt!==void 0&&rules.type(et,tt,nt,at,it)}rt(at)},number=function(et,tt,rt,nt,it){var at=[],st=et.required||!et.required&&nt.hasOwnProperty(et.field);if(st){if(tt===""&&(tt=void 0),isEmptyValue(tt)&&!et.required)return rt();rules.required(et,tt,nt,at,it),tt!==void 0&&(rules.type(et,tt,nt,at,it),rules.range(et,tt,nt,at,it))}rt(at)},_boolean=function(et,tt,rt,nt,it){var at=[],st=et.required||!et.required&&nt.hasOwnProperty(et.field);if(st){if(isEmptyValue(tt)&&!et.required)return rt();rules.required(et,tt,nt,at,it),tt!==void 0&&rules.type(et,tt,nt,at,it)}rt(at)},regexp=function(et,tt,rt,nt,it){var at=[],st=et.required||!et.required&&nt.hasOwnProperty(et.field);if(st){if(isEmptyValue(tt)&&!et.required)return rt();rules.required(et,tt,nt,at,it),isEmptyValue(tt)||rules.type(et,tt,nt,at,it)}rt(at)},integer=function(et,tt,rt,nt,it){var at=[],st=et.required||!et.required&&nt.hasOwnProperty(et.field);if(st){if(isEmptyValue(tt)&&!et.required)return rt();rules.required(et,tt,nt,at,it),tt!==void 0&&(rules.type(et,tt,nt,at,it),rules.range(et,tt,nt,at,it))}rt(at)},floatFn=function(et,tt,rt,nt,it){var at=[],st=et.required||!et.required&&nt.hasOwnProperty(et.field);if(st){if(isEmptyValue(tt)&&!et.required)return rt();rules.required(et,tt,nt,at,it),tt!==void 0&&(rules.type(et,tt,nt,at,it),rules.range(et,tt,nt,at,it))}rt(at)},array=function(et,tt,rt,nt,it){var at=[],st=et.required||!et.required&&nt.hasOwnProperty(et.field);if(st){if(tt==null&&!et.required)return rt();rules.required(et,tt,nt,at,it,"array"),tt!=null&&(rules.type(et,tt,nt,at,it),rules.range(et,tt,nt,at,it))}rt(at)},object=function(et,tt,rt,nt,it){var at=[],st=et.required||!et.required&&nt.hasOwnProperty(et.field);if(st){if(isEmptyValue(tt)&&!et.required)return rt();rules.required(et,tt,nt,at,it),tt!==void 0&&rules.type(et,tt,nt,at,it)}rt(at)},ENUM="enum",enumerable=function(et,tt,rt,nt,it){var at=[],st=et.required||!et.required&&nt.hasOwnProperty(et.field);if(st){if(isEmptyValue(tt)&&!et.required)return rt();rules.required(et,tt,nt,at,it),tt!==void 0&&rules[ENUM](et,tt,nt,at,it)}rt(at)},pattern=function(et,tt,rt,nt,it){var at=[],st=et.required||!et.required&&nt.hasOwnProperty(et.field);if(st){if(isEmptyValue(tt,"string")&&!et.required)return rt();rules.required(et,tt,nt,at,it),isEmptyValue(tt,"string")||rules.pattern(et,tt,nt,at,it)}rt(at)},date=function(et,tt,rt,nt,it){var at=[],st=et.required||!et.required&&nt.hasOwnProperty(et.field);if(st){if(isEmptyValue(tt,"date")&&!et.required)return rt();if(rules.required(et,tt,nt,at,it),!isEmptyValue(tt,"date")){var lt;tt instanceof Date?lt=tt:lt=new Date(tt),rules.type(et,lt,nt,at,it),lt&&rules.range(et,lt.getTime(),nt,at,it)}}rt(at)},required=function(et,tt,rt,nt,it){var at=[],st=Array.isArray(tt)?"array":typeof tt;rules.required(et,tt,nt,at,it,st),rt(at)},type=function(et,tt,rt,nt,it){var at=et.type,st=[],lt=et.required||!et.required&&nt.hasOwnProperty(et.field);if(lt){if(isEmptyValue(tt,at)&&!et.required)return rt();rules.required(et,tt,nt,st,it,at),isEmptyValue(tt,at)||rules.type(et,tt,nt,st,it)}rt(st)},any=function(et,tt,rt,nt,it){var at=[],st=et.required||!et.required&&nt.hasOwnProperty(et.field);if(st){if(isEmptyValue(tt)&&!et.required)return rt();rules.required(et,tt,nt,at,it)}rt(at)},validators={string,method,number,boolean:_boolean,regexp,integer,float:floatFn,array,object,enum:enumerable,pattern,date,url:type,hex:type,email:type,required,any};function newMessages(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var et=JSON.parse(JSON.stringify(this));return et.clone=this.clone,et}}}var messages=newMessages(),Schema=function(){function _e(tt){this.rules=null,this._messages=messages,this.define(tt)}var et=_e.prototype;return et.define=function(rt){var nt=this;if(!rt)throw new Error("Cannot configure a schema with no rules");if(typeof rt!="object"||Array.isArray(rt))throw new Error("Rules must be an object");this.rules={},Object.keys(rt).forEach(function(it){var at=rt[it];nt.rules[it]=Array.isArray(at)?at:[at]})},et.messages=function(rt){return rt&&(this._messages=deepMerge(newMessages(),rt)),this._messages},et.validate=function(rt,nt,it){var at=this;nt===void 0&&(nt={}),it===void 0&&(it=function(){});var st=rt,lt=nt,dt=it;if(typeof lt=="function"&&(dt=lt,lt={}),!this.rules||Object.keys(this.rules).length===0)return dt&&dt(null,st),Promise.resolve(st);function ht(xt){var yt=[],bt={};function wt($t){if(Array.isArray($t)){var Pt;yt=(Pt=yt).concat.apply(Pt,$t)}else yt.push($t)}for(var Et=0;Et2&&arguments[2]!==void 0?arguments[2]:!1;return _e&&_e.some(function(rt){return matchNamePath(et,rt,tt)})}function matchNamePath(_e,et){var tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!_e||!et||!tt&&_e.length!==et.length?!1:et.every(function(rt,nt){return _e[nt]===rt})}function isSimilar(_e,et){if(_e===et)return!0;if(!_e&&et||_e&&!et||!_e||!et||_typeof$1(_e)!=="object"||_typeof$1(et)!=="object")return!1;var tt=Object.keys(_e),rt=Object.keys(et),nt=new Set([].concat(tt,rt));return _toConsumableArray(nt).every(function(it){var at=_e[it],st=et[it];return typeof at=="function"&&typeof st=="function"?!0:at===st})}function defaultGetValueFromEvent(_e){var et=arguments.length<=1?void 0:arguments[1];return et&&et.target&&_typeof$1(et.target)==="object"&&_e in et.target?et.target[_e]:et}function move(_e,et,tt){var rt=_e.length;if(et<0||et>=rt||tt<0||tt>=rt)return _e;var nt=_e[et],it=et-tt;return it>0?[].concat(_toConsumableArray(_e.slice(0,tt)),[nt],_toConsumableArray(_e.slice(tt,et)),_toConsumableArray(_e.slice(et+1,rt))):it<0?[].concat(_toConsumableArray(_e.slice(0,et)),_toConsumableArray(_e.slice(et+1,tt+1)),[nt],_toConsumableArray(_e.slice(tt+1,rt))):_e}var _excluded$3=["name"],EMPTY_ERRORS=[];function requireUpdate(_e,et,tt,rt,nt,it){return typeof _e=="function"?_e(et,tt,"source"in it?{source:it.source}:{}):rt!==nt}var Field=function(_e){_inherits$1(tt,_e);var et=_createSuper$1(tt);function tt(rt){var nt;if(_classCallCheck$1(this,tt),nt=et.call(this,rt),_defineProperty$1(_assertThisInitialized$1(nt),"state",{resetCount:0}),_defineProperty$1(_assertThisInitialized$1(nt),"cancelRegisterFunc",null),_defineProperty$1(_assertThisInitialized$1(nt),"mounted",!1),_defineProperty$1(_assertThisInitialized$1(nt),"touched",!1),_defineProperty$1(_assertThisInitialized$1(nt),"dirty",!1),_defineProperty$1(_assertThisInitialized$1(nt),"validatePromise",void 0),_defineProperty$1(_assertThisInitialized$1(nt),"prevValidating",void 0),_defineProperty$1(_assertThisInitialized$1(nt),"errors",EMPTY_ERRORS),_defineProperty$1(_assertThisInitialized$1(nt),"warnings",EMPTY_ERRORS),_defineProperty$1(_assertThisInitialized$1(nt),"cancelRegister",function(){var lt=nt.props,dt=lt.preserve,ht=lt.isListField,pt=lt.name;nt.cancelRegisterFunc&&nt.cancelRegisterFunc(ht,dt,getNamePath(pt)),nt.cancelRegisterFunc=null}),_defineProperty$1(_assertThisInitialized$1(nt),"getNamePath",function(){var lt=nt.props,dt=lt.name,ht=lt.fieldContext,pt=ht.prefixName,mt=pt===void 0?[]:pt;return dt!==void 0?[].concat(_toConsumableArray(mt),_toConsumableArray(dt)):[]}),_defineProperty$1(_assertThisInitialized$1(nt),"getRules",function(){var lt=nt.props,dt=lt.rules,ht=dt===void 0?[]:dt,pt=lt.fieldContext;return ht.map(function(mt){return typeof mt=="function"?mt(pt):mt})}),_defineProperty$1(_assertThisInitialized$1(nt),"refresh",function(){nt.mounted&&nt.setState(function(lt){var dt=lt.resetCount;return{resetCount:dt+1}})}),_defineProperty$1(_assertThisInitialized$1(nt),"metaCache",null),_defineProperty$1(_assertThisInitialized$1(nt),"triggerMetaEvent",function(lt){var dt=nt.props.onMetaChange;if(dt){var ht=_objectSpread2(_objectSpread2({},nt.getMeta()),{},{destroy:lt});isEqual(nt.metaCache,ht)||dt(ht),nt.metaCache=ht}else nt.metaCache=null}),_defineProperty$1(_assertThisInitialized$1(nt),"onStoreChange",function(lt,dt,ht){var pt=nt.props,mt=pt.shouldUpdate,gt=pt.dependencies,vt=gt===void 0?[]:gt,xt=pt.onReset,yt=ht.store,bt=nt.getNamePath(),wt=nt.getValue(lt),Et=nt.getValue(yt),$t=dt&&containsNamePath(dt,bt);switch(ht.type==="valueUpdate"&&ht.source==="external"&&wt!==Et&&(nt.touched=!0,nt.dirty=!0,nt.validatePromise=null,nt.errors=EMPTY_ERRORS,nt.warnings=EMPTY_ERRORS,nt.triggerMetaEvent()),ht.type){case"reset":if(!dt||$t){nt.touched=!1,nt.dirty=!1,nt.validatePromise=void 0,nt.errors=EMPTY_ERRORS,nt.warnings=EMPTY_ERRORS,nt.triggerMetaEvent(),xt?.(),nt.refresh();return}break;case"remove":{if(mt){nt.reRender();return}break}case"setField":{var Pt=ht.data;if($t){"touched"in Pt&&(nt.touched=Pt.touched),"validating"in Pt&&!("originRCField"in Pt)&&(nt.validatePromise=Pt.validating?Promise.resolve([]):null),"errors"in Pt&&(nt.errors=Pt.errors||EMPTY_ERRORS),"warnings"in Pt&&(nt.warnings=Pt.warnings||EMPTY_ERRORS),nt.dirty=!0,nt.triggerMetaEvent(),nt.reRender();return}else if("value"in Pt&&containsNamePath(dt,bt,!0)){nt.reRender();return}if(mt&&!bt.length&&requireUpdate(mt,lt,yt,wt,Et,ht)){nt.reRender();return}break}case"dependenciesUpdate":{var kt=vt.map(getNamePath);if(kt.some(function(Lt){return containsNamePath(ht.relatedFields,Lt)})){nt.reRender();return}break}default:if($t||(!vt.length||bt.length||mt)&&requireUpdate(mt,lt,yt,wt,Et,ht)){nt.reRender();return}break}mt===!0&&nt.reRender()}),_defineProperty$1(_assertThisInitialized$1(nt),"validateRules",function(lt){var dt=nt.getNamePath(),ht=nt.getValue(),pt=lt||{},mt=pt.triggerName,gt=pt.validateOnly,vt=gt===void 0?!1:gt,xt=Promise.resolve().then(_asyncToGenerator(_regeneratorRuntime().mark(function yt(){var bt,wt,Et,$t,Pt,kt,Lt;return _regeneratorRuntime().wrap(function(qt){for(;;)switch(qt.prev=qt.next){case 0:if(nt.mounted){qt.next=2;break}return qt.abrupt("return",[]);case 2:if(bt=nt.props,wt=bt.validateFirst,Et=wt===void 0?!1:wt,$t=bt.messageVariables,Pt=bt.validateDebounce,kt=nt.getRules(),mt&&(kt=kt.filter(function(Dt){return Dt}).filter(function(Dt){var Ht=Dt.validateTrigger;if(!Ht)return!0;var Xt=toArray(Ht);return Xt.includes(mt)})),!(Pt&&mt)){qt.next=10;break}return qt.next=8,new Promise(function(Dt){setTimeout(Dt,Pt)});case 8:if(nt.validatePromise===xt){qt.next=10;break}return qt.abrupt("return",[]);case 10:return Lt=validateRules(dt,ht,kt,lt,Et,$t),Lt.catch(function(Dt){return Dt}).then(function(){var Dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:EMPTY_ERRORS;if(nt.validatePromise===xt){var Ht;nt.validatePromise=null;var Xt=[],Mt=[];(Ht=Dt.forEach)===null||Ht===void 0||Ht.call(Dt,function(_t){var At=_t.rule.warningOnly,Tt=_t.errors,Bt=Tt===void 0?EMPTY_ERRORS:Tt;At?Mt.push.apply(Mt,_toConsumableArray(Bt)):Xt.push.apply(Xt,_toConsumableArray(Bt))}),nt.errors=Xt,nt.warnings=Mt,nt.triggerMetaEvent(),nt.reRender()}}),qt.abrupt("return",Lt);case 13:case"end":return qt.stop()}},yt)})));return vt||(nt.validatePromise=xt,nt.dirty=!0,nt.errors=EMPTY_ERRORS,nt.warnings=EMPTY_ERRORS,nt.triggerMetaEvent(),nt.reRender()),xt}),_defineProperty$1(_assertThisInitialized$1(nt),"isFieldValidating",function(){return!!nt.validatePromise}),_defineProperty$1(_assertThisInitialized$1(nt),"isFieldTouched",function(){return nt.touched}),_defineProperty$1(_assertThisInitialized$1(nt),"isFieldDirty",function(){if(nt.dirty||nt.props.initialValue!==void 0)return!0;var lt=nt.props.fieldContext,dt=lt.getInternalHooks(HOOK_MARK),ht=dt.getInitialValue;return ht(nt.getNamePath())!==void 0}),_defineProperty$1(_assertThisInitialized$1(nt),"getErrors",function(){return nt.errors}),_defineProperty$1(_assertThisInitialized$1(nt),"getWarnings",function(){return nt.warnings}),_defineProperty$1(_assertThisInitialized$1(nt),"isListField",function(){return nt.props.isListField}),_defineProperty$1(_assertThisInitialized$1(nt),"isList",function(){return nt.props.isList}),_defineProperty$1(_assertThisInitialized$1(nt),"isPreserve",function(){return nt.props.preserve}),_defineProperty$1(_assertThisInitialized$1(nt),"getMeta",function(){nt.prevValidating=nt.isFieldValidating();var lt={touched:nt.isFieldTouched(),validating:nt.prevValidating,errors:nt.errors,warnings:nt.warnings,name:nt.getNamePath(),validated:nt.validatePromise===null};return lt}),_defineProperty$1(_assertThisInitialized$1(nt),"getOnlyChild",function(lt){if(typeof lt=="function"){var dt=nt.getMeta();return _objectSpread2(_objectSpread2({},nt.getOnlyChild(lt(nt.getControlled(),dt,nt.props.fieldContext))),{},{isFunction:!0})}var ht=toArray$1(lt);return ht.length!==1||!reactExports.isValidElement(ht[0])?{child:ht,isFunction:!1}:{child:ht[0],isFunction:!1}}),_defineProperty$1(_assertThisInitialized$1(nt),"getValue",function(lt){var dt=nt.props.fieldContext.getFieldsValue,ht=nt.getNamePath();return get(lt||dt(!0),ht)}),_defineProperty$1(_assertThisInitialized$1(nt),"getControlled",function(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},dt=nt.props,ht=dt.trigger,pt=dt.validateTrigger,mt=dt.getValueFromEvent,gt=dt.normalize,vt=dt.valuePropName,xt=dt.getValueProps,yt=dt.fieldContext,bt=pt!==void 0?pt:yt.validateTrigger,wt=nt.getNamePath(),Et=yt.getInternalHooks,$t=yt.getFieldsValue,Pt=Et(HOOK_MARK),kt=Pt.dispatch,Lt=nt.getValue(),jt=xt||function(Xt){return _defineProperty$1({},vt,Xt)},qt=lt[ht],Dt=_objectSpread2(_objectSpread2({},lt),jt(Lt));Dt[ht]=function(){nt.touched=!0,nt.dirty=!0,nt.triggerMetaEvent();for(var Xt,Mt=arguments.length,_t=new Array(Mt),At=0;At=0&&Dt<=Ht.length?(ht.keys=[].concat(_toConsumableArray(ht.keys.slice(0,Dt)),[ht.id],_toConsumableArray(ht.keys.slice(Dt))),Et([].concat(_toConsumableArray(Ht.slice(0,Dt)),[qt],_toConsumableArray(Ht.slice(Dt))))):(ht.keys=[].concat(_toConsumableArray(ht.keys),[ht.id]),Et([].concat(_toConsumableArray(Ht),[qt]))),ht.id+=1},remove:function(qt){var Dt=Pt(),Ht=new Set(Array.isArray(qt)?qt:[qt]);Ht.size<=0||(ht.keys=ht.keys.filter(function(Xt,Mt){return!Ht.has(Mt)}),Et(Dt.filter(function(Xt,Mt){return!Ht.has(Mt)})))},move:function(qt,Dt){if(qt!==Dt){var Ht=Pt();qt<0||qt>=Ht.length||Dt<0||Dt>=Ht.length||(ht.keys=move(ht.keys,qt,Dt),Et(move(Ht,qt,Dt)))}}},Lt=wt||[];return Array.isArray(Lt)||(Lt=[]),rt(Lt.map(function(jt,qt){var Dt=ht.keys[qt];return Dt===void 0&&(ht.keys[qt]=ht.id,Dt=ht.keys[qt],ht.id+=1),{name:qt,key:Dt,isListField:!0}}),kt,yt)})))}function allPromiseFinish(_e){var et=!1,tt=_e.length,rt=[];return _e.length?new Promise(function(nt,it){_e.forEach(function(at,st){at.catch(function(lt){return et=!0,lt}).then(function(lt){tt-=1,rt[st]=lt,!(tt>0)&&(et&&it(rt),nt(rt))})})}):Promise.resolve([])}var SPLIT="__@field_split__";function normalize(_e){return _e.map(function(et){return"".concat(_typeof$1(et),":").concat(et)}).join(SPLIT)}var NameMap=function(){function _e(){_classCallCheck$1(this,_e),_defineProperty$1(this,"kvs",new Map)}return _createClass$1(_e,[{key:"set",value:function(tt,rt){this.kvs.set(normalize(tt),rt)}},{key:"get",value:function(tt){return this.kvs.get(normalize(tt))}},{key:"update",value:function(tt,rt){var nt=this.get(tt),it=rt(nt);it?this.set(tt,it):this.delete(tt)}},{key:"delete",value:function(tt){this.kvs.delete(normalize(tt))}},{key:"map",value:function(tt){return _toConsumableArray(this.kvs.entries()).map(function(rt){var nt=_slicedToArray(rt,2),it=nt[0],at=nt[1],st=it.split(SPLIT);return tt({key:st.map(function(lt){var dt=lt.match(/^([^:]*):(.*)$/),ht=_slicedToArray(dt,3),pt=ht[1],mt=ht[2];return pt==="number"?Number(mt):mt}),value:at})})}},{key:"toJSON",value:function(){var tt={};return this.map(function(rt){var nt=rt.key,it=rt.value;return tt[nt.join(".")]=it,null}),tt}}]),_e}(),_excluded$2=["name"],FormStore=_createClass$1(function _e(et){var tt=this;_classCallCheck$1(this,_e),_defineProperty$1(this,"formHooked",!1),_defineProperty$1(this,"forceRootUpdate",void 0),_defineProperty$1(this,"subscribable",!0),_defineProperty$1(this,"store",{}),_defineProperty$1(this,"fieldEntities",[]),_defineProperty$1(this,"initialValues",{}),_defineProperty$1(this,"callbacks",{}),_defineProperty$1(this,"validateMessages",null),_defineProperty$1(this,"preserve",null),_defineProperty$1(this,"lastValidatePromise",null),_defineProperty$1(this,"getForm",function(){return{getFieldValue:tt.getFieldValue,getFieldsValue:tt.getFieldsValue,getFieldError:tt.getFieldError,getFieldWarning:tt.getFieldWarning,getFieldsError:tt.getFieldsError,isFieldsTouched:tt.isFieldsTouched,isFieldTouched:tt.isFieldTouched,isFieldValidating:tt.isFieldValidating,isFieldsValidating:tt.isFieldsValidating,resetFields:tt.resetFields,setFields:tt.setFields,setFieldValue:tt.setFieldValue,setFieldsValue:tt.setFieldsValue,validateFields:tt.validateFields,submit:tt.submit,_init:!0,getInternalHooks:tt.getInternalHooks}}),_defineProperty$1(this,"getInternalHooks",function(rt){return rt===HOOK_MARK?(tt.formHooked=!0,{dispatch:tt.dispatch,initEntityValue:tt.initEntityValue,registerField:tt.registerField,useSubscribe:tt.useSubscribe,setInitialValues:tt.setInitialValues,destroyForm:tt.destroyForm,setCallbacks:tt.setCallbacks,setValidateMessages:tt.setValidateMessages,getFields:tt.getFields,setPreserve:tt.setPreserve,getInitialValue:tt.getInitialValue,registerWatch:tt.registerWatch}):(warningOnce(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),_defineProperty$1(this,"useSubscribe",function(rt){tt.subscribable=rt}),_defineProperty$1(this,"prevWithoutPreserves",null),_defineProperty$1(this,"setInitialValues",function(rt,nt){if(tt.initialValues=rt||{},nt){var it,at=merge$1(rt,tt.store);(it=tt.prevWithoutPreserves)===null||it===void 0||it.map(function(st){var lt=st.key;at=set(at,lt,get(rt,lt))}),tt.prevWithoutPreserves=null,tt.updateStore(at)}}),_defineProperty$1(this,"destroyForm",function(){var rt=new NameMap;tt.getFieldEntities(!0).forEach(function(nt){tt.isMergedPreserve(nt.isPreserve())||rt.set(nt.getNamePath(),!0)}),tt.prevWithoutPreserves=rt}),_defineProperty$1(this,"getInitialValue",function(rt){var nt=get(tt.initialValues,rt);return rt.length?merge$1(nt):nt}),_defineProperty$1(this,"setCallbacks",function(rt){tt.callbacks=rt}),_defineProperty$1(this,"setValidateMessages",function(rt){tt.validateMessages=rt}),_defineProperty$1(this,"setPreserve",function(rt){tt.preserve=rt}),_defineProperty$1(this,"watchList",[]),_defineProperty$1(this,"registerWatch",function(rt){return tt.watchList.push(rt),function(){tt.watchList=tt.watchList.filter(function(nt){return nt!==rt})}}),_defineProperty$1(this,"notifyWatch",function(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(tt.watchList.length){var nt=tt.getFieldsValue(),it=tt.getFieldsValue(!0);tt.watchList.forEach(function(at){at(nt,it,rt)})}}),_defineProperty$1(this,"timeoutId",null),_defineProperty$1(this,"warningUnhooked",function(){}),_defineProperty$1(this,"updateStore",function(rt){tt.store=rt}),_defineProperty$1(this,"getFieldEntities",function(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return rt?tt.fieldEntities.filter(function(nt){return nt.getNamePath().length}):tt.fieldEntities}),_defineProperty$1(this,"getFieldsMap",function(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,nt=new NameMap;return tt.getFieldEntities(rt).forEach(function(it){var at=it.getNamePath();nt.set(at,it)}),nt}),_defineProperty$1(this,"getFieldEntitiesForNamePathList",function(rt){if(!rt)return tt.getFieldEntities(!0);var nt=tt.getFieldsMap(!0);return rt.map(function(it){var at=getNamePath(it);return nt.get(at)||{INVALIDATE_NAME_PATH:getNamePath(it)}})}),_defineProperty$1(this,"getFieldsValue",function(rt,nt){tt.warningUnhooked();var it,at,st;if(rt===!0||Array.isArray(rt)?(it=rt,at=nt):rt&&_typeof$1(rt)==="object"&&(st=rt.strict,at=rt.filter),it===!0&&!at)return tt.store;var lt=tt.getFieldEntitiesForNamePathList(Array.isArray(it)?it:null),dt=[];return lt.forEach(function(ht){var pt,mt,gt="INVALIDATE_NAME_PATH"in ht?ht.INVALIDATE_NAME_PATH:ht.getNamePath();if(st){var vt,xt;if((vt=(xt=ht).isList)!==null&&vt!==void 0&&vt.call(xt))return}else if(!it&&(pt=(mt=ht).isListField)!==null&&pt!==void 0&&pt.call(mt))return;if(!at)dt.push(gt);else{var yt="getMeta"in ht?ht.getMeta():null;at(yt)&&dt.push(gt)}}),cloneByNamePathList(tt.store,dt.map(getNamePath))}),_defineProperty$1(this,"getFieldValue",function(rt){tt.warningUnhooked();var nt=getNamePath(rt);return get(tt.store,nt)}),_defineProperty$1(this,"getFieldsError",function(rt){tt.warningUnhooked();var nt=tt.getFieldEntitiesForNamePathList(rt);return nt.map(function(it,at){return it&&!("INVALIDATE_NAME_PATH"in it)?{name:it.getNamePath(),errors:it.getErrors(),warnings:it.getWarnings()}:{name:getNamePath(rt[at]),errors:[],warnings:[]}})}),_defineProperty$1(this,"getFieldError",function(rt){tt.warningUnhooked();var nt=getNamePath(rt),it=tt.getFieldsError([nt])[0];return it.errors}),_defineProperty$1(this,"getFieldWarning",function(rt){tt.warningUnhooked();var nt=getNamePath(rt),it=tt.getFieldsError([nt])[0];return it.warnings}),_defineProperty$1(this,"isFieldsTouched",function(){tt.warningUnhooked();for(var rt=arguments.length,nt=new Array(rt),it=0;it0&&arguments[0]!==void 0?arguments[0]:{},nt=new NameMap,it=tt.getFieldEntities(!0);it.forEach(function(lt){var dt=lt.props.initialValue,ht=lt.getNamePath();if(dt!==void 0){var pt=nt.get(ht)||new Set;pt.add({entity:lt,value:dt}),nt.set(ht,pt)}});var at=function(dt){dt.forEach(function(ht){var pt=ht.props.initialValue;if(pt!==void 0){var mt=ht.getNamePath(),gt=tt.getInitialValue(mt);if(gt!==void 0)warningOnce(!1,"Form already set 'initialValues' with path '".concat(mt.join("."),"'. Field can not overwrite it."));else{var vt=nt.get(mt);if(vt&&vt.size>1)warningOnce(!1,"Multiple Field with path '".concat(mt.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(vt){var xt=tt.getFieldValue(mt);(!rt.skipExist||xt===void 0)&&tt.updateStore(set(tt.store,mt,_toConsumableArray(vt)[0].value))}}}})},st;rt.entities?st=rt.entities:rt.namePathList?(st=[],rt.namePathList.forEach(function(lt){var dt=nt.get(lt);if(dt){var ht;(ht=st).push.apply(ht,_toConsumableArray(_toConsumableArray(dt).map(function(pt){return pt.entity})))}})):st=it,at(st)}),_defineProperty$1(this,"resetFields",function(rt){tt.warningUnhooked();var nt=tt.store;if(!rt){tt.updateStore(merge$1(tt.initialValues)),tt.resetWithFieldInitialValue(),tt.notifyObservers(nt,null,{type:"reset"}),tt.notifyWatch();return}var it=rt.map(getNamePath);it.forEach(function(at){var st=tt.getInitialValue(at);tt.updateStore(set(tt.store,at,st))}),tt.resetWithFieldInitialValue({namePathList:it}),tt.notifyObservers(nt,it,{type:"reset"}),tt.notifyWatch(it)}),_defineProperty$1(this,"setFields",function(rt){tt.warningUnhooked();var nt=tt.store,it=[];rt.forEach(function(at){var st=at.name,lt=_objectWithoutProperties$1(at,_excluded$2),dt=getNamePath(st);it.push(dt),"value"in lt&&tt.updateStore(set(tt.store,dt,lt.value)),tt.notifyObservers(nt,[dt],{type:"setField",data:at})}),tt.notifyWatch(it)}),_defineProperty$1(this,"getFields",function(){var rt=tt.getFieldEntities(!0),nt=rt.map(function(it){var at=it.getNamePath(),st=it.getMeta(),lt=_objectSpread2(_objectSpread2({},st),{},{name:at,value:tt.getFieldValue(at)});return Object.defineProperty(lt,"originRCField",{value:!0}),lt});return nt}),_defineProperty$1(this,"initEntityValue",function(rt){var nt=rt.props.initialValue;if(nt!==void 0){var it=rt.getNamePath(),at=get(tt.store,it);at===void 0&&tt.updateStore(set(tt.store,it,nt))}}),_defineProperty$1(this,"isMergedPreserve",function(rt){var nt=rt!==void 0?rt:tt.preserve;return nt??!0}),_defineProperty$1(this,"registerField",function(rt){tt.fieldEntities.push(rt);var nt=rt.getNamePath();if(tt.notifyWatch([nt]),rt.props.initialValue!==void 0){var it=tt.store;tt.resetWithFieldInitialValue({entities:[rt],skipExist:!0}),tt.notifyObservers(it,[rt.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(at,st){var lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(tt.fieldEntities=tt.fieldEntities.filter(function(pt){return pt!==rt}),!tt.isMergedPreserve(st)&&(!at||lt.length>1)){var dt=at?void 0:tt.getInitialValue(nt);if(nt.length&&tt.getFieldValue(nt)!==dt&&tt.fieldEntities.every(function(pt){return!matchNamePath(pt.getNamePath(),nt)})){var ht=tt.store;tt.updateStore(set(ht,nt,dt,!0)),tt.notifyObservers(ht,[nt],{type:"remove"}),tt.triggerDependenciesUpdate(ht,nt)}}tt.notifyWatch([nt])}}),_defineProperty$1(this,"dispatch",function(rt){switch(rt.type){case"updateValue":{var nt=rt.namePath,it=rt.value;tt.updateValue(nt,it);break}case"validateField":{var at=rt.namePath,st=rt.triggerName;tt.validateFields([at],{triggerName:st});break}}}),_defineProperty$1(this,"notifyObservers",function(rt,nt,it){if(tt.subscribable){var at=_objectSpread2(_objectSpread2({},it),{},{store:tt.getFieldsValue(!0)});tt.getFieldEntities().forEach(function(st){var lt=st.onStoreChange;lt(rt,nt,at)})}else tt.forceRootUpdate()}),_defineProperty$1(this,"triggerDependenciesUpdate",function(rt,nt){var it=tt.getDependencyChildrenFields(nt);return it.length&&tt.validateFields(it),tt.notifyObservers(rt,it,{type:"dependenciesUpdate",relatedFields:[nt].concat(_toConsumableArray(it))}),it}),_defineProperty$1(this,"updateValue",function(rt,nt){var it=getNamePath(rt),at=tt.store;tt.updateStore(set(tt.store,it,nt)),tt.notifyObservers(at,[it],{type:"valueUpdate",source:"internal"}),tt.notifyWatch([it]);var st=tt.triggerDependenciesUpdate(at,it),lt=tt.callbacks.onValuesChange;if(lt){var dt=cloneByNamePathList(tt.store,[it]);lt(dt,tt.getFieldsValue())}tt.triggerOnFieldsChange([it].concat(_toConsumableArray(st)))}),_defineProperty$1(this,"setFieldsValue",function(rt){tt.warningUnhooked();var nt=tt.store;if(rt){var it=merge$1(tt.store,rt);tt.updateStore(it)}tt.notifyObservers(nt,null,{type:"valueUpdate",source:"external"}),tt.notifyWatch()}),_defineProperty$1(this,"setFieldValue",function(rt,nt){tt.setFields([{name:rt,value:nt}])}),_defineProperty$1(this,"getDependencyChildrenFields",function(rt){var nt=new Set,it=[],at=new NameMap;tt.getFieldEntities().forEach(function(lt){var dt=lt.props.dependencies;(dt||[]).forEach(function(ht){var pt=getNamePath(ht);at.update(pt,function(){var mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return mt.add(lt),mt})})});var st=function lt(dt){var ht=at.get(dt)||new Set;ht.forEach(function(pt){if(!nt.has(pt)){nt.add(pt);var mt=pt.getNamePath();pt.isFieldDirty()&&mt.length&&(it.push(mt),lt(mt))}})};return st(rt),it}),_defineProperty$1(this,"triggerOnFieldsChange",function(rt,nt){var it=tt.callbacks.onFieldsChange;if(it){var at=tt.getFields();if(nt){var st=new NameMap;nt.forEach(function(dt){var ht=dt.name,pt=dt.errors;st.set(ht,pt)}),at.forEach(function(dt){dt.errors=st.get(dt.name)||dt.errors})}var lt=at.filter(function(dt){var ht=dt.name;return containsNamePath(rt,ht)});lt.length&&it(lt,at)}}),_defineProperty$1(this,"validateFields",function(rt,nt){var it;tt.warningUnhooked();var at,st;Array.isArray(rt)||typeof rt=="string"||typeof nt=="string"?(at=rt,st=nt):st=rt;var lt=!!at,dt=lt?at.map(getNamePath):[],ht=[],pt=String(Date.now()),mt=new Set,gt=(it=st)===null||it===void 0?void 0:it.recursive;tt.getFieldEntities(!0).forEach(function(bt){if(lt||dt.push(bt.getNamePath()),!(!bt.props.rules||!bt.props.rules.length)){var wt=bt.getNamePath();if(mt.add(wt.join(pt)),!lt||containsNamePath(dt,wt,gt)){var Et=bt.validateRules(_objectSpread2({validateMessages:_objectSpread2(_objectSpread2({},defaultValidateMessages),tt.validateMessages)},st));ht.push(Et.then(function(){return{name:wt,errors:[],warnings:[]}}).catch(function($t){var Pt,kt=[],Lt=[];return(Pt=$t.forEach)===null||Pt===void 0||Pt.call($t,function(jt){var qt=jt.rule.warningOnly,Dt=jt.errors;qt?Lt.push.apply(Lt,_toConsumableArray(Dt)):kt.push.apply(kt,_toConsumableArray(Dt))}),kt.length?Promise.reject({name:wt,errors:kt,warnings:Lt}):{name:wt,errors:kt,warnings:Lt}}))}}});var vt=allPromiseFinish(ht);tt.lastValidatePromise=vt,vt.catch(function(bt){return bt}).then(function(bt){var wt=bt.map(function(Et){var $t=Et.name;return $t});tt.notifyObservers(tt.store,wt,{type:"validateFinish"}),tt.triggerOnFieldsChange(wt,bt)});var xt=vt.then(function(){return tt.lastValidatePromise===vt?Promise.resolve(tt.getFieldsValue(dt)):Promise.reject([])}).catch(function(bt){var wt=bt.filter(function(Et){return Et&&Et.errors.length});return Promise.reject({values:tt.getFieldsValue(dt),errorFields:wt,outOfDate:tt.lastValidatePromise!==vt})});xt.catch(function(bt){return bt});var yt=dt.filter(function(bt){return mt.has(bt.join(pt))});return tt.triggerOnFieldsChange(yt),xt}),_defineProperty$1(this,"submit",function(){tt.warningUnhooked(),tt.validateFields().then(function(rt){var nt=tt.callbacks.onFinish;if(nt)try{nt(rt)}catch(it){console.error(it)}}).catch(function(rt){var nt=tt.callbacks.onFinishFailed;nt&&nt(rt)})}),this.forceRootUpdate=et});function useForm(_e){var et=reactExports.useRef(),tt=reactExports.useState({}),rt=_slicedToArray(tt,2),nt=rt[1];if(!et.current)if(_e)et.current=_e;else{var it=function(){nt({})},at=new FormStore(it);et.current=at.getForm()}return[et.current]}var FormContext=reactExports.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),FormProvider=function(et){var tt=et.validateMessages,rt=et.onFormChange,nt=et.onFormFinish,it=et.children,at=reactExports.useContext(FormContext),st=reactExports.useRef({});return reactExports.createElement(FormContext.Provider,{value:_objectSpread2(_objectSpread2({},at),{},{validateMessages:_objectSpread2(_objectSpread2({},at.validateMessages),tt),triggerFormChange:function(dt,ht){rt&&rt(dt,{changedFields:ht,forms:st.current}),at.triggerFormChange(dt,ht)},triggerFormFinish:function(dt,ht){nt&&nt(dt,{values:ht,forms:st.current}),at.triggerFormFinish(dt,ht)},registerForm:function(dt,ht){dt&&(st.current=_objectSpread2(_objectSpread2({},st.current),{},_defineProperty$1({},dt,ht))),at.registerForm(dt,ht)},unregisterForm:function(dt){var ht=_objectSpread2({},st.current);delete ht[dt],st.current=ht,at.unregisterForm(dt)}})},it)},_excluded$1=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],Form=function(et,tt){var rt=et.name,nt=et.initialValues,it=et.fields,at=et.form,st=et.preserve,lt=et.children,dt=et.component,ht=dt===void 0?"form":dt,pt=et.validateMessages,mt=et.validateTrigger,gt=mt===void 0?"onChange":mt,vt=et.onValuesChange,xt=et.onFieldsChange,yt=et.onFinish,bt=et.onFinishFailed,wt=_objectWithoutProperties$1(et,_excluded$1),Et=reactExports.useContext(FormContext),$t=useForm(at),Pt=_slicedToArray($t,1),kt=Pt[0],Lt=kt.getInternalHooks(HOOK_MARK),jt=Lt.useSubscribe,qt=Lt.setInitialValues,Dt=Lt.setCallbacks,Ht=Lt.setValidateMessages,Xt=Lt.setPreserve,Mt=Lt.destroyForm;reactExports.useImperativeHandle(tt,function(){return kt}),reactExports.useEffect(function(){return Et.registerForm(rt,kt),function(){Et.unregisterForm(rt)}},[Et,kt,rt]),Ht(_objectSpread2(_objectSpread2({},Et.validateMessages),pt)),Dt({onValuesChange:vt,onFieldsChange:function(St){if(Et.triggerFormChange(rt,St),xt){for(var Ft=arguments.length,Vt=new Array(Ft>1?Ft-1:0),Rt=1;Rt{let{children:et,status:tt,override:rt}=_e;const nt=reactExports.useContext(FormItemInputContext),it=reactExports.useMemo(()=>{const at=Object.assign({},nt);return rt&&delete at.isFormItemInput,tt&&(delete at.status,delete at.hasFeedback,delete at.feedbackIcon),at},[tt,rt,nt]);return reactExports.createElement(FormItemInputContext.Provider,{value:it},et)};function voidFunc(){}const WatermarkContext=reactExports.createContext({add:voidFunc,remove:voidFunc});function usePanelRef(_e){const et=reactExports.useContext(WatermarkContext),tt=reactExports.useRef();return useEvent(nt=>{if(nt){const it=_e?nt.querySelector(_e):nt;et.add(it),tt.current=it}else et.remove(tt.current)})}const NormalCancelBtn=()=>{const{cancelButtonProps:_e,cancelTextLocale:et,onCancel:tt}=reactExports.useContext(ModalContext);return React.createElement(Button$1,Object.assign({onClick:tt},_e),et)},NormalCancelBtn$1=NormalCancelBtn,NormalOkBtn=()=>{const{confirmLoading:_e,okButtonProps:et,okType:tt,okTextLocale:rt,onOk:nt}=reactExports.useContext(ModalContext);return React.createElement(Button$1,Object.assign({},convertLegacyProps(tt),{loading:_e,onClick:nt},et),rt)},NormalOkBtn$1=NormalOkBtn;function renderCloseIcon(_e,et){return React.createElement("span",{className:`${_e}-close-x`},et||React.createElement(CloseOutlined$1,{className:`${_e}-close-icon`}))}const Footer=_e=>{const{okText:et,okType:tt="primary",cancelText:rt,confirmLoading:nt,onOk:it,onCancel:at,okButtonProps:st,cancelButtonProps:lt,footer:dt}=_e,[ht]=useLocale$1("Modal",getConfirmLocale()),pt=et||ht?.okText,mt=rt||ht?.cancelText,gt={confirmLoading:nt,okButtonProps:st,cancelButtonProps:lt,okTextLocale:pt,cancelTextLocale:mt,okType:tt,onOk:it,onCancel:at},vt=React.useMemo(()=>gt,_toConsumableArray(Object.values(gt)));let xt;return typeof dt=="function"||typeof dt>"u"?(xt=React.createElement(React.Fragment,null,React.createElement(NormalCancelBtn$1,null),React.createElement(NormalOkBtn$1,null)),typeof dt=="function"&&(xt=dt(xt,{OkBtn:NormalOkBtn$1,CancelBtn:NormalCancelBtn$1})),xt=React.createElement(ModalContextProvider,{value:vt},xt)):xt=dt,React.createElement(DisabledContextProvider,{disabled:!1},xt)},initMotionCommon=_e=>({animationDuration:_e,animationFillMode:"both"}),initMotionCommonLeave=_e=>({animationDuration:_e,animationFillMode:"both"}),initMotion=function(_e,et,tt,rt){const it=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[` + ${it}${_e}-enter, + ${it}${_e}-appear + `]:Object.assign(Object.assign({},initMotionCommon(rt)),{animationPlayState:"paused"}),[`${it}${_e}-leave`]:Object.assign(Object.assign({},initMotionCommonLeave(rt)),{animationPlayState:"paused"}),[` + ${it}${_e}-enter${_e}-enter-active, + ${it}${_e}-appear${_e}-appear-active + `]:{animationName:et,animationPlayState:"running"},[`${it}${_e}-leave${_e}-leave-active`]:{animationName:tt,animationPlayState:"running",pointerEvents:"none"}}},fadeIn=new Keyframe("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),fadeOut=new Keyframe("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),initFadeMotion=function(_e){let et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:tt}=_e,rt=`${tt}-fade`,nt=et?"&":"";return[initMotion(rt,fadeIn,fadeOut,_e.motionDurationMid,et),{[` + ${nt}${rt}-enter, + ${nt}${rt}-appear + `]:{opacity:0,animationTimingFunction:"linear"},[`${nt}${rt}-leave`]:{animationTimingFunction:"linear"}}]},zoomIn=new Keyframe("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),zoomOut=new Keyframe("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),zoomBigIn=new Keyframe("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),zoomBigOut=new Keyframe("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),zoomUpIn=new Keyframe("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),zoomUpOut=new Keyframe("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),zoomLeftIn=new Keyframe("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),zoomLeftOut=new Keyframe("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),zoomRightIn=new Keyframe("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),zoomRightOut=new Keyframe("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),zoomDownIn=new Keyframe("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),zoomDownOut=new Keyframe("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),zoomMotion={zoom:{inKeyframes:zoomIn,outKeyframes:zoomOut},"zoom-big":{inKeyframes:zoomBigIn,outKeyframes:zoomBigOut},"zoom-big-fast":{inKeyframes:zoomBigIn,outKeyframes:zoomBigOut},"zoom-left":{inKeyframes:zoomLeftIn,outKeyframes:zoomLeftOut},"zoom-right":{inKeyframes:zoomRightIn,outKeyframes:zoomRightOut},"zoom-up":{inKeyframes:zoomUpIn,outKeyframes:zoomUpOut},"zoom-down":{inKeyframes:zoomDownIn,outKeyframes:zoomDownOut}},initZoomMotion=(_e,et)=>{const{antCls:tt}=_e,rt=`${tt}-${et}`,{inKeyframes:nt,outKeyframes:it}=zoomMotion[et];return[initMotion(rt,nt,it,et==="zoom-big-fast"?_e.motionDurationFast:_e.motionDurationMid),{[` + ${rt}-enter, + ${rt}-appear + `]:{transform:"scale(0)",opacity:0,animationTimingFunction:_e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${rt}-leave`]:{animationTimingFunction:_e.motionEaseInOutCirc}}]};function box(_e){return{position:_e,inset:0}}const genModalMaskStyle=_e=>{const{componentCls:et,antCls:tt}=_e;return[{[`${et}-root`]:{[`${et}${tt}-zoom-enter, ${et}${tt}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:_e.motionDurationSlow,userSelect:"none"},[`${et}${tt}-zoom-leave ${et}-content`]:{pointerEvents:"none"},[`${et}-mask`]:Object.assign(Object.assign({},box("fixed")),{zIndex:_e.zIndexPopupBase,height:"100%",backgroundColor:_e.colorBgMask,pointerEvents:"none",[`${et}-hidden`]:{display:"none"}}),[`${et}-wrap`]:Object.assign(Object.assign({},box("fixed")),{zIndex:_e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch",[`&:has(${et}${tt}-zoom-enter), &:has(${et}${tt}-zoom-appear)`]:{pointerEvents:"none"}})}},{[`${et}-root`]:initFadeMotion(_e)}]},genModalStyle=_e=>{const{componentCls:et}=_e;return[{[`${et}-root`]:{[`${et}-wrap-rtl`]:{direction:"rtl"},[`${et}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[et]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${_e.screenSMMax})`]:{[et]:{maxWidth:"calc(100vw - 16px)",margin:`${_e.marginXS} auto`},[`${et}-centered`]:{[et]:{flex:1}}}}},{[et]:Object.assign(Object.assign({},resetComponent(_e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${_e.margin*2}px)`,margin:"0 auto",paddingBottom:_e.paddingLG,[`${et}-title`]:{margin:0,color:_e.titleColor,fontWeight:_e.fontWeightStrong,fontSize:_e.titleFontSize,lineHeight:_e.titleLineHeight,wordWrap:"break-word"},[`${et}-content`]:{position:"relative",backgroundColor:_e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:_e.borderRadiusLG,boxShadow:_e.boxShadow,pointerEvents:"auto",padding:`${_e.paddingMD}px ${_e.paddingContentHorizontalLG}px`},[`${et}-close`]:Object.assign({position:"absolute",top:(_e.modalHeaderHeight-_e.modalCloseBtnSize)/2,insetInlineEnd:(_e.modalHeaderHeight-_e.modalCloseBtnSize)/2,zIndex:_e.zIndexPopupBase+10,padding:0,color:_e.modalCloseIconColor,fontWeight:_e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:_e.borderRadiusSM,width:_e.modalCloseBtnSize,height:_e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${_e.motionDurationMid}, background-color ${_e.motionDurationMid}`,"&-x":{display:"flex",fontSize:_e.fontSizeLG,fontStyle:"normal",lineHeight:`${_e.modalCloseBtnSize}px`,justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:_e.modalIconHoverColor,backgroundColor:_e.wireframe?"transparent":_e.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:_e.wireframe?"transparent":_e.colorFillContentHover}},genFocusStyle(_e)),[`${et}-header`]:{color:_e.colorText,background:_e.headerBg,borderRadius:`${_e.borderRadiusLG}px ${_e.borderRadiusLG}px 0 0`,marginBottom:_e.marginXS},[`${et}-body`]:{fontSize:_e.fontSize,lineHeight:_e.lineHeight,wordWrap:"break-word"},[`${et}-footer`]:{textAlign:"end",background:_e.footerBg,marginTop:_e.marginSM,[`${_e.antCls}-btn + ${_e.antCls}-btn:not(${_e.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:_e.marginXS}},[`${et}-open`]:{overflow:"hidden"}})},{[`${et}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${et}-content, + ${et}-body, + ${et}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${et}-confirm-body`]:{marginBottom:"auto"}}}]},genWireframeStyle=_e=>{const{componentCls:et,antCls:tt}=_e,rt=`${et}-confirm`;return{[et]:{[`${et}-content`]:{padding:0},[`${et}-header`]:{padding:_e.modalHeaderPadding,borderBottom:`${_e.modalHeaderBorderWidth}px ${_e.modalHeaderBorderStyle} ${_e.modalHeaderBorderColorSplit}`,marginBottom:0},[`${et}-body`]:{padding:_e.modalBodyPadding},[`${et}-footer`]:{padding:`${_e.modalFooterPaddingVertical}px ${_e.modalFooterPaddingHorizontal}px`,borderTop:`${_e.modalFooterBorderWidth}px ${_e.modalFooterBorderStyle} ${_e.modalFooterBorderColorSplit}`,borderRadius:`0 0 ${_e.borderRadiusLG}px ${_e.borderRadiusLG}px`,marginTop:0}},[rt]:{[`${tt}-modal-body`]:{padding:`${_e.padding*2}px ${_e.padding*2}px ${_e.paddingLG}px`},[`${rt}-body > ${_e.iconCls}`]:{marginInlineEnd:_e.margin},[`${rt}-btns`]:{marginTop:_e.marginLG}}}},genRTLStyle=_e=>{const{componentCls:et}=_e;return{[`${et}-root`]:{[`${et}-wrap-rtl`]:{direction:"rtl",[`${et}-confirm-body`]:{direction:"rtl"}}}}},prepareToken=_e=>{const et=_e.padding,tt=_e.fontSizeHeading5,rt=_e.lineHeightHeading5;return merge(_e,{modalBodyPadding:_e.paddingLG,modalHeaderPadding:`${et}px ${_e.paddingLG}px`,modalHeaderBorderWidth:_e.lineWidth,modalHeaderBorderStyle:_e.lineType,modalHeaderBorderColorSplit:_e.colorSplit,modalHeaderHeight:rt*tt+et*2,modalFooterBorderColorSplit:_e.colorSplit,modalFooterBorderStyle:_e.lineType,modalFooterPaddingVertical:_e.paddingXS,modalFooterPaddingHorizontal:_e.padding,modalFooterBorderWidth:_e.lineWidth,modalIconHoverColor:_e.colorIconHover,modalCloseIconColor:_e.colorIcon,modalCloseBtnSize:_e.fontSize*_e.lineHeight,modalConfirmIconSize:_e.fontSize*_e.lineHeight})},prepareComponentToken=_e=>({footerBg:"transparent",headerBg:_e.colorBgElevated,titleLineHeight:_e.lineHeightHeading5,titleFontSize:_e.fontSizeHeading5,contentBg:_e.colorBgElevated,titleColor:_e.colorTextHeading}),useStyle=genComponentStyleHook("Modal",_e=>{const et=prepareToken(_e);return[genModalStyle(et),genRTLStyle(et),genModalMaskStyle(et),_e.wireframe&&genWireframeStyle(et),initZoomMotion(et,"zoom")]},prepareComponentToken);var __rest$4=globalThis&&globalThis.__rest||function(_e,et){var tt={};for(var rt in _e)Object.prototype.hasOwnProperty.call(_e,rt)&&et.indexOf(rt)<0&&(tt[rt]=_e[rt]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,rt=Object.getOwnPropertySymbols(_e);nt{mousePosition={x:_e.pageX,y:_e.pageY},setTimeout(()=>{mousePosition=null},100)};canUseDocElement()&&document.documentElement.addEventListener("click",getClickPosition,!0);const Modal$2=_e=>{var et;const{getPopupContainer:tt,getPrefixCls:rt,direction:nt,modal:it}=reactExports.useContext(ConfigContext),at=Ot=>{const{onCancel:Ut}=_e;Ut?.(Ot)},st=Ot=>{const{onOk:Ut}=_e;Ut?.(Ot)},{prefixCls:lt,className:dt,rootClassName:ht,open:pt,wrapClassName:mt,centered:gt,getContainer:vt,closeIcon:xt,closable:yt,focusTriggerAfterClose:bt=!0,style:wt,visible:Et,width:$t=520,footer:Pt,classNames:kt,styles:Lt}=_e,jt=__rest$4(_e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","closeIcon","closable","focusTriggerAfterClose","style","visible","width","footer","classNames","styles"]),qt=rt("modal",lt),Dt=rt(),[Ht,Xt]=useStyle(qt),Mt=classNames(mt,{[`${qt}-centered`]:!!gt,[`${qt}-wrap-rtl`]:nt==="rtl"}),_t=Pt!==null&&reactExports.createElement(Footer,Object.assign({},_e,{onOk:st,onCancel:at})),[At,Tt]=useClosable(yt,xt,Ot=>renderCloseIcon(qt,Ot),reactExports.createElement(CloseOutlined$1,{className:`${qt}-close-icon`}),!0),Bt=usePanelRef(`.${qt}-content`);return Ht(reactExports.createElement(NoCompactStyle,null,reactExports.createElement(NoFormStyle,{status:!0,override:!0},reactExports.createElement(DialogWrap,Object.assign({width:$t},jt,{getContainer:vt===void 0?tt:vt,prefixCls:qt,rootClassName:classNames(Xt,ht),footer:_t,visible:pt??Et,mousePosition:(et=jt.mousePosition)!==null&&et!==void 0?et:mousePosition,onClose:at,closable:At,closeIcon:Tt,focusTriggerAfterClose:bt,transitionName:getTransitionName(Dt,"zoom",_e.transitionName),maskTransitionName:getTransitionName(Dt,"fade",_e.maskTransitionName),className:classNames(Xt,dt,it?.className),style:Object.assign(Object.assign({},it?.style),wt),classNames:Object.assign(Object.assign({wrapper:Mt},it?.classNames),kt),styles:Object.assign(Object.assign({},it?.styles),Lt),panelRef:Bt})))))},OriginModal=Modal$2,genModalConfirmStyle=_e=>{const{componentCls:et,titleFontSize:tt,titleLineHeight:rt,modalConfirmIconSize:nt,fontSize:it,lineHeight:at}=_e,st=`${et}-confirm`,lt=Math.round(tt*rt),dt=Math.round(it*at);return{[st]:{"&-rtl":{direction:"rtl"},[`${_e.antCls}-modal-header`]:{display:"none"},[`${st}-body-wrapper`]:Object.assign({},clearFix()),[`${st}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${_e.iconCls}`]:{flex:"none",fontSize:nt,marginInlineEnd:_e.marginSM,marginTop:(dt-nt)/2},[`&-has-title > ${_e.iconCls}`]:{marginTop:(lt-nt)/2}},[`${st}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:_e.marginXS,maxWidth:`calc(100% - ${_e.modalConfirmIconSize+_e.marginSM}px)`},[`${st}-title`]:{color:_e.colorTextHeading,fontWeight:_e.fontWeightStrong,fontSize:tt,lineHeight:rt},[`${st}-content`]:{color:_e.colorText,fontSize:it,lineHeight:at},[`${st}-btns`]:{textAlign:"end",marginTop:_e.marginSM,[`${_e.antCls}-btn + ${_e.antCls}-btn`]:{marginBottom:0,marginInlineStart:_e.marginXS}}},[`${st}-error ${st}-body > ${_e.iconCls}`]:{color:_e.colorError},[`${st}-warning ${st}-body > ${_e.iconCls}, + ${st}-confirm ${st}-body > ${_e.iconCls}`]:{color:_e.colorWarning},[`${st}-info ${st}-body > ${_e.iconCls}`]:{color:_e.colorInfo},[`${st}-success ${st}-body > ${_e.iconCls}`]:{color:_e.colorSuccess}}},ConfirmCmp=genSubStyleComponent(["Modal","confirm"],_e=>{const et=prepareToken(_e);return[genModalConfirmStyle(et)]},prepareComponentToken,{order:-1e3});var __rest$3=globalThis&&globalThis.__rest||function(_e,et){var tt={};for(var rt in _e)Object.prototype.hasOwnProperty.call(_e,rt)&&et.indexOf(rt)<0&&(tt[rt]=_e[rt]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,rt=Object.getOwnPropertySymbols(_e);ntwt,_toConsumableArray(Object.values(wt))),$t=reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(CancelBtn,null),reactExports.createElement(OkBtn,null)),Pt=_e.title!==void 0&&_e.title!==null,kt=`${it}-body`;return reactExports.createElement("div",{className:`${it}-body-wrapper`},reactExports.createElement("div",{className:classNames(kt,{[`${kt}-has-title`]:Pt})},pt,reactExports.createElement("div",{className:`${it}-paragraph`},Pt&&reactExports.createElement("span",{className:`${it}-title`},_e.title),reactExports.createElement("div",{className:`${it}-content`},_e.content))),lt===void 0||typeof lt=="function"?reactExports.createElement(ModalContextProvider,{value:Et},reactExports.createElement("div",{className:`${it}-btns`},typeof lt=="function"?lt($t,{OkBtn,CancelBtn}):$t)):lt,reactExports.createElement(ConfirmCmp,{prefixCls:et}))}const ConfirmDialog=_e=>{const{close:et,zIndex:tt,afterClose:rt,open:nt,keyboard:it,centered:at,getContainer:st,maskStyle:lt,direction:dt,prefixCls:ht,wrapClassName:pt,rootPrefixCls:mt,iconPrefixCls:gt,theme:vt,bodyStyle:xt,closable:yt=!1,closeIcon:bt,modalRender:wt,focusTriggerAfterClose:Et,onConfirm:$t}=_e,Pt=`${ht}-confirm`,kt=_e.width||416,Lt=_e.style||{},jt=_e.mask===void 0?!0:_e.mask,qt=_e.maskClosable===void 0?!1:_e.maskClosable,Dt=classNames(Pt,`${Pt}-${_e.type}`,{[`${Pt}-rtl`]:dt==="rtl"},_e.className);return reactExports.createElement(ConfigProvider$1,{prefixCls:mt,iconPrefixCls:gt,direction:dt,theme:vt},reactExports.createElement(OriginModal,{prefixCls:ht,className:Dt,wrapClassName:classNames({[`${Pt}-centered`]:!!_e.centered},pt),onCancel:()=>{et?.({triggerCancel:!0}),$t?.(!1)},open:nt,title:"",footer:null,transitionName:getTransitionName(mt||"","zoom",_e.transitionName),maskTransitionName:getTransitionName(mt||"","fade",_e.maskTransitionName),mask:jt,maskClosable:qt,style:Lt,styles:{body:xt,mask:lt},width:kt,zIndex:tt,afterClose:rt,keyboard:it,centered:at,getContainer:st,closable:yt,closeIcon:bt,modalRender:wt,focusTriggerAfterClose:Et},reactExports.createElement(ConfirmContent,Object.assign({},_e,{confirmPrefixCls:Pt}))))},ConfirmDialog$1=ConfirmDialog,destroyFns=[],destroyFns$1=destroyFns;var __rest$2=globalThis&&globalThis.__rest||function(_e,et){var tt={};for(var rt in _e)Object.prototype.hasOwnProperty.call(_e,rt)&&et.indexOf(rt)<0&&(tt[rt]=_e[rt]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,rt=Object.getOwnPropertySymbols(_e);ntmt&&mt.triggerCancel);_e.onCancel&&pt&&_e.onCancel.apply(_e,[()=>{}].concat(_toConsumableArray(dt.slice(1))));for(let mt=0;mt{const vt=getConfirmLocale(),{getPrefixCls:xt,getIconPrefixCls:yt,getTheme:bt}=globalConfig(),wt=xt(void 0,getRootPrefixCls()),Et=pt||`${wt}-modal`,$t=yt(),Pt=bt();let kt=mt;kt===!1&&(kt=void 0),render(reactExports.createElement(ConfirmDialog$1,Object.assign({},gt,{getContainer:kt,prefixCls:Et,rootPrefixCls:wt,iconPrefixCls:$t,okText:dt,locale:vt,theme:Pt,cancelText:ht||vt.cancelText})),et)})}function at(){for(var lt=arguments.length,dt=new Array(lt),ht=0;ht{typeof _e.afterClose=="function"&&_e.afterClose(),nt.apply(this,dt)}}),tt.visible&&delete tt.visible,it(tt)}function st(lt){typeof lt=="function"?tt=lt(tt):tt=Object.assign(Object.assign({},tt),lt),it(tt)}return it(tt),destroyFns$1.push(at),{destroy:at,update:st}}function withWarn(_e){return Object.assign(Object.assign({},_e),{type:"warning"})}function withInfo(_e){return Object.assign(Object.assign({},_e),{type:"info"})}function withSuccess(_e){return Object.assign(Object.assign({},_e),{type:"success"})}function withError(_e){return Object.assign(Object.assign({},_e),{type:"error"})}function withConfirm(_e){return Object.assign(Object.assign({},_e),{type:"confirm"})}function modalGlobalConfig(_e){let{rootPrefixCls:et}=_e;defaultRootPrefixCls=et}var __rest$1=globalThis&&globalThis.__rest||function(_e,et){var tt={};for(var rt in _e)Object.prototype.hasOwnProperty.call(_e,rt)&&et.indexOf(rt)<0&&(tt[rt]=_e[rt]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,rt=Object.getOwnPropertySymbols(_e);nt{var tt,{afterClose:rt,config:nt}=_e,it=__rest$1(_e,["afterClose","config"]);const[at,st]=reactExports.useState(!0),[lt,dt]=reactExports.useState(nt),{direction:ht,getPrefixCls:pt}=reactExports.useContext(ConfigContext),mt=pt("modal"),gt=pt(),vt=()=>{var wt;rt(),(wt=lt.afterClose)===null||wt===void 0||wt.call(lt)},xt=function(){st(!1);for(var wt=arguments.length,Et=new Array(wt),$t=0;$tkt&&kt.triggerCancel);lt.onCancel&&Pt&<.onCancel.apply(lt,[()=>{}].concat(_toConsumableArray(Et.slice(1))))};reactExports.useImperativeHandle(et,()=>({destroy:xt,update:wt=>{dt(Et=>Object.assign(Object.assign({},Et),wt))}}));const yt=(tt=lt.okCancel)!==null&&tt!==void 0?tt:lt.type==="confirm",[bt]=useLocale$1("Modal",defaultLocale.Modal);return reactExports.createElement(ConfirmDialog$1,Object.assign({prefixCls:mt,rootPrefixCls:gt},lt,{close:xt,open:at,afterClose:vt,okText:lt.okText||(yt?bt?.okText:bt?.justOkText),direction:lt.direction||ht,cancelText:lt.cancelText||bt?.cancelText},it))},HookModal$1=reactExports.forwardRef(HookModal);let uuid=0;const ElementsHolder=reactExports.memo(reactExports.forwardRef((_e,et)=>{const[tt,rt]=usePatchElement();return reactExports.useImperativeHandle(et,()=>({patchElement:rt}),[]),reactExports.createElement(reactExports.Fragment,null,tt)}));function useModal$1(){const _e=reactExports.useRef(null),[et,tt]=reactExports.useState([]);reactExports.useEffect(()=>{et.length&&(_toConsumableArray(et).forEach(at=>{at()}),tt([]))},[et]);const rt=reactExports.useCallback(it=>function(st){var lt;uuid+=1;const dt=reactExports.createRef();let ht;const pt=new Promise(yt=>{ht=yt});let mt=!1,gt;const vt=reactExports.createElement(HookModal$1,{key:`modal-${uuid}`,config:it(st),ref:dt,afterClose:()=>{gt?.()},isSilent:()=>mt,onConfirm:yt=>{ht(yt)}});return gt=(lt=_e.current)===null||lt===void 0?void 0:lt.patchElement(vt),gt&&destroyFns$1.push(gt),{destroy:()=>{function yt(){var bt;(bt=dt.current)===null||bt===void 0||bt.destroy()}dt.current?yt():tt(bt=>[].concat(_toConsumableArray(bt),[yt]))},update:yt=>{function bt(){var wt;(wt=dt.current)===null||wt===void 0||wt.update(yt)}dt.current?bt():tt(wt=>[].concat(_toConsumableArray(wt),[bt]))},then:yt=>(mt=!0,pt.then(yt))}},[]);return[reactExports.useMemo(()=>({info:rt(withInfo),success:rt(withSuccess),error:rt(withError),warning:rt(withWarn),confirm:rt(withConfirm)}),[]),reactExports.createElement(ElementsHolder,{key:"modal-holder",ref:_e})]}function withPureRenderTheme(_e){return function(tt){return reactExports.createElement(ConfigProvider$1,{theme:{token:{motion:!1,zIndexPopupBase:0}}},reactExports.createElement(_e,Object.assign({},tt)))}}let message=null,act=_e=>_e(),taskQueue=[],defaultGlobalConfig={};function getGlobalContext(){const{prefixCls:_e,getContainer:et,duration:tt,rtl:rt,maxCount:nt,top:it}=defaultGlobalConfig,at=_e??globalConfig().getPrefixCls("message"),st=et?.()||document.body;return{prefixCls:at,getContainer:()=>st,duration:tt,rtl:rt,maxCount:nt,top:it}}const GlobalHolder=reactExports.forwardRef((_e,et)=>{const[tt,rt]=reactExports.useState(getGlobalContext),[nt,it]=useInternalMessage(tt),at=globalConfig(),st=at.getRootPrefixCls(),lt=at.getIconPrefixCls(),dt=at.getTheme(),ht=()=>{rt(getGlobalContext)};return reactExports.useEffect(ht,[]),reactExports.useImperativeHandle(et,()=>{const pt=Object.assign({},nt);return Object.keys(pt).forEach(mt=>{pt[mt]=function(){return ht(),nt[mt].apply(nt,arguments)}}),{instance:pt,sync:ht}}),reactExports.createElement(ConfigProvider$1,{prefixCls:st,iconPrefixCls:lt,theme:dt},it)});function flushNotice(){if(!message){const _e=document.createDocumentFragment(),et={fragment:_e};message=et,act(()=>{render(reactExports.createElement(GlobalHolder,{ref:tt=>{const{instance:rt,sync:nt}=tt||{};Promise.resolve().then(()=>{!et.instance&&rt&&(et.instance=rt,et.sync=nt,flushNotice())})}}),_e)});return}message.instance&&(taskQueue.forEach(_e=>{const{type:et,skipped:tt}=_e;if(!tt)switch(et){case"open":{act(()=>{const rt=message.instance.open(Object.assign(Object.assign({},defaultGlobalConfig),_e.config));rt?.then(_e.resolve),_e.setCloseFn(rt)});break}case"destroy":act(()=>{message?.instance.destroy(_e.key)});break;default:act(()=>{var rt;const nt=(rt=message.instance)[et].apply(rt,_toConsumableArray(_e.args));nt?.then(_e.resolve),_e.setCloseFn(nt)})}}),taskQueue=[])}function setMessageGlobalConfig(_e){defaultGlobalConfig=Object.assign(Object.assign({},defaultGlobalConfig),_e),act(()=>{var et;(et=message?.sync)===null||et===void 0||et.call(message)})}function open(_e){const et=wrapPromiseFn(tt=>{let rt;const nt={type:"open",config:_e,resolve:tt,setCloseFn:it=>{rt=it}};return taskQueue.push(nt),()=>{rt?act(()=>{rt()}):nt.skipped=!0}});return flushNotice(),et}function typeOpen(_e,et){const tt=wrapPromiseFn(rt=>{let nt;const it={type:_e,args:et,resolve:rt,setCloseFn:at=>{nt=at}};return taskQueue.push(it),()=>{nt?act(()=>{nt()}):it.skipped=!0}});return flushNotice(),tt}function destroy(_e){taskQueue.push({type:"destroy",key:_e}),flushNotice()}const methods=["success","info","warning","error","loading"],baseStaticMethods={open,destroy,config:setMessageGlobalConfig,useMessage,_InternalPanelDoNotUseOrYouWillBeFired:PurePanel$3},staticMethods=baseStaticMethods;methods.forEach(_e=>{staticMethods[_e]=function(){for(var et=arguments.length,tt=new Array(et),rt=0;rt{const{prefixCls:et,className:tt,closeIcon:rt,closable:nt,type:it,title:at,children:st}=_e,lt=__rest(_e,["prefixCls","className","closeIcon","closable","type","title","children"]),{getPrefixCls:dt}=reactExports.useContext(ConfigContext),ht=dt(),pt=et||dt("modal"),[,mt]=useStyle(pt),gt=`${pt}-confirm`;let vt={};return it?vt={closable:nt??!1,title:"",footer:"",children:reactExports.createElement(ConfirmContent,Object.assign({},_e,{prefixCls:pt,confirmPrefixCls:gt,rootPrefixCls:ht,content:st}))}:vt={closable:nt??!0,title:at,footer:_e.footer===void 0?reactExports.createElement(Footer,Object.assign({},_e)):_e.footer,children:st},reactExports.createElement(Panel,Object.assign({prefixCls:pt,className:classNames(mt,`${pt}-pure-panel`,it&>,it&&`${gt}-${it}`,tt)},lt,{closeIcon:renderCloseIcon(pt,rt),closable:nt},vt))},PurePanel$1=withPureRenderTheme(PurePanel);function modalWarn(_e){return confirm(withWarn(_e))}const Modal=OriginModal;Modal.useModal=useModal$1;Modal.info=function(et){return confirm(withInfo(et))};Modal.success=function(et){return confirm(withSuccess(et))};Modal.error=function(et){return confirm(withError(et))};Modal.warning=modalWarn;Modal.warn=modalWarn;Modal.confirm=function(et){return confirm(withConfirm(et))};Modal.destroyAll=function(){for(;destroyFns$1.length;){const et=destroyFns$1.pop();et&&et()}};Modal.config=modalGlobalConfig;Modal._InternalPanelDoNotUseOrYouWillBeFired=PurePanel$1;const Modal$1=Modal;var toggleSelection=function(){var _e=document.getSelection();if(!_e.rangeCount)return function(){};for(var et=document.activeElement,tt=[],rt=0;rt<_e.rangeCount;rt++)tt.push(_e.getRangeAt(rt));switch(et.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":et.blur();break;default:et=null;break}return _e.removeAllRanges(),function(){_e.type==="Caret"&&_e.removeAllRanges(),_e.rangeCount||tt.forEach(function(nt){_e.addRange(nt)}),et&&et.focus()}},deselectCurrent=toggleSelection,clipboardToIE11Formatting={"text/plain":"Text","text/html":"Url",default:"Text"},defaultMessage="Copy to clipboard: #{key}, Enter";function format(_e){var et=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return _e.replace(/#{\s*key\s*}/g,et)}function copy(_e,et){var tt,rt,nt,it,at,st,lt=!1;et||(et={}),tt=et.debug||!1;try{nt=deselectCurrent(),it=document.createRange(),at=document.getSelection(),st=document.createElement("span"),st.textContent=_e,st.ariaHidden="true",st.style.all="unset",st.style.position="fixed",st.style.top=0,st.style.clip="rect(0, 0, 0, 0)",st.style.whiteSpace="pre",st.style.webkitUserSelect="text",st.style.MozUserSelect="text",st.style.msUserSelect="text",st.style.userSelect="text",st.addEventListener("copy",function(ht){if(ht.stopPropagation(),et.format)if(ht.preventDefault(),typeof ht.clipboardData>"u"){tt&&console.warn("unable to use e.clipboardData"),tt&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var pt=clipboardToIE11Formatting[et.format]||clipboardToIE11Formatting.default;window.clipboardData.setData(pt,_e)}else ht.clipboardData.clearData(),ht.clipboardData.setData(et.format,_e);et.onCopy&&(ht.preventDefault(),et.onCopy(ht.clipboardData))}),document.body.appendChild(st),it.selectNodeContents(st),at.addRange(it);var dt=document.execCommand("copy");if(!dt)throw new Error("copy command was unsuccessful");lt=!0}catch(ht){tt&&console.error("unable to copy using execCommand: ",ht),tt&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(et.format||"text",_e),et.onCopy&&et.onCopy(window.clipboardData),lt=!0}catch(pt){tt&&console.error("unable to copy using clipboardData: ",pt),tt&&console.error("falling back to prompt"),rt=format("message"in et?et.message:defaultMessage),window.prompt(rt,_e)}}finally{at&&(typeof at.removeRange=="function"?at.removeRange(it):at.removeAllRanges()),st&&document.body.removeChild(st),nt()}return lt}var copyToClipboard=copy;let wait=!1;function createSystemCalls({worldContract:_e,waitForTransaction:et},tt){const{Counter:rt,Player:nt,LootList1:it,LootList2:at,BoxList:st,BattleList:lt}=tt;return{increment:async()=>{const _t=await _e.write.increment();return await et(_t),g$7(rt,f$1)},move:async _t=>{if(!wait){wait=!0,console.log("move",new Date().getTime());try{const At=await _e.write.move([_t]);await et(At),console.log("move success",new Date().getTime(),At),wait=!1}catch(At){console.log("move",At),message$1.error(At.cause.reason||At.cause.details),wait=!1}}},getPosition:async _t=>{const At=await _e.read.getPosition([_t]);await et(At),await et(At)},joinBattlefield:async()=>{console.log("joinBattlefield",new Date().getTime());try{const _t=await _e.write.joinBattlefield();return await et(_t),console.log("joinBattlefield success",new Date().getTime(),_t),_t}catch(_t){console.log("joinBattlefield",_t),message$1.error(_t.cause.reason||_t.cause.details)}},transfer:async(_t,At)=>{console.log("transfer",new Date().getTime());try{const Tt=await _e.write.transfer([_t,...At]);await et(Tt),console.log("transfer success",new Date().getTime(),Tt)}catch(Tt){console.log("transfer",Tt),message$1.error(Tt.cause.reason||Tt.cause.details)}},battleInvitation:async(_t,At)=>{if(!wait){wait=!0,console.log("battleInvitation",new Date().getTime());try{const Tt=await _e.write.battleInvitation([_t,At]);return await et(Tt),console.log("battleInvitation success",new Date().getTime(),Tt),wait=!1,Tt}catch(Tt){console.log("battleInvitation",Tt),message$1.error(Tt.cause.reason||Tt.cause.details),wait=!1}}},confirmBattle:async(_t,At)=>{if(!wait){wait=!0,console.log("confirmBattle",new Date().getTime());try{const Tt=await _e.write.confirmBattle([_t,At]);return await et(Tt),console.log("confirmBattle success",new Date().getTime(),Tt),wait=!1,{type:"success",data:g$7(lt,u$1({battleId:"uint256"},{battleId:At}))}}catch(Tt){return console.log("confirmBattle",Tt),message$1.error(Tt.cause.reason||Tt.cause.details),wait=!1,{type:"error",msg:Tt.cause.reason||Tt.cause.details||Tt.cause}}}},selectUserNft:async(_t,At)=>{console.log("selectUserNft",new Date().getTime());try{const Tt=await _e.write.selectUserNft([_t]);return await et(Tt),console.log("selectUserNft success",new Date().getTime(),Tt),g$7(nt,u$1({addr:"address"},{addr:At}))}catch(Tt){console.log("selectUserNft",Tt),message$1.error(Tt.cause.reason||Tt.cause.details)}},selectLootNFT:async(_t,At)=>{console.log("selectLootNFT",new Date().getTime());try{const Tt=await _e.write.selectLootNFT([_t]);return await et(Tt),console.log("selectLootNFT success",new Date().getTime(),Tt),g$7(it,u$1({addr:"address"},{addr:At}))}catch(Tt){console.log("selectLootNFT",Tt),message$1.error(Tt.cause.reason||Tt.cause.details)}},revealBattle:async(_t,At,Tt,Bt)=>{if(!wait){wait=!0,console.log("revealBattle",new Date().getTime());try{const Ot=await _e.write.revealBattle([_t,At,Tt,Bt]);return await et(Ot),console.log("revealBattle success",new Date().getTime(),Ot),wait=!1,{type:"success",data:g$7(lt,u$1({battleId:"uint256"},{battleId:_t}))}}catch(Ot){return console.log("revealBattle",Ot),message$1.error(Ot.cause.reason||Ot.cause.details),wait=!1,{type:"error",msg:Ot.cause.reason||Ot.cause.details||Ot.cause}}}},openBox:async _t=>{if(!wait){wait=!0,console.log("openBox",new Date().getTime());try{const At=await _e.write.openBox([_t]);await et(At),console.log("openBox success",new Date().getTime(),At),wait=!1}catch(At){console.log("openBox",At),message$1.error(At.cause.reason||At.cause.details),wait=!1}}},getCollections:async(_t,At,Tt)=>{if(!wait){wait=!0;try{const Bt=await _e.write.getCollections([_t,At,Tt]);await et(Bt),wait=!1}catch(Bt){console.log("getCollections",Bt),message$1.error(Bt.cause.reason||Bt.cause.details),wait=!1}}},revealBox:async _t=>{if(!wait){wait=!0,console.log("revealBox",new Date().getTime());try{const At=await _e.write.revealBox([_t]);return await et(At),console.log("revealBox success",new Date().getTime(),At),wait=!1,g$7(st,u$1({boxId:"uint256"},{boxId:_t}))}catch(At){console.log("revealBox",At),message$1.error(At.cause.reason||At.cause.details),wait=!1}}},CreateBox:async(_t,At)=>{try{const Tt=await _e.write.CreateBox([_t,At]);await et(Tt)}catch(Tt){console.log("CreateBox",Tt),message$1.error(Tt.cause.reason||Tt.cause.details)}},getBattlePlayerHp:async(_t,At)=>await _e.read.getBattlePlayerHp([_t,At]),setInfo:async(_t,At)=>{console.log("setInfo",new Date().getTime());try{const Tt=await _e.write.setInfo([_t,At]);return await et(Tt),console.log("setInfo success",new Date().getTime(),Tt),Tt}catch(Tt){console.log("setInfo",Tt),message$1.error(Tt.cause.reason||Tt.cause.details)}},initUserInfo:async()=>{if(!wait){wait=!0,console.log("initUserInfo",new Date().getTime());try{const _t=await _e.write.initUserInfo();return await et(_t),console.log("initUserInfo success",new Date().getTime(),_t),wait=!1,_t}catch(_t){console.log("initUserInfo",_t),message$1.error(_t.cause.reason||_t.cause.details),wait=!1}}},selectBothNFT:async(_t,At,Tt)=>{console.log("selectBothNFT",new Date().getTime());try{const Bt=await _e.write.selectBothNFT([_t,At]);return await et(Bt),console.log("selectBothNFT success",new Date().getTime(),Bt),{playerData:g$7(nt,u$1({addr:"address"},{addr:Tt})),lootData:g$7(it,u$1({addr:"address"},{addr:Tt}))}}catch(Bt){console.log("selectUserNft",Bt),message$1.error(Bt.cause.reason||Bt.cause.details)}},forceEnd:async _t=>{if(!wait){wait=!0,console.log("forceEnd",new Date().getTime());try{const At=await _e.write.forceEnd([_t]);return await et(At),console.log("forceEnd success",new Date().getTime(),At),wait=!1,g$7(lt,u$1({battleId:"uint256"},{battleId:_t}))}catch(At){console.log("forceEnd",At),wait=!1}}},unlockUserLocation:async()=>{console.log("unlockUserLocation",new Date().getTime());try{const _t=await _e.write.unlockUserLocation();return await et(_t),console.log("unlockUserLocation success",new Date().getTime(),_t),_t}catch(_t){console.log("unlockUserLocation",_t),message$1.error(_t.cause.reason||_t.cause.details)}},submitGem:async()=>{try{const _t=await _e.write.submitGem();return await et(_t),_t}catch(_t){console.log("submitGem",_t),message$1.error(_t.cause.reason||_t.cause.details)}}}}/** + * @license + * Copyright 2009 The Closure Library Authors + * Copyright 2020 Daniel Wirtz / The long.js Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */var wasm=null;try{wasm=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function Long(_e,et,tt){this.low=_e|0,this.high=et|0,this.unsigned=!!tt}Long.prototype.__isLong__;Object.defineProperty(Long.prototype,"__isLong__",{value:!0});function isLong(_e){return(_e&&_e.__isLong__)===!0}function ctz32(_e){var et=Math.clz32(_e&-_e);return _e?31-et:et}Long.isLong=isLong;var INT_CACHE={},UINT_CACHE={};function fromInt(_e,et){var tt,rt,nt;return et?(_e>>>=0,(nt=0<=_e&&_e<256)&&(rt=UINT_CACHE[_e],rt)?rt:(tt=fromBits(_e,0,!0),nt&&(UINT_CACHE[_e]=tt),tt)):(_e|=0,(nt=-128<=_e&&_e<128)&&(rt=INT_CACHE[_e],rt)?rt:(tt=fromBits(_e,_e<0?-1:0,!1),nt&&(INT_CACHE[_e]=tt),tt))}Long.fromInt=fromInt;function fromNumber(_e,et){if(isNaN(_e))return et?UZERO:ZERO;if(et){if(_e<0)return UZERO;if(_e>=TWO_PWR_64_DBL)return MAX_UNSIGNED_VALUE}else{if(_e<=-TWO_PWR_63_DBL)return MIN_VALUE;if(_e+1>=TWO_PWR_63_DBL)return MAX_VALUE}return _e<0?fromNumber(-_e,et).neg():fromBits(_e%TWO_PWR_32_DBL|0,_e/TWO_PWR_32_DBL|0,et)}Long.fromNumber=fromNumber;function fromBits(_e,et,tt){return new Long(_e,et,tt)}Long.fromBits=fromBits;var pow_dbl=Math.pow;function fromString(_e,et,tt){if(_e.length===0)throw Error("empty string");if(typeof et=="number"?(tt=et,et=!1):et=!!et,_e==="NaN"||_e==="Infinity"||_e==="+Infinity"||_e==="-Infinity")return et?UZERO:ZERO;if(tt=tt||10,tt<2||360)throw Error("interior hyphen");if(rt===0)return fromString(_e.substring(1),et,tt).neg();for(var nt=fromNumber(pow_dbl(tt,8)),it=ZERO,at=0;at<_e.length;at+=8){var st=Math.min(8,_e.length-at),lt=parseInt(_e.substring(at,at+st),tt);if(st<8){var dt=fromNumber(pow_dbl(tt,st));it=it.mul(dt).add(fromNumber(lt))}else it=it.mul(nt),it=it.add(fromNumber(lt))}return it.unsigned=et,it}Long.fromString=fromString;function fromValue(_e,et){return typeof _e=="number"?fromNumber(_e,et):typeof _e=="string"?fromString(_e,et):fromBits(_e.low,_e.high,typeof et=="boolean"?et:_e.unsigned)}Long.fromValue=fromValue;var TWO_PWR_16_DBL=65536,TWO_PWR_24_DBL=1<<24,TWO_PWR_32_DBL=TWO_PWR_16_DBL*TWO_PWR_16_DBL,TWO_PWR_64_DBL=TWO_PWR_32_DBL*TWO_PWR_32_DBL,TWO_PWR_63_DBL=TWO_PWR_64_DBL/2,TWO_PWR_24=fromInt(TWO_PWR_24_DBL),ZERO=fromInt(0);Long.ZERO=ZERO;var UZERO=fromInt(0,!0);Long.UZERO=UZERO;var ONE=fromInt(1);Long.ONE=ONE;var UONE=fromInt(1,!0);Long.UONE=UONE;var NEG_ONE=fromInt(-1);Long.NEG_ONE=NEG_ONE;var MAX_VALUE=fromBits(-1,2147483647,!1);Long.MAX_VALUE=MAX_VALUE;var MAX_UNSIGNED_VALUE=fromBits(-1,-1,!0);Long.MAX_UNSIGNED_VALUE=MAX_UNSIGNED_VALUE;var MIN_VALUE=fromBits(0,-2147483648,!1);Long.MIN_VALUE=MIN_VALUE;var LongPrototype=Long.prototype;LongPrototype.toInt=function(){return this.unsigned?this.low>>>0:this.low};LongPrototype.toNumber=function(){return this.unsigned?(this.high>>>0)*TWO_PWR_32_DBL+(this.low>>>0):this.high*TWO_PWR_32_DBL+(this.low>>>0)};LongPrototype.toString=function(et){if(et=et||10,et<2||36>>0,ht=dt.toString(et);if(at=lt,at.isZero())return ht+st;for(;ht.length<6;)ht="0"+ht;st=""+ht+st}};LongPrototype.getHighBits=function(){return this.high};LongPrototype.getHighBitsUnsigned=function(){return this.high>>>0};LongPrototype.getLowBits=function(){return this.low};LongPrototype.getLowBitsUnsigned=function(){return this.low>>>0};LongPrototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(MIN_VALUE)?64:this.neg().getNumBitsAbs();for(var et=this.high!=0?this.high:this.low,tt=31;tt>0&&!(et&1<=0};LongPrototype.isOdd=function(){return(this.low&1)===1};LongPrototype.isEven=function(){return(this.low&1)===0};LongPrototype.equals=function(et){return isLong(et)||(et=fromValue(et)),this.unsigned!==et.unsigned&&this.high>>>31===1&&et.high>>>31===1?!1:this.high===et.high&&this.low===et.low};LongPrototype.eq=LongPrototype.equals;LongPrototype.notEquals=function(et){return!this.eq(et)};LongPrototype.neq=LongPrototype.notEquals;LongPrototype.ne=LongPrototype.notEquals;LongPrototype.lessThan=function(et){return this.comp(et)<0};LongPrototype.lt=LongPrototype.lessThan;LongPrototype.lessThanOrEqual=function(et){return this.comp(et)<=0};LongPrototype.lte=LongPrototype.lessThanOrEqual;LongPrototype.le=LongPrototype.lessThanOrEqual;LongPrototype.greaterThan=function(et){return this.comp(et)>0};LongPrototype.gt=LongPrototype.greaterThan;LongPrototype.greaterThanOrEqual=function(et){return this.comp(et)>=0};LongPrototype.gte=LongPrototype.greaterThanOrEqual;LongPrototype.ge=LongPrototype.greaterThanOrEqual;LongPrototype.compare=function(et){if(isLong(et)||(et=fromValue(et)),this.eq(et))return 0;var tt=this.isNegative(),rt=et.isNegative();return tt&&!rt?-1:!tt&&rt?1:this.unsigned?et.high>>>0>this.high>>>0||et.high===this.high&&et.low>>>0>this.low>>>0?-1:1:this.sub(et).isNegative()?-1:1};LongPrototype.comp=LongPrototype.compare;LongPrototype.negate=function(){return!this.unsigned&&this.eq(MIN_VALUE)?MIN_VALUE:this.not().add(ONE)};LongPrototype.neg=LongPrototype.negate;LongPrototype.add=function(et){isLong(et)||(et=fromValue(et));var tt=this.high>>>16,rt=this.high&65535,nt=this.low>>>16,it=this.low&65535,at=et.high>>>16,st=et.high&65535,lt=et.low>>>16,dt=et.low&65535,ht=0,pt=0,mt=0,gt=0;return gt+=it+dt,mt+=gt>>>16,gt&=65535,mt+=nt+lt,pt+=mt>>>16,mt&=65535,pt+=rt+st,ht+=pt>>>16,pt&=65535,ht+=tt+at,ht&=65535,fromBits(mt<<16|gt,ht<<16|pt,this.unsigned)};LongPrototype.subtract=function(et){return isLong(et)||(et=fromValue(et)),this.add(et.neg())};LongPrototype.sub=LongPrototype.subtract;LongPrototype.multiply=function(et){if(this.isZero())return this;if(isLong(et)||(et=fromValue(et)),wasm){var tt=wasm.mul(this.low,this.high,et.low,et.high);return fromBits(tt,wasm.get_high(),this.unsigned)}if(et.isZero())return this.unsigned?UZERO:ZERO;if(this.eq(MIN_VALUE))return et.isOdd()?MIN_VALUE:ZERO;if(et.eq(MIN_VALUE))return this.isOdd()?MIN_VALUE:ZERO;if(this.isNegative())return et.isNegative()?this.neg().mul(et.neg()):this.neg().mul(et).neg();if(et.isNegative())return this.mul(et.neg()).neg();if(this.lt(TWO_PWR_24)&&et.lt(TWO_PWR_24))return fromNumber(this.toNumber()*et.toNumber(),this.unsigned);var rt=this.high>>>16,nt=this.high&65535,it=this.low>>>16,at=this.low&65535,st=et.high>>>16,lt=et.high&65535,dt=et.low>>>16,ht=et.low&65535,pt=0,mt=0,gt=0,vt=0;return vt+=at*ht,gt+=vt>>>16,vt&=65535,gt+=it*ht,mt+=gt>>>16,gt&=65535,gt+=at*dt,mt+=gt>>>16,gt&=65535,mt+=nt*ht,pt+=mt>>>16,mt&=65535,mt+=it*dt,pt+=mt>>>16,mt&=65535,mt+=at*lt,pt+=mt>>>16,mt&=65535,pt+=rt*ht+nt*dt+it*lt+at*st,pt&=65535,fromBits(gt<<16|vt,pt<<16|mt,this.unsigned)};LongPrototype.mul=LongPrototype.multiply;LongPrototype.divide=function(et){if(isLong(et)||(et=fromValue(et)),et.isZero())throw Error("division by zero");if(wasm){if(!this.unsigned&&this.high===-2147483648&&et.low===-1&&et.high===-1)return this;var tt=(this.unsigned?wasm.div_u:wasm.div_s)(this.low,this.high,et.low,et.high);return fromBits(tt,wasm.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?UZERO:ZERO;var rt,nt,it;if(this.unsigned){if(et.unsigned||(et=et.toUnsigned()),et.gt(this))return UZERO;if(et.gt(this.shru(1)))return UONE;it=UZERO}else{if(this.eq(MIN_VALUE)){if(et.eq(ONE)||et.eq(NEG_ONE))return MIN_VALUE;if(et.eq(MIN_VALUE))return ONE;var at=this.shr(1);return rt=at.div(et).shl(1),rt.eq(ZERO)?et.isNegative()?ONE:NEG_ONE:(nt=this.sub(et.mul(rt)),it=rt.add(nt.div(et)),it)}else if(et.eq(MIN_VALUE))return this.unsigned?UZERO:ZERO;if(this.isNegative())return et.isNegative()?this.neg().div(et.neg()):this.neg().div(et).neg();if(et.isNegative())return this.div(et.neg()).neg();it=ZERO}for(nt=this;nt.gte(et);){rt=Math.max(1,Math.floor(nt.toNumber()/et.toNumber()));for(var st=Math.ceil(Math.log(rt)/Math.LN2),lt=st<=48?1:pow_dbl(2,st-48),dt=fromNumber(rt),ht=dt.mul(et);ht.isNegative()||ht.gt(nt);)rt-=lt,dt=fromNumber(rt,this.unsigned),ht=dt.mul(et);dt.isZero()&&(dt=ONE),it=it.add(dt),nt=nt.sub(ht)}return it};LongPrototype.div=LongPrototype.divide;LongPrototype.modulo=function(et){if(isLong(et)||(et=fromValue(et)),wasm){var tt=(this.unsigned?wasm.rem_u:wasm.rem_s)(this.low,this.high,et.low,et.high);return fromBits(tt,wasm.get_high(),this.unsigned)}return this.sub(this.div(et).mul(et))};LongPrototype.mod=LongPrototype.modulo;LongPrototype.rem=LongPrototype.modulo;LongPrototype.not=function(){return fromBits(~this.low,~this.high,this.unsigned)};LongPrototype.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};LongPrototype.clz=LongPrototype.countLeadingZeros;LongPrototype.countTrailingZeros=function(){return this.low?ctz32(this.low):ctz32(this.high)+32};LongPrototype.ctz=LongPrototype.countTrailingZeros;LongPrototype.and=function(et){return isLong(et)||(et=fromValue(et)),fromBits(this.low&et.low,this.high&et.high,this.unsigned)};LongPrototype.or=function(et){return isLong(et)||(et=fromValue(et)),fromBits(this.low|et.low,this.high|et.high,this.unsigned)};LongPrototype.xor=function(et){return isLong(et)||(et=fromValue(et)),fromBits(this.low^et.low,this.high^et.high,this.unsigned)};LongPrototype.shiftLeft=function(et){return isLong(et)&&(et=et.toInt()),(et&=63)===0?this:et<32?fromBits(this.low<>>32-et,this.unsigned):fromBits(0,this.low<>>et|this.high<<32-et,this.high>>et,this.unsigned):fromBits(this.high>>et-32,this.high>=0?0:-1,this.unsigned)};LongPrototype.shr=LongPrototype.shiftRight;LongPrototype.shiftRightUnsigned=function(et){return isLong(et)&&(et=et.toInt()),(et&=63)===0?this:et<32?fromBits(this.low>>>et|this.high<<32-et,this.high>>>et,this.unsigned):et===32?fromBits(this.high,0,this.unsigned):fromBits(this.high>>>et-32,0,this.unsigned)};LongPrototype.shru=LongPrototype.shiftRightUnsigned;LongPrototype.shr_u=LongPrototype.shiftRightUnsigned;LongPrototype.rotateLeft=function(et){var tt;return isLong(et)&&(et=et.toInt()),(et&=63)===0?this:et===32?fromBits(this.high,this.low,this.unsigned):et<32?(tt=32-et,fromBits(this.low<>>tt,this.high<>>tt,this.unsigned)):(et-=32,tt=32-et,fromBits(this.high<>>tt,this.low<>>tt,this.unsigned))};LongPrototype.rotl=LongPrototype.rotateLeft;LongPrototype.rotateRight=function(et){var tt;return isLong(et)&&(et=et.toInt()),(et&=63)===0?this:et===32?fromBits(this.high,this.low,this.unsigned):et<32?(tt=32-et,fromBits(this.high<>>et,this.low<>>et,this.unsigned)):(et-=32,tt=32-et,fromBits(this.low<>>et,this.high<>>et,this.unsigned))};LongPrototype.rotr=LongPrototype.rotateRight;LongPrototype.toSigned=function(){return this.unsigned?fromBits(this.low,this.high,!1):this};LongPrototype.toUnsigned=function(){return this.unsigned?this:fromBits(this.low,this.high,!0)};LongPrototype.toBytes=function(et){return et?this.toBytesLE():this.toBytesBE()};LongPrototype.toBytesLE=function(){var et=this.high,tt=this.low;return[tt&255,tt>>>8&255,tt>>>16&255,tt>>>24,et&255,et>>>8&255,et>>>16&255,et>>>24]};LongPrototype.toBytesBE=function(){var et=this.high,tt=this.low;return[et>>>24,et>>>16&255,et>>>8&255,et&255,tt>>>24,tt>>>16&255,tt>>>8&255,tt&255]};Long.fromBytes=function(et,tt,rt){return rt?Long.fromBytesLE(et,tt):Long.fromBytesBE(et,tt)};Long.fromBytesLE=function(et,tt){return new Long(et[0]|et[1]<<8|et[2]<<16|et[3]<<24,et[4]|et[5]<<8|et[6]<<16|et[7]<<24,tt)};Long.fromBytesBE=function(et,tt){return new Long(et[4]<<24|et[5]<<16|et[6]<<8|et[7],et[0]<<24|et[1]<<16|et[2]<<8|et[3],tt)};var indexMinimal={},minimal$1={},aspromise=asPromise;function asPromise(_e,et){for(var tt=new Array(arguments.length-1),rt=0,nt=2,it=!0;nt1&&st.charAt(lt)==="=";)++dt;return Math.ceil(st.length*3)/4-dt};for(var tt=new Array(64),rt=new Array(123),nt=0;nt<64;)rt[tt[nt]=nt<26?nt+65:nt<52?nt+71:nt<62?nt-4:nt-59|43]=nt++;et.encode=function(st,lt,dt){for(var ht=null,pt=[],mt=0,gt=0,vt;lt>2],vt=(xt&3)<<4,gt=1;break;case 1:pt[mt++]=tt[vt|xt>>4],vt=(xt&15)<<2,gt=2;break;case 2:pt[mt++]=tt[vt|xt>>6],pt[mt++]=tt[xt&63],gt=0;break}mt>8191&&((ht||(ht=[])).push(String.fromCharCode.apply(String,pt)),mt=0)}return gt&&(pt[mt++]=tt[vt],pt[mt++]=61,gt===1&&(pt[mt++]=61)),ht?(mt&&ht.push(String.fromCharCode.apply(String,pt.slice(0,mt))),ht.join("")):String.fromCharCode.apply(String,pt.slice(0,mt))};var it="invalid encoding";et.decode=function(st,lt,dt){for(var ht=dt,pt=0,mt,gt=0;gt1)break;if((vt=rt[vt])===void 0)throw Error(it);switch(pt){case 0:mt=vt,pt=1;break;case 1:lt[dt++]=mt<<2|(vt&48)>>4,mt=vt,pt=2;break;case 2:lt[dt++]=(mt&15)<<4|(vt&60)>>2,mt=vt,pt=3;break;case 3:lt[dt++]=(mt&3)<<6|vt,pt=0;break}}if(pt===1)throw Error(it);return dt-ht},et.test=function(st){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(st)}})(base64$2);var eventemitter=EventEmitter;function EventEmitter(){this._listeners={}}EventEmitter.prototype.on=function(et,tt,rt){return(this._listeners[et]||(this._listeners[et]=[])).push({fn:tt,ctx:rt||this}),this};EventEmitter.prototype.off=function(et,tt){if(et===void 0)this._listeners={};else if(tt===void 0)this._listeners[et]=[];else for(var rt=this._listeners[et],nt=0;nt0?0:2147483648,it,at);else if(isNaN(nt))rt(2143289344,it,at);else if(nt>34028234663852886e22)rt((st<<31|2139095040)>>>0,it,at);else if(nt<11754943508222875e-54)rt((st<<31|Math.round(nt/1401298464324817e-60))>>>0,it,at);else{var lt=Math.floor(Math.log(nt)/Math.LN2),dt=Math.round(nt*Math.pow(2,-lt)*8388608)&8388607;rt((st<<31|lt+127<<23|dt)>>>0,it,at)}}_e.writeFloatLE=et.bind(null,writeUintLE),_e.writeFloatBE=et.bind(null,writeUintBE);function tt(rt,nt,it){var at=rt(nt,it),st=(at>>31)*2+1,lt=at>>>23&255,dt=at&8388607;return lt===255?dt?NaN:st*(1/0):lt===0?st*1401298464324817e-60*dt:st*Math.pow(2,lt-150)*(dt+8388608)}_e.readFloatLE=tt.bind(null,readUintLE),_e.readFloatBE=tt.bind(null,readUintBE)}(),typeof Float64Array<"u"?function(){var et=new Float64Array([-0]),tt=new Uint8Array(et.buffer),rt=tt[7]===128;function nt(lt,dt,ht){et[0]=lt,dt[ht]=tt[0],dt[ht+1]=tt[1],dt[ht+2]=tt[2],dt[ht+3]=tt[3],dt[ht+4]=tt[4],dt[ht+5]=tt[5],dt[ht+6]=tt[6],dt[ht+7]=tt[7]}function it(lt,dt,ht){et[0]=lt,dt[ht]=tt[7],dt[ht+1]=tt[6],dt[ht+2]=tt[5],dt[ht+3]=tt[4],dt[ht+4]=tt[3],dt[ht+5]=tt[2],dt[ht+6]=tt[1],dt[ht+7]=tt[0]}_e.writeDoubleLE=rt?nt:it,_e.writeDoubleBE=rt?it:nt;function at(lt,dt){return tt[0]=lt[dt],tt[1]=lt[dt+1],tt[2]=lt[dt+2],tt[3]=lt[dt+3],tt[4]=lt[dt+4],tt[5]=lt[dt+5],tt[6]=lt[dt+6],tt[7]=lt[dt+7],et[0]}function st(lt,dt){return tt[7]=lt[dt],tt[6]=lt[dt+1],tt[5]=lt[dt+2],tt[4]=lt[dt+3],tt[3]=lt[dt+4],tt[2]=lt[dt+5],tt[1]=lt[dt+6],tt[0]=lt[dt+7],et[0]}_e.readDoubleLE=rt?at:st,_e.readDoubleBE=rt?st:at}():function(){function et(rt,nt,it,at,st,lt){var dt=at<0?1:0;if(dt&&(at=-at),at===0)rt(0,st,lt+nt),rt(1/at>0?0:2147483648,st,lt+it);else if(isNaN(at))rt(0,st,lt+nt),rt(2146959360,st,lt+it);else if(at>17976931348623157e292)rt(0,st,lt+nt),rt((dt<<31|2146435072)>>>0,st,lt+it);else{var ht;if(at<22250738585072014e-324)ht=at/5e-324,rt(ht>>>0,st,lt+nt),rt((dt<<31|ht/4294967296)>>>0,st,lt+it);else{var pt=Math.floor(Math.log(at)/Math.LN2);pt===1024&&(pt=1023),ht=at*Math.pow(2,-pt),rt(ht*4503599627370496>>>0,st,lt+nt),rt((dt<<31|pt+1023<<20|ht*1048576&1048575)>>>0,st,lt+it)}}}_e.writeDoubleLE=et.bind(null,writeUintLE,0,4),_e.writeDoubleBE=et.bind(null,writeUintBE,4,0);function tt(rt,nt,it,at,st){var lt=rt(at,st+nt),dt=rt(at,st+it),ht=(dt>>31)*2+1,pt=dt>>>20&2047,mt=4294967296*(dt&1048575)+lt;return pt===2047?mt?NaN:ht*(1/0):pt===0?ht*5e-324*mt:ht*Math.pow(2,pt-1075)*(mt+4503599627370496)}_e.readDoubleLE=tt.bind(null,readUintLE,0,4),_e.readDoubleBE=tt.bind(null,readUintBE,4,0)}(),_e}function writeUintLE(_e,et,tt){et[tt]=_e&255,et[tt+1]=_e>>>8&255,et[tt+2]=_e>>>16&255,et[tt+3]=_e>>>24}function writeUintBE(_e,et,tt){et[tt]=_e>>>24,et[tt+1]=_e>>>16&255,et[tt+2]=_e>>>8&255,et[tt+3]=_e&255}function readUintLE(_e,et){return(_e[et]|_e[et+1]<<8|_e[et+2]<<16|_e[et+3]<<24)>>>0}function readUintBE(_e,et){return(_e[et]<<24|_e[et+1]<<16|_e[et+2]<<8|_e[et+3])>>>0}var inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(_e){}return null}var utf8$2={};(function(_e){var et=_e;et.length=function(rt){for(var nt=0,it=0,at=0;at191&&ht<224?lt[dt++]=(ht&31)<<6|rt[nt++]&63:ht>239&&ht<365?(ht=((ht&7)<<18|(rt[nt++]&63)<<12|(rt[nt++]&63)<<6|rt[nt++]&63)-65536,lt[dt++]=55296+(ht>>10),lt[dt++]=56320+(ht&1023)):lt[dt++]=(ht&15)<<12|(rt[nt++]&63)<<6|rt[nt++]&63,dt>8191&&((st||(st=[])).push(String.fromCharCode.apply(String,lt)),dt=0);return st?(dt&&st.push(String.fromCharCode.apply(String,lt.slice(0,dt))),st.join("")):String.fromCharCode.apply(String,lt.slice(0,dt))},et.write=function(rt,nt,it){for(var at=it,st,lt,dt=0;dt>6|192,nt[it++]=st&63|128):(st&64512)===55296&&((lt=rt.charCodeAt(dt+1))&64512)===56320?(st=65536+((st&1023)<<10)+(lt&1023),++dt,nt[it++]=st>>18|240,nt[it++]=st>>12&63|128,nt[it++]=st>>6&63|128,nt[it++]=st&63|128):(nt[it++]=st>>12|224,nt[it++]=st>>6&63|128,nt[it++]=st&63|128);return it-at}})(utf8$2);var pool_1=pool;function pool(_e,et,tt){var rt=tt||8192,nt=rt>>>1,it=null,at=rt;return function(lt){if(lt<1||lt>nt)return _e(lt);at+lt>rt&&(it=_e(rt),at=0);var dt=et.call(it,at,at+=lt);return at&7&&(at=(at|7)+1),dt}}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=et;var _e=requireMinimal();function et(it,at){this.lo=it>>>0,this.hi=at>>>0}var tt=et.zero=new et(0,0);tt.toNumber=function(){return 0},tt.zzEncode=tt.zzDecode=function(){return this},tt.length=function(){return 1};var rt=et.zeroHash="\0\0\0\0\0\0\0\0";et.fromNumber=function(at){if(at===0)return tt;var st=at<0;st&&(at=-at);var lt=at>>>0,dt=(at-lt)/4294967296>>>0;return st&&(dt=~dt>>>0,lt=~lt>>>0,++lt>4294967295&&(lt=0,++dt>4294967295&&(dt=0))),new et(lt,dt)},et.from=function(at){if(typeof at=="number")return et.fromNumber(at);if(_e.isString(at))if(_e.Long)at=_e.Long.fromString(at);else return et.fromNumber(parseInt(at,10));return at.low||at.high?new et(at.low>>>0,at.high>>>0):tt},et.prototype.toNumber=function(at){if(!at&&this.hi>>>31){var st=~this.lo+1>>>0,lt=~this.hi>>>0;return st||(lt=lt+1>>>0),-(st+lt*4294967296)}return this.lo+this.hi*4294967296},et.prototype.toLong=function(at){return _e.Long?new _e.Long(this.lo|0,this.hi|0,!!at):{low:this.lo|0,high:this.hi|0,unsigned:!!at}};var nt=String.prototype.charCodeAt;return et.fromHash=function(at){return at===rt?tt:new et((nt.call(at,0)|nt.call(at,1)<<8|nt.call(at,2)<<16|nt.call(at,3)<<24)>>>0,(nt.call(at,4)|nt.call(at,5)<<8|nt.call(at,6)<<16|nt.call(at,7)<<24)>>>0)},et.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},et.prototype.zzEncode=function(){var at=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^at)>>>0,this.lo=(this.lo<<1^at)>>>0,this},et.prototype.zzDecode=function(){var at=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^at)>>>0,this.hi=(this.hi>>>1^at)>>>0,this},et.prototype.length=function(){var at=this.lo,st=(this.lo>>>28|this.hi<<4)>>>0,lt=this.hi>>>24;return lt===0?st===0?at<16384?at<128?1:2:at<2097152?3:4:st<16384?st<128?5:6:st<2097152?7:8:lt<128?9:10},longbits}var hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,function(_e){var et=_e;et.asPromise=aspromise,et.base64=base64$2,et.EventEmitter=eventemitter,et.float=float,et.inquire=inquire_1,et.utf8=utf8$2,et.pool=pool_1,et.LongBits=requireLongbits(),et.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),et.global=et.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||commonjsGlobal,et.emptyArray=Object.freeze?Object.freeze([]):[],et.emptyObject=Object.freeze?Object.freeze({}):{},et.isInteger=Number.isInteger||function(it){return typeof it=="number"&&isFinite(it)&&Math.floor(it)===it},et.isString=function(it){return typeof it=="string"||it instanceof String},et.isObject=function(it){return it&&typeof it=="object"},et.isset=et.isSet=function(it,at){var st=it[at];return st!=null&&it.hasOwnProperty(at)?typeof st!="object"||(Array.isArray(st)?st.length:Object.keys(st).length)>0:!1},et.Buffer=function(){try{var nt=et.inquire("buffer").Buffer;return nt.prototype.utf8Write?nt:null}catch{return null}}(),et._Buffer_from=null,et._Buffer_allocUnsafe=null,et.newBuffer=function(it){return typeof it=="number"?et.Buffer?et._Buffer_allocUnsafe(it):new et.Array(it):et.Buffer?et._Buffer_from(it):typeof Uint8Array>"u"?it:new Uint8Array(it)},et.Array=typeof Uint8Array<"u"?Uint8Array:Array,et.Long=et.global.dcodeIO&&et.global.dcodeIO.Long||et.global.Long||et.inquire("long"),et.key2Re=/^true|false|0|1$/,et.key32Re=/^-?(?:0|[1-9][0-9]*)$/,et.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,et.longToHash=function(it){return it?et.LongBits.from(it).toHash():et.LongBits.zeroHash},et.longFromHash=function(it,at){var st=et.LongBits.fromHash(it);return et.Long?et.Long.fromBits(st.lo,st.hi,at):st.toNumber(!!at)};function tt(nt,it,at){for(var st=Object.keys(it),lt=0;lt-1;--dt)if(at[lt[dt]]===1&&this[lt[dt]]!==void 0&&this[lt[dt]]!==null)return lt[dt]}},et.oneOfSetter=function(it){return function(at){for(var st=0;st127;)et[tt++]=_e&127|128,_e>>>=7;et[tt]=_e}function VarintOp(_e,et){this.len=_e,this.next=void 0,this.val=et}VarintOp.prototype=Object.create(Op.prototype);VarintOp.prototype.fn=writeVarint32;Writer$1.prototype.uint32=function _e(et){return this.len+=(this.tail=this.tail.next=new VarintOp((et=et>>>0)<128?1:et<16384?2:et<2097152?3:et<268435456?4:5,et)).len,this};Writer$1.prototype.int32=function _e(et){return et<0?this._push(writeVarint64,10,LongBits$1.fromNumber(et)):this.uint32(et)};Writer$1.prototype.sint32=function _e(et){return this.uint32((et<<1^et>>31)>>>0)};function writeVarint64(_e,et,tt){for(;_e.hi;)et[tt++]=_e.lo&127|128,_e.lo=(_e.lo>>>7|_e.hi<<25)>>>0,_e.hi>>>=7;for(;_e.lo>127;)et[tt++]=_e.lo&127|128,_e.lo=_e.lo>>>7;et[tt++]=_e.lo}Writer$1.prototype.uint64=function _e(et){var tt=LongBits$1.from(et);return this._push(writeVarint64,tt.length(),tt)};Writer$1.prototype.int64=Writer$1.prototype.uint64;Writer$1.prototype.sint64=function _e(et){var tt=LongBits$1.from(et).zzEncode();return this._push(writeVarint64,tt.length(),tt)};Writer$1.prototype.bool=function _e(et){return this._push(writeByte,1,et?1:0)};function writeFixed32(_e,et,tt){et[tt]=_e&255,et[tt+1]=_e>>>8&255,et[tt+2]=_e>>>16&255,et[tt+3]=_e>>>24}Writer$1.prototype.fixed32=function _e(et){return this._push(writeFixed32,4,et>>>0)};Writer$1.prototype.sfixed32=Writer$1.prototype.fixed32;Writer$1.prototype.fixed64=function _e(et){var tt=LongBits$1.from(et);return this._push(writeFixed32,4,tt.lo)._push(writeFixed32,4,tt.hi)};Writer$1.prototype.sfixed64=Writer$1.prototype.fixed64;Writer$1.prototype.float=function _e(et){return this._push(util$4.float.writeFloatLE,4,et)};Writer$1.prototype.double=function _e(et){return this._push(util$4.float.writeDoubleLE,8,et)};var writeBytes=util$4.Array.prototype.set?function _e(et,tt,rt){tt.set(et,rt)}:function _e(et,tt,rt){for(var nt=0;nt>>0;if(!tt)return this._push(writeByte,1,0);if(util$4.isString(et)){var rt=Writer$1.alloc(tt=base64$1.length(et));base64$1.decode(et,rt,0),et=rt}return this.uint32(tt)._push(writeBytes,tt,et)};Writer$1.prototype.string=function _e(et){var tt=utf8$1.length(et);return tt?this.uint32(tt)._push(utf8$1.write,tt,et):this._push(writeByte,1,0)};Writer$1.prototype.fork=function _e(){return this.states=new State(this),this.head=this.tail=new Op(noop,0,0),this.len=0,this};Writer$1.prototype.reset=function _e(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Op(noop,0,0),this.len=0),this};Writer$1.prototype.ldelim=function _e(){var et=this.head,tt=this.tail,rt=this.len;return this.reset().uint32(rt),rt&&(this.tail.next=et.next,this.tail=tt,this.len+=rt),this};Writer$1.prototype.finish=function _e(){for(var et=this.head.next,tt=this.constructor.alloc(this.len),rt=0;et;)et.fn(et.val,tt,rt),rt+=et.len,et=et.next;return tt};Writer$1._configure=function(_e){BufferWriter$1=_e,Writer$1.create=create$1(),BufferWriter$1._configure()};var writer_buffer=BufferWriter,Writer=writer;(BufferWriter.prototype=Object.create(Writer.prototype)).constructor=BufferWriter;var util$3=requireMinimal();function BufferWriter(){Writer.call(this)}BufferWriter._configure=function(){BufferWriter.alloc=util$3._Buffer_allocUnsafe,BufferWriter.writeBytesBuffer=util$3.Buffer&&util$3.Buffer.prototype instanceof Uint8Array&&util$3.Buffer.prototype.set.name==="set"?function(et,tt,rt){tt.set(et,rt)}:function(et,tt,rt){if(et.copy)et.copy(tt,rt,0,et.length);else for(var nt=0;nt>>0;return this.uint32(tt),tt&&this._push(BufferWriter.writeBytesBuffer,tt,et),this};function writeStringBuffer(_e,et,tt){_e.length<40?util$3.utf8.write(_e,et,tt):et.utf8Write?et.utf8Write(_e,tt):et.write(_e,tt)}BufferWriter.prototype.string=function _e(et){var tt=util$3.Buffer.byteLength(et);return this.uint32(tt),tt&&this._push(writeStringBuffer,tt,et),this};BufferWriter._configure();var reader=Reader$1,util$2=requireMinimal(),BufferReader$1,LongBits=util$2.LongBits,utf8=util$2.utf8;function indexOutOfRange(_e,et){return RangeError("index out of range: "+_e.pos+" + "+(et||1)+" > "+_e.len)}function Reader$1(_e){this.buf=_e,this.pos=0,this.len=_e.length}var create_array=typeof Uint8Array<"u"?function _e(et){if(et instanceof Uint8Array||Array.isArray(et))return new Reader$1(et);throw Error("illegal buffer")}:function _e(et){if(Array.isArray(et))return new Reader$1(et);throw Error("illegal buffer")},create=function _e(){return util$2.Buffer?function(tt){return(Reader$1.create=function(nt){return util$2.Buffer.isBuffer(nt)?new BufferReader$1(nt):create_array(nt)})(tt)}:create_array};Reader$1.create=create();Reader$1.prototype._slice=util$2.Array.prototype.subarray||util$2.Array.prototype.slice;Reader$1.prototype.uint32=function _e(){var et=4294967295;return function(){if(et=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(et=(et|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(et=(et|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(et=(et|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(et=(et|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return et;if((this.pos+=5)>this.len)throw this.pos=this.len,indexOutOfRange(this,10);return et}}();Reader$1.prototype.int32=function _e(){return this.uint32()|0};Reader$1.prototype.sint32=function _e(){var et=this.uint32();return et>>>1^-(et&1)|0};function readLongVarint(){var _e=new LongBits(0,0),et=0;if(this.len-this.pos>4){for(;et<4;++et)if(_e.lo=(_e.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return _e;if(_e.lo=(_e.lo|(this.buf[this.pos]&127)<<28)>>>0,_e.hi=(_e.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return _e;et=0}else{for(;et<3;++et){if(this.pos>=this.len)throw indexOutOfRange(this);if(_e.lo=(_e.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return _e}return _e.lo=(_e.lo|(this.buf[this.pos++]&127)<>>0,_e}if(this.len-this.pos>4){for(;et<5;++et)if(_e.hi=(_e.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return _e}else for(;et<5;++et){if(this.pos>=this.len)throw indexOutOfRange(this);if(_e.hi=(_e.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return _e}throw Error("invalid varint encoding")}Reader$1.prototype.bool=function _e(){return this.uint32()!==0};function readFixed32_end(_e,et){return(_e[et-4]|_e[et-3]<<8|_e[et-2]<<16|_e[et-1]<<24)>>>0}Reader$1.prototype.fixed32=function _e(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)};Reader$1.prototype.sfixed32=function _e(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)|0};function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new LongBits(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4))}Reader$1.prototype.float=function _e(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var et=util$2.float.readFloatLE(this.buf,this.pos);return this.pos+=4,et};Reader$1.prototype.double=function _e(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var et=util$2.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,et};Reader$1.prototype.bytes=function _e(){var et=this.uint32(),tt=this.pos,rt=this.pos+et;if(rt>this.len)throw indexOutOfRange(this,et);if(this.pos+=et,Array.isArray(this.buf))return this.buf.slice(tt,rt);if(tt===rt){var nt=util$2.Buffer;return nt?nt.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,tt,rt)};Reader$1.prototype.string=function _e(){var et=this.bytes();return utf8.read(et,0,et.length)};Reader$1.prototype.skip=function _e(et){if(typeof et=="number"){if(this.pos+et>this.len)throw indexOutOfRange(this,et);this.pos+=et}else do if(this.pos>=this.len)throw indexOutOfRange(this);while(this.buf[this.pos++]&128);return this};Reader$1.prototype.skipType=function(_e){switch(_e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(_e=this.uint32()&7)!==4;)this.skipType(_e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+_e+" at offset "+this.pos)}return this};Reader$1._configure=function(_e){BufferReader$1=_e,Reader$1.create=create(),BufferReader$1._configure();var et=util$2.Long?"toLong":"toNumber";util$2.merge(Reader$1.prototype,{int64:function(){return readLongVarint.call(this)[et](!1)},uint64:function(){return readLongVarint.call(this)[et](!0)},sint64:function(){return readLongVarint.call(this).zzDecode()[et](!1)},fixed64:function(){return readFixed64.call(this)[et](!0)},sfixed64:function(){return readFixed64.call(this)[et](!1)}})};var reader_buffer=BufferReader,Reader=reader;(BufferReader.prototype=Object.create(Reader.prototype)).constructor=BufferReader;var util$1=requireMinimal();function BufferReader(_e){Reader.call(this,_e)}BufferReader._configure=function(){util$1.Buffer&&(BufferReader.prototype._slice=util$1.Buffer.prototype.slice)};BufferReader.prototype.string=function _e(){var et=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+et,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+et,this.len))};BufferReader._configure();var rpc={},service=Service,util=requireMinimal();(Service.prototype=Object.create(util.EventEmitter.prototype)).constructor=Service;function Service(_e,et,tt){if(typeof _e!="function")throw TypeError("rpcImpl must be a function");util.EventEmitter.call(this),this.rpcImpl=_e,this.requestDelimited=!!et,this.responseDelimited=!!tt}Service.prototype.rpcCall=function _e(et,tt,rt,nt,it){if(!nt)throw TypeError("request must be specified");var at=this;if(!it)return util.asPromise(_e,at,et,tt,rt,nt);if(!at.rpcImpl){setTimeout(function(){it(Error("already ended"))},0);return}try{return at.rpcImpl(et,tt[at.requestDelimited?"encodeDelimited":"encode"](nt).finish(),function(lt,dt){if(lt)return at.emit("error",lt,et),it(lt);if(dt===null){at.end(!0);return}if(!(dt instanceof rt))try{dt=rt[at.responseDelimited?"decodeDelimited":"decode"](dt)}catch(ht){return at.emit("error",ht,et),it(ht)}return at.emit("data",dt,et),it(null,dt)})}catch(st){at.emit("error",st,et),setTimeout(function(){it(st)},0);return}};Service.prototype.end=function _e(et){return this.rpcImpl&&(et||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this};(function(_e){var et=_e;et.Service=service})(rpc);var roots={};(function(_e){var et=_e;et.build="minimal",et.Writer=writer,et.BufferWriter=writer_buffer,et.Reader=reader,et.BufferReader=reader_buffer,et.util=requireMinimal(),et.rpc=rpc,et.roots=roots,et.configure=tt;function tt(){et.util._configure(),et.Writer._configure(et.BufferWriter),et.Reader._configure(et.BufferReader)}tt()})(indexMinimal);var minimal=indexMinimal;const _m0=getDefaultExportFromCjs(minimal);var lib$2={},lib$1={},Metadata={};Object.defineProperty(Metadata,"__esModule",{value:!0});Metadata.Metadata=void 0;Metadata.Metadata=function _e(et){const tt=new Map,rt={set(nt,it){if(nt=normalizeKey(nt),Array.isArray(it))if(it.length===0)tt.delete(nt);else{for(const at of it)validate(nt,at);tt.set(nt,nt.endsWith("-bin")?it:[it.join(", ")])}else validate(nt,it),tt.set(nt,[it]);return rt},append(nt,it){nt=normalizeKey(nt),validate(nt,it);let at=tt.get(nt);return at==null&&(at=[],tt.set(nt,at)),at.push(it),nt.endsWith("-bin")||tt.set(nt,[at.join(", ")]),rt},delete(nt){nt=normalizeKey(nt),tt.delete(nt)},get(nt){var it;return nt=normalizeKey(nt),(it=tt.get(nt))===null||it===void 0?void 0:it[0]},getAll(nt){var it;return nt=normalizeKey(nt),(it=tt.get(nt))!==null&&it!==void 0?it:[]},has(nt){return nt=normalizeKey(nt),tt.has(nt)},[Symbol.iterator](){return tt[Symbol.iterator]()}};if(et!=null){const nt=isIterable(et)?et:Object.entries(et);for(const[it,at]of nt)rt.set(it,at)}return rt};function normalizeKey(_e){return _e.toLowerCase()}function validate(_e,et){if(!/^[0-9a-z_.-]+$/.test(_e))throw new Error(`Metadata key '${_e}' contains illegal characters`);if(_e.endsWith("-bin")){if(!(et instanceof Uint8Array))throw new Error(`Metadata key '${_e}' ends with '-bin', thus it must have binary value`)}else{if(typeof et!="string")throw new Error(`Metadata key '${_e}' doesn't end with '-bin', thus it must have string value`);if(!/^[ -~]*$/.test(et))throw new Error(`Metadata value '${et}' of key '${_e}' contains illegal characters`)}}function isIterable(_e){return Symbol.iterator in _e}var Status={};(function(_e){Object.defineProperty(_e,"__esModule",{value:!0}),_e.Status=void 0,function(et){et[et.OK=0]="OK",et[et.CANCELLED=1]="CANCELLED",et[et.UNKNOWN=2]="UNKNOWN",et[et.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",et[et.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",et[et.NOT_FOUND=5]="NOT_FOUND",et[et.ALREADY_EXISTS=6]="ALREADY_EXISTS",et[et.PERMISSION_DENIED=7]="PERMISSION_DENIED",et[et.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",et[et.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",et[et.ABORTED=10]="ABORTED",et[et.OUT_OF_RANGE=11]="OUT_OF_RANGE",et[et.UNIMPLEMENTED=12]="UNIMPLEMENTED",et[et.INTERNAL=13]="INTERNAL",et[et.UNAVAILABLE=14]="UNAVAILABLE",et[et.DATA_LOSS=15]="DATA_LOSS",et[et.UNAUTHENTICATED=16]="UNAUTHENTICATED"}(_e.Status||(_e.Status={}))})(Status);var MethodDescriptor={};Object.defineProperty(MethodDescriptor,"__esModule",{value:!0});var CallOptions={};Object.defineProperty(CallOptions,"__esModule",{value:!0});var ClientMiddleware={};Object.defineProperty(ClientMiddleware,"__esModule",{value:!0});var composeClientMiddleware$1={};Object.defineProperty(composeClientMiddleware$1,"__esModule",{value:!0});composeClientMiddleware$1.composeClientMiddleware=void 0;function composeClientMiddleware(_e,et){return(tt,rt)=>et(Object.assign(Object.assign({},tt),{next:(nt,it)=>_e(Object.assign(Object.assign({},tt),{request:nt}),it)}),rt)}composeClientMiddleware$1.composeClientMiddleware=composeClientMiddleware;var ClientError$1={},cjs={},helpers={};helpers.__esModule=void 0;helpers.__esModule=!0;var objectSetPrototypeOfIsDefined=typeof Object.setPrototypeOf=="function",objectGetPrototypeOfIsDefined=typeof Object.getPrototypeOf=="function",objectDefinePropertyIsDefined=typeof Object.defineProperty=="function",objectCreateIsDefined=typeof Object.create=="function",objectHasOwnPropertyIsDefined=typeof Object.prototype.hasOwnProperty=="function",setPrototypeOf=function _e(et,tt){objectSetPrototypeOfIsDefined?Object.setPrototypeOf(et,tt):et.__proto__=tt};helpers.setPrototypeOf=setPrototypeOf;var getPrototypeOf=function _e(et){return objectGetPrototypeOfIsDefined?Object.getPrototypeOf(et):et.__proto__||et.prototype};helpers.getPrototypeOf=getPrototypeOf;var ie8ObjectDefinePropertyBug=!1,defineProperty=function _e(et,tt,rt){if(objectDefinePropertyIsDefined&&!ie8ObjectDefinePropertyBug)try{Object.defineProperty(et,tt,rt)}catch{ie8ObjectDefinePropertyBug=!0,_e(et,tt,rt)}else et[tt]=rt.value};helpers.defineProperty=defineProperty;var hasOwnProperty=function _e(et,tt){return objectHasOwnPropertyIsDefined?et.hasOwnProperty(et,tt):et[tt]===void 0};helpers.hasOwnProperty=hasOwnProperty;var objectCreate=function _e(et,tt){if(objectCreateIsDefined)return Object.create(et,tt);var rt=function(){};rt.prototype=et;var nt=new rt;if(typeof tt>"u")return nt;if(typeof tt=="null")throw new Error("PropertyDescriptors must not be null.");if(typeof tt=="object")for(var it in tt)hasOwnProperty(tt,it)&&(nt[it]=tt[it].value);return nt};helpers.objectCreate=objectCreate;(function(_e){_e.__esModule=void 0,_e.__esModule=!0;var et=helpers,tt=et.setPrototypeOf,rt=et.getPrototypeOf,nt=et.defineProperty,it=et.objectCreate,at=new Error().toString()==="[object Error]",st="";function lt(dt){var ht=this.constructor,pt=ht.name||function(){var yt=ht.toString().match(/^function\s*([^\s(]+)/);return yt===null?st||"Error":yt[1]}(),mt=pt==="Error",gt=mt?st:pt,vt=Error.apply(this,arguments);if(tt(vt,rt(this)),!(vt instanceof ht)||!(vt instanceof lt)){var vt=this;Error.apply(this,arguments),nt(vt,"message",{configurable:!0,enumerable:!1,value:dt,writable:!0})}if(nt(vt,"name",{configurable:!0,enumerable:!1,value:gt,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(vt,mt?lt:ht),vt.stack===void 0){var xt=new Error(dt);xt.name=vt.name,vt.stack=xt.stack}return at&&nt(vt,"toString",{configurable:!0,enumerable:!1,value:function(){return(this.name||"Error")+(typeof this.message>"u"?"":": "+this.message)},writable:!0}),vt}st=lt.name||"ExtendableError",lt.prototype=it(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),_e.ExtendableError=lt,_e.default=_e.ExtendableError})(cjs);Object.defineProperty(ClientError$1,"__esModule",{value:!0});ClientError$1.ClientError=void 0;const ts_error_1$1=cjs,Status_1$1=Status;class ClientError extends ts_error_1$1.ExtendableError{constructor(et,tt,rt){super(`${et} ${Status_1$1.Status[tt]}: ${rt}`),this.path=et,this.code=tt,this.details=rt,this.name="ClientError",Object.defineProperty(this,"@@nice-grpc",{value:!0}),Object.defineProperty(this,"@@nice-grpc:ClientError",{value:!0})}static[Symbol.hasInstance](et){return this!==ClientError?this.prototype.isPrototypeOf(et):typeof et=="object"&&et!==null&&(et.constructor===ClientError||et["@@nice-grpc:ClientError"]===!0||et.name==="ClientError"&&et["@@nice-grpc"]===!0)}}ClientError$1.ClientError=ClientError;var CallContext={};Object.defineProperty(CallContext,"__esModule",{value:!0});var ServerMiddleware={};Object.defineProperty(ServerMiddleware,"__esModule",{value:!0});var composeServerMiddleware$1={};Object.defineProperty(composeServerMiddleware$1,"__esModule",{value:!0});composeServerMiddleware$1.composeServerMiddleware=void 0;function composeServerMiddleware(_e,et){return(tt,rt)=>_e(Object.assign(Object.assign({},tt),{next:(nt,it)=>et(Object.assign(Object.assign({},tt),{request:nt}),it)}),rt)}composeServerMiddleware$1.composeServerMiddleware=composeServerMiddleware;var ServerError$1={};Object.defineProperty(ServerError$1,"__esModule",{value:!0});ServerError$1.ServerError=void 0;const ts_error_1=cjs,Status_1=Status;class ServerError extends ts_error_1.ExtendableError{constructor(et,tt){super(`${Status_1.Status[et]}: ${tt}`),this.code=et,this.details=tt,this.name="ServerError",Object.defineProperty(this,"@@nice-grpc",{value:!0}),Object.defineProperty(this,"@@nice-grpc:ServerError",{value:!0})}static[Symbol.hasInstance](et){return this!==ServerError?this.prototype.isPrototypeOf(et):typeof et=="object"&&et!==null&&(et.constructor===ServerError||et["@@nice-grpc:ServerError"]===!0||et.name==="ServerError"&&et["@@nice-grpc"]===!0)}}ServerError$1.ServerError=ServerError;(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(rt,nt,it,at){at===void 0&&(at=it);var st=Object.getOwnPropertyDescriptor(nt,it);(!st||("get"in st?!nt.__esModule:st.writable||st.configurable))&&(st={enumerable:!0,get:function(){return nt[it]}}),Object.defineProperty(rt,at,st)}:function(rt,nt,it,at){at===void 0&&(at=it),rt[at]=nt[it]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(rt,nt){for(var it in rt)it!=="default"&&!Object.prototype.hasOwnProperty.call(nt,it)&&et(nt,rt,it)};Object.defineProperty(_e,"__esModule",{value:!0}),tt(Metadata,_e),tt(Status,_e),tt(MethodDescriptor,_e),tt(CallOptions,_e),tt(ClientMiddleware,_e),tt(composeClientMiddleware$1,_e),tt(ClientError$1,_e),tt(CallContext,_e),tt(ServerMiddleware,_e),tt(composeServerMiddleware$1,_e),tt(ServerError$1,_e)})(lib$1);var serviceDefinitions={},grpcWeb={};Object.defineProperty(grpcWeb,"__esModule",{value:!0});grpcWeb.isGrpcWebServiceDefinition=grpcWeb.fromGrpcWebServiceDefinition=void 0;function fromGrpcWebServiceDefinition(_e){const et={};for(const[tt,rt]of Object.entries(_e)){if(tt==="serviceName")continue;const nt=rt;et[uncapitalize(tt)]={path:`/${_e.serviceName}/${tt}`,requestStream:nt.requestStream,responseStream:nt.responseStream,requestDeserialize:nt.requestType.deserializeBinary,requestSerialize:it=>it.serializeBinary(),responseDeserialize:nt.responseType.deserializeBinary,responseSerialize:it=>it.serializeBinary(),options:{}}}return et}grpcWeb.fromGrpcWebServiceDefinition=fromGrpcWebServiceDefinition;function isGrpcWebServiceDefinition(_e){return"prototype"in _e}grpcWeb.isGrpcWebServiceDefinition=isGrpcWebServiceDefinition;function uncapitalize(_e){return _e.length===0?_e:_e[0].toLowerCase()+_e.slice(1)}var tsProto={};Object.defineProperty(tsProto,"__esModule",{value:!0});tsProto.isTsProtoServiceDefinition=tsProto.fromTsProtoServiceDefinition=void 0;function fromTsProtoServiceDefinition(_e){const et={};for(const[tt,rt]of Object.entries(_e.methods)){const nt=rt.requestType.encode,it=rt.requestType.fromPartial,at=rt.responseType.encode,st=rt.responseType.fromPartial;et[tt]={path:`/${_e.fullName}/${rt.name}`,requestStream:rt.requestStream,responseStream:rt.responseStream,requestDeserialize:rt.requestType.decode,requestSerialize:it!=null?lt=>nt(it(lt)).finish():lt=>nt(lt).finish(),responseDeserialize:rt.responseType.decode,responseSerialize:st!=null?lt=>at(st(lt)).finish():lt=>at(lt).finish(),options:rt.options}}return et}tsProto.fromTsProtoServiceDefinition=fromTsProtoServiceDefinition;function isTsProtoServiceDefinition(_e){return"name"in _e&&"fullName"in _e&&"methods"in _e}tsProto.isTsProtoServiceDefinition=isTsProtoServiceDefinition;Object.defineProperty(serviceDefinitions,"__esModule",{value:!0});serviceDefinitions.toGrpcWebMethodDefinition=serviceDefinitions.normalizeServiceDefinition=void 0;const grpc_web_1$5=grpcWeb,ts_proto_1=tsProto;function normalizeServiceDefinition(_e){return(0,grpc_web_1$5.isGrpcWebServiceDefinition)(_e)?(0,grpc_web_1$5.fromGrpcWebServiceDefinition)(_e):(0,ts_proto_1.isTsProtoServiceDefinition)(_e)?(0,ts_proto_1.fromTsProtoServiceDefinition)(_e):_e}serviceDefinitions.normalizeServiceDefinition=normalizeServiceDefinition;function toGrpcWebMethodDefinition(_e){const[,et,tt]=_e.path.split("/");return{service:{serviceName:et},methodName:tt,requestStream:_e.requestStream,responseStream:_e.responseStream,requestType:class{constructor(){throw new Error("Unexpected instantiation")}static deserializeBinary(rt){return _e.requestDeserialize(rt)}},responseType:class{constructor(){throw new Error("Unexpected instantiation")}static deserializeBinary(rt){return _e.responseDeserialize(rt)}}}}serviceDefinitions.toGrpcWebMethodDefinition=toGrpcWebMethodDefinition;var channel={};Object.defineProperty(channel,"__esModule",{value:!0});channel.createChannel=void 0;function createChannel(_e,et){return{address:_e,transport:et}}channel.createChannel=createChannel;var ClientFactory={},createBidiStreamingMethod$1={},grpcWebClient_umd={exports:{}};(function(_e,et){(function(tt,rt){_e.exports=rt()})(commonjsGlobal,function(){return tt={418:function(nt,it){(function(at,st){for(var lt in st)at[lt]=st[lt]})(it,function(at){var st={};function lt(dt){if(st[dt])return st[dt].exports;var ht=st[dt]={i:dt,l:!1,exports:{}};return at[dt].call(ht.exports,ht,ht.exports,lt),ht.l=!0,ht.exports}return lt.m=at,lt.c=st,lt.i=function(dt){return dt},lt.d=function(dt,ht,pt){lt.o(dt,ht)||Object.defineProperty(dt,ht,{configurable:!1,enumerable:!0,get:pt})},lt.n=function(dt){var ht=dt&&dt.__esModule?function(){return dt.default}:function(){return dt};return lt.d(ht,"a",ht),ht},lt.o=function(dt,ht){return Object.prototype.hasOwnProperty.call(dt,ht)},lt.p="",lt(lt.s=1)}([function(at,st,lt){Object.defineProperty(st,"__esModule",{value:!0});var dt=lt(3),ht=function(){function pt(mt,gt){mt===void 0&&(mt={}),gt===void 0&&(gt={splitValues:!1});var vt,xt=this;this.headersMap={},mt&&(typeof Headers<"u"&&mt instanceof Headers?dt.getHeaderKeys(mt).forEach(function(yt){dt.getHeaderValues(mt,yt).forEach(function(bt){gt.splitValues?xt.append(yt,dt.splitHeaderValue(bt)):xt.append(yt,bt)})}):typeof(vt=mt)=="object"&&typeof vt.headersMap=="object"&&typeof vt.forEach=="function"?mt.forEach(function(yt,bt){xt.append(yt,bt)}):typeof Map<"u"&&mt instanceof Map?mt.forEach(function(yt,bt){xt.append(bt,yt)}):typeof mt=="string"?this.appendFromString(mt):typeof mt=="object"&&Object.getOwnPropertyNames(mt).forEach(function(yt){var bt=mt[yt];Array.isArray(bt)?bt.forEach(function(wt){xt.append(yt,wt)}):xt.append(yt,bt)}))}return pt.prototype.appendFromString=function(mt){for(var gt=mt.split(`\r +`),vt=0;vt0){var bt=xt.substring(0,yt).trim(),wt=xt.substring(yt+1).trim();this.append(bt,wt)}}},pt.prototype.delete=function(mt,gt){var vt=dt.normalizeName(mt);if(gt===void 0)delete this.headersMap[vt];else{var xt=this.headersMap[vt];if(xt){var yt=xt.indexOf(gt);yt>=0&&xt.splice(yt,1),xt.length===0&&delete this.headersMap[vt]}}},pt.prototype.append=function(mt,gt){var vt=this,xt=dt.normalizeName(mt);Array.isArray(this.headersMap[xt])||(this.headersMap[xt]=[]),Array.isArray(gt)?gt.forEach(function(yt){vt.headersMap[xt].push(dt.normalizeValue(yt))}):this.headersMap[xt].push(dt.normalizeValue(gt))},pt.prototype.set=function(mt,gt){var vt=dt.normalizeName(mt);if(Array.isArray(gt)){var xt=[];gt.forEach(function(yt){xt.push(dt.normalizeValue(yt))}),this.headersMap[vt]=xt}else this.headersMap[vt]=[dt.normalizeValue(gt)]},pt.prototype.has=function(mt,gt){var vt=this.headersMap[dt.normalizeName(mt)];if(!Array.isArray(vt))return!1;if(gt!==void 0){var xt=dt.normalizeValue(gt);return vt.indexOf(xt)>=0}return!0},pt.prototype.get=function(mt){var gt=this.headersMap[dt.normalizeName(mt)];return gt!==void 0?gt.concat():[]},pt.prototype.forEach=function(mt){var gt=this;Object.getOwnPropertyNames(this.headersMap).forEach(function(vt){mt(vt,gt.headersMap[vt])},this)},pt.prototype.toHeaders=function(){if(typeof Headers<"u"){var mt=new Headers;return this.forEach(function(gt,vt){vt.forEach(function(xt){mt.append(gt,xt)})}),mt}throw new Error("Headers class is not defined")},pt}();st.BrowserHeaders=ht},function(at,st,lt){Object.defineProperty(st,"__esModule",{value:!0});var dt=lt(0);st.BrowserHeaders=dt.BrowserHeaders},function(at,st,lt){Object.defineProperty(st,"__esModule",{value:!0}),st.iterateHeaders=function(dt,ht){for(var pt=dt[Symbol.iterator](),mt=pt.next();!mt.done;)ht(mt.value[0]),mt=pt.next()},st.iterateHeadersKeys=function(dt,ht){for(var pt=dt.keys(),mt=pt.next();!mt.done;)ht(mt.value),mt=pt.next()}},function(at,st,lt){Object.defineProperty(st,"__esModule",{value:!0});var dt=lt(2);st.normalizeName=function(ht){if(typeof ht!="string"&&(ht=String(ht)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(ht))throw new TypeError("Invalid character in header field name");return ht.toLowerCase()},st.normalizeValue=function(ht){return typeof ht!="string"&&(ht=String(ht)),ht},st.getHeaderValues=function(ht,pt){var mt=ht;if(mt instanceof Headers&&mt.getAll)return mt.getAll(pt);var gt=mt.get(pt);return gt&&typeof gt=="string"?[gt]:gt},st.getHeaderKeys=function(ht){var pt=ht,mt={},gt=[];return pt.keys?dt.iterateHeadersKeys(pt,function(vt){mt[vt]||(mt[vt]=!0,gt.push(vt))}):pt.forEach?pt.forEach(function(vt,xt){mt[xt]||(mt[xt]=!0,gt.push(xt))}):dt.iterateHeaders(pt,function(vt){var xt=vt[0];mt[xt]||(mt[xt]=!0,gt.push(xt))}),gt},st.splitHeaderValue=function(ht){var pt=[];return ht.split(", ").forEach(function(mt){mt.split(",").forEach(function(gt){pt.push(gt)})}),pt}}]))},617:function(nt,it,at){Object.defineProperty(it,"__esModule",{value:!0}),it.ChunkParser=it.ChunkType=it.encodeASCII=it.decodeASCII=void 0;var st,lt=at(65);function dt(yt){return(bt=yt)===9||bt===10||bt===13||yt>=32&&yt<=126;var bt}function ht(yt){for(var bt=0;bt!==yt.length;++bt)if(!dt(yt[bt]))throw new Error("Metadata is not valid (printable) ASCII");return String.fromCharCode.apply(String,Array.prototype.slice.call(yt))}function pt(yt){return(128&yt.getUint8(0))==128}function mt(yt){return yt.getUint32(1,!1)}function gt(yt,bt,wt){return yt.byteLength-bt>=wt}function vt(yt,bt,wt){if(yt.slice)return yt.slice(bt,wt);var Et=yt.length;wt!==void 0&&(Et=wt);for(var $t=new Uint8Array(Et-bt),Pt=0,kt=bt;kt=0?wt:dt.httpStatusToCode(bt);this.props.debug&&ht.debug("onHeaders.code",Et);var $t=yt.get("grpc-message")||[];if(this.props.debug&&ht.debug("onHeaders.gRPCMessage",$t),this.rawOnHeaders(yt),Et!==dt.Code.OK){var Pt=this.decodeGRPCStatus($t[0]);this.rawOnError(Et,Pt,yt)}}},xt.prototype.onTransportChunk=function(yt){var bt=this;if(this.closed)this.props.debug&&ht.debug("grpc.onChunk received after request was closed - ignoring");else{var wt=[];try{wt=this.parser.parse(yt)}catch(Et){return this.props.debug&&ht.debug("onChunk.parsing error",Et,Et.message),void this.rawOnError(dt.Code.Internal,"parsing error: "+Et.message)}wt.forEach(function(Et){if(Et.chunkType===lt.ChunkType.MESSAGE){var $t=bt.methodDefinition.responseType.deserializeBinary(Et.data);bt.rawOnMessage($t)}else Et.chunkType===lt.ChunkType.TRAILERS&&(bt.responseHeaders?(bt.responseTrailers=new st.Metadata(Et.trailers),bt.props.debug&&ht.debug("onChunk.trailers",bt.responseTrailers)):(bt.responseHeaders=new st.Metadata(Et.trailers),bt.rawOnHeaders(bt.responseHeaders)))})}},xt.prototype.onTransportEnd=function(){if(this.props.debug&&ht.debug("grpc.onEnd"),this.closed)this.props.debug&&ht.debug("grpc.onEnd received after request was closed - ignoring");else if(this.responseTrailers!==void 0){var yt=vt(this.responseTrailers);if(yt!==null){var bt=this.responseTrailers.get("grpc-message"),wt=this.decodeGRPCStatus(bt[0]);this.rawOnEnd(yt,wt,this.responseTrailers)}else this.rawOnError(dt.Code.Internal,"Response closed without grpc-status (Trailers provided)")}else{if(this.responseHeaders===void 0)return void this.rawOnError(dt.Code.Unknown,"Response closed without headers");var Et=vt(this.responseHeaders),$t=this.responseHeaders.get("grpc-message");if(this.props.debug&&ht.debug("grpc.headers only response ",Et,$t),Et===null)return void this.rawOnEnd(dt.Code.Unknown,"Response closed without grpc-status (Headers only)",this.responseHeaders);var Pt=this.decodeGRPCStatus($t[0]);this.rawOnEnd(Et,Pt,this.responseHeaders)}},xt.prototype.decodeGRPCStatus=function(yt){if(!yt)return"";try{return decodeURIComponent(yt)}catch{return yt}},xt.prototype.rawOnEnd=function(yt,bt,wt){var Et=this;this.props.debug&&ht.debug("rawOnEnd",yt,bt,wt),this.completed||(this.completed=!0,this.onEndCallbacks.forEach(function($t){if(!Et.closed)try{$t(yt,bt,wt)}catch(Pt){setTimeout(function(){throw Pt},0)}}))},xt.prototype.rawOnHeaders=function(yt){this.props.debug&&ht.debug("rawOnHeaders",yt),this.completed||this.onHeadersCallbacks.forEach(function(bt){try{bt(yt)}catch(wt){setTimeout(function(){throw wt},0)}})},xt.prototype.rawOnError=function(yt,bt,wt){var Et=this;wt===void 0&&(wt=new st.Metadata),this.props.debug&&ht.debug("rawOnError",yt,bt),this.completed||(this.completed=!0,this.onEndCallbacks.forEach(function($t){if(!Et.closed)try{$t(yt,bt,wt)}catch(Pt){setTimeout(function(){throw Pt},0)}}))},xt.prototype.rawOnMessage=function(yt){var bt=this;this.props.debug&&ht.debug("rawOnMessage",yt.toObject()),this.completed||this.closed||this.onMessageCallbacks.forEach(function(wt){if(!bt.closed)try{wt(yt)}catch(Et){setTimeout(function(){throw Et},0)}})},xt.prototype.onHeaders=function(yt){this.onHeadersCallbacks.push(yt)},xt.prototype.onMessage=function(yt){this.onMessageCallbacks.push(yt)},xt.prototype.onEnd=function(yt){this.onEndCallbacks.push(yt)},xt.prototype.start=function(yt){if(this.started)throw new Error("Client already started - cannot .start()");this.started=!0;var bt=new st.Metadata(yt||{});bt.set("content-type","application/grpc-web+proto"),bt.set("x-grpc-web","1"),this.transport.start(bt)},xt.prototype.send=function(yt){if(!this.started)throw new Error("Client not started - .start() must be called before .send()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .send()");if(!this.methodDefinition.requestStream&&this.sentFirstMessage)throw new Error("Message already sent for non-client-streaming method - cannot .send()");this.sentFirstMessage=!0;var bt=mt.frameRequest(yt);this.transport.sendMessage(bt)},xt.prototype.finishSend=function(){if(!this.started)throw new Error("Client not started - .finishSend() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .send()");if(this.finishedSending)throw new Error("Client already finished sending - cannot .finishSend()");this.finishedSending=!0,this.transport.finishSend()},xt.prototype.close=function(){if(!this.started)throw new Error("Client not started - .start() must be called before .close()");if(this.closed)throw new Error("Client already closed - cannot .close()");this.closed=!0,this.props.debug&&ht.debug("request.abort aborting request"),this.transport.cancel()},xt}();function vt(xt){var yt=xt.get("grpc-status")||[];if(yt.length>0)try{var bt=yt[0];return parseInt(bt,10)}catch{return null}return null}},346:function(nt,it){Object.defineProperty(it,"__esModule",{value:!0}),it.debug=void 0,it.debug=function(){for(var at=[],st=0;st=55296&&wt<=56319){var Et=yt.charCodeAt(bt+1);Et>=56320&&Et<=57343&&(wt=65536+(wt-55296<<10)+(Et-56320))}return wt}function xt(yt){for(var bt=new Uint8Array(yt.length),wt=0,Et=0;Et{if(_e.aborted){rt(new AbortError);return}let nt,it=!1;function at(){it||(it=!0,nt?.())}const st=et(lt=>{tt(lt),at()},lt=>{rt(lt),at()});if(!it){const lt=()=>{const dt=st();dt==null?rt(new AbortError):dt.then(()=>{rt(new AbortError)},ht=>{rt(ht)}),at()};_e.addEventListener("abort",lt),nt=()=>{_e.removeEventListener("abort",lt)}}})}function abortable(_e,et){if(_e.aborted){const tt=()=>{};et.then(tt,tt)}return execute(_e,(tt,rt)=>(et.then(tt,rt),()=>{}))}function delay$1(_e,et){return execute(_e,tt=>{const rt=typeof et=="number"?et:et.getTime()-Date.now(),nt=setTimeout(tt,rt);return()=>{clearTimeout(nt)}})}function forever(_e){return execute(_e,()=>()=>{})}function waitForEvent(_e,et,tt,rt){return execute(_e,nt=>{let it,at=!1;return it=listen(et,tt,(...lt)=>{nt(lt.length>1?lt:lt[0]),at=!0,it?.()},rt),at&&it(),()=>{at=!0,it?.()}})}function listen(_e,et,tt,rt){if(isEventTarget(_e))return _e.addEventListener(et,tt,rt),()=>_e.removeEventListener(et,tt,rt);if(isJQueryStyleEventEmitter(_e))return _e.on(et,tt),()=>_e.off(et,tt);if(isNodeStyleEventEmitter(_e))return _e.addListener(et,tt),()=>_e.removeListener(et,tt);throw new Error("Invalid event target")}function isNodeStyleEventEmitter(_e){return isFunction(_e.addListener)&&isFunction(_e.removeListener)}function isJQueryStyleEventEmitter(_e){return isFunction(_e.on)&&isFunction(_e.off)}function isEventTarget(_e){return isFunction(_e.addEventListener)&&isFunction(_e.removeEventListener)}const isFunction=_e=>typeof _e=="function";function all(_e,et){return new Promise((tt,rt)=>{if(_e.aborted){rt(new AbortError);return}const nt=new AbortController,it=et(nt.signal);if(it.length===0){tt([]);return}const at=()=>{nt.abort()};_e.addEventListener("abort",at);let st;const lt=new Array(it.length);let dt=0;function ht(){dt+=1,dt===it.length&&(_e.removeEventListener("abort",at),st!=null?rt(st.reason):tt(lt))}for(const[pt,mt]of it.entries())mt.then(gt=>{lt[pt]=gt,ht()},gt=>{nt.abort(),(st==null||!isAbortError(gt)&&isAbortError(st.reason))&&(st={reason:gt}),ht()})})}function race(_e,et){return new Promise((tt,rt)=>{if(_e.aborted){rt(new AbortError);return}const nt=new AbortController,it=et(nt.signal),at=()=>{nt.abort()};_e.addEventListener("abort",at);let st=0;function lt(ht){nt.abort(),st+=1,st===it.length&&(_e.removeEventListener("abort",at),ht.status==="fulfilled"?tt(ht.value):rt(ht.reason))}let dt;for(const ht of it)ht.then(pt=>{dt==null&&(dt={status:"fulfilled",value:pt}),lt(dt)},pt=>{(dt==null||!isAbortError(pt)&&(dt.status==="fulfilled"||isAbortError(dt.reason)))&&(dt={status:"rejected",reason:pt}),lt(dt)})})}async function retry(_e,et,tt={}){const{baseMs:rt=1e3,maxDelayMs:nt=3e4,onError:it,maxAttempts:at=1/0}=tt;let st=0;const lt=()=>{st=-1};for(;;)try{return await et(_e,st,lt)}catch(dt){if(rethrowAbortError(dt),st>=at)throw dt;let ht;if(st===-1)ht=0;else{const pt=Math.min(nt,Math.pow(2,st)*rt);ht=Math.round(pt*(1+Math.random())/2)}it&&it(dt,st,ht),ht!==0&&await delay$1(_e,ht),st+=1}}function spawn(_e,et){if(_e.aborted)return Promise.reject(new AbortError);const tt=[],rt=new AbortController,nt=rt.signal,it=()=>{rt.abort()};_e.addEventListener("abort",it);const at=()=>{_e.removeEventListener("abort",it)},st=new Set,lt=()=>{for(const pt of st)pt.abort()};nt.addEventListener("abort",lt);const dt=()=>{nt.removeEventListener("abort",lt)};let ht=new Promise((pt,mt)=>{let gt,vt;xt(yt=>et(yt,{defer(bt){tt.push(bt)},fork:xt})).join().then(yt=>{rt.abort(),gt={value:yt}},yt=>{rt.abort(),(!isAbortError(yt)||vt==null)&&(vt={error:yt})});function xt(yt){if(nt.aborted)return{abort(){},async join(){throw new AbortError}};const bt=new AbortController,wt=bt.signal,Et=yt(wt),$t={abort(){bt.abort()},join:()=>Et};return st.add($t),Et.catch(catchAbortError).catch(Pt=>{vt={error:Pt},rt.abort()}).finally(()=>{st.delete($t),st.size===0&&(vt!=null?mt(vt.error):pt(gt.value))}),$t}});return ht=ht.finally(()=>{at(),dt();let pt=Promise.resolve();for(let mt=tt.length-1;mt>=0;mt--)pt=pt.finally(tt[mt]);return pt}),ht}function run(_e){const et=new AbortController,tt=_e(et.signal).catch(catchAbortError);return()=>(et.abort(),tt)}function proactiveRetry(_e,et,tt={}){const{baseMs:rt=1e3,onError:nt,maxAttempts:it=1/0}=tt;return execute(_e,(at,st)=>{const lt=new AbortController;let dt=!1;const ht=new Map;function pt(vt){lt.abort(),ht.clear(),at(vt)}function mt(vt,xt){if(ht.delete(xt),dt&&ht.size===0){st(vt);return}if(!isAbortError(vt)&&nt)try{nt(vt,xt)}catch(yt){lt.abort(),ht.clear(),st(yt)}}async function gt(vt){for(let xt=0;;xt++){const yt=et(vt,xt);if(ht.set(xt,yt),yt.then(pt,Et=>mt(Et,xt)),xt+1>=it)break;const bt=Math.pow(2,xt)*rt,wt=Math.round(bt*(1+Math.random())/2);await delay$1(vt,wt)}dt=!0}return gt(lt.signal).catch(catchAbortError),()=>{lt.abort()}})}const es=Object.freeze(Object.defineProperty({__proto__:null,AbortError,abortable,all,catchAbortError,delay:delay$1,execute,forever,isAbortError,proactiveRetry,race,rethrowAbortError,retry,run,spawn,throwIfAborted,waitForEvent},Symbol.toStringTag,{value:"Module"})),require$$2=getAugmentedNamespace(es);var AsyncSink$1={};Object.defineProperty(AsyncSink$1,"__esModule",{value:!0});AsyncSink$1.AsyncSink=void 0;const ARRAY_VALUE="value",ARRAY_ERROR="error";class AsyncSink{constructor(){this._ended=!1,this._values=[],this._resolvers=[]}[Symbol.asyncIterator](){return this}write(et){this._push({type:ARRAY_VALUE,value:et})}error(et){this._push({type:ARRAY_ERROR,error:et})}_push(et){if(this._ended)throw new Error("AsyncSink already ended");if(this._resolvers.length>0){const{resolve:tt,reject:rt}=this._resolvers.shift();et.type===ARRAY_ERROR?rt(et.error):tt({done:!1,value:et.value})}else this._values.push(et)}next(){if(this._values.length>0){const{type:et,value:tt,error:rt}=this._values.shift();return et===ARRAY_ERROR?Promise.reject(rt):Promise.resolve({done:!1,value:tt})}return this._ended?Promise.resolve({done:!0}):new Promise((et,tt)=>{this._resolvers.push({resolve:et,reject:tt})})}end(){for(;this._resolvers.length>0;)this._resolvers.shift().resolve({done:!0});this._ended=!0}}AsyncSink$1.AsyncSink=AsyncSink;var isAsyncIterable$1={};Object.defineProperty(isAsyncIterable$1,"__esModule",{value:!0});isAsyncIterable$1.isAsyncIterable=void 0;function isAsyncIterable(_e){return _e!=null&&Symbol.asyncIterator in _e}isAsyncIterable$1.isAsyncIterable=isAsyncIterable;var convertMetadata={},base64={exports:{}};(function(_e,et){(function(tt,rt){_e.exports=rt()})(typeof self<"u"?self:typeof window<"u"?window:commonjsGlobal,function(){var tt="3.7.5",rt=tt,nt=typeof atob=="function",it=typeof btoa=="function",at=typeof Buffer=="function",st=typeof TextDecoder=="function"?new TextDecoder:void 0,lt=typeof TextEncoder=="function"?new TextEncoder:void 0,dt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ht=Array.prototype.slice.call(dt),pt=function(Zt){var Jt={};return Zt.forEach(function(rr,or){return Jt[rr]=or}),Jt}(ht),mt=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,gt=String.fromCharCode.bind(String),vt=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):function(Zt){return new Uint8Array(Array.prototype.slice.call(Zt,0))},xt=function(Zt){return Zt.replace(/=/g,"").replace(/[+\/]/g,function(Jt){return Jt=="+"?"-":"_"})},yt=function(Zt){return Zt.replace(/[^A-Za-z0-9\+\/]/g,"")},bt=function(Zt){for(var Jt,rr,or,ar,ir="",pr=Zt.length%3,nr=0;nr255||(or=Zt.charCodeAt(nr++))>255||(ar=Zt.charCodeAt(nr++))>255)throw new TypeError("invalid character found");Jt=rr<<16|or<<8|ar,ir+=ht[Jt>>18&63]+ht[Jt>>12&63]+ht[Jt>>6&63]+ht[Jt&63]}return pr?ir.slice(0,pr-3)+"===".substring(pr):ir},wt=it?function(Zt){return btoa(Zt)}:at?function(Zt){return Buffer.from(Zt,"binary").toString("base64")}:bt,Et=at?function(Zt){return Buffer.from(Zt).toString("base64")}:function(Zt){for(var Jt=4096,rr=[],or=0,ar=Zt.length;or>>6)+gt(128|Jt&63):gt(224|Jt>>>12&15)+gt(128|Jt>>>6&63)+gt(128|Jt&63)}else{var Jt=65536+(Zt.charCodeAt(0)-55296)*1024+(Zt.charCodeAt(1)-56320);return gt(240|Jt>>>18&7)+gt(128|Jt>>>12&63)+gt(128|Jt>>>6&63)+gt(128|Jt&63)}},kt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Lt=function(Zt){return Zt.replace(kt,Pt)},jt=at?function(Zt){return Buffer.from(Zt,"utf8").toString("base64")}:lt?function(Zt){return Et(lt.encode(Zt))}:function(Zt){return wt(Lt(Zt))},qt=function(Zt,Jt){return Jt===void 0&&(Jt=!1),Jt?xt(jt(Zt)):jt(Zt)},Dt=function(Zt){return qt(Zt,!0)},Ht=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Xt=function(Zt){switch(Zt.length){case 4:var Jt=(7&Zt.charCodeAt(0))<<18|(63&Zt.charCodeAt(1))<<12|(63&Zt.charCodeAt(2))<<6|63&Zt.charCodeAt(3),rr=Jt-65536;return gt((rr>>>10)+55296)+gt((rr&1023)+56320);case 3:return gt((15&Zt.charCodeAt(0))<<12|(63&Zt.charCodeAt(1))<<6|63&Zt.charCodeAt(2));default:return gt((31&Zt.charCodeAt(0))<<6|63&Zt.charCodeAt(1))}},Mt=function(Zt){return Zt.replace(Ht,Xt)},_t=function(Zt){if(Zt=Zt.replace(/\s+/g,""),!mt.test(Zt))throw new TypeError("malformed base64.");Zt+="==".slice(2-(Zt.length&3));for(var Jt,rr="",or,ar,ir=0;ir>16&255):ar===64?gt(Jt>>16&255,Jt>>8&255):gt(Jt>>16&255,Jt>>8&255,Jt&255);return rr},At=nt?function(Zt){return atob(yt(Zt))}:at?function(Zt){return Buffer.from(Zt,"base64").toString("binary")}:_t,Tt=at?function(Zt){return vt(Buffer.from(Zt,"base64"))}:function(Zt){return vt(At(Zt).split("").map(function(Jt){return Jt.charCodeAt(0)}))},Bt=function(Zt){return Tt(Ut(Zt))},Ot=at?function(Zt){return Buffer.from(Zt,"base64").toString("utf8")}:st?function(Zt){return st.decode(Tt(Zt))}:function(Zt){return Mt(At(Zt))},Ut=function(Zt){return yt(Zt.replace(/[-_]/g,function(Jt){return Jt=="-"?"+":"/"}))},Wt=function(Zt){return Ot(Ut(Zt))},Ct=function(Zt){if(typeof Zt!="string")return!1;var Jt=Zt.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(Jt)||!/[^\s0-9a-zA-Z\-_]/.test(Jt)},St=function(Zt){return{value:Zt,enumerable:!1,writable:!0,configurable:!0}},Ft=function(){var Zt=function(Jt,rr){return Object.defineProperty(String.prototype,Jt,St(rr))};Zt("fromBase64",function(){return Wt(this)}),Zt("toBase64",function(Jt){return qt(this,Jt)}),Zt("toBase64URI",function(){return qt(this,!0)}),Zt("toBase64URL",function(){return qt(this,!0)}),Zt("toUint8Array",function(){return Bt(this)})},Vt=function(){var Zt=function(Jt,rr){return Object.defineProperty(Uint8Array.prototype,Jt,St(rr))};Zt("toBase64",function(Jt){return $t(this,Jt)}),Zt("toBase64URI",function(){return $t(this,!0)}),Zt("toBase64URL",function(){return $t(this,!0)})},Rt=function(){Ft(),Vt()},Kt={version:tt,VERSION:rt,atob:At,atobPolyfill:_t,btoa:wt,btoaPolyfill:bt,fromBase64:Wt,toBase64:qt,encode:qt,encodeURI:Dt,encodeURL:Dt,utob:Lt,btou:Mt,decode:Wt,isValid:Ct,fromUint8Array:$t,toUint8Array:Bt,extendString:Ft,extendUint8Array:Vt,extendBuiltins:Rt};return Kt.Base64={},Object.keys(Kt).forEach(function(Zt){return Kt.Base64[Zt]=Kt[Zt]}),Kt})})(base64);var base64Exports=base64.exports;Object.defineProperty(convertMetadata,"__esModule",{value:!0});convertMetadata.convertMetadataFromGrpcWeb=convertMetadata.convertMetadataToGrpcWeb=void 0;const grpc_web_1$4=grpcWebClient_umdExports,nice_grpc_common_1$5=lib$1,js_base64_1=base64Exports;function convertMetadataToGrpcWeb(_e){const et=new grpc_web_1$4.grpc.Metadata;for(const[tt,rt]of _e)for(const nt of rt)et.append(tt,typeof nt=="string"?nt:js_base64_1.Base64.fromUint8Array(nt));return et}convertMetadata.convertMetadataToGrpcWeb=convertMetadataToGrpcWeb;function convertMetadataFromGrpcWeb(_e){const et=(0,nice_grpc_common_1$5.Metadata)();for(const[tt,rt]of Object.entries(_e.headersMap))if(tt.endsWith("-bin"))for(const nt of rt)for(const it of nt.split(/,\s?/))et.append(tt,js_base64_1.Base64.toUint8Array(it));else et.set(tt,rt);return et}convertMetadata.convertMetadataFromGrpcWeb=convertMetadataFromGrpcWeb;Object.defineProperty(createBidiStreamingMethod$1,"__esModule",{value:!0});createBidiStreamingMethod$1.createBidiStreamingMethod=void 0;const nice_grpc_common_1$4=lib$1,grpc_web_1$3=grpcWebClient_umdExports,abort_controller_x_1$3=require$$2,AsyncSink_1$1=AsyncSink$1,service_definitions_1$4=serviceDefinitions,isAsyncIterable_1$3=isAsyncIterable$1,convertMetadata_1$3=convertMetadata;function createBidiStreamingMethod(_e,et,tt,rt){const nt=(0,service_definitions_1$4.toGrpcWebMethodDefinition)(_e),it={path:_e.path,requestStream:_e.requestStream,responseStream:_e.responseStream,options:_e.options};async function*at(lt,dt){if(!(0,isAsyncIterable_1$3.isAsyncIterable)(lt))throw new Error("A middleware passed invalid request to next(): expected a single message for bidirectional streaming method");const{metadata:ht=(0,nice_grpc_common_1$4.Metadata)(),signal:pt=new AbortController().signal,onHeader:mt,onTrailer:gt}=dt,vt=new AbortController,xt=new AsyncSink_1$1.AsyncSink,yt=grpc_web_1$3.grpc.client(nt,{host:et.address,transport:et.transport});yt.onHeaders(Et=>{mt?.((0,convertMetadata_1$3.convertMetadataFromGrpcWeb)(Et))}),yt.onMessage(Et=>{xt.write(Et)}),yt.onEnd((Et,$t,Pt)=>{gt?.((0,convertMetadata_1$3.convertMetadataFromGrpcWeb)(Pt)),Et===grpc_web_1$3.grpc.Code.OK?xt.end():xt.error(new nice_grpc_common_1$4.ClientError(_e.path,+Et,$t))}),yt.start((0,convertMetadata_1$3.convertMetadataToGrpcWeb)(ht));let bt;pipeRequest$1(vt.signal,lt,yt,_e).then(()=>{yt.finishSend()},Et=>{(0,abort_controller_x_1$3.isAbortError)(Et)||(bt=Et,yt.close(),xt.end())});const wt=()=>{xt.error(new abort_controller_x_1$3.AbortError),vt.abort(),yt.close()};pt.addEventListener("abort",wt);try{yield*xt}finally{if(vt.abort(),pt.removeEventListener("abort",wt),(0,abort_controller_x_1$3.throwIfAborted)(pt),bt)throw bt}}const st=tt==null?at:(lt,dt)=>tt({method:it,requestStream:!0,request:lt,responseStream:!0,next:at},dt);return(lt,dt)=>{const pt=st(lt,{...rt,...dt})[Symbol.asyncIterator]();return{[Symbol.asyncIterator](){return{async next(){const mt=await pt.next();return mt.done&&mt.value!=null?await pt.throw(new Error("A middleware returned a message, but expected to return void for bidirectional streaming method")):mt},return(){return pt.return()},throw(mt){return pt.throw(mt)}}}}}}createBidiStreamingMethod$1.createBidiStreamingMethod=createBidiStreamingMethod;async function pipeRequest$1(_e,et,tt,rt){for await(const nt of et)(0,abort_controller_x_1$3.throwIfAborted)(_e),tt.send({serializeBinary:()=>rt.requestSerialize(nt)})}var createClientStreamingMethod$1={};Object.defineProperty(createClientStreamingMethod$1,"__esModule",{value:!0});createClientStreamingMethod$1.createClientStreamingMethod=void 0;const nice_grpc_common_1$3=lib$1,grpc_web_1$2=grpcWebClient_umdExports,abort_controller_x_1$2=require$$2,service_definitions_1$3=serviceDefinitions,isAsyncIterable_1$2=isAsyncIterable$1,convertMetadata_1$2=convertMetadata;function createClientStreamingMethod(_e,et,tt,rt){const nt=(0,service_definitions_1$3.toGrpcWebMethodDefinition)(_e),it={path:_e.path,requestStream:_e.requestStream,responseStream:_e.responseStream,options:_e.options};async function*at(lt,dt){if(!(0,isAsyncIterable_1$2.isAsyncIterable)(lt))throw new Error("A middleware passed invalid request to next(): expected a single message for client streaming method");const{metadata:ht=(0,nice_grpc_common_1$3.Metadata)(),signal:pt=new AbortController().signal,onHeader:mt,onTrailer:gt}=dt;return await(0,abort_controller_x_1$2.execute)(pt,(vt,xt)=>{const yt=new AbortController;let bt;const wt=grpc_web_1$2.grpc.client(nt,{host:et.address,transport:et.transport});return wt.onHeaders(Et=>{mt?.((0,convertMetadata_1$2.convertMetadataFromGrpcWeb)(Et))}),wt.onMessage(Et=>{bt=Et}),wt.onEnd((Et,$t,Pt)=>{gt?.((0,convertMetadata_1$2.convertMetadataFromGrpcWeb)(Pt)),yt.abort(),Et===grpc_web_1$2.grpc.Code.OK?vt(bt):xt(new nice_grpc_common_1$3.ClientError(_e.path,+Et,$t))}),wt.start((0,convertMetadata_1$2.convertMetadataToGrpcWeb)(ht)),pipeRequest(yt.signal,lt,wt,_e).then(()=>{wt.finishSend()},Et=>{(0,abort_controller_x_1$2.isAbortError)(Et)||(xt(Et),wt.close())}),()=>{yt.abort(),wt.close()}})}const st=tt==null?at:(lt,dt)=>tt({method:it,requestStream:!0,request:lt,responseStream:!1,next:at},dt);return async(lt,dt)=>{const pt=st(lt,{...rt,...dt})[Symbol.asyncIterator]();let mt=await pt.next();for(;;){if(!mt.done){mt=await pt.throw(new Error("A middleware yielded a message, but expected to only return a message for client streaming method"));continue}if(mt.value==null){mt=await pt.throw(new Error("A middleware returned void, but expected to return a message for client streaming method"));continue}return mt.value}}}createClientStreamingMethod$1.createClientStreamingMethod=createClientStreamingMethod;async function pipeRequest(_e,et,tt,rt){for await(const nt of et)(0,abort_controller_x_1$2.throwIfAborted)(_e),tt.send({serializeBinary:()=>rt.requestSerialize(nt)})}var createServerStreamingMethod$1={};Object.defineProperty(createServerStreamingMethod$1,"__esModule",{value:!0});createServerStreamingMethod$1.createServerStreamingMethod=void 0;const grpc_web_1$1=grpcWebClient_umdExports,abort_controller_x_1$1=require$$2,AsyncSink_1=AsyncSink$1,nice_grpc_common_1$2=lib$1,service_definitions_1$2=serviceDefinitions,convertMetadata_1$1=convertMetadata,isAsyncIterable_1$1=isAsyncIterable$1;function createServerStreamingMethod(_e,et,tt,rt){const nt=(0,service_definitions_1$2.toGrpcWebMethodDefinition)(_e),it={path:_e.path,requestStream:_e.requestStream,responseStream:_e.responseStream,options:_e.options};async function*at(lt,dt){if((0,isAsyncIterable_1$1.isAsyncIterable)(lt))throw new Error("A middleware passed invalid request to next(): expected a single message for server streaming method");const{metadata:ht=(0,nice_grpc_common_1$2.Metadata)(),signal:pt=new AbortController().signal,onHeader:mt,onTrailer:gt}=dt,vt=new AsyncSink_1.AsyncSink,xt=grpc_web_1$1.grpc.client(nt,{host:et.address,transport:et.transport});xt.onHeaders(bt=>{mt?.((0,convertMetadata_1$1.convertMetadataFromGrpcWeb)(bt))}),xt.onMessage(bt=>{vt.write(bt)}),xt.onEnd((bt,wt,Et)=>{gt?.((0,convertMetadata_1$1.convertMetadataFromGrpcWeb)(Et)),bt===grpc_web_1$1.grpc.Code.OK?vt.end():vt.error(new nice_grpc_common_1$2.ClientError(_e.path,+bt,wt))}),xt.start((0,convertMetadata_1$1.convertMetadataToGrpcWeb)(ht)),xt.send({serializeBinary:()=>_e.requestSerialize(lt)}),xt.finishSend();const yt=()=>{vt.error(new abort_controller_x_1$1.AbortError),xt.close()};pt.addEventListener("abort",yt);try{yield*vt}finally{pt.removeEventListener("abort",yt),(0,abort_controller_x_1$1.throwIfAborted)(pt)}}const st=tt==null?at:(lt,dt)=>tt({method:it,requestStream:!1,request:lt,responseStream:!0,next:at},dt);return(lt,dt)=>{const pt=st(lt,{...rt,...dt})[Symbol.asyncIterator]();return{[Symbol.asyncIterator](){return{async next(){const mt=await pt.next();return mt.done&&mt.value!=null?await pt.throw(new Error("A middleware returned a message, but expected to return void for server streaming method")):mt},return(){return pt.return()},throw(mt){return pt.throw(mt)}}}}}}createServerStreamingMethod$1.createServerStreamingMethod=createServerStreamingMethod;var createUnaryMethod$1={};Object.defineProperty(createUnaryMethod$1,"__esModule",{value:!0});createUnaryMethod$1.createUnaryMethod=void 0;const nice_grpc_common_1$1=lib$1,grpc_web_1=grpcWebClient_umdExports,abort_controller_x_1=require$$2,service_definitions_1$1=serviceDefinitions,isAsyncIterable_1=isAsyncIterable$1,convertMetadata_1=convertMetadata;function createUnaryMethod(_e,et,tt,rt){const nt=(0,service_definitions_1$1.toGrpcWebMethodDefinition)(_e),it={path:_e.path,requestStream:_e.requestStream,responseStream:_e.responseStream,options:_e.options};async function*at(lt,dt){if((0,isAsyncIterable_1.isAsyncIterable)(lt))throw new Error("A middleware passed invalid request to next(): expected a single message for unary method");const{metadata:ht=(0,nice_grpc_common_1$1.Metadata)(),signal:pt=new AbortController().signal,onHeader:mt,onTrailer:gt}=dt;return await(0,abort_controller_x_1.execute)(pt,(vt,xt)=>{let yt;const bt=grpc_web_1.grpc.client(nt,{host:et.address,transport:et.transport});return bt.onHeaders(wt=>{mt?.((0,convertMetadata_1.convertMetadataFromGrpcWeb)(wt))}),bt.onMessage(wt=>{yt=wt}),bt.onEnd((wt,Et,$t)=>{gt?.((0,convertMetadata_1.convertMetadataFromGrpcWeb)($t)),wt===grpc_web_1.grpc.Code.OK?vt(yt):xt(new nice_grpc_common_1$1.ClientError(_e.path,+wt,Et))}),bt.start((0,convertMetadata_1.convertMetadataToGrpcWeb)(ht)),bt.send({serializeBinary:()=>_e.requestSerialize(lt)}),bt.finishSend(),()=>{bt.close()}})}const st=tt==null?at:(lt,dt)=>tt({method:it,requestStream:!1,request:lt,responseStream:!1,next:at},dt);return async(lt,dt)=>{const pt=st(lt,{...rt,...dt})[Symbol.asyncIterator]();let mt=await pt.next();for(;;){if(!mt.done){mt=await pt.throw(new Error("A middleware yielded a message, but expected to only return a message for unary method"));continue}if(mt.value==null){mt=await pt.throw(new Error("A middleware returned void, but expected to return a message for unary method"));continue}return mt.value}}}createUnaryMethod$1.createUnaryMethod=createUnaryMethod;Object.defineProperty(ClientFactory,"__esModule",{value:!0});ClientFactory.createClient=ClientFactory.createClientFactory=void 0;const nice_grpc_common_1=lib$1,service_definitions_1=serviceDefinitions,createBidiStreamingMethod_1=createBidiStreamingMethod$1,createClientStreamingMethod_1=createClientStreamingMethod$1,createServerStreamingMethod_1=createServerStreamingMethod$1,createUnaryMethod_1=createUnaryMethod$1;function createClientFactory(){return createClientFactoryWithMiddleware()}ClientFactory.createClientFactory=createClientFactory;function createClient(_e,et,tt){return createClientFactory().create(_e,et,tt)}ClientFactory.createClient=createClient;function createClientFactoryWithMiddleware(_e){return{use(et){return createClientFactoryWithMiddleware(_e==null?et:(0,nice_grpc_common_1.composeClientMiddleware)(_e,et))},create(et,tt,rt={}){const nt={},it=Object.entries((0,service_definitions_1.normalizeServiceDefinition)(et));for(const[at,st]of it){const lt={...rt["*"],...rt[at]};st.requestStream?st.responseStream?nt[at]=(0,createBidiStreamingMethod_1.createBidiStreamingMethod)(st,tt,_e,lt):nt[at]=(0,createClientStreamingMethod_1.createClientStreamingMethod)(st,tt,_e,lt):st.responseStream?nt[at]=(0,createServerStreamingMethod_1.createServerStreamingMethod)(st,tt,_e,lt):nt[at]=(0,createUnaryMethod_1.createUnaryMethod)(st,tt,_e,lt)}return nt}}}var Client={};Object.defineProperty(Client,"__esModule",{value:!0});(function(_e){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(nt,it,at,st){st===void 0&&(st=at);var lt=Object.getOwnPropertyDescriptor(it,at);(!lt||("get"in lt?!it.__esModule:lt.writable||lt.configurable))&&(lt={enumerable:!0,get:function(){return it[at]}}),Object.defineProperty(nt,st,lt)}:function(nt,it,at,st){st===void 0&&(st=at),nt[st]=it[at]}),tt=commonjsGlobal&&commonjsGlobal.__exportStar||function(nt,it){for(var at in nt)at!=="default"&&!Object.prototype.hasOwnProperty.call(it,at)&&et(it,nt,at)};Object.defineProperty(_e,"__esModule",{value:!0}),_e.Status=_e.Metadata=_e.composeClientMiddleware=_e.ClientError=void 0;var rt=lib$1;Object.defineProperty(_e,"ClientError",{enumerable:!0,get:function(){return rt.ClientError}}),Object.defineProperty(_e,"composeClientMiddleware",{enumerable:!0,get:function(){return rt.composeClientMiddleware}}),Object.defineProperty(_e,"Metadata",{enumerable:!0,get:function(){return rt.Metadata}}),Object.defineProperty(_e,"Status",{enumerable:!0,get:function(){return rt.Status}}),tt(serviceDefinitions,_e),tt(channel,_e),tt(ClientFactory,_e),tt(Client,_e)})(lib$2);function createBaseLinkedTwitterPair(){return{username:"",address:""}}var LinkedTwitterPair={encode(_e,et=_m0.Writer.create()){return _e.username!==""&&et.uint32(10).string(_e.username),_e.address!==""&&et.uint32(18).string(_e.address),et},decode(_e,et){const tt=_e instanceof _m0.Reader?_e:_m0.Reader.create(_e);let rt=et===void 0?tt.len:tt.pos+et;const nt=createBaseLinkedTwitterPair();for(;tt.pos>>3){case 1:if(it!=10)break;nt.username=tt.string();continue;case 2:if(it!=18)break;nt.address=tt.string();continue}if((it&7)==4||it==0)break;tt.skipType(it&7)}return nt},create(_e){return LinkedTwitterPair.fromPartial(_e??{})},fromPartial(_e){const et=createBaseLinkedTwitterPair();return et.username=_e.username??"",et.address=_e.address??"",et}};function createBaseDripRequest(){return{username:"",address:""}}var DripRequest={encode(_e,et=_m0.Writer.create()){return _e.username!==""&&et.uint32(10).string(_e.username),_e.address!==""&&et.uint32(18).string(_e.address),et},decode(_e,et){const tt=_e instanceof _m0.Reader?_e:_m0.Reader.create(_e);let rt=et===void 0?tt.len:tt.pos+et;const nt=createBaseDripRequest();for(;tt.pos>>3){case 1:if(it!=10)break;nt.username=tt.string();continue;case 2:if(it!=18)break;nt.address=tt.string();continue}if((it&7)==4||it==0)break;tt.skipType(it&7)}return nt},create(_e){return DripRequest.fromPartial(_e??{})},fromPartial(_e){const et=createBaseDripRequest();return et.username=_e.username??"",et.address=_e.address??"",et}};function createBaseDripDevRequest(){return{address:""}}var DripDevRequest={encode(_e,et=_m0.Writer.create()){return _e.address!==""&&et.uint32(10).string(_e.address),et},decode(_e,et){const tt=_e instanceof _m0.Reader?_e:_m0.Reader.create(_e);let rt=et===void 0?tt.len:tt.pos+et;const nt=createBaseDripDevRequest();for(;tt.pos>>3){case 1:if(it!=10)break;nt.address=tt.string();continue}if((it&7)==4||it==0)break;tt.skipType(it&7)}return nt},create(_e){return DripDevRequest.fromPartial(_e??{})},fromPartial(_e){const et=createBaseDripDevRequest();return et.address=_e.address??"",et}};function createBaseDripResponse(){return{dripTxHash:"",ecsTxHash:""}}var DripResponse={encode(_e,et=_m0.Writer.create()){return _e.dripTxHash!==""&&et.uint32(10).string(_e.dripTxHash),_e.ecsTxHash!==""&&et.uint32(18).string(_e.ecsTxHash),et},decode(_e,et){const tt=_e instanceof _m0.Reader?_e:_m0.Reader.create(_e);let rt=et===void 0?tt.len:tt.pos+et;const nt=createBaseDripResponse();for(;tt.pos>>3){case 1:if(it!=10)break;nt.dripTxHash=tt.string();continue;case 2:if(it!=18)break;nt.ecsTxHash=tt.string();continue}if((it&7)==4||it==0)break;tt.skipType(it&7)}return nt},create(_e){return DripResponse.fromPartial(_e??{})},fromPartial(_e){const et=createBaseDripResponse();return et.dripTxHash=_e.dripTxHash??"",et.ecsTxHash=_e.ecsTxHash??"",et}};function createBaseTimeUntilDripResponse(){return{timeUntilDripMinutes:0,timeUntilDripSeconds:0}}var TimeUntilDripResponse={encode(_e,et=_m0.Writer.create()){return _e.timeUntilDripMinutes!==0&&et.uint32(9).double(_e.timeUntilDripMinutes),_e.timeUntilDripSeconds!==0&&et.uint32(17).double(_e.timeUntilDripSeconds),et},decode(_e,et){const tt=_e instanceof _m0.Reader?_e:_m0.Reader.create(_e);let rt=et===void 0?tt.len:tt.pos+et;const nt=createBaseTimeUntilDripResponse();for(;tt.pos>>3){case 1:if(it!=9)break;nt.timeUntilDripMinutes=tt.double();continue;case 2:if(it!=17)break;nt.timeUntilDripSeconds=tt.double();continue}if((it&7)==4||it==0)break;tt.skipType(it&7)}return nt},create(_e){return TimeUntilDripResponse.fromPartial(_e??{})},fromPartial(_e){const et=createBaseTimeUntilDripResponse();return et.timeUntilDripMinutes=_e.timeUntilDripMinutes??0,et.timeUntilDripSeconds=_e.timeUntilDripSeconds??0,et}};function createBaseGetLinkedTwittersRequest(){return{}}var GetLinkedTwittersRequest={encode(_e,et=_m0.Writer.create()){return et},decode(_e,et){const tt=_e instanceof _m0.Reader?_e:_m0.Reader.create(_e);let rt=et===void 0?tt.len:tt.pos+et;const nt=createBaseGetLinkedTwittersRequest();for(;tt.pos>>3){case 1:if(it!=10)break;nt.linkedTwitters.push(LinkedTwitterPair.decode(tt,tt.uint32()));continue}if((it&7)==4||it==0)break;tt.skipType(it&7)}return nt},create(_e){return GetLinkedTwittersResponse.fromPartial(_e??{})},fromPartial(_e){const et=createBaseGetLinkedTwittersResponse();return et.linkedTwitters=_e.linkedTwitters?.map(tt=>LinkedTwitterPair.fromPartial(tt))||[],et}};function createBaseLinkedTwitterForAddressRequest(){return{address:""}}var LinkedTwitterForAddressRequest={encode(_e,et=_m0.Writer.create()){return _e.address!==""&&et.uint32(10).string(_e.address),et},decode(_e,et){const tt=_e instanceof _m0.Reader?_e:_m0.Reader.create(_e);let rt=et===void 0?tt.len:tt.pos+et;const nt=createBaseLinkedTwitterForAddressRequest();for(;tt.pos>>3){case 1:if(it!=10)break;nt.address=tt.string();continue}if((it&7)==4||it==0)break;tt.skipType(it&7)}return nt},create(_e){return LinkedTwitterForAddressRequest.fromPartial(_e??{})},fromPartial(_e){const et=createBaseLinkedTwitterForAddressRequest();return et.address=_e.address??"",et}};function createBaseLinkedTwitterForAddressResponse(){return{username:""}}var LinkedTwitterForAddressResponse={encode(_e,et=_m0.Writer.create()){return _e.username!==""&&et.uint32(10).string(_e.username),et},decode(_e,et){const tt=_e instanceof _m0.Reader?_e:_m0.Reader.create(_e);let rt=et===void 0?tt.len:tt.pos+et;const nt=createBaseLinkedTwitterForAddressResponse();for(;tt.pos>>3){case 1:if(it!=10)break;nt.username=tt.string();continue}if((it&7)==4||it==0)break;tt.skipType(it&7)}return nt},create(_e){return LinkedTwitterForAddressResponse.fromPartial(_e??{})},fromPartial(_e){const et=createBaseLinkedTwitterForAddressResponse();return et.username=_e.username??"",et}};function createBaseLinkedAddressForTwitterRequest(){return{username:""}}var LinkedAddressForTwitterRequest={encode(_e,et=_m0.Writer.create()){return _e.username!==""&&et.uint32(10).string(_e.username),et},decode(_e,et){const tt=_e instanceof _m0.Reader?_e:_m0.Reader.create(_e);let rt=et===void 0?tt.len:tt.pos+et;const nt=createBaseLinkedAddressForTwitterRequest();for(;tt.pos>>3){case 1:if(it!=10)break;nt.username=tt.string();continue}if((it&7)==4||it==0)break;tt.skipType(it&7)}return nt},create(_e){return LinkedAddressForTwitterRequest.fromPartial(_e??{})},fromPartial(_e){const et=createBaseLinkedAddressForTwitterRequest();return et.username=_e.username??"",et}};function createBaseLinkedAddressForTwitterResponse(){return{address:""}}var LinkedAddressForTwitterResponse={encode(_e,et=_m0.Writer.create()){return _e.address!==""&&et.uint32(10).string(_e.address),et},decode(_e,et){const tt=_e instanceof _m0.Reader?_e:_m0.Reader.create(_e);let rt=et===void 0?tt.len:tt.pos+et;const nt=createBaseLinkedAddressForTwitterResponse();for(;tt.pos>>3){case 1:if(it!=10)break;nt.address=tt.string();continue}if((it&7)==4||it==0)break;tt.skipType(it&7)}return nt},create(_e){return LinkedAddressForTwitterResponse.fromPartial(_e??{})},fromPartial(_e){const et=createBaseLinkedAddressForTwitterResponse();return et.address=_e.address??"",et}};function createBaseSetLinkedTwitterRequest(){return{address:"",username:"",signature:""}}var SetLinkedTwitterRequest={encode(_e,et=_m0.Writer.create()){return _e.address!==""&&et.uint32(10).string(_e.address),_e.username!==""&&et.uint32(18).string(_e.username),_e.signature!==""&&et.uint32(26).string(_e.signature),et},decode(_e,et){const tt=_e instanceof _m0.Reader?_e:_m0.Reader.create(_e);let rt=et===void 0?tt.len:tt.pos+et;const nt=createBaseSetLinkedTwitterRequest();for(;tt.pos>>3){case 1:if(it!=10)break;nt.address=tt.string();continue;case 2:if(it!=18)break;nt.username=tt.string();continue;case 3:if(it!=26)break;nt.signature=tt.string();continue}if((it&7)==4||it==0)break;tt.skipType(it&7)}return nt},create(_e){return SetLinkedTwitterRequest.fromPartial(_e??{})},fromPartial(_e){const et=createBaseSetLinkedTwitterRequest();return et.address=_e.address??"",et.username=_e.username??"",et.signature=_e.signature??"",et}};function createBaseSetLinkedTwitterResponse(){return{}}var SetLinkedTwitterResponse={encode(_e,et=_m0.Writer.create()){return et},decode(_e,et){const tt=_e instanceof _m0.Reader?_e:_m0.Reader.create(_e);let rt=et===void 0?tt.len:tt.pos+et;const nt=createBaseSetLinkedTwitterResponse();for(;tt.pos{if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw"Unable to locate global object"})();_m0.util.Long!==Long&&(_m0.util.Long=Long,_m0.configure());function createFaucetService(_e){return lib$2.createClient(FaucetServiceDefinition,lib$2.createChannel(_e))}const worldsJson={4242:{address:"0x06b2F63321C54D946BA419F7dAee2a931B24D7a4",blockNumber:29582781},31337:{address:"0xe59592e480262c15cB5EA88b5059AC61eE035B2c"},33784:{address:"0x418c0049114E9Cfec1f007b502b1D9D191A0216B",blockNumber:247623},421613:{address:"0x2Bc1034975c3df48D6f3026802f372677844b85d",blockNumber:46508363},11155111:{address:"0xec7F8CF3B3640b1C5E8fD3c208776aad056D4fc3",blockNumber:4450305}};var arbitrumGoerli$1={id:421613,name:"Arbitrum Goerli",network:"arbitrum-goerli",nativeCurrency:{name:"Arbitrum Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://arb-goerli.g.alchemy.com/v2"],webSocket:["wss://arb-goerli.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-goerli.infura.io/v3"],webSocket:["wss://arbitrum-goerli.infura.io/ws/v3"]},default:{http:["https://goerli-rollup.arbitrum.io/rpc"]},public:{http:["https://goerli-rollup.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://goerli.arbiscan.io/"},default:{name:"Arbiscan",url:"https://goerli.arbiscan.io/"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:88114}},testnet:!0},foundry$1={id:31337,name:"Foundry",network:"foundry",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]},public:{http:["http://127.0.0.1:8545"],webSocket:["ws://127.0.0.1:8545"]}}},sepolia$1={id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0};const arbitrumGoerli=defineChain(arbitrumGoerli$1),foundry=defineChain(foundry$1),sepolia=defineChain(sepolia$1);var t={name:"Lattice Testnet",id:4242,network:"lattice-testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://follower.testnet-chain.linfra.xyz"],webSocket:["wss://follower.testnet-chain.linfra.xyz"]},public:{http:["https://follower.testnet-chain.linfra.xyz"],webSocket:["wss://follower.testnet-chain.linfra.xyz"]}},blockExplorers:{otterscan:{name:"Otterscan",url:"https://explorer.testnet-chain.linfra.xyz"},default:{name:"Otterscan",url:"https://explorer.testnet-chain.linfra.xyz"}},faucetUrl:"https://faucet.testnet-mud-services.linfra.xyz"},r={...foundry,fees:{defaultPriorityFee:0n}};arbitrumGoerli.rpcUrls.default.http=["https://arbitrum-goerli.infura.io/v3/5ca372516740427e97512d4dfefd9c47"];arbitrumGoerli.rpcUrls.default.webSocket=["wss://arbitrum-goerli.infura.io/ws/v3/5ca372516740427e97512d4dfefd9c47"];const testnet={name:"Lidamao Testnet",id:33784,network:"lidamao-testnet",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.0xmssp.xyz"],webSocket:["https://rpc.0xmssp.xyz"]},public:{http:["https://rpc.0xmssp.xyz"],webSocket:["https://rpc.0xmssp.xyz"]}}},supportedChains=[r,t,sepolia,arbitrumGoerli,testnet],worlds=worldsJson;async function getNetworkConfig(){const _e=new URLSearchParams(window.location.search),et=Number(_e.get("chainId")||_e.get("chainid")||"33784"),tt=supportedChains.findIndex(st=>st.id===et),rt=supportedChains[tt];if(!rt)throw new Error(`Chain ${et} not found`);const nt=worlds[rt.id.toString()],it=_e.get("worldAddress")||nt?.address;if(!it)throw new Error(`No world address found for chain ${et}. Did you run \`mud deploy\`?`);const at=_e.has("initialBlockNumber")?Number(_e.get("initialBlockNumber")):nt?.blockNumber??0n;return{privateKey:be$2(),chainId:et,chain:rt,faucetServiceUrl:_e.get("faucet")??rt.faucetUrl,worldAddress:it,initialBlockNumber:at}}const world=ft(),_abi=[{inputs:[{internalType:"string",name:"resource",type:"string"},{internalType:"address",name:"caller",type:"address"}],name:"AccessDenied",type:"error"},{inputs:[{internalType:"bytes4",name:"functionSelector",type:"bytes4"}],name:"FunctionSelectorExists",type:"error"},{inputs:[{internalType:"bytes4",name:"functionSelector",type:"bytes4"}],name:"FunctionSelectorNotFound",type:"error"},{inputs:[{internalType:"string",name:"resource",type:"string"}],name:"InvalidSelector",type:"error"},{inputs:[{internalType:"string",name:"module",type:"string"}],name:"ModuleAlreadyInstalled",type:"error"},{inputs:[{internalType:"string",name:"resource",type:"string"}],name:"ResourceExists",type:"error"},{inputs:[{internalType:"string",name:"resource",type:"string"}],name:"ResourceNotFound",type:"error"},{inputs:[{internalType:"uint256",name:"length",type:"uint256"},{internalType:"uint256",name:"received",type:"uint256"}],name:"StoreCore_DataIndexOverflow",type:"error"},{inputs:[{internalType:"uint256",name:"expected",type:"uint256"},{internalType:"uint256",name:"received",type:"uint256"}],name:"StoreCore_InvalidDataLength",type:"error"},{inputs:[{internalType:"uint256",name:"expected",type:"uint256"},{internalType:"uint256",name:"received",type:"uint256"}],name:"StoreCore_InvalidFieldNamesLength",type:"error"},{inputs:[{internalType:"uint256",name:"expected",type:"uint256"},{internalType:"uint256",name:"received",type:"uint256"}],name:"StoreCore_InvalidKeyNamesLength",type:"error"},{inputs:[],name:"StoreCore_NotDynamicField",type:"error"},{inputs:[],name:"StoreCore_NotImplemented",type:"error"},{inputs:[{internalType:"bytes32",name:"tableId",type:"bytes32"},{internalType:"string",name:"tableIdString",type:"string"}],name:"StoreCore_TableAlreadyExists",type:"error"},{inputs:[{internalType:"bytes32",name:"tableId",type:"bytes32"},{internalType:"string",name:"tableIdString",type:"string"}],name:"StoreCore_TableNotFound",type:"error"},{inputs:[{internalType:"address",name:"system",type:"address"}],name:"SystemExists",type:"error"},{anonymous:!1,inputs:[],name:"HelloWorld",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"table",type:"bytes32"},{indexed:!1,internalType:"bytes32[]",name:"key",type:"bytes32[]"}],name:"StoreDeleteRecord",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"table",type:"bytes32"},{indexed:!1,internalType:"bytes32[]",name:"key",type:"bytes32[]"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"}],name:"StoreEphemeralRecord",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"table",type:"bytes32"},{indexed:!1,internalType:"bytes32[]",name:"key",type:"bytes32[]"},{indexed:!1,internalType:"uint8",name:"schemaIndex",type:"uint8"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"}],name:"StoreSetField",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"table",type:"bytes32"},{indexed:!1,internalType:"bytes32[]",name:"key",type:"bytes32[]"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"}],name:"StoreSetRecord",type:"event"},{inputs:[{internalType:"uint16",name:"_x",type:"uint16"},{internalType:"uint16",name:"_y",type:"uint16"}],name:"CreateBox",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"GetSeasonInfo",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_root",type:"bytes32"}],name:"SetMapMerkleRoot",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_start",type:"uint256"},{internalType:"uint256",name:"_end",type:"uint256"}],name:"SetSeasonInfo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"SetUserContract",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_targetAddress",type:"address"},{components:[{internalType:"uint16",name:"x",type:"uint16"},{internalType:"uint16",name:"y",type:"uint16"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],internalType:"struct Position[]",name:"positionList",type:"tuple[]"}],name:"battleInvitation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"resourceSelector",type:"bytes32"},{internalType:"bytes",name:"funcSelectorAndArgs",type:"bytes"}],name:"call",outputs:[{internalType:"bytes",name:"",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"_buffHash",type:"bytes32"},{internalType:"uint256",name:"_battleId",type:"uint256"}],name:"confirmBattle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"},{internalType:"bytes32[]",name:"key",type:"bytes32[]"},{internalType:"Schema",name:"valueSchema",type:"bytes32"}],name:"deleteRecord",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"},{internalType:"bytes32[]",name:"key",type:"bytes32[]"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"Schema",name:"valueSchema",type:"bytes32"}],name:"emitEphemeralRecord",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_battleId",type:"uint256"}],name:"forceEnd",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_battleId",type:"uint256"},{internalType:"address",name:"addr",type:"address"}],name:"getBattlePlayerHp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_boxId",type:"uint256"},{internalType:"uint16",name:"_oreAmount",type:"uint16"},{internalType:"uint16",name:"_treasureAmount",type:"uint16"}],name:"getCollections",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"},{internalType:"bytes32[]",name:"key",type:"bytes32[]"},{internalType:"uint8",name:"schemaIndex",type:"uint8"},{internalType:"Schema",name:"valueSchema",type:"bytes32"}],name:"getField",outputs:[{internalType:"bytes",name:"data",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"},{internalType:"bytes32[]",name:"key",type:"bytes32[]"},{internalType:"uint8",name:"schemaIndex",type:"uint8"},{internalType:"Schema",name:"valueSchema",type:"bytes32"}],name:"getFieldLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"},{internalType:"bytes32[]",name:"key",type:"bytes32[]"},{internalType:"uint8",name:"schemaIndex",type:"uint8"},{internalType:"Schema",name:"valueSchema",type:"bytes32"},{internalType:"uint256",name:"start",type:"uint256"},{internalType:"uint256",name:"end",type:"uint256"}],name:"getFieldSlice",outputs:[{internalType:"bytes",name:"data",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"addr",type:"address"}],name:"getInfo",outputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"}],name:"getKeySchema",outputs:[{internalType:"Schema",name:"schema",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"addr",type:"address"}],name:"getPosition",outputs:[{internalType:"uint16",name:"",type:"uint16"},{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"},{internalType:"bytes32[]",name:"key",type:"bytes32[]"},{internalType:"Schema",name:"valueSchema",type:"bytes32"}],name:"getRecord",outputs:[{internalType:"bytes",name:"data",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSenderPosition",outputs:[{internalType:"uint16",name:"",type:"uint16"},{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getUserInfo",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"}],name:"getValueSchema",outputs:[{internalType:"Schema",name:"schema",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"goHome",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"resourceSelector",type:"bytes32"},{internalType:"address",name:"grantee",type:"address"}],name:"grantAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_player",type:"address"}],name:"initPlayerHp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initUserInfo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IModule",name:"module",type:"address"},{internalType:"bytes",name:"args",type:"bytes"}],name:"installModule",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IModule",name:"module",type:"address"},{internalType:"bytes",name:"args",type:"bytes"}],name:"installRootModule",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"joinBattlefield",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"uint16",name:"x",type:"uint16"},{internalType:"uint16",name:"y",type:"uint16"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],internalType:"struct Position[]",name:"moveList",type:"tuple[]"}],name:"move",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_boxId",type:"uint256"}],name:"openBox",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"},{internalType:"bytes32[]",name:"key",type:"bytes32[]"},{internalType:"uint8",name:"schemaIndex",type:"uint8"},{internalType:"uint256",name:"byteLengthToPop",type:"uint256"},{internalType:"Schema",name:"valueSchema",type:"bytes32"}],name:"popFromField",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"},{internalType:"bytes32[]",name:"key",type:"bytes32[]"},{internalType:"uint8",name:"schemaIndex",type:"uint8"},{internalType:"bytes",name:"dataToPush",type:"bytes"},{internalType:"Schema",name:"valueSchema",type:"bytes32"}],name:"pushToField",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"resourceSelector",type:"bytes32"},{internalType:"string",name:"systemFunctionName",type:"string"},{internalType:"string",name:"systemFunctionArguments",type:"string"}],name:"registerFunctionSelector",outputs:[{internalType:"bytes4",name:"worldFunctionSelector",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes16",name:"namespace",type:"bytes16"}],name:"registerNamespace",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"resourceSelector",type:"bytes32"},{internalType:"bytes4",name:"worldFunctionSelector",type:"bytes4"},{internalType:"bytes4",name:"systemFunctionSelector",type:"bytes4"}],name:"registerRootFunctionSelector",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"},{internalType:"contract IStoreHook",name:"hook",type:"address"}],name:"registerStoreHook",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"resourceSelector",type:"bytes32"},{internalType:"contract System",name:"system",type:"address"},{internalType:"bool",name:"publicAccess",type:"bool"}],name:"registerSystem",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"resourceSelector",type:"bytes32"},{internalType:"contract ISystemHook",name:"hook",type:"address"}],name:"registerSystemHook",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"},{internalType:"Schema",name:"keySchema",type:"bytes32"},{internalType:"Schema",name:"valueSchema",type:"bytes32"},{internalType:"string[]",name:"keyNames",type:"string[]"},{internalType:"string[]",name:"fieldNames",type:"string[]"}],name:"registerTable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_battleId",type:"uint256"},{internalType:"bytes32",name:"_action",type:"bytes32"},{internalType:"uint256",name:"_arg",type:"uint256"},{internalType:"bytes32",name:"_nonce",type:"bytes32"}],name:"revealBattle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_boxId",type:"uint256"}],name:"revealBox",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_battleId",type:"uint256"}],name:"revealWinner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"resourceSelector",type:"bytes32"},{internalType:"address",name:"grantee",type:"address"}],name:"revokeAccess",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_userTokenId",type:"uint256"},{internalType:"uint256",name:"_lootTokenId",type:"uint256"}],name:"selectBothNFT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"selectLootNFT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"selectUserNft",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"},{internalType:"bytes32[]",name:"key",type:"bytes32[]"},{internalType:"uint8",name:"schemaIndex",type:"uint8"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"Schema",name:"valueSchema",type:"bytes32"}],name:"setField",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"url",type:"string"}],name:"setInfo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"},{internalType:"bytes32[]",name:"key",type:"bytes32[]"},{internalType:"bytes",name:"data",type:"bytes"},{internalType:"Schema",name:"valueSchema",type:"bytes32"}],name:"setRecord",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"submitGem",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"addr",type:"address"},{internalType:"uint16",name:"x",type:"uint16"},{internalType:"uint16",name:"y",type:"uint16"}],name:"transfer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockUserLocation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"table",type:"bytes32"},{internalType:"bytes32[]",name:"key",type:"bytes32[]"},{internalType:"uint8",name:"schemaIndex",type:"uint8"},{internalType:"uint256",name:"startByteIndex",type:"uint256"},{internalType:"bytes",name:"dataToSet",type:"bytes"},{internalType:"Schema",name:"valueSchema",type:"bytes32"}],name:"updateInField",outputs:[],stateMutability:"nonpayable",type:"function"}];class IWorld__factory{static createInterface(){return new Interface(_abi)}static connect(et,tt){return new Contract(et,_abi,tt)}}IWorld__factory.abi=_abi;const mudConfig=s({systems:{BattleSystem:{name:"battle",openAccess:!0},GameSystem:{name:"game",openAccess:!0},GMSystem:{name:"gm",openAccess:!0},PlayerSystem:{name:"player",openAccess:!0},BoxSystem:{name:"box",openAccess:!0},MoveSystem:{name:"move",openAccess:!0}},enums:{BattleState:["Inited","Confirmed","Revealed"],PlayerState:["Idle","Preparing","Exploring","Attacking"],ActionType:["Attack","Escape","Props"],Buff:["None","Fire","Water","Wind"],RandomState:["Inited","Pending","Confirmed"],BattleEndType:["NotEnd","NormalEnd","AllEscape","RoundEnd"]},tables:{Season:{schema:{start:"uint256",end:"uint256",no:"uint256"}},PlayerSeason:{keySchema:{addr:"address"},schema:{oreBalance:"uint16",attackCount:"uint16"}},Player:{keySchema:{addr:"address"},schema:{suitId:"uint256",equipmentId:"uint256",x:"uint16",y:"uint16",hp:"uint256",attack:"uint256",attackRange:"uint256",speed:"uint256",strength:"uint256",space:"uint256",oreBalance:"uint16",treasureBalance:"uint16",state:"PlayerState",lastBattleTime:"uint256",maxHp:"uint256",name:"string",url:"string"}},PlayerAddon:{keySchema:{addr:"address"},schema:{lootId:"uint256",userId:"uint256"}},Ownable:{schema:{owner:"address"}},GameConfig:{dataStruct:!1,schema:{merkleRoot:"bytes32",battleId:"uint256",randomId:"uint256",originX:"uint16",originY:"uint16",roomId:"uint256",boxId:"uint256"}},BattleConfig:{dataStruct:!1,schema:{maxAttackzDistance:"uint256",maxMoveDistance:"uint256",maxTimeLimit:"uint256",maxUserLocationLockTime:"uint256",maxBoxBindTime:"uint256",battlefieldPlayers:"address[]"}},Board:{keySchema:{addr:"address"},schema:{x:"uint16",y:"uint16"}},MapBoard:{keySchema:{x:"uint16",y:"uint16"},schema:{addresses:"address[]"}},RandomList:{keySchema:{id:"uint256"},schema:{blockNumber:"uint256",author:"address"}},BattleList:{keySchema:{battleId:"uint256"},schema:{attacker:"address",defender:"address",winner:"address",round:"uint16",attackerHP:"uint256",defenderHP:"uint256",isEnd:"bool",attackerState:"BattleState",defenderState:"BattleState",attackerAction:"bytes32",defenderAction:"bytes32",attackerBuffHash:"bytes32",defenderBuffHash:"bytes32",startTimestamp:"uint256",attackerArg:"uint256",defenderArg:"uint256",endTimestamp:"uint256"}},PlayerLocationLock:{keySchema:{addr:"address"},schema:{lockTime:"uint256"}},BoxList:{keySchema:{boxId:"uint256"},schema:{lockTime:"uint256",x:"uint16",y:"uint16",oreBalance:"uint16",treasureBalance:"uint16",randomId:"uint256",dropTime:"uint256",openTime:"uint256",opened:"bool",owner:"address"}},LootList1:{keySchema:{addr:"address"},schema:{weapon:"string",chest:"string",head:"string",waist:"string",foot:"string"}},LootList2:{keySchema:{addr:"address"},schema:{hand:"string",neck:"string",ring:"string"}},GlobalConfig:{dataStruct:!1,schema:{userContract:"address",lootContract:"address",pluginContract:"address"}}}});async function setupNetwork(){const _e=await getNetworkConfig(),et={chain:_e.chain,transport:Ee$1(fallback([webSocket(),http()])),pollingInterval:1e3},tt=createPublicClient(et),rt=J$1(_e.privateKey),nt=createWalletClient({...et,account:rt}),it=new Subject,at=me$1({address:_e.worldAddress,abi:IWorld__factory.abi,publicClient:tt,walletClient:nt,onWrite:pt=>it.next(pt)}),{components:st,latestBlock$:lt,blockStorageOperations$:dt,waitForTransaction:ht}=await ae$1({world,config:mudConfig,address:_e.worldAddress,publicClient:tt,startBlock:BigInt(_e.initialBlockNumber)});if(_e.faucetServiceUrl){const pt=rt.address;console.info("[Dev Faucet]: Player address -> ",pt);const mt=createFaucetService(_e.faucetServiceUrl),gt=async()=>{const vt=await tt.getBalance({address:pt});console.info(`[Dev Faucet]: Player balance -> ${vt}`),vt"u")throw new Error(et)}function warning(_e,et){if(!_e){typeof console<"u"&&console.warn(et);try{throw new Error(et)}catch{}}}function createKey(){return Math.random().toString(36).substr(2,8)}function getHistoryState(_e,et){return{usr:_e.state,key:_e.key,idx:et}}function createLocation(_e,et,tt,rt){return tt===void 0&&(tt=null),_extends$1({pathname:typeof _e=="string"?_e:_e.pathname,search:"",hash:""},typeof et=="string"?parsePath(et):et,{state:tt,key:et&&et.key||rt||createKey()})}function createPath(_e){let{pathname:et="/",search:tt="",hash:rt=""}=_e;return tt&&tt!=="?"&&(et+=tt.charAt(0)==="?"?tt:"?"+tt),rt&&rt!=="#"&&(et+=rt.charAt(0)==="#"?rt:"#"+rt),et}function parsePath(_e){let et={};if(_e){let tt=_e.indexOf("#");tt>=0&&(et.hash=_e.substr(tt),_e=_e.substr(0,tt));let rt=_e.indexOf("?");rt>=0&&(et.search=_e.substr(rt),_e=_e.substr(0,rt)),_e&&(et.pathname=_e)}return et}function getUrlBasedHistory(_e,et,tt,rt){rt===void 0&&(rt={});let{window:nt=document.defaultView,v5Compat:it=!1}=rt,at=nt.history,st=Action.Pop,lt=null,dt=ht();dt==null&&(dt=0,at.replaceState(_extends$1({},at.state,{idx:dt}),""));function ht(){return(at.state||{idx:null}).idx}function pt(){st=Action.Pop;let yt=ht(),bt=yt==null?null:yt-dt;dt=yt,lt&<({action:st,location:xt.location,delta:bt})}function mt(yt,bt){st=Action.Push;let wt=createLocation(xt.location,yt,bt);tt&&tt(wt,yt),dt=ht()+1;let Et=getHistoryState(wt,dt),$t=xt.createHref(wt);try{at.pushState(Et,"",$t)}catch(Pt){if(Pt instanceof DOMException&&Pt.name==="DataCloneError")throw Pt;nt.location.assign($t)}it&<&<({action:st,location:xt.location,delta:1})}function gt(yt,bt){st=Action.Replace;let wt=createLocation(xt.location,yt,bt);tt&&tt(wt,yt),dt=ht();let Et=getHistoryState(wt,dt),$t=xt.createHref(wt);at.replaceState(Et,"",$t),it&<&<({action:st,location:xt.location,delta:0})}function vt(yt){let bt=nt.location.origin!=="null"?nt.location.origin:nt.location.href,wt=typeof yt=="string"?yt:createPath(yt);return invariant(bt,"No window.location.(origin|href) available to create URL for href: "+wt),new URL(wt,bt)}let xt={get action(){return st},get location(){return _e(nt,at)},listen(yt){if(lt)throw new Error("A history only accepts one active listener");return nt.addEventListener(PopStateEventType,pt),lt=yt,()=>{nt.removeEventListener(PopStateEventType,pt),lt=null}},createHref(yt){return et(nt,yt)},createURL:vt,encodeLocation(yt){let bt=vt(yt);return{pathname:bt.pathname,search:bt.search,hash:bt.hash}},push:mt,replace:gt,go(yt){return at.go(yt)}};return xt}var ResultType;(function(_e){_e.data="data",_e.deferred="deferred",_e.redirect="redirect",_e.error="error"})(ResultType||(ResultType={}));function matchRoutes(_e,et,tt){tt===void 0&&(tt="/");let rt=typeof et=="string"?parsePath(et):et,nt=stripBasename(rt.pathname||"/",tt);if(nt==null)return null;let it=flattenRoutes(_e);rankRouteBranches(it);let at=null;for(let st=0;at==null&&st{let lt={relativePath:st===void 0?it.path||"":st,caseSensitive:it.caseSensitive===!0,childrenIndex:at,route:it};lt.relativePath.startsWith("/")&&(invariant(lt.relativePath.startsWith(rt),'Absolute route path "'+lt.relativePath+'" nested under path '+('"'+rt+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),lt.relativePath=lt.relativePath.slice(rt.length));let dt=joinPaths([rt,lt.relativePath]),ht=tt.concat(lt);it.children&&it.children.length>0&&(invariant(it.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+dt+'".')),flattenRoutes(it.children,et,ht,dt)),!(it.path==null&&!it.index)&&et.push({path:dt,score:computeScore(dt,it.index),routesMeta:ht})};return _e.forEach((it,at)=>{var st;if(it.path===""||!((st=it.path)!=null&&st.includes("?")))nt(it,at);else for(let lt of explodeOptionalSegments(it.path))nt(it,at,lt)}),et}function explodeOptionalSegments(_e){let et=_e.split("/");if(et.length===0)return[];let[tt,...rt]=et,nt=tt.endsWith("?"),it=tt.replace(/\?$/,"");if(rt.length===0)return nt?[it,""]:[it];let at=explodeOptionalSegments(rt.join("/")),st=[];return st.push(...at.map(lt=>lt===""?it:[it,lt].join("/"))),nt&&st.push(...at),st.map(lt=>_e.startsWith("/")&<===""?"/":lt)}function rankRouteBranches(_e){_e.sort((et,tt)=>et.score!==tt.score?tt.score-et.score:compareIndexes(et.routesMeta.map(rt=>rt.childrenIndex),tt.routesMeta.map(rt=>rt.childrenIndex)))}const paramRe=/^:\w+$/,dynamicSegmentValue=3,indexRouteValue=2,emptySegmentValue=1,staticSegmentValue=10,splatPenalty=-2,isSplat=_e=>_e==="*";function computeScore(_e,et){let tt=_e.split("/"),rt=tt.length;return tt.some(isSplat)&&(rt+=splatPenalty),et&&(rt+=indexRouteValue),tt.filter(nt=>!isSplat(nt)).reduce((nt,it)=>nt+(paramRe.test(it)?dynamicSegmentValue:it===""?emptySegmentValue:staticSegmentValue),rt)}function compareIndexes(_e,et){return _e.length===et.length&&_e.slice(0,-1).every((rt,nt)=>rt===et[nt])?_e[_e.length-1]-et[et.length-1]:0}function matchRouteBranch(_e,et){let{routesMeta:tt}=_e,rt={},nt="/",it=[];for(let at=0;at{if(ht==="*"){let mt=st[pt]||"";at=it.slice(0,it.length-mt.length).replace(/(.)\/+$/,"$1")}return dt[ht]=safelyDecodeURIComponent(st[pt]||"",ht),dt},{}),pathname:it,pathnameBase:at,pattern:_e}}function compilePath(_e,et,tt){et===void 0&&(et=!1),tt===void 0&&(tt=!0),warning(_e==="*"||!_e.endsWith("*")||_e.endsWith("/*"),'Route path "'+_e+'" will be treated as if it were '+('"'+_e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+_e.replace(/\*$/,"/*")+'".'));let rt=[],nt="^"+_e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(at,st)=>(rt.push(st),"/([^\\/]+)"));return _e.endsWith("*")?(rt.push("*"),nt+=_e==="*"||_e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):tt?nt+="\\/*$":_e!==""&&_e!=="/"&&(nt+="(?:(?=\\/|$))"),[new RegExp(nt,et?void 0:"i"),rt]}function safelyDecodeURI(_e){try{return decodeURI(_e)}catch(et){return warning(!1,'The URL path "'+_e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+et+").")),_e}}function safelyDecodeURIComponent(_e,et){try{return decodeURIComponent(_e)}catch(tt){return warning(!1,'The value for the URL param "'+et+'" will not be decoded because'+(' the string "'+_e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+tt+").")),_e}}function stripBasename(_e,et){if(et==="/")return _e;if(!_e.toLowerCase().startsWith(et.toLowerCase()))return null;let tt=et.endsWith("/")?et.length-1:et.length,rt=_e.charAt(tt);return rt&&rt!=="/"?null:_e.slice(tt)||"/"}function resolvePath(_e,et){et===void 0&&(et="/");let{pathname:tt,search:rt="",hash:nt=""}=typeof _e=="string"?parsePath(_e):_e;return{pathname:tt?tt.startsWith("/")?tt:resolvePathname(tt,et):et,search:normalizeSearch(rt),hash:normalizeHash(nt)}}function resolvePathname(_e,et){let tt=et.replace(/\/+$/,"").split("/");return _e.split("/").forEach(nt=>{nt===".."?tt.length>1&&tt.pop():nt!=="."&&tt.push(nt)}),tt.length>1?tt.join("/"):"/"}function getInvalidPathError(_e,et,tt,rt){return"Cannot include a '"+_e+"' character in a manually specified "+("`to."+et+"` field ["+JSON.stringify(rt)+"]. Please separate it out to the ")+("`to."+tt+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function getPathContributingMatches(_e){return _e.filter((et,tt)=>tt===0||et.route.path&&et.route.path.length>0)}function resolveTo(_e,et,tt,rt){rt===void 0&&(rt=!1);let nt;typeof _e=="string"?nt=parsePath(_e):(nt=_extends$1({},_e),invariant(!nt.pathname||!nt.pathname.includes("?"),getInvalidPathError("?","pathname","search",nt)),invariant(!nt.pathname||!nt.pathname.includes("#"),getInvalidPathError("#","pathname","hash",nt)),invariant(!nt.search||!nt.search.includes("#"),getInvalidPathError("#","search","hash",nt)));let it=_e===""||nt.pathname==="",at=it?"/":nt.pathname,st;if(rt||at==null)st=tt;else{let pt=et.length-1;if(at.startsWith("..")){let mt=at.split("/");for(;mt[0]==="..";)mt.shift(),pt-=1;nt.pathname=mt.join("/")}st=pt>=0?et[pt]:"/"}let lt=resolvePath(nt,st),dt=at&&at!=="/"&&at.endsWith("/"),ht=(it||at===".")&&tt.endsWith("/");return!lt.pathname.endsWith("/")&&(dt||ht)&&(lt.pathname+="/"),lt}const joinPaths=_e=>_e.join("/").replace(/\/\/+/g,"/"),normalizePathname=_e=>_e.replace(/\/+$/,"").replace(/^\/*/,"/"),normalizeSearch=_e=>!_e||_e==="?"?"":_e.startsWith("?")?_e:"?"+_e,normalizeHash=_e=>!_e||_e==="#"?"":_e.startsWith("#")?_e:"#"+_e;function isRouteErrorResponse(_e){return _e!=null&&typeof _e.status=="number"&&typeof _e.statusText=="string"&&typeof _e.internal=="boolean"&&"data"in _e}const validMutationMethodsArr=["post","put","patch","delete"];new Set(validMutationMethodsArr);const validRequestMethodsArr=["get",...validMutationMethodsArr];new Set(validRequestMethodsArr);/** + * React Router v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function _extends(){return _extends=Object.assign?Object.assign.bind():function(_e){for(var et=1;etlt.pathnameBase)),at=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{at.current=!0}),reactExports.useCallback(function(lt,dt){if(dt===void 0&&(dt={}),!at.current)return;if(typeof lt=="number"){tt.go(lt);return}let ht=resolveTo(lt,JSON.parse(it),nt,dt.relative==="path");_e==null&&et!=="/"&&(ht.pathname=ht.pathname==="/"?et:joinPaths([et,ht.pathname])),(dt.replace?tt.replace:tt.push)(ht,dt.state,dt)},[et,tt,it,nt,_e])}function useRoutes(_e,et){return useRoutesImpl(_e,et)}function useRoutesImpl(_e,et,tt){useInRouterContext()||invariant(!1);let{navigator:rt}=reactExports.useContext(NavigationContext),{matches:nt}=reactExports.useContext(RouteContext),it=nt[nt.length-1],at=it?it.params:{};it&&it.pathname;let st=it?it.pathnameBase:"/";it&&it.route;let lt=useLocation(),dt;if(et){var ht;let xt=typeof et=="string"?parsePath(et):et;st==="/"||(ht=xt.pathname)!=null&&ht.startsWith(st)||invariant(!1),dt=xt}else dt=lt;let pt=dt.pathname||"/",mt=st==="/"?pt:pt.slice(st.length)||"/",gt=matchRoutes(_e,{pathname:mt}),vt=_renderMatches(gt&>.map(xt=>Object.assign({},xt,{params:Object.assign({},at,xt.params),pathname:joinPaths([st,rt.encodeLocation?rt.encodeLocation(xt.pathname).pathname:xt.pathname]),pathnameBase:xt.pathnameBase==="/"?st:joinPaths([st,rt.encodeLocation?rt.encodeLocation(xt.pathnameBase).pathname:xt.pathnameBase])})),nt,tt);return et&&vt?reactExports.createElement(LocationContext.Provider,{value:{location:_extends({pathname:"/",search:"",hash:"",state:null,key:"default"},dt),navigationType:Action.Pop}},vt):vt}function DefaultErrorComponent(){let _e=useRouteError(),et=isRouteErrorResponse(_e)?_e.status+" "+_e.statusText:_e instanceof Error?_e.message:JSON.stringify(_e),tt=_e instanceof Error?_e.stack:null,nt={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},it=null;return reactExports.createElement(reactExports.Fragment,null,reactExports.createElement("h2",null,"Unexpected Application Error!"),reactExports.createElement("h3",{style:{fontStyle:"italic"}},et),tt?reactExports.createElement("pre",{style:nt},tt):null,it)}const defaultErrorElement=reactExports.createElement(DefaultErrorComponent,null);class RenderErrorBoundary extends reactExports.Component{constructor(et){super(et),this.state={location:et.location,revalidation:et.revalidation,error:et.error}}static getDerivedStateFromError(et){return{error:et}}static getDerivedStateFromProps(et,tt){return tt.location!==et.location||tt.revalidation!=="idle"&&et.revalidation==="idle"?{error:et.error,location:et.location,revalidation:et.revalidation}:{error:et.error||tt.error,location:tt.location,revalidation:et.revalidation||tt.revalidation}}componentDidCatch(et,tt){console.error("React Router caught the following error during render",et,tt)}render(){return this.state.error?reactExports.createElement(RouteContext.Provider,{value:this.props.routeContext},reactExports.createElement(RouteErrorContext.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function RenderedRoute(_e){let{routeContext:et,match:tt,children:rt}=_e,nt=reactExports.useContext(DataRouterContext);return nt&&nt.static&&nt.staticContext&&(tt.route.errorElement||tt.route.ErrorBoundary)&&(nt.staticContext._deepestRenderedBoundaryId=tt.route.id),reactExports.createElement(RouteContext.Provider,{value:et},rt)}function _renderMatches(_e,et,tt){var rt;if(et===void 0&&(et=[]),tt===void 0&&(tt=null),_e==null){var nt;if((nt=tt)!=null&&nt.errors)_e=tt.matches;else return null}let it=_e,at=(rt=tt)==null?void 0:rt.errors;if(at!=null){let st=it.findIndex(lt=>lt.route.id&&at?.[lt.route.id]);st>=0||invariant(!1),it=it.slice(0,Math.min(it.length,st+1))}return it.reduceRight((st,lt,dt)=>{let ht=lt.route.id?at?.[lt.route.id]:null,pt=null;tt&&(pt=lt.route.errorElement||defaultErrorElement);let mt=et.concat(it.slice(0,dt+1)),gt=()=>{let vt;return ht?vt=pt:lt.route.Component?vt=reactExports.createElement(lt.route.Component,null):lt.route.element?vt=lt.route.element:vt=st,reactExports.createElement(RenderedRoute,{match:lt,routeContext:{outlet:st,matches:mt,isDataRoute:tt!=null},children:vt})};return tt&&(lt.route.ErrorBoundary||lt.route.errorElement||dt===0)?reactExports.createElement(RenderErrorBoundary,{location:tt.location,revalidation:tt.revalidation,component:pt,error:ht,children:gt(),routeContext:{outlet:null,matches:mt,isDataRoute:!0}}):gt()},null)}var DataRouterHook$1=function(_e){return _e.UseBlocker="useBlocker",_e.UseRevalidator="useRevalidator",_e.UseNavigateStable="useNavigate",_e}(DataRouterHook$1||{}),DataRouterStateHook$1=function(_e){return _e.UseBlocker="useBlocker",_e.UseLoaderData="useLoaderData",_e.UseActionData="useActionData",_e.UseRouteError="useRouteError",_e.UseNavigation="useNavigation",_e.UseRouteLoaderData="useRouteLoaderData",_e.UseMatches="useMatches",_e.UseRevalidator="useRevalidator",_e.UseNavigateStable="useNavigate",_e.UseRouteId="useRouteId",_e}(DataRouterStateHook$1||{});function useDataRouterContext(_e){let et=reactExports.useContext(DataRouterContext);return et||invariant(!1),et}function useDataRouterState(_e){let et=reactExports.useContext(DataRouterStateContext);return et||invariant(!1),et}function useRouteContext(_e){let et=reactExports.useContext(RouteContext);return et||invariant(!1),et}function useCurrentRouteId(_e){let et=useRouteContext(),tt=et.matches[et.matches.length-1];return tt.route.id||invariant(!1),tt.route.id}function useRouteError(){var _e;let et=reactExports.useContext(RouteErrorContext),tt=useDataRouterState(DataRouterStateHook$1.UseRouteError),rt=useCurrentRouteId(DataRouterStateHook$1.UseRouteError);return et||((_e=tt.errors)==null?void 0:_e[rt])}function useNavigateStable(){let{router:_e}=useDataRouterContext(DataRouterHook$1.UseNavigateStable),et=useCurrentRouteId(DataRouterStateHook$1.UseNavigateStable),tt=reactExports.useRef(!1);return useIsomorphicLayoutEffect(()=>{tt.current=!0}),reactExports.useCallback(function(nt,it){it===void 0&&(it={}),tt.current&&(typeof nt=="number"?_e.navigate(nt):_e.navigate(nt,_extends({fromRouteId:et},it)))},[_e,et])}function Route(_e){invariant(!1)}function Router(_e){let{basename:et="/",children:tt=null,location:rt,navigationType:nt=Action.Pop,navigator:it,static:at=!1}=_e;useInRouterContext()&&invariant(!1);let st=et.replace(/^\/*/,"/"),lt=reactExports.useMemo(()=>({basename:st,navigator:it,static:at}),[st,it,at]);typeof rt=="string"&&(rt=parsePath(rt));let{pathname:dt="/",search:ht="",hash:pt="",state:mt=null,key:gt="default"}=rt,vt=reactExports.useMemo(()=>{let xt=stripBasename(dt,st);return xt==null?null:{location:{pathname:xt,search:ht,hash:pt,state:mt,key:gt},navigationType:nt}},[st,dt,ht,pt,mt,gt,nt]);return vt==null?null:reactExports.createElement(NavigationContext.Provider,{value:lt},reactExports.createElement(LocationContext.Provider,{children:tt,value:vt}))}function Routes(_e){let{children:et,location:tt}=_e;return useRoutes(createRoutesFromChildren(et),tt)}new Promise(()=>{});function createRoutesFromChildren(_e,et){et===void 0&&(et=[]);let tt=[];return reactExports.Children.forEach(_e,(rt,nt)=>{if(!reactExports.isValidElement(rt))return;let it=[...et,nt];if(rt.type===reactExports.Fragment){tt.push.apply(tt,createRoutesFromChildren(rt.props.children,it));return}rt.type!==Route&&invariant(!1),!rt.props.index||!rt.props.children||invariant(!1);let at={id:rt.props.id||it.join("-"),caseSensitive:rt.props.caseSensitive,element:rt.props.element,Component:rt.props.Component,index:rt.props.index,path:rt.props.path,loader:rt.props.loader,action:rt.props.action,errorElement:rt.props.errorElement,ErrorBoundary:rt.props.ErrorBoundary,hasErrorBoundary:rt.props.ErrorBoundary!=null||rt.props.errorElement!=null,shouldRevalidate:rt.props.shouldRevalidate,handle:rt.props.handle,lazy:rt.props.lazy};rt.props.children&&(at.children=createRoutesFromChildren(rt.props.children,it)),tt.push(at)}),tt}/** + * React Router DOM v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */const START_TRANSITION="startTransition",startTransitionImpl=React$1[START_TRANSITION];function BrowserRouter(_e){let{basename:et,children:tt,future:rt,window:nt}=_e,it=reactExports.useRef();it.current==null&&(it.current=createBrowserHistory({window:nt,v5Compat:!0}));let at=it.current,[st,lt]=reactExports.useState({action:at.action,location:at.location}),{v7_startTransition:dt}=rt||{},ht=reactExports.useCallback(pt=>{dt&&startTransitionImpl?startTransitionImpl(()=>lt(pt)):lt(pt)},[lt,dt]);return reactExports.useLayoutEffect(()=>at.listen(ht),[at,ht]),reactExports.createElement(Router,{basename:et,children:tt,location:st.location,navigationType:st.action,navigator:at})}var DataRouterHook;(function(_e){_e.UseScrollRestoration="useScrollRestoration",_e.UseSubmit="useSubmit",_e.UseSubmitFetcher="useSubmitFetcher",_e.UseFetcher="useFetcher"})(DataRouterHook||(DataRouterHook={}));var DataRouterStateHook;(function(_e){_e.UseFetchers="useFetchers",_e.UseScrollRestoration="useScrollRestoration"})(DataRouterStateHook||(DataRouterStateHook={}));const App$1="";function de(){return pipe(filter(_e=>_e!=null))}function Oe(_e){if(_e<2)throw new Error("Minimum size is 2");if(_e>64)throw new Error("Maximum size is 64");let et=2**(_e-1)-1,tt=-et-1;return rt=>{if(rt=rt<<0,rt>et||rtet,rt(_e[_e.Boolean=0]="Boolean",_e[_e.Number=1]="Number",_e[_e.OptionalNumber=2]="OptionalNumber",_e[_e.BigInt=3]="BigInt",_e[_e.OptionalBigInt=4]="OptionalBigInt",_e[_e.String=5]="String",_e[_e.OptionalString=6]="OptionalString",_e[_e.NumberArray=7]="NumberArray",_e[_e.OptionalNumberArray=8]="OptionalNumberArray",_e[_e.BigIntArray=9]="BigIntArray",_e[_e.OptionalBigIntArray=10]="OptionalBigIntArray",_e[_e.StringArray=11]="StringArray",_e[_e.OptionalStringArray=12]="OptionalStringArray",_e[_e.Entity=13]="Entity",_e[_e.OptionalEntity=14]="OptionalEntity",_e[_e.EntityArray=15]="EntityArray",_e[_e.OptionalEntityArray=16]="OptionalEntityArray",_e[_e.T=17]="T",_e[_e.OptionalT=18]="OptionalT",_e))(U||{}),F=(_e=>(_e[_e.Enter=0]="Enter",_e[_e.Exit=1]="Exit",_e[_e.Update=2]="Update",_e[_e.Noop=3]="Noop",_e))(F||{}),W=[14,16,2,8,4,10,6,12,18];function S(_e){return Symbol.for(_e)}function te(_e,et){let tt=x(et,_e);return{entity:_e,component:et,value:[tt,void 0],type:tt==null?3:0}}function Q(_e){return pipe(map(et=>te(et,_e)))}function $(_e){return"getEntitiesWithValue"in _e}function B(_e,et){return Object.keys(_e.schema).every(tt=>tt in et)}function v(_e,et){let tt=S(et);return Object.values(_e.values)[0].has(tt)}function x(_e,et){let tt={},rt=S(et),nt=Object.keys(_e.schema);for(let it of nt){let at=_e.values[it].get(rt);if(at===void 0&&!W.includes(_e.schema[it]))return;tt[it]=at}return tt}function M$1(_e,et){if(!_e&&!et)return!0;if(!_e||!et)return!1;let tt=!0;for(let rt of Object.keys(_e))if(tt=_e[rt]===et[rt],!tt)return!1;return tt}function P(_e,et){if($(_e)&&B(_e,et))return _e.getEntitiesWithValue(et);let tt=new Set;for(let rt of T(_e)){let nt=x(_e,rt);M$1(et,nt)&&tt.add(rt)}return tt}function T(_e){return _e.entities()}var L=(_e=>(_e[_e.Has=0]="Has",_e[_e.HasValue=1]="HasValue",_e[_e.Not=2]="Not",_e[_e.NotValue=3]="NotValue",_e[_e.ProxyRead=4]="ProxyRead",_e[_e.ProxyExpand=5]="ProxyExpand",_e))(L||{});function h(_e,et){if(et.type===0)return v(et.component,_e);if(et.type===1)return M$1(et.value,x(et.component,_e));if(et.type===2)return!v(et.component,_e);if(et.type===3)return!M$1(et.value,x(et.component,_e));throw new Error("Unknown query fragment")}function ce(_e){return _e.type===0||_e.type==1}function z(_e){return _e.type===2||_e.type==3}function fe(_e){return _e.type===5||_e.type==4}function Y(_e,et){return _e&&ce(et)||!_e&&z(et)}function K(_e,et,tt){let rt=_e,nt=!1;for(let it=0;it[...A(it,et,tt-1)]).flat();return new Set([...rt,...nt])}function J(_e,et){let tt=et?new Set([...et]):void 0,rt,nt;for(let it=0;it<_e.length;it++){let at=_e[it];if(fe(at))at.type===4&&(rt=at),at.type===5&&(nt=at);else if(tt)for(let st of[...tt]){let lt=h(st,at);if(rt&&rt.depth>0&&!Y(lt,at)&&(lt=K(st,at,rt)??lt),lt||tt.delete(st),nt&&nt.depth>0){let dt=A(st,nt.component,nt.depth);for(let ht of dt)(h(ht,at)||rt&&rt.depth>0&&K(ht,at,rt))&&tt.add(ht)}}else{if(z(at))throw new Error("First EntityQueryFragment must be Has or HasValue");if(tt=at.type===0?new Set([...T(at.component)]):P(at.component,at.value),nt&&nt.depth>0)for(let st of[...tt])for(let lt of A(st,nt.component,nt.depth))tt.add(lt)}}return tt??new Set}function O(_e,et){let tt=et?.runOnInit||et?.initialSet?J(_e,et.initialSet):new Set,rt=observable$2(tt),nt=from$1(rt).pipe(Q(_e[0].component)),it=_e.findIndex(ht=>[5,4].includes(ht.type))!==-1,at=merge$2(..._e.map(ht=>ht.component.update$)).pipe(it?concatMap(ht=>{let pt=J(_e,et?.initialSet),mt=[];for(let gt of rt)pt.has(gt)||(rt.delete(gt),mt.push({entity:gt,type:1,component:ht.component,value:[void 0,void 0]}));for(let gt of pt)rt.has(gt)?mt.push({entity:gt,type:2,component:ht.component,value:[x(ht.component,gt),void 0]}):(rt.add(gt),mt.push({entity:gt,type:0,component:ht.component,value:[x(ht.component,gt),void 0]}));return of$1(...mt)}):map(ht=>{if(rt.has(ht.entity))return _e.filter(pt=>pt.component.id===ht.component.id).every(pt=>h(ht.entity,pt))?{...ht,type:2}:(rt.delete(ht.entity),{...ht,type:1});if(_e.every(pt=>h(ht.entity,pt)))return rt.add(ht.entity),{...ht,type:0}}),de()),st=new Subject,lt=_e[0].component.world,dt=st.subscribe.bind(st);return st.subscribe=ht=>{let pt=at.subscribe(st);return lt.registerDisposer(()=>pt?.unsubscribe()),dt(ht)},{matching:rt,update$:concat$2(nt,st)}}var fastDeepEqual=function _e(et,tt){if(et===tt)return!0;if(et&&tt&&typeof et=="object"&&typeof tt=="object"){if(et.constructor!==tt.constructor)return!1;var rt,nt,it;if(Array.isArray(et)){if(rt=et.length,rt!=tt.length)return!1;for(nt=rt;nt--!==0;)if(!_e(et[nt],tt[nt]))return!1;return!0}if(et.constructor===RegExp)return et.source===tt.source&&et.flags===tt.flags;if(et.valueOf!==Object.prototype.valueOf)return et.valueOf()===tt.valueOf();if(et.toString!==Object.prototype.toString)return et.toString()===tt.toString();if(it=Object.keys(et),rt=it.length,rt!==Object.keys(tt).length)return!1;for(nt=rt;nt--!==0;)if(!Object.prototype.hasOwnProperty.call(tt,it[nt]))return!1;for(nt=rt;nt--!==0;){var at=it[nt];if(!_e(et[at],tt[at]))return!1}return!0}return et!==et&&tt!==tt};const M=getDefaultExportFromCjs(fastDeepEqual);var a=_e=>{let[et,tt]=reactExports.useState(_e);return reactExports.useEffect(()=>{M(_e,et)||tt(_e)},[_e]),et};function ne(_e,et){let tt=et?.updateOnValueChange??!0,rt=a(_e),nt=reactExports.useMemo(()=>O(rt,{runOnInit:!0}),[rt]),[it,at]=reactExports.useState([...nt.matching]);return reactExports.useEffect(()=>{at([...nt.matching]);let st=nt.update$.pipe(map(()=>[...nt.matching]));tt||(st=st.pipe(distinctUntilChanged((dt,ht)=>M(dt,ht))));let lt=st.subscribe(dt=>at(dt));return()=>lt.unsubscribe()},[nt,tt]),it}const MapConfig={visualWidth:24,visualHeight:16},LimitSpace={x:~~(MapConfig.visualWidth/2),y:~~(MapConfig.visualHeight/2)},CellType={immovable:101,blank:100,delivery:102},DELIVERY={x:4,y:5},MAP_CFG=[[101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101],[101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101],[101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101],[101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101],[101,101,101,100,100,100,100,100,100,100,100,101,101,101,100,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101],[101,101,101,100,100,100,100,100,100,100,100,101,101,101,100,101,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,100,100,100,100,100,100,100,100,101],[101,101,101,100,100,100,100,100,100,100,100,101,101,101,100,101,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,100,100,100,100,100,100,100,100,101],[101,101,101,100,100,100,100,100,100,100,100,101,101,101,100,101,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,100,100,100,100,100,100,100,100,101],[101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,100,100,100,100,100,100,100,100,101],[101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,100,101,101,101,101,101,100,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,100,101,101,101,100,101,101],[101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,100,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,100,101,101,101,100,101,101],[101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,100,101,101,101,101,101,100,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,100,101,101,101,100,101,101],[101,101,101,101,101,101,101,101,101,100,100,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,100,101,101,101,101,101,100,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,100,101,101],[101,101,101,101,101,101,101,101,101,100,100,101,101,101,101,101,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,100,101,101,101,101,100,100,100,100,101,101,101,101,101,101,100,101,100,101,101,101,101,100,101,101,101,101,101,101,101,100,101,101],[101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,100,101,101,101,101,100,100,100,100,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,100,101,101],[101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,100,100,100,100,101,101,100,100,100,100,101,100,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,100,100,100,100,101],[101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,100,100,100,100,101,101,100,100,100,100,101,100,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,100,100,100,100,101],[101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,100,100,100,100,101,101,100,100,100,100,101,100,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,100,100,100,100,101],[101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,100,100,100,100,100,100,101,100,100,100,100,101,101,100,100,100,100,101,100,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,100,100,100,100,101],[101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,100,100,100,100,100,100,101,100,100,100,100,101,101,101,101,100,101,101,100,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,100,100,100,100,101],[101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,100,100,100,100,100,100,101,100,100,100,100,101,101,101,101,100,101,101,100,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,100,100,100,100,101],[101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,100,100,100,100,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101],[101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,101,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101],[101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101],[101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101],[101,101,100,100,100,100,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,100,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101],[101,101,100,100,100,100,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,100,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101],[101,101,100,100,100,100,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,101,100,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101],[101,101,100,100,100,100,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,101,100,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101],[101,101,100,100,100,100,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,100,100,101,101,101,101,101,101],[101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,101,101],[101,100,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,101,101],[101,100,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,101,101],[101,100,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,101,101],[101,100,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,100,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,100,101,101],[101,100,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,100,100,101,101,101,101,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101],[101,100,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,100,100,100,100,100,100,100,100,100,100,101,101,101,101,100,100,100,101,101,101,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101],[101,100,101,100,100,100,100,100,100,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,100,101,101,101,101,101,101,100,100,100,100,101,101,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101],[101,100,101,100,100,100,100,100,100,101,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,101,100,101,100,100,100,100,101,100,100,100,100,100,101,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101],[101,100,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,100,101,100,100,100,100,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101],[101,100,101,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,100,100,100,100,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101],[101,100,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101],[101,100,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,100,100,100,100,101,101,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101],[101,100,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,100,100,100,100,101,101,101,101,101,101,101,101,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,101,101],[101,100,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,100,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,100,101,101],[101,100,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,100,101,101,101,101,100,100,100,100,100,100,100,100,101,101,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,100,101,101],[101,100,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,100,101,101,101,101,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,100,101,101],[101,100,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,100,101,101,101,101,100,100,100,100,100,100,100,100,101,101,100,100,100,101,100,100,100,100,100,100,101,101,101,101,101,100,101,101],[101,100,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,100,101,101,101,101,100,100,100,100,100,100,100,100,101,101,100,100,100,101,100,100,100,100,100,100,101,101,101,101,101,100,101,101],[101,100,101,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,100,100,100,101,100,100,100,100,100,100,101,101,101,101,101,100,101,101],[101,100,101,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,100,101,101,101,101,100,100,100,100,100,100,100,100,101,101,100,100,101,101,100,100,100,100,100,100,101,101,101,101,101,100,101,101],[101,100,101,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,100,101,101,101,101,100,100,100,100,100,100,100,100,101,101,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,100,101,101],[101,100,100,100,100,100,100,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,101],[101,101,101,101,101,101,101,100,100,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,101],[101,101,101,101,101,101,101,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,100,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,101],[101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,100,100,100,100,101],[101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101],[101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,101],[101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101],[101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101],[101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101],[101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101],[101,101,101,101,101,101,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,101,101,101,101,101,101,101,101,101,101,101,101],[101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101]],loadMapData=async()=>MAP_CFG,getNormalMovableCellClass=()=>{const _e=Math.random();return _e<.7?24:_e<.9?25:18},getBorderMovableCellClass=()=>Math.random()<.8?19:20,productWallIndexToFeIndex=_e=>_e<=3?_e+5:_e>=7?_e-7:_e-1,getAroundCellMovableConfig=(_e,et,tt)=>{const rt=et===0,nt=et===_e[0].length-1,it=tt===0,at=tt===_e.length-1,st=!it&&isMovable(_e[tt-1][et]),lt=!at&&isMovable(_e[tt+1][et]),dt=!rt&&isMovable(_e[tt][et-1]),ht=!nt&&isMovable(_e[tt][et+1]),pt=!(it||rt)&&isMovable(_e[tt-1][et-1]),mt=!(it||nt)&&isMovable(_e[tt-1][et+1]),gt=!(at||rt)&&isMovable(_e[tt+1][et-1]),vt=!(at||nt)&&isMovable(_e[tt+1][et+1]);return{topMovable:st,bottomMovable:lt,leftMovable:dt,rightMovable:ht,topLeftMovable:pt,topRightMovable:mt,bottomLeftMovable:gt,bottomRightMovable:vt}},getBlankCellClass=_e=>{const et=Array(9).fill(0),tt=[],{topMovable:rt,rightMovable:nt,topRightMovable:it}=_e;return rt&&nt?(et.forEach((at,st)=>{et[st]=getNormalMovableCellClass()}),it||(et[8]=22)):rt&&!nt?([3,6,9].forEach(at=>{et[at-1]=getBorderMovableCellClass(),tt.push({index:productWallIndexToFeIndex(at),transform:"rotate(90deg)"})}),[1,2,4,5,7,8].forEach(at=>{et[at-1]=getNormalMovableCellClass()})):!rt&&nt?([7,8,9].forEach(at=>{et[at-1]=getBorderMovableCellClass()}),[1,2,3,4,5,6].forEach(at=>{et[at-1]=getNormalMovableCellClass()})):(et[8]=21,et[6]=getBorderMovableCellClass(),et[7]=getBorderMovableCellClass(),[3,6].forEach(at=>{et[at-1]=getBorderMovableCellClass(),tt.push({index:productWallIndexToFeIndex(at),transform:"rotate(90deg)"})}),[1,2,4,5].forEach(at=>{et[at-1]=getNormalMovableCellClass()})),{transforms:tt,wallIndexArr:et}},getImmovableCellClass=_e=>{const et=Array(9).fill(0),tt=[],{topMovable:rt,bottomMovable:nt,leftMovable:it,rightMovable:at,topLeftMovable:st,topRightMovable:lt,bottomLeftMovable:dt,bottomRightMovable:ht}=_e;return[2,5].forEach(pt=>{et[pt-1]=nt?2:5}),[1,4].forEach(pt=>{nt?it?et[pt-1]=1:et[pt-1]=2:it?et[pt-1]=4:et[pt-1]=dt?4:5}),[3,6].forEach(pt=>{nt?at?et[pt-1]=3:et[pt-1]=2:at?et[pt-1]=6:et[pt-1]=ht?6:5}),rt?et[7]=12:et[7]=nt?10:5,rt?et[6]=it?8:12:nt?et[6]=it?7:10:it?et[6]=4:st?et[6]=9:!st&&!dt?et[6]=5:!st&&dt&&(et[6]=16),rt?at?et[8]=lt?13:6:et[8]=12:at?et[8]=ht&&nt?14:6:et[8]=lt?15:nt?10:ht?17:5,{transforms:tt,wallIndexArr:et}},getDeliveryCellClass=()=>({transforms:[{index:0,transform:"rotate(-90deg)"},{index:3,transform:"rotate(-90deg)"},{index:5,transform:"rotate(90deg)"},{index:6,transform:"rotate(180deg)"},{index:7,transform:"rotate(180deg)"},{index:8,transform:"rotate(90deg)"}],wallIndexArr:[27,26,27,26,28,26,27,26,27]}),getCellClass=(_e,et)=>{const{x:tt,y:rt}=et,nt=getAroundCellMovableConfig(_e,tt,rt);let it;switch(_e[rt][tt]){case CellType.delivery:it=getDeliveryCellClass();break;case CellType.blank:it=getBlankCellClass(nt);break;default:it=getImmovableCellClass(nt)}const{transforms:at,wallIndexArr:st}=it;return{transforms:at,classList:[...st.slice(6),...st.slice(3,6),...st.slice(0,3)]}},isMovable=_e=>_e!==CellType.immovable,bfs=(_e,et,tt)=>{const rt=_e.map(at=>[...at]);rt[et.y][et.x]=0;let nt=[[et]];const it=[[-1,0],[1,0],[0,-1],[0,1]];do{const at=[];if(nt.some(lt=>{const dt=lt[lt.length-1];return it.some(ht=>{const[pt,mt]=ht,gt=dt.x+pt,vt=dt.y+mt;return rt[vt][gt]===1&&(at.push([...lt,{x:gt,y:vt}]),rt[vt][gt]=0),gt===tt.x&&vt===tt.y})}))return at[at.length-1];nt=at}while(nt.length!==0);return[]},simplifyMapData=_e=>_e.length===0?_e:_e.map(et=>et.map(tt=>isMovable(tt)?1:0)),triggerVertexUpdate=(_e,et,tt,rt)=>{const nt=_e.x-et.x,it=_e.y-et.y;if(nt===1){const at=_e.x-rt.x>LimitSpace.x,st=rt.x+MapConfig.visualWidth0;at&&st&&rt.x--}else if(it===1){const at=_e.y-rt.y>LimitSpace.y,st=rt.y+MapConfig.visualHeight0;at&&st&&rt.y--}return{...rt}},getDistance=(_e,et)=>Math.sqrt(Math.pow(et.x-_e.x,2)+Math.pow(et.y-_e.y,2)),delay=(_e,et)=>new Promise(tt=>{setTimeout(tt.bind(null,et),_e)});Promise.prototype.delay=function(_e){return this.then(function(et){return delay(_e,et)})};const styles$f="",styles$e="",styles$d="",Fog=()=>jsxRuntimeExports.jsx("div",{className:"mi-map-fog"}),styles$c="",Appearance$1=_e=>{const{handheld:et,head:tt,clothes:rt,toward:nt}=_e;return jsxRuntimeExports.jsxs("div",{className:`mi-appearance-wrapper ${nt==="Right"?"appearance-right":""}`,children:[jsxRuntimeExports.jsx("img",{src:"/assets/img/duck/default.png",alt:"",className:"user-appearance"}),rt&&jsxRuntimeExports.jsx("img",{src:`/assets/img/duck/Clothes/${rt}.png`,alt:""}),et&&jsxRuntimeExports.jsx("img",{src:`/assets/img/duck/Handheld/${et}.png`,alt:""}),tt&&jsxRuntimeExports.jsx("img",{src:`/assets/img/duck/Head/${tt}.png`,alt:""})]})},PlayersMockData=[{id:3,username:"Me",x:5,y:4,gem:0,equip:{head:"ChristmasHat",handheld:"Beer",clothes:"Chain"}},{id:1,username:"Piter",x:18,y:10,gem:2,equip:{head:"HiTechGlasses",handheld:"Guitar",clothes:"Niddle"}},{id:6,username:"Tom",gem:5,x:18,y:13,equip:{head:"Robber",handheld:"Shield",clothes:"Deliver"}},{id:8,username:"Stone",x:18,y:13,gem:8,equip:{head:"Turban",handheld:"Wand",clothes:"Shirt"}}],CurIdMockData=3,GameContext=reactExports.createContext({curId:CurIdMockData,players:PlayersMockData,mapData:[[]],onPlayerMove:()=>{},treasureChest:[],openTreasureChest:()=>{}}),Player=_e=>{const{username:et,addr:tt,equip:rt,gem:nt=0,toward:it,waiting:at}=_e,{curAddr:st}=reactExports.useContext(GameContext);return jsxRuntimeExports.jsxs("div",{className:"mi-player",children:[jsxRuntimeExports.jsxs("div",{className:"player-info",children:[nt>0&&jsxRuntimeExports.jsx("span",{className:"gem-num",children:nt}),jsxRuntimeExports.jsx("span",{className:"player-username",children:et})]}),jsxRuntimeExports.jsx(Appearance$1,{toward:it,...rt}),tt===st&&jsxRuntimeExports.jsx(Fog,{}),at&&jsxRuntimeExports.jsx("div",{className:"waiting-tip",children:"Wait TX"})]})},styles$b="",TreasureChest=_e=>{const{openingBox:et}=reactExports.useContext(GameContext),tt=et===_e.id;return jsxRuntimeExports.jsx("div",{className:"mi-treasure-chest",children:jsxRuntimeExports.jsx("div",{className:`open-loading ${tt?"opening":""}`,children:jsxRuntimeExports.jsx("div",{className:"progress"})})})},MapCell=_e=>{const{coordinate:{x:et,y:tt},cellClassCache:rt,treasureChest:nt=[],players:it=[],onMoveTo:at,onExeAction:st,prevActionCoordinate:lt}=_e,[dt,ht]=reactExports.useState(!1),[pt,mt]=reactExports.useState(-1),{mapData:gt,openTreasureChest:vt,setStartBattle:xt,showUserInfo:yt,previewPath:bt,renderPreviewPaths:wt=[],curAddr:Et,players:$t}=reactExports.useContext(GameContext),Pt=DELIVERY.x===et&&DELIVERY.y===tt,kt=isMovable(gt[tt][et]);rt[`${tt}-${et}`]||(rt[`${tt}-${et}`]=getCellClass(gt,{x:et,y:tt}));const{transforms:Lt,classList:jt}=rt[`${tt}-${et}`],qt=Mt=>{if(st({x:et,y:tt}),Mt.preventDefault(),it.length>0||nt.length>0){Dt();return}kt&&at({x:et,y:tt})},Dt=()=>{st({x:et,y:tt});const Mt=$t.find(_t=>_t.addr===Et);if(Mt){if(nt.length>0&&getDistance({x:et,y:tt},Mt)<=1){vt(nt[0].id);return}it.length!==0&&(ht(!0),mt(it[0].addr))}},Ht=(Mt,_t)=>{Mt.stopPropagation(),ht(!1);const At=it.find(Tt=>Tt.addr===pt);switch(_t){case"move":at({x:et,y:tt});break;case"info":yt(At);break;case"attack":xt(At);break}};reactExports.useEffect(()=>{(lt.x!==et||lt.y!==tt)&&ht(!1)},[lt.x,lt.y]);const Xt=wt.find(Mt=>Mt.x===et&&Mt.y===tt);return jsxRuntimeExports.jsxs("div",{className:"mi-map-cell",onContextMenu:qt,onClick:Dt,onMouseEnter:()=>{kt&&bt(et,tt)},children:[jsxRuntimeExports.jsx("div",{className:"cell-map-box",children:jt.map((Mt,_t)=>{const At=Lt.find(Bt=>Bt.index===_t),Tt=At?{transform:At.transform}:{};return jsxRuntimeExports.jsx("div",{className:`inner-cell mi-wall-${Mt}`,style:Tt},`${et}-${tt}-${_t}`)})}),Xt&&jsxRuntimeExports.jsx("div",{className:`render-preview-path ${Xt.movable?"movable":""}`}),Pt&&jsxRuntimeExports.jsx("div",{className:"cell-map-delivery"}),nt.map(Mt=>reactExports.createElement(TreasureChest,{...Mt,key:Mt.id})),!Pt&&it.map(Mt=>jsxRuntimeExports.jsx(Player,{...Mt},Mt.addr)),dt&&jsxRuntimeExports.jsxs("div",{className:"mi-cell-user-menu",children:[it.length>1&&jsxRuntimeExports.jsx("ul",{className:"mi-cell-username-list",children:it.slice(0,3).map(Mt=>jsxRuntimeExports.jsx("li",{className:Mt.addr===pt?"active":"",onClick:_t=>{mt(Mt.addr),_t.stopPropagation()},children:Mt.username},Mt.addr))}),jsxRuntimeExports.jsxs("ul",{className:"mi-cell-action-menu",children:[pt!==Et&&jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("button",{className:"mi-btn",onClick:Mt=>Ht(Mt,"move"),children:"move"})}),pt!==Et&&jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("button",{className:"mi-btn",onClick:Mt=>Ht(Mt,"attack"),children:"attack"})}),jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx("button",{className:"mi-btn",onClick:Mt=>Ht(Mt,"info"),children:"info"})})]})]})]})},styles$a="";var dist={},MerkleTree$1={},buffer={},base64Js={};base64Js.byteLength=byteLength;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i=0,len=code.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var tt=_e.indexOf("=");tt===-1&&(tt=et);var rt=tt===et?0:4-tt%4;return[tt,rt]}function byteLength(_e){var et=getLens(_e),tt=et[0],rt=et[1];return(tt+rt)*3/4-rt}function _byteLength(_e,et,tt){return(et+tt)*3/4-tt}function toByteArray(_e){var et,tt=getLens(_e),rt=tt[0],nt=tt[1],it=new Arr(_byteLength(_e,rt,nt)),at=0,st=nt>0?rt-4:rt,lt;for(lt=0;lt>16&255,it[at++]=et>>8&255,it[at++]=et&255;return nt===2&&(et=revLookup[_e.charCodeAt(lt)]<<2|revLookup[_e.charCodeAt(lt+1)]>>4,it[at++]=et&255),nt===1&&(et=revLookup[_e.charCodeAt(lt)]<<10|revLookup[_e.charCodeAt(lt+1)]<<4|revLookup[_e.charCodeAt(lt+2)]>>2,it[at++]=et>>8&255,it[at++]=et&255),it}function tripletToBase64(_e){return lookup[_e>>18&63]+lookup[_e>>12&63]+lookup[_e>>6&63]+lookup[_e&63]}function encodeChunk(_e,et,tt){for(var rt,nt=[],it=et;itst?st:at+it));return rt===1?(et=_e[tt-1],nt.push(lookup[et>>2]+lookup[et<<4&63]+"==")):rt===2&&(et=(_e[tt-2]<<8)+_e[tt-1],nt.push(lookup[et>>10]+lookup[et>>4&63]+lookup[et<<2&63]+"=")),nt.join("")}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ieee754.read=function(_e,et,tt,rt,nt){var it,at,st=nt*8-rt-1,lt=(1<>1,ht=-7,pt=tt?nt-1:0,mt=tt?-1:1,gt=_e[et+pt];for(pt+=mt,it=gt&(1<<-ht)-1,gt>>=-ht,ht+=st;ht>0;it=it*256+_e[et+pt],pt+=mt,ht-=8);for(at=it&(1<<-ht)-1,it>>=-ht,ht+=rt;ht>0;at=at*256+_e[et+pt],pt+=mt,ht-=8);if(it===0)it=1-dt;else{if(it===lt)return at?NaN:(gt?-1:1)*(1/0);at=at+Math.pow(2,rt),it=it-dt}return(gt?-1:1)*at*Math.pow(2,it-rt)};ieee754.write=function(_e,et,tt,rt,nt,it){var at,st,lt,dt=it*8-nt-1,ht=(1<>1,mt=nt===23?Math.pow(2,-24)-Math.pow(2,-77):0,gt=rt?0:it-1,vt=rt?1:-1,xt=et<0||et===0&&1/et<0?1:0;for(et=Math.abs(et),isNaN(et)||et===1/0?(st=isNaN(et)?1:0,at=ht):(at=Math.floor(Math.log(et)/Math.LN2),et*(lt=Math.pow(2,-at))<1&&(at--,lt*=2),at+pt>=1?et+=mt/lt:et+=mt*Math.pow(2,1-pt),et*lt>=2&&(at++,lt/=2),at+pt>=ht?(st=0,at=ht):at+pt>=1?(st=(et*lt-1)*Math.pow(2,nt),at=at+pt):(st=et*Math.pow(2,pt-1)*Math.pow(2,nt),at=0));nt>=8;_e[tt+gt]=st&255,gt+=vt,st/=256,nt-=8);for(at=at<0;_e[tt+gt]=at&255,gt+=vt,at/=256,dt-=8);_e[tt+gt-vt]|=xt*128};/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */(function(_e){const et=base64Js,tt=ieee754,rt=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;_e.Buffer=st,_e.SlowBuffer=wt,_e.INSPECT_MAX_BYTES=50;const nt=2147483647;_e.kMaxLength=nt,st.TYPED_ARRAY_SUPPORT=it(),!st.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function it(){try{const zt=new Uint8Array(1),It={foo:function(){return 42}};return Object.setPrototypeOf(It,Uint8Array.prototype),Object.setPrototypeOf(zt,It),zt.foo()===42}catch{return!1}}Object.defineProperty(st.prototype,"parent",{enumerable:!0,get:function(){if(st.isBuffer(this))return this.buffer}}),Object.defineProperty(st.prototype,"offset",{enumerable:!0,get:function(){if(st.isBuffer(this))return this.byteOffset}});function at(zt){if(zt>nt)throw new RangeError('The value "'+zt+'" is invalid for option "size"');const It=new Uint8Array(zt);return Object.setPrototypeOf(It,st.prototype),It}function st(zt,It,Nt){if(typeof zt=="number"){if(typeof It=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return pt(zt)}return lt(zt,It,Nt)}st.poolSize=8192;function lt(zt,It,Nt){if(typeof zt=="string")return mt(zt,It);if(ArrayBuffer.isView(zt))return vt(zt);if(zt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof zt);if(Er(zt,ArrayBuffer)||zt&&Er(zt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Er(zt,SharedArrayBuffer)||zt&&Er(zt.buffer,SharedArrayBuffer)))return xt(zt,It,Nt);if(typeof zt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Gt=zt.valueOf&&zt.valueOf();if(Gt!=null&&Gt!==zt)return st.from(Gt,It,Nt);const er=yt(zt);if(er)return er;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof zt[Symbol.toPrimitive]=="function")return st.from(zt[Symbol.toPrimitive]("string"),It,Nt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof zt)}st.from=function(zt,It,Nt){return lt(zt,It,Nt)},Object.setPrototypeOf(st.prototype,Uint8Array.prototype),Object.setPrototypeOf(st,Uint8Array);function dt(zt){if(typeof zt!="number")throw new TypeError('"size" argument must be of type number');if(zt<0)throw new RangeError('The value "'+zt+'" is invalid for option "size"')}function ht(zt,It,Nt){return dt(zt),zt<=0?at(zt):It!==void 0?typeof Nt=="string"?at(zt).fill(It,Nt):at(zt).fill(It):at(zt)}st.alloc=function(zt,It,Nt){return ht(zt,It,Nt)};function pt(zt){return dt(zt),at(zt<0?0:bt(zt)|0)}st.allocUnsafe=function(zt){return pt(zt)},st.allocUnsafeSlow=function(zt){return pt(zt)};function mt(zt,It){if((typeof It!="string"||It==="")&&(It="utf8"),!st.isEncoding(It))throw new TypeError("Unknown encoding: "+It);const Nt=Et(zt,It)|0;let Gt=at(Nt);const er=Gt.write(zt,It);return er!==Nt&&(Gt=Gt.slice(0,er)),Gt}function gt(zt){const It=zt.length<0?0:bt(zt.length)|0,Nt=at(It);for(let Gt=0;Gt=nt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+nt.toString(16)+" bytes");return zt|0}function wt(zt){return+zt!=zt&&(zt=0),st.alloc(+zt)}st.isBuffer=function(It){return It!=null&&It._isBuffer===!0&&It!==st.prototype},st.compare=function(It,Nt){if(Er(It,Uint8Array)&&(It=st.from(It,It.offset,It.byteLength)),Er(Nt,Uint8Array)&&(Nt=st.from(Nt,Nt.offset,Nt.byteLength)),!st.isBuffer(It)||!st.isBuffer(Nt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(It===Nt)return 0;let Gt=It.length,er=Nt.length;for(let Yt=0,tr=Math.min(Gt,er);Yter.length?(st.isBuffer(tr)||(tr=st.from(tr)),tr.copy(er,Yt)):Uint8Array.prototype.set.call(er,tr,Yt);else if(st.isBuffer(tr))tr.copy(er,Yt);else throw new TypeError('"list" argument must be an Array of Buffers');Yt+=tr.length}return er};function Et(zt,It){if(st.isBuffer(zt))return zt.length;if(ArrayBuffer.isView(zt)||Er(zt,ArrayBuffer))return zt.byteLength;if(typeof zt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof zt);const Nt=zt.length,Gt=arguments.length>2&&arguments[2]===!0;if(!Gt&&Nt===0)return 0;let er=!1;for(;;)switch(It){case"ascii":case"latin1":case"binary":return Nt;case"utf8":case"utf-8":return ur(zt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nt*2;case"hex":return Nt>>>1;case"base64":return gr(zt).length;default:if(er)return Gt?-1:ur(zt).length;It=(""+It).toLowerCase(),er=!0}}st.byteLength=Et;function $t(zt,It,Nt){let Gt=!1;if((It===void 0||It<0)&&(It=0),It>this.length||((Nt===void 0||Nt>this.length)&&(Nt=this.length),Nt<=0)||(Nt>>>=0,It>>>=0,Nt<=It))return"";for(zt||(zt="utf8");;)switch(zt){case"hex":return Ut(this,It,Nt);case"utf8":case"utf-8":return _t(this,It,Nt);case"ascii":return Bt(this,It,Nt);case"latin1":case"binary":return Ot(this,It,Nt);case"base64":return Mt(this,It,Nt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Wt(this,It,Nt);default:if(Gt)throw new TypeError("Unknown encoding: "+zt);zt=(zt+"").toLowerCase(),Gt=!0}}st.prototype._isBuffer=!0;function Pt(zt,It,Nt){const Gt=zt[It];zt[It]=zt[Nt],zt[Nt]=Gt}st.prototype.swap16=function(){const It=this.length;if(It%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Nt=0;NtNt&&(It+=" ... "),""},rt&&(st.prototype[rt]=st.prototype.inspect),st.prototype.compare=function(It,Nt,Gt,er,Yt){if(Er(It,Uint8Array)&&(It=st.from(It,It.offset,It.byteLength)),!st.isBuffer(It))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof It);if(Nt===void 0&&(Nt=0),Gt===void 0&&(Gt=It?It.length:0),er===void 0&&(er=0),Yt===void 0&&(Yt=this.length),Nt<0||Gt>It.length||er<0||Yt>this.length)throw new RangeError("out of range index");if(er>=Yt&&Nt>=Gt)return 0;if(er>=Yt)return-1;if(Nt>=Gt)return 1;if(Nt>>>=0,Gt>>>=0,er>>>=0,Yt>>>=0,this===It)return 0;let tr=Yt-er,dr=Gt-Nt;const br=Math.min(tr,dr),Qt=this.slice(er,Yt),sr=It.slice(Nt,Gt);for(let cr=0;cr2147483647?Nt=2147483647:Nt<-2147483648&&(Nt=-2147483648),Nt=+Nt,_r(Nt)&&(Nt=er?0:zt.length-1),Nt<0&&(Nt=zt.length+Nt),Nt>=zt.length){if(er)return-1;Nt=zt.length-1}else if(Nt<0)if(er)Nt=0;else return-1;if(typeof It=="string"&&(It=st.from(It,Gt)),st.isBuffer(It))return It.length===0?-1:Lt(zt,It,Nt,Gt,er);if(typeof It=="number")return It=It&255,typeof Uint8Array.prototype.indexOf=="function"?er?Uint8Array.prototype.indexOf.call(zt,It,Nt):Uint8Array.prototype.lastIndexOf.call(zt,It,Nt):Lt(zt,[It],Nt,Gt,er);throw new TypeError("val must be string, number or Buffer")}function Lt(zt,It,Nt,Gt,er){let Yt=1,tr=zt.length,dr=It.length;if(Gt!==void 0&&(Gt=String(Gt).toLowerCase(),Gt==="ucs2"||Gt==="ucs-2"||Gt==="utf16le"||Gt==="utf-16le")){if(zt.length<2||It.length<2)return-1;Yt=2,tr/=2,dr/=2,Nt/=2}function br(sr,cr){return Yt===1?sr[cr]:sr.readUInt16BE(cr*Yt)}let Qt;if(er){let sr=-1;for(Qt=Nt;Qttr&&(Nt=tr-dr),Qt=Nt;Qt>=0;Qt--){let sr=!0;for(let cr=0;crer&&(Gt=er)):Gt=er;const Yt=It.length;Gt>Yt/2&&(Gt=Yt/2);let tr;for(tr=0;tr>>0,isFinite(Gt)?(Gt=Gt>>>0,er===void 0&&(er="utf8")):(er=Gt,Gt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Yt=this.length-Nt;if((Gt===void 0||Gt>Yt)&&(Gt=Yt),It.length>0&&(Gt<0||Nt<0)||Nt>this.length)throw new RangeError("Attempt to write outside buffer bounds");er||(er="utf8");let tr=!1;for(;;)switch(er){case"hex":return jt(this,It,Nt,Gt);case"utf8":case"utf-8":return qt(this,It,Nt,Gt);case"ascii":case"latin1":case"binary":return Dt(this,It,Nt,Gt);case"base64":return Ht(this,It,Nt,Gt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xt(this,It,Nt,Gt);default:if(tr)throw new TypeError("Unknown encoding: "+er);er=(""+er).toLowerCase(),tr=!0}},st.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Mt(zt,It,Nt){return It===0&&Nt===zt.length?et.fromByteArray(zt):et.fromByteArray(zt.slice(It,Nt))}function _t(zt,It,Nt){Nt=Math.min(zt.length,Nt);const Gt=[];let er=It;for(;er239?4:Yt>223?3:Yt>191?2:1;if(er+dr<=Nt){let br,Qt,sr,cr;switch(dr){case 1:Yt<128&&(tr=Yt);break;case 2:br=zt[er+1],(br&192)===128&&(cr=(Yt&31)<<6|br&63,cr>127&&(tr=cr));break;case 3:br=zt[er+1],Qt=zt[er+2],(br&192)===128&&(Qt&192)===128&&(cr=(Yt&15)<<12|(br&63)<<6|Qt&63,cr>2047&&(cr<55296||cr>57343)&&(tr=cr));break;case 4:br=zt[er+1],Qt=zt[er+2],sr=zt[er+3],(br&192)===128&&(Qt&192)===128&&(sr&192)===128&&(cr=(Yt&15)<<18|(br&63)<<12|(Qt&63)<<6|sr&63,cr>65535&&cr<1114112&&(tr=cr))}}tr===null?(tr=65533,dr=1):tr>65535&&(tr-=65536,Gt.push(tr>>>10&1023|55296),tr=56320|tr&1023),Gt.push(tr),er+=dr}return Tt(Gt)}const At=4096;function Tt(zt){const It=zt.length;if(It<=At)return String.fromCharCode.apply(String,zt);let Nt="",Gt=0;for(;GtGt)&&(Nt=Gt);let er="";for(let Yt=It;YtGt&&(It=Gt),Nt<0?(Nt+=Gt,Nt<0&&(Nt=0)):Nt>Gt&&(Nt=Gt),NtNt)throw new RangeError("Trying to access beyond buffer length")}st.prototype.readUintLE=st.prototype.readUIntLE=function(It,Nt,Gt){It=It>>>0,Nt=Nt>>>0,Gt||Ct(It,Nt,this.length);let er=this[It],Yt=1,tr=0;for(;++tr>>0,Nt=Nt>>>0,Gt||Ct(It,Nt,this.length);let er=this[It+--Nt],Yt=1;for(;Nt>0&&(Yt*=256);)er+=this[It+--Nt]*Yt;return er},st.prototype.readUint8=st.prototype.readUInt8=function(It,Nt){return It=It>>>0,Nt||Ct(It,1,this.length),this[It]},st.prototype.readUint16LE=st.prototype.readUInt16LE=function(It,Nt){return It=It>>>0,Nt||Ct(It,2,this.length),this[It]|this[It+1]<<8},st.prototype.readUint16BE=st.prototype.readUInt16BE=function(It,Nt){return It=It>>>0,Nt||Ct(It,2,this.length),this[It]<<8|this[It+1]},st.prototype.readUint32LE=st.prototype.readUInt32LE=function(It,Nt){return It=It>>>0,Nt||Ct(It,4,this.length),(this[It]|this[It+1]<<8|this[It+2]<<16)+this[It+3]*16777216},st.prototype.readUint32BE=st.prototype.readUInt32BE=function(It,Nt){return It=It>>>0,Nt||Ct(It,4,this.length),this[It]*16777216+(this[It+1]<<16|this[It+2]<<8|this[It+3])},st.prototype.readBigUInt64LE=Dr(function(It){It=It>>>0,pr(It,"offset");const Nt=this[It],Gt=this[It+7];(Nt===void 0||Gt===void 0)&&nr(It,this.length-8);const er=Nt+this[++It]*2**8+this[++It]*2**16+this[++It]*2**24,Yt=this[++It]+this[++It]*2**8+this[++It]*2**16+Gt*2**24;return BigInt(er)+(BigInt(Yt)<>>0,pr(It,"offset");const Nt=this[It],Gt=this[It+7];(Nt===void 0||Gt===void 0)&&nr(It,this.length-8);const er=Nt*2**24+this[++It]*2**16+this[++It]*2**8+this[++It],Yt=this[++It]*2**24+this[++It]*2**16+this[++It]*2**8+Gt;return(BigInt(er)<>>0,Nt=Nt>>>0,Gt||Ct(It,Nt,this.length);let er=this[It],Yt=1,tr=0;for(;++tr=Yt&&(er-=Math.pow(2,8*Nt)),er},st.prototype.readIntBE=function(It,Nt,Gt){It=It>>>0,Nt=Nt>>>0,Gt||Ct(It,Nt,this.length);let er=Nt,Yt=1,tr=this[It+--er];for(;er>0&&(Yt*=256);)tr+=this[It+--er]*Yt;return Yt*=128,tr>=Yt&&(tr-=Math.pow(2,8*Nt)),tr},st.prototype.readInt8=function(It,Nt){return It=It>>>0,Nt||Ct(It,1,this.length),this[It]&128?(255-this[It]+1)*-1:this[It]},st.prototype.readInt16LE=function(It,Nt){It=It>>>0,Nt||Ct(It,2,this.length);const Gt=this[It]|this[It+1]<<8;return Gt&32768?Gt|4294901760:Gt},st.prototype.readInt16BE=function(It,Nt){It=It>>>0,Nt||Ct(It,2,this.length);const Gt=this[It+1]|this[It]<<8;return Gt&32768?Gt|4294901760:Gt},st.prototype.readInt32LE=function(It,Nt){return It=It>>>0,Nt||Ct(It,4,this.length),this[It]|this[It+1]<<8|this[It+2]<<16|this[It+3]<<24},st.prototype.readInt32BE=function(It,Nt){return It=It>>>0,Nt||Ct(It,4,this.length),this[It]<<24|this[It+1]<<16|this[It+2]<<8|this[It+3]},st.prototype.readBigInt64LE=Dr(function(It){It=It>>>0,pr(It,"offset");const Nt=this[It],Gt=this[It+7];(Nt===void 0||Gt===void 0)&&nr(It,this.length-8);const er=this[It+4]+this[It+5]*2**8+this[It+6]*2**16+(Gt<<24);return(BigInt(er)<>>0,pr(It,"offset");const Nt=this[It],Gt=this[It+7];(Nt===void 0||Gt===void 0)&&nr(It,this.length-8);const er=(Nt<<24)+this[++It]*2**16+this[++It]*2**8+this[++It];return(BigInt(er)<>>0,Nt||Ct(It,4,this.length),tt.read(this,It,!0,23,4)},st.prototype.readFloatBE=function(It,Nt){return It=It>>>0,Nt||Ct(It,4,this.length),tt.read(this,It,!1,23,4)},st.prototype.readDoubleLE=function(It,Nt){return It=It>>>0,Nt||Ct(It,8,this.length),tt.read(this,It,!0,52,8)},st.prototype.readDoubleBE=function(It,Nt){return It=It>>>0,Nt||Ct(It,8,this.length),tt.read(this,It,!1,52,8)};function St(zt,It,Nt,Gt,er,Yt){if(!st.isBuffer(zt))throw new TypeError('"buffer" argument must be a Buffer instance');if(It>er||Itzt.length)throw new RangeError("Index out of range")}st.prototype.writeUintLE=st.prototype.writeUIntLE=function(It,Nt,Gt,er){if(It=+It,Nt=Nt>>>0,Gt=Gt>>>0,!er){const dr=Math.pow(2,8*Gt)-1;St(this,It,Nt,Gt,dr,0)}let Yt=1,tr=0;for(this[Nt]=It&255;++tr>>0,Gt=Gt>>>0,!er){const dr=Math.pow(2,8*Gt)-1;St(this,It,Nt,Gt,dr,0)}let Yt=Gt-1,tr=1;for(this[Nt+Yt]=It&255;--Yt>=0&&(tr*=256);)this[Nt+Yt]=It/tr&255;return Nt+Gt},st.prototype.writeUint8=st.prototype.writeUInt8=function(It,Nt,Gt){return It=+It,Nt=Nt>>>0,Gt||St(this,It,Nt,1,255,0),this[Nt]=It&255,Nt+1},st.prototype.writeUint16LE=st.prototype.writeUInt16LE=function(It,Nt,Gt){return It=+It,Nt=Nt>>>0,Gt||St(this,It,Nt,2,65535,0),this[Nt]=It&255,this[Nt+1]=It>>>8,Nt+2},st.prototype.writeUint16BE=st.prototype.writeUInt16BE=function(It,Nt,Gt){return It=+It,Nt=Nt>>>0,Gt||St(this,It,Nt,2,65535,0),this[Nt]=It>>>8,this[Nt+1]=It&255,Nt+2},st.prototype.writeUint32LE=st.prototype.writeUInt32LE=function(It,Nt,Gt){return It=+It,Nt=Nt>>>0,Gt||St(this,It,Nt,4,4294967295,0),this[Nt+3]=It>>>24,this[Nt+2]=It>>>16,this[Nt+1]=It>>>8,this[Nt]=It&255,Nt+4},st.prototype.writeUint32BE=st.prototype.writeUInt32BE=function(It,Nt,Gt){return It=+It,Nt=Nt>>>0,Gt||St(this,It,Nt,4,4294967295,0),this[Nt]=It>>>24,this[Nt+1]=It>>>16,this[Nt+2]=It>>>8,this[Nt+3]=It&255,Nt+4};function Ft(zt,It,Nt,Gt,er){ir(It,Gt,er,zt,Nt,7);let Yt=Number(It&BigInt(4294967295));zt[Nt++]=Yt,Yt=Yt>>8,zt[Nt++]=Yt,Yt=Yt>>8,zt[Nt++]=Yt,Yt=Yt>>8,zt[Nt++]=Yt;let tr=Number(It>>BigInt(32)&BigInt(4294967295));return zt[Nt++]=tr,tr=tr>>8,zt[Nt++]=tr,tr=tr>>8,zt[Nt++]=tr,tr=tr>>8,zt[Nt++]=tr,Nt}function Vt(zt,It,Nt,Gt,er){ir(It,Gt,er,zt,Nt,7);let Yt=Number(It&BigInt(4294967295));zt[Nt+7]=Yt,Yt=Yt>>8,zt[Nt+6]=Yt,Yt=Yt>>8,zt[Nt+5]=Yt,Yt=Yt>>8,zt[Nt+4]=Yt;let tr=Number(It>>BigInt(32)&BigInt(4294967295));return zt[Nt+3]=tr,tr=tr>>8,zt[Nt+2]=tr,tr=tr>>8,zt[Nt+1]=tr,tr=tr>>8,zt[Nt]=tr,Nt+8}st.prototype.writeBigUInt64LE=Dr(function(It,Nt=0){return Ft(this,It,Nt,BigInt(0),BigInt("0xffffffffffffffff"))}),st.prototype.writeBigUInt64BE=Dr(function(It,Nt=0){return Vt(this,It,Nt,BigInt(0),BigInt("0xffffffffffffffff"))}),st.prototype.writeIntLE=function(It,Nt,Gt,er){if(It=+It,Nt=Nt>>>0,!er){const br=Math.pow(2,8*Gt-1);St(this,It,Nt,Gt,br-1,-br)}let Yt=0,tr=1,dr=0;for(this[Nt]=It&255;++Yt>0)-dr&255;return Nt+Gt},st.prototype.writeIntBE=function(It,Nt,Gt,er){if(It=+It,Nt=Nt>>>0,!er){const br=Math.pow(2,8*Gt-1);St(this,It,Nt,Gt,br-1,-br)}let Yt=Gt-1,tr=1,dr=0;for(this[Nt+Yt]=It&255;--Yt>=0&&(tr*=256);)It<0&&dr===0&&this[Nt+Yt+1]!==0&&(dr=1),this[Nt+Yt]=(It/tr>>0)-dr&255;return Nt+Gt},st.prototype.writeInt8=function(It,Nt,Gt){return It=+It,Nt=Nt>>>0,Gt||St(this,It,Nt,1,127,-128),It<0&&(It=255+It+1),this[Nt]=It&255,Nt+1},st.prototype.writeInt16LE=function(It,Nt,Gt){return It=+It,Nt=Nt>>>0,Gt||St(this,It,Nt,2,32767,-32768),this[Nt]=It&255,this[Nt+1]=It>>>8,Nt+2},st.prototype.writeInt16BE=function(It,Nt,Gt){return It=+It,Nt=Nt>>>0,Gt||St(this,It,Nt,2,32767,-32768),this[Nt]=It>>>8,this[Nt+1]=It&255,Nt+2},st.prototype.writeInt32LE=function(It,Nt,Gt){return It=+It,Nt=Nt>>>0,Gt||St(this,It,Nt,4,2147483647,-2147483648),this[Nt]=It&255,this[Nt+1]=It>>>8,this[Nt+2]=It>>>16,this[Nt+3]=It>>>24,Nt+4},st.prototype.writeInt32BE=function(It,Nt,Gt){return It=+It,Nt=Nt>>>0,Gt||St(this,It,Nt,4,2147483647,-2147483648),It<0&&(It=4294967295+It+1),this[Nt]=It>>>24,this[Nt+1]=It>>>16,this[Nt+2]=It>>>8,this[Nt+3]=It&255,Nt+4},st.prototype.writeBigInt64LE=Dr(function(It,Nt=0){return Ft(this,It,Nt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),st.prototype.writeBigInt64BE=Dr(function(It,Nt=0){return Vt(this,It,Nt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Rt(zt,It,Nt,Gt,er,Yt){if(Nt+Gt>zt.length)throw new RangeError("Index out of range");if(Nt<0)throw new RangeError("Index out of range")}function Kt(zt,It,Nt,Gt,er){return It=+It,Nt=Nt>>>0,er||Rt(zt,It,Nt,4),tt.write(zt,It,Nt,Gt,23,4),Nt+4}st.prototype.writeFloatLE=function(It,Nt,Gt){return Kt(this,It,Nt,!0,Gt)},st.prototype.writeFloatBE=function(It,Nt,Gt){return Kt(this,It,Nt,!1,Gt)};function Zt(zt,It,Nt,Gt,er){return It=+It,Nt=Nt>>>0,er||Rt(zt,It,Nt,8),tt.write(zt,It,Nt,Gt,52,8),Nt+8}st.prototype.writeDoubleLE=function(It,Nt,Gt){return Zt(this,It,Nt,!0,Gt)},st.prototype.writeDoubleBE=function(It,Nt,Gt){return Zt(this,It,Nt,!1,Gt)},st.prototype.copy=function(It,Nt,Gt,er){if(!st.isBuffer(It))throw new TypeError("argument should be a Buffer");if(Gt||(Gt=0),!er&&er!==0&&(er=this.length),Nt>=It.length&&(Nt=It.length),Nt||(Nt=0),er>0&&er=this.length)throw new RangeError("Index out of range");if(er<0)throw new RangeError("sourceEnd out of bounds");er>this.length&&(er=this.length),It.length-Nt>>0,Gt=Gt===void 0?this.length:Gt>>>0,It||(It=0);let Yt;if(typeof It=="number")for(Yt=Nt;Yt2**32?er=or(String(Nt)):typeof Nt=="bigint"&&(er=String(Nt),(Nt>BigInt(2)**BigInt(32)||Nt<-(BigInt(2)**BigInt(32)))&&(er=or(er)),er+="n"),Gt+=` It must be ${It}. Received ${er}`,Gt},RangeError);function or(zt){let It="",Nt=zt.length;const Gt=zt[0]==="-"?1:0;for(;Nt>=Gt+4;Nt-=3)It=`_${zt.slice(Nt-3,Nt)}${It}`;return`${zt.slice(0,Nt)}${It}`}function ar(zt,It,Nt){pr(It,"offset"),(zt[It]===void 0||zt[It+Nt]===void 0)&&nr(It,zt.length-(Nt+1))}function ir(zt,It,Nt,Gt,er,Yt){if(zt>Nt||zt3?It===0||It===BigInt(0)?dr=`>= 0${tr} and < 2${tr} ** ${(Yt+1)*8}${tr}`:dr=`>= -(2${tr} ** ${(Yt+1)*8-1}${tr}) and < 2 ** ${(Yt+1)*8-1}${tr}`:dr=`>= ${It}${tr} and <= ${Nt}${tr}`,new Jt.ERR_OUT_OF_RANGE("value",dr,zt)}ar(Gt,er,Yt)}function pr(zt,It){if(typeof zt!="number")throw new Jt.ERR_INVALID_ARG_TYPE(It,"number",zt)}function nr(zt,It,Nt){throw Math.floor(zt)!==zt?(pr(zt,Nt),new Jt.ERR_OUT_OF_RANGE(Nt||"offset","an integer",zt)):It<0?new Jt.ERR_BUFFER_OUT_OF_BOUNDS:new Jt.ERR_OUT_OF_RANGE(Nt||"offset",`>= ${Nt?1:0} and <= ${It}`,zt)}const hr=/[^+/0-9A-Za-z-_]/g;function Ar(zt){if(zt=zt.split("=")[0],zt=zt.trim().replace(hr,""),zt.length<2)return"";for(;zt.length%4!==0;)zt=zt+"=";return zt}function ur(zt,It){It=It||1/0;let Nt;const Gt=zt.length;let er=null;const Yt=[];for(let tr=0;tr55295&&Nt<57344){if(!er){if(Nt>56319){(It-=3)>-1&&Yt.push(239,191,189);continue}else if(tr+1===Gt){(It-=3)>-1&&Yt.push(239,191,189);continue}er=Nt;continue}if(Nt<56320){(It-=3)>-1&&Yt.push(239,191,189),er=Nt;continue}Nt=(er-55296<<10|Nt-56320)+65536}else er&&(It-=3)>-1&&Yt.push(239,191,189);if(er=null,Nt<128){if((It-=1)<0)break;Yt.push(Nt)}else if(Nt<2048){if((It-=2)<0)break;Yt.push(Nt>>6|192,Nt&63|128)}else if(Nt<65536){if((It-=3)<0)break;Yt.push(Nt>>12|224,Nt>>6&63|128,Nt&63|128)}else if(Nt<1114112){if((It-=4)<0)break;Yt.push(Nt>>18|240,Nt>>12&63|128,Nt>>6&63|128,Nt&63|128)}else throw new Error("Invalid code point")}return Yt}function vr(zt){const It=[];for(let Nt=0;Nt>8,er=Nt%256,Yt.push(er),Yt.push(Gt);return Yt}function gr(zt){return et.toByteArray(Ar(zt))}function yr(zt,It,Nt,Gt){let er;for(er=0;er=It.length||er>=zt.length);++er)It[er+Nt]=zt[er];return er}function Er(zt,It){return zt instanceof It||zt!=null&&zt.constructor!=null&&zt.constructor.name!=null&&zt.constructor.name===It.name}function _r(zt){return zt!==zt}const $r=function(){const zt="0123456789abcdef",It=new Array(256);for(let Nt=0;Nt<16;++Nt){const Gt=Nt*16;for(let er=0;er<16;++er)It[Gt+er]=zt[Nt]+zt[er]}return It}();function Dr(zt){return typeof BigInt>"u"?kr:zt}function kr(){throw new Error("BigInt not supported")}})(buffer);var bufferReverse=function _e(et){for(var tt=new Buffer(et.length),rt=0,nt=et.length-1;rt<=nt;++rt,--nt)tt[rt]=et[nt],tt[nt]=et[rt];return tt},sha256={exports:{}},core={exports:{}},hasRequiredCore;function requireCore(){return hasRequiredCore||(hasRequiredCore=1,function(_e,et){(function(tt,rt){_e.exports=rt()})(commonjsGlobal,function(){var tt=tt||function(rt,nt){var it=Object.create||function(){function yt(){}return function(bt){var wt;return yt.prototype=bt,wt=new yt,yt.prototype=null,wt}}(),at={},st=at.lib={},lt=st.Base=function(){return{extend:function(yt){var bt=it(this);return yt&&bt.mixIn(yt),(!bt.hasOwnProperty("init")||this.init===bt.init)&&(bt.init=function(){bt.$super.init.apply(this,arguments)}),bt.init.prototype=bt,bt.$super=this,bt},create:function(){var yt=this.extend();return yt.init.apply(yt,arguments),yt},init:function(){},mixIn:function(yt){for(var bt in yt)yt.hasOwnProperty(bt)&&(this[bt]=yt[bt]);yt.hasOwnProperty("toString")&&(this.toString=yt.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),dt=st.WordArray=lt.extend({init:function(yt,bt){yt=this.words=yt||[],bt!=nt?this.sigBytes=bt:this.sigBytes=yt.length*4},toString:function(yt){return(yt||pt).stringify(this)},concat:function(yt){var bt=this.words,wt=yt.words,Et=this.sigBytes,$t=yt.sigBytes;if(this.clamp(),Et%4)for(var Pt=0;Pt<$t;Pt++){var kt=wt[Pt>>>2]>>>24-Pt%4*8&255;bt[Et+Pt>>>2]|=kt<<24-(Et+Pt)%4*8}else for(var Pt=0;Pt<$t;Pt+=4)bt[Et+Pt>>>2]=wt[Pt>>>2];return this.sigBytes+=$t,this},clamp:function(){var yt=this.words,bt=this.sigBytes;yt[bt>>>2]&=4294967295<<32-bt%4*8,yt.length=rt.ceil(bt/4)},clone:function(){var yt=lt.clone.call(this);return yt.words=this.words.slice(0),yt},random:function(yt){for(var bt=[],wt=function(Lt){var Lt=Lt,jt=987654321,qt=4294967295;return function(){jt=36969*(jt&65535)+(jt>>16)&qt,Lt=18e3*(Lt&65535)+(Lt>>16)&qt;var Dt=(jt<<16)+Lt&qt;return Dt/=4294967296,Dt+=.5,Dt*(rt.random()>.5?1:-1)}},Et=0,$t;Et>>2]>>>24-$t%4*8&255;Et.push((Pt>>>4).toString(16)),Et.push((Pt&15).toString(16))}return Et.join("")},parse:function(yt){for(var bt=yt.length,wt=[],Et=0;Et>>3]|=parseInt(yt.substr(Et,2),16)<<24-Et%8*4;return new dt.init(wt,bt/2)}},mt=ht.Latin1={stringify:function(yt){for(var bt=yt.words,wt=yt.sigBytes,Et=[],$t=0;$t>>2]>>>24-$t%4*8&255;Et.push(String.fromCharCode(Pt))}return Et.join("")},parse:function(yt){for(var bt=yt.length,wt=[],Et=0;Et>>2]|=(yt.charCodeAt(Et)&255)<<24-Et%4*8;return new dt.init(wt,bt)}},gt=ht.Utf8={stringify:function(yt){try{return decodeURIComponent(escape(mt.stringify(yt)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(yt){return mt.parse(unescape(encodeURIComponent(yt)))}},vt=st.BufferedBlockAlgorithm=lt.extend({reset:function(){this._data=new dt.init,this._nDataBytes=0},_append:function(yt){typeof yt=="string"&&(yt=gt.parse(yt)),this._data.concat(yt),this._nDataBytes+=yt.sigBytes},_process:function(yt){var bt=this._data,wt=bt.words,Et=bt.sigBytes,$t=this.blockSize,Pt=$t*4,kt=Et/Pt;yt?kt=rt.ceil(kt):kt=rt.max((kt|0)-this._minBufferSize,0);var Lt=kt*$t,jt=rt.min(Lt*4,Et);if(Lt){for(var qt=0;qt>>7)^(qt<<14|qt>>>18)^qt>>>3,Ht=pt[jt-2],Xt=(Ht<<15|Ht>>>17)^(Ht<<13|Ht>>>19)^Ht>>>10;pt[jt]=Dt+pt[jt-7]+Xt+pt[jt-16]}var Mt=$t&Pt^~$t&kt,_t=yt&bt^yt&wt^bt&wt,At=(yt<<30|yt>>>2)^(yt<<19|yt>>>13)^(yt<<10|yt>>>22),Tt=($t<<26|$t>>>6)^($t<<21|$t>>>11)^($t<<7|$t>>>25),Bt=Lt+Tt+Mt+ht[jt]+pt[jt],Ot=At+_t;Lt=kt,kt=Pt,Pt=$t,$t=Et+Bt|0,Et=wt,wt=bt,bt=yt,yt=Bt+Ot|0}xt[0]=xt[0]+yt|0,xt[1]=xt[1]+bt|0,xt[2]=xt[2]+wt|0,xt[3]=xt[3]+Et|0,xt[4]=xt[4]+$t|0,xt[5]=xt[5]+Pt|0,xt[6]=xt[6]+kt|0,xt[7]=xt[7]+Lt|0},_doFinalize:function(){var gt=this._data,vt=gt.words,xt=this._nDataBytes*8,yt=gt.sigBytes*8;return vt[yt>>>5]|=128<<24-yt%32,vt[(yt+64>>>9<<4)+14]=rt.floor(xt/4294967296),vt[(yt+64>>>9<<4)+15]=xt,gt.sigBytes=vt.length*4,this._process(),this._hash},clone:function(){var gt=st.clone.call(this);return gt._hash=this._hash.clone(),gt}});nt.SHA256=st._createHelper(mt),nt.HmacSHA256=st._createHmacHelper(mt)}(Math),tt.SHA256})})(sha256);var sha256Exports=sha256.exports,treeify={exports:{}};(function(_e,et){(function(tt,rt){_e.exports=rt()})(commonjsGlobal,function(){function tt(at,st){var lt=st?"└":"├";return at?lt+="─ ":lt+="──┐",lt}function rt(at,st){var lt=[];for(var dt in at)at.hasOwnProperty(dt)&&(st&&typeof at[dt]=="function"||lt.push(dt));return lt}function nt(at,st,lt,dt,ht,pt,mt){var gt="",vt=0,xt,yt,bt=dt.slice(0);if(bt.push([st,lt])&&dt.length>0&&(dt.forEach(function(Et,$t){$t>0&&(gt+=(Et[1]?" ":"│")+" "),!yt&&Et[0]===st&&(yt=!0)}),gt+=tt(at,lt)+at,ht&&(typeof st!="object"||st instanceof Date)&&(gt+=": "+st),yt&&(gt+=" (circular ref.)"),mt(gt)),!yt&&typeof st=="object"){var wt=rt(st,pt);wt.forEach(function(Et){xt=++vt===wt.length,nt(Et,st[Et],xt,bt,ht,pt,mt)})}}var it={};return it.asLines=function(at,st,lt,dt){var ht=typeof lt!="function"?lt:!1;nt(".",at,!1,[],st,ht,dt||lt)},it.asTree=function(at,st,lt){var dt="";return nt(".",at,!1,[],st,lt,function(ht){dt+=ht+` +`}),dt},it})})(treeify);var treeifyExports=treeify.exports,Base$1={},cryptoJs={exports:{}},x64Core={exports:{}},hasRequiredX64Core;function requireX64Core(){return hasRequiredX64Core||(hasRequiredX64Core=1,function(_e,et){(function(tt,rt){_e.exports=rt(requireCore())})(commonjsGlobal,function(tt){return function(rt){var nt=tt,it=nt.lib,at=it.Base,st=it.WordArray,lt=nt.x64={};lt.Word=at.extend({init:function(dt,ht){this.high=dt,this.low=ht}}),lt.WordArray=at.extend({init:function(dt,ht){dt=this.words=dt||[],ht!=rt?this.sigBytes=ht:this.sigBytes=dt.length*8},toX32:function(){for(var dt=this.words,ht=dt.length,pt=[],mt=0;mt>>2]|=lt[pt]<<24-pt%4*8;at.call(this,ht,dt)}else at.apply(this,arguments)};st.prototype=it}}(),tt.lib.WordArray})}(libTypedarrays)),libTypedarrays.exports}var encUtf16={exports:{}},hasRequiredEncUtf16;function requireEncUtf16(){return hasRequiredEncUtf16||(hasRequiredEncUtf16=1,function(_e,et){(function(tt,rt){_e.exports=rt(requireCore())})(commonjsGlobal,function(tt){return function(){var rt=tt,nt=rt.lib,it=nt.WordArray,at=rt.enc;at.Utf16=at.Utf16BE={stringify:function(lt){for(var dt=lt.words,ht=lt.sigBytes,pt=[],mt=0;mt>>2]>>>16-mt%4*8&65535;pt.push(String.fromCharCode(gt))}return pt.join("")},parse:function(lt){for(var dt=lt.length,ht=[],pt=0;pt>>1]|=lt.charCodeAt(pt)<<16-pt%2*16;return it.create(ht,dt*2)}},at.Utf16LE={stringify:function(lt){for(var dt=lt.words,ht=lt.sigBytes,pt=[],mt=0;mt>>2]>>>16-mt%4*8&65535);pt.push(String.fromCharCode(gt))}return pt.join("")},parse:function(lt){for(var dt=lt.length,ht=[],pt=0;pt>>1]|=st(lt.charCodeAt(pt)<<16-pt%2*16);return it.create(ht,dt*2)}};function st(lt){return lt<<8&4278255360|lt>>>8&16711935}}(),tt.enc.Utf16})}(encUtf16)),encUtf16.exports}var encBase64={exports:{}},hasRequiredEncBase64;function requireEncBase64(){return hasRequiredEncBase64||(hasRequiredEncBase64=1,function(_e,et){(function(tt,rt){_e.exports=rt(requireCore())})(commonjsGlobal,function(tt){return function(){var rt=tt,nt=rt.lib,it=nt.WordArray,at=rt.enc;at.Base64={stringify:function(lt){var dt=lt.words,ht=lt.sigBytes,pt=this._map;lt.clamp();for(var mt=[],gt=0;gt>>2]>>>24-gt%4*8&255,xt=dt[gt+1>>>2]>>>24-(gt+1)%4*8&255,yt=dt[gt+2>>>2]>>>24-(gt+2)%4*8&255,bt=vt<<16|xt<<8|yt,wt=0;wt<4&>+wt*.75>>6*(3-wt)&63));var Et=pt.charAt(64);if(Et)for(;mt.length%4;)mt.push(Et);return mt.join("")},parse:function(lt){var dt=lt.length,ht=this._map,pt=this._reverseMap;if(!pt){pt=this._reverseMap=[];for(var mt=0;mt>>6-gt%4*2;pt[mt>>>2]|=(vt|xt)<<24-mt%4*8,mt++}return it.create(pt,mt)}}(),tt.enc.Base64})}(encBase64)),encBase64.exports}var md5={exports:{}},hasRequiredMd5;function requireMd5(){return hasRequiredMd5||(hasRequiredMd5=1,function(_e,et){(function(tt,rt){_e.exports=rt(requireCore())})(commonjsGlobal,function(tt){return function(rt){var nt=tt,it=nt.lib,at=it.WordArray,st=it.Hasher,lt=nt.algo,dt=[];(function(){for(var xt=0;xt<64;xt++)dt[xt]=rt.abs(rt.sin(xt+1))*4294967296|0})();var ht=lt.MD5=st.extend({_doReset:function(){this._hash=new at.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(xt,yt){for(var bt=0;bt<16;bt++){var wt=yt+bt,Et=xt[wt];xt[wt]=(Et<<8|Et>>>24)&16711935|(Et<<24|Et>>>8)&4278255360}var $t=this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,6,dt[56]),Vt=vt(Vt,Ct,St,Ft,Wt,10,dt[57]),Ft=vt(Ft,Vt,Ct,St,Ht,15,dt[58]),St=vt(St,Ft,Vt,Ct,Ot,21,dt[59]),Ct=vt(Ct,St,Ft,Vt,qt,6,dt[60]),Vt=vt(Vt,Ct,St,Ft,Tt,10,dt[61]),Ft=vt(Ft,Vt,Ct,St,Lt,15,dt[62]),St=vt(St,Ft,Vt,Ct,_t,21,dt[63]),$t[0]=$t[0]+Ct|0,$t[1]=$t[1]+St|0,$t[2]=$t[2]+Ft|0,$t[3]=$t[3]+Vt|0},_doFinalize:function(){var xt=this._data,yt=xt.words,bt=this._nDataBytes*8,wt=xt.sigBytes*8;yt[wt>>>5]|=128<<24-wt%32;var Et=rt.floor(bt/4294967296),$t=bt;yt[(wt+64>>>9<<4)+15]=(Et<<8|Et>>>24)&16711935|(Et<<24|Et>>>8)&4278255360,yt[(wt+64>>>9<<4)+14]=($t<<8|$t>>>24)&16711935|($t<<24|$t>>>8)&4278255360,xt.sigBytes=(yt.length+1)*4,this._process();for(var Pt=this._hash,kt=Pt.words,Lt=0;Lt<4;Lt++){var jt=kt[Lt];kt[Lt]=(jt<<8|jt>>>24)&16711935|(jt<<24|jt>>>8)&4278255360}return Pt},clone:function(){var xt=st.clone.call(this);return xt._hash=this._hash.clone(),xt}});function pt(xt,yt,bt,wt,Et,$t,Pt){var kt=xt+(yt&bt|~yt&wt)+Et+Pt;return(kt<<$t|kt>>>32-$t)+yt}function mt(xt,yt,bt,wt,Et,$t,Pt){var kt=xt+(yt&wt|bt&~wt)+Et+Pt;return(kt<<$t|kt>>>32-$t)+yt}function gt(xt,yt,bt,wt,Et,$t,Pt){var kt=xt+(yt^bt^wt)+Et+Pt;return(kt<<$t|kt>>>32-$t)+yt}function vt(xt,yt,bt,wt,Et,$t,Pt){var kt=xt+(bt^(yt|~wt))+Et+Pt;return(kt<<$t|kt>>>32-$t)+yt}nt.MD5=st._createHelper(ht),nt.HmacMD5=st._createHmacHelper(ht)}(Math),tt.MD5})}(md5)),md5.exports}var sha1={exports:{}},hasRequiredSha1;function requireSha1(){return hasRequiredSha1||(hasRequiredSha1=1,function(_e,et){(function(tt,rt){_e.exports=rt(requireCore())})(commonjsGlobal,function(tt){return function(){var rt=tt,nt=rt.lib,it=nt.WordArray,at=nt.Hasher,st=rt.algo,lt=[],dt=st.SHA1=at.extend({_doReset:function(){this._hash=new it.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(ht,pt){for(var mt=this._hash.words,gt=mt[0],vt=mt[1],xt=mt[2],yt=mt[3],bt=mt[4],wt=0;wt<80;wt++){if(wt<16)lt[wt]=ht[pt+wt]|0;else{var Et=lt[wt-3]^lt[wt-8]^lt[wt-14]^lt[wt-16];lt[wt]=Et<<1|Et>>>31}var $t=(gt<<5|gt>>>27)+bt+lt[wt];wt<20?$t+=(vt&xt|~vt&yt)+1518500249:wt<40?$t+=(vt^xt^yt)+1859775393:wt<60?$t+=(vt&xt|vt&yt|xt&yt)-1894007588:$t+=(vt^xt^yt)-899497514,bt=yt,yt=xt,xt=vt<<30|vt>>>2,vt=gt,gt=$t}mt[0]=mt[0]+gt|0,mt[1]=mt[1]+vt|0,mt[2]=mt[2]+xt|0,mt[3]=mt[3]+yt|0,mt[4]=mt[4]+bt|0},_doFinalize:function(){var ht=this._data,pt=ht.words,mt=this._nDataBytes*8,gt=ht.sigBytes*8;return pt[gt>>>5]|=128<<24-gt%32,pt[(gt+64>>>9<<4)+14]=Math.floor(mt/4294967296),pt[(gt+64>>>9<<4)+15]=mt,ht.sigBytes=pt.length*4,this._process(),this._hash},clone:function(){var ht=at.clone.call(this);return ht._hash=this._hash.clone(),ht}});rt.SHA1=at._createHelper(dt),rt.HmacSHA1=at._createHmacHelper(dt)}(),tt.SHA1})}(sha1)),sha1.exports}var sha224={exports:{}},hasRequiredSha224;function requireSha224(){return hasRequiredSha224||(hasRequiredSha224=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),sha256Exports)})(commonjsGlobal,function(tt){return function(){var rt=tt,nt=rt.lib,it=nt.WordArray,at=rt.algo,st=at.SHA256,lt=at.SHA224=st.extend({_doReset:function(){this._hash=new it.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var dt=st._doFinalize.call(this);return dt.sigBytes-=4,dt}});rt.SHA224=st._createHelper(lt),rt.HmacSHA224=st._createHmacHelper(lt)}(),tt.SHA224})}(sha224)),sha224.exports}var sha512={exports:{}},hasRequiredSha512;function requireSha512(){return hasRequiredSha512||(hasRequiredSha512=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireX64Core())})(commonjsGlobal,function(tt){return function(){var rt=tt,nt=rt.lib,it=nt.Hasher,at=rt.x64,st=at.Word,lt=at.WordArray,dt=rt.algo;function ht(){return st.create.apply(st,arguments)}var pt=[ht(1116352408,3609767458),ht(1899447441,602891725),ht(3049323471,3964484399),ht(3921009573,2173295548),ht(961987163,4081628472),ht(1508970993,3053834265),ht(2453635748,2937671579),ht(2870763221,3664609560),ht(3624381080,2734883394),ht(310598401,1164996542),ht(607225278,1323610764),ht(1426881987,3590304994),ht(1925078388,4068182383),ht(2162078206,991336113),ht(2614888103,633803317),ht(3248222580,3479774868),ht(3835390401,2666613458),ht(4022224774,944711139),ht(264347078,2341262773),ht(604807628,2007800933),ht(770255983,1495990901),ht(1249150122,1856431235),ht(1555081692,3175218132),ht(1996064986,2198950837),ht(2554220882,3999719339),ht(2821834349,766784016),ht(2952996808,2566594879),ht(3210313671,3203337956),ht(3336571891,1034457026),ht(3584528711,2466948901),ht(113926993,3758326383),ht(338241895,168717936),ht(666307205,1188179964),ht(773529912,1546045734),ht(1294757372,1522805485),ht(1396182291,2643833823),ht(1695183700,2343527390),ht(1986661051,1014477480),ht(2177026350,1206759142),ht(2456956037,344077627),ht(2730485921,1290863460),ht(2820302411,3158454273),ht(3259730800,3505952657),ht(3345764771,106217008),ht(3516065817,3606008344),ht(3600352804,1432725776),ht(4094571909,1467031594),ht(275423344,851169720),ht(430227734,3100823752),ht(506948616,1363258195),ht(659060556,3750685593),ht(883997877,3785050280),ht(958139571,3318307427),ht(1322822218,3812723403),ht(1537002063,2003034995),ht(1747873779,3602036899),ht(1955562222,1575990012),ht(2024104815,1125592928),ht(2227730452,2716904306),ht(2361852424,442776044),ht(2428436474,593698344),ht(2756734187,3733110249),ht(3204031479,2999351573),ht(3329325298,3815920427),ht(3391569614,3928383900),ht(3515267271,566280711),ht(3940187606,3454069534),ht(4118630271,4000239992),ht(116418474,1914138554),ht(174292421,2731055270),ht(289380356,3203993006),ht(460393269,320620315),ht(685471733,587496836),ht(852142971,1086792851),ht(1017036298,365543100),ht(1126000580,2618297676),ht(1288033470,3409855158),ht(1501505948,4234509866),ht(1607167915,987167468),ht(1816402316,1246189591)],mt=[];(function(){for(var vt=0;vt<80;vt++)mt[vt]=ht()})();var gt=dt.SHA512=it.extend({_doReset:function(){this._hash=new lt.init([new st.init(1779033703,4089235720),new st.init(3144134277,2227873595),new st.init(1013904242,4271175723),new st.init(2773480762,1595750129),new st.init(1359893119,2917565137),new st.init(2600822924,725511199),new st.init(528734635,4215389547),new st.init(1541459225,327033209)])},_doProcessBlock:function(vt,xt){for(var yt=this._hash.words,bt=yt[0],wt=yt[1],Et=yt[2],$t=yt[3],Pt=yt[4],kt=yt[5],Lt=yt[6],jt=yt[7],qt=bt.high,Dt=bt.low,Ht=wt.high,Xt=wt.low,Mt=Et.high,_t=Et.low,At=$t.high,Tt=$t.low,Bt=Pt.high,Ot=Pt.low,Ut=kt.high,Wt=kt.low,Ct=Lt.high,St=Lt.low,Ft=jt.high,Vt=jt.low,Rt=qt,Kt=Dt,Zt=Ht,Jt=Xt,rr=Mt,or=_t,ar=At,ir=Tt,pr=Bt,nr=Ot,hr=Ut,Ar=Wt,ur=Ct,vr=St,wr=Ft,gr=Vt,yr=0;yr<80;yr++){var Er=mt[yr];if(yr<16)var _r=Er.high=vt[xt+yr*2]|0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r,ir=or,rr=Zt,or=Jt,Zt=Rt,Jt=Kt,Kt=Zr+jr|0,Rt=Rr+Yr+(Kt>>>0>>0?1:0)|0}Dt=bt.low=Dt+Kt,bt.high=qt+Rt+(Dt>>>0>>0?1:0),Xt=wt.low=Xt+Jt,wt.high=Ht+Zt+(Xt>>>0>>0?1:0),_t=Et.low=_t+or,Et.high=Mt+rr+(_t>>>0>>0?1:0),Tt=$t.low=Tt+ir,$t.high=At+ar+(Tt>>>0>>0?1:0),Ot=Pt.low=Ot+nr,Pt.high=Bt+pr+(Ot>>>0>>0?1:0),Wt=kt.low=Wt+Ar,kt.high=Ut+hr+(Wt>>>0>>0?1:0),St=Lt.low=St+vr,Lt.high=Ct+ur+(St>>>0>>0?1:0),Vt=jt.low=Vt+gr,jt.high=Ft+wr+(Vt>>>0>>0?1:0)},_doFinalize:function(){var vt=this._data,xt=vt.words,yt=this._nDataBytes*8,bt=vt.sigBytes*8;xt[bt>>>5]|=128<<24-bt%32,xt[(bt+128>>>10<<5)+30]=Math.floor(yt/4294967296),xt[(bt+128>>>10<<5)+31]=yt,vt.sigBytes=xt.length*4,this._process();var wt=this._hash.toX32();return wt},clone:function(){var vt=it.clone.call(this);return vt._hash=this._hash.clone(),vt},blockSize:1024/32});rt.SHA512=it._createHelper(gt),rt.HmacSHA512=it._createHmacHelper(gt)}(),tt.SHA512})}(sha512)),sha512.exports}var sha384={exports:{}},hasRequiredSha384;function requireSha384(){return hasRequiredSha384||(hasRequiredSha384=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireX64Core(),requireSha512())})(commonjsGlobal,function(tt){return function(){var rt=tt,nt=rt.x64,it=nt.Word,at=nt.WordArray,st=rt.algo,lt=st.SHA512,dt=st.SHA384=lt.extend({_doReset:function(){this._hash=new at.init([new it.init(3418070365,3238371032),new it.init(1654270250,914150663),new it.init(2438529370,812702999),new it.init(355462360,4144912697),new it.init(1731405415,4290775857),new it.init(2394180231,1750603025),new it.init(3675008525,1694076839),new it.init(1203062813,3204075428)])},_doFinalize:function(){var ht=lt._doFinalize.call(this);return ht.sigBytes-=16,ht}});rt.SHA384=lt._createHelper(dt),rt.HmacSHA384=lt._createHmacHelper(dt)}(),tt.SHA384})}(sha384)),sha384.exports}var sha3={exports:{}},hasRequiredSha3;function requireSha3(){return hasRequiredSha3||(hasRequiredSha3=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireX64Core())})(commonjsGlobal,function(tt){return function(rt){var nt=tt,it=nt.lib,at=it.WordArray,st=it.Hasher,lt=nt.x64,dt=lt.Word,ht=nt.algo,pt=[],mt=[],gt=[];(function(){for(var yt=1,bt=0,wt=0;wt<24;wt++){pt[yt+5*bt]=(wt+1)*(wt+2)/2%64;var Et=bt%5,$t=(2*yt+3*bt)%5;yt=Et,bt=$t}for(var yt=0;yt<5;yt++)for(var bt=0;bt<5;bt++)mt[yt+5*bt]=bt+(2*yt+3*bt)%5*5;for(var Pt=1,kt=0;kt<24;kt++){for(var Lt=0,jt=0,qt=0;qt<7;qt++){if(Pt&1){var Dt=(1<>>24)&16711935|(Pt<<24|Pt>>>8)&4278255360,kt=(kt<<8|kt>>>24)&16711935|(kt<<24|kt>>>8)&4278255360;var Lt=wt[$t];Lt.high^=kt,Lt.low^=Pt}for(var jt=0;jt<24;jt++){for(var qt=0;qt<5;qt++){for(var Dt=0,Ht=0,Xt=0;Xt<5;Xt++){var Lt=wt[qt+5*Xt];Dt^=Lt.high,Ht^=Lt.low}var Mt=vt[qt];Mt.high=Dt,Mt.low=Ht}for(var qt=0;qt<5;qt++)for(var _t=vt[(qt+4)%5],At=vt[(qt+1)%5],Tt=At.high,Bt=At.low,Dt=_t.high^(Tt<<1|Bt>>>31),Ht=_t.low^(Bt<<1|Tt>>>31),Xt=0;Xt<5;Xt++){var Lt=wt[qt+5*Xt];Lt.high^=Dt,Lt.low^=Ht}for(var Ot=1;Ot<25;Ot++){var Lt=wt[Ot],Ut=Lt.high,Wt=Lt.low,Ct=pt[Ot];if(Ct<32)var Dt=Ut<>>32-Ct,Ht=Wt<>>32-Ct;else var Dt=Wt<>>64-Ct,Ht=Ut<>>64-Ct;var St=vt[mt[Ot]];St.high=Dt,St.low=Ht}var Ft=vt[0],Vt=wt[0];Ft.high=Vt.high,Ft.low=Vt.low;for(var qt=0;qt<5;qt++)for(var Xt=0;Xt<5;Xt++){var Ot=qt+5*Xt,Lt=wt[Ot],Rt=vt[Ot],Kt=vt[(qt+1)%5+5*Xt],Zt=vt[(qt+2)%5+5*Xt];Lt.high=Rt.high^~Kt.high&Zt.high,Lt.low=Rt.low^~Kt.low&Zt.low}var Lt=wt[0],Jt=gt[jt];Lt.high^=Jt.high,Lt.low^=Jt.low}},_doFinalize:function(){var yt=this._data,bt=yt.words;this._nDataBytes*8;var wt=yt.sigBytes*8,Et=this.blockSize*32;bt[wt>>>5]|=1<<24-wt%32,bt[(rt.ceil((wt+1)/Et)*Et>>>5)-1]|=128,yt.sigBytes=bt.length*4,this._process();for(var $t=this._state,Pt=this.cfg.outputLength/8,kt=Pt/8,Lt=[],jt=0;jt>>24)&16711935|(Dt<<24|Dt>>>8)&4278255360,Ht=(Ht<<8|Ht>>>24)&16711935|(Ht<<24|Ht>>>8)&4278255360,Lt.push(Ht),Lt.push(Dt)}return new at.init(Lt,Pt)},clone:function(){for(var yt=st.clone.call(this),bt=yt._state=this._state.slice(0),wt=0;wt<25;wt++)bt[wt]=bt[wt].clone();return yt}});nt.SHA3=st._createHelper(xt),nt.HmacSHA3=st._createHmacHelper(xt)}(Math),tt.SHA3})}(sha3)),sha3.exports}var ripemd160={exports:{}},hasRequiredRipemd160;function requireRipemd160(){return hasRequiredRipemd160||(hasRequiredRipemd160=1,function(_e,et){(function(tt,rt){_e.exports=rt(requireCore())})(commonjsGlobal,function(tt){/** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */return function(rt){var nt=tt,it=nt.lib,at=it.WordArray,st=it.Hasher,lt=nt.algo,dt=at.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),ht=at.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),pt=at.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),mt=at.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),gt=at.create([0,1518500249,1859775393,2400959708,2840853838]),vt=at.create([1352829926,1548603684,1836072691,2053994217,0]),xt=lt.RIPEMD160=st.extend({_doReset:function(){this._hash=at.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(kt,Lt){for(var jt=0;jt<16;jt++){var qt=Lt+jt,Dt=kt[qt];kt[qt]=(Dt<<8|Dt>>>24)&16711935|(Dt<<24|Dt>>>8)&4278255360}var Ht=this._hash.words,Xt=gt.words,Mt=vt.words,_t=dt.words,At=ht.words,Tt=pt.words,Bt=mt.words,Ot,Ut,Wt,Ct,St,Ft,Vt,Rt,Kt,Zt;Ft=Ot=Ht[0],Vt=Ut=Ht[1],Rt=Wt=Ht[2],Kt=Ct=Ht[3],Zt=St=Ht[4];for(var Jt,jt=0;jt<80;jt+=1)Jt=Ot+kt[Lt+_t[jt]]|0,jt<16?Jt+=yt(Ut,Wt,Ct)+Xt[0]:jt<32?Jt+=bt(Ut,Wt,Ct)+Xt[1]:jt<48?Jt+=wt(Ut,Wt,Ct)+Xt[2]:jt<64?Jt+=Et(Ut,Wt,Ct)+Xt[3]:Jt+=$t(Ut,Wt,Ct)+Xt[4],Jt=Jt|0,Jt=Pt(Jt,Tt[jt]),Jt=Jt+St|0,Ot=St,St=Ct,Ct=Pt(Wt,10),Wt=Ut,Ut=Jt,Jt=Ft+kt[Lt+At[jt]]|0,jt<16?Jt+=$t(Vt,Rt,Kt)+Mt[0]:jt<32?Jt+=Et(Vt,Rt,Kt)+Mt[1]:jt<48?Jt+=wt(Vt,Rt,Kt)+Mt[2]:jt<64?Jt+=bt(Vt,Rt,Kt)+Mt[3]:Jt+=yt(Vt,Rt,Kt)+Mt[4],Jt=Jt|0,Jt=Pt(Jt,Bt[jt]),Jt=Jt+Zt|0,Ft=Zt,Zt=Kt,Kt=Pt(Rt,10),Rt=Vt,Vt=Jt;Jt=Ht[1]+Wt+Kt|0,Ht[1]=Ht[2]+Ct+Zt|0,Ht[2]=Ht[3]+St+Ft|0,Ht[3]=Ht[4]+Ot+Vt|0,Ht[4]=Ht[0]+Ut+Rt|0,Ht[0]=Jt},_doFinalize:function(){var kt=this._data,Lt=kt.words,jt=this._nDataBytes*8,qt=kt.sigBytes*8;Lt[qt>>>5]|=128<<24-qt%32,Lt[(qt+64>>>9<<4)+14]=(jt<<8|jt>>>24)&16711935|(jt<<24|jt>>>8)&4278255360,kt.sigBytes=(Lt.length+1)*4,this._process();for(var Dt=this._hash,Ht=Dt.words,Xt=0;Xt<5;Xt++){var Mt=Ht[Xt];Ht[Xt]=(Mt<<8|Mt>>>24)&16711935|(Mt<<24|Mt>>>8)&4278255360}return Dt},clone:function(){var kt=st.clone.call(this);return kt._hash=this._hash.clone(),kt}});function yt(kt,Lt,jt){return kt^Lt^jt}function bt(kt,Lt,jt){return kt&Lt|~kt&jt}function wt(kt,Lt,jt){return(kt|~Lt)^jt}function Et(kt,Lt,jt){return kt&jt|Lt&~jt}function $t(kt,Lt,jt){return kt^(Lt|~jt)}function Pt(kt,Lt){return kt<>>32-Lt}nt.RIPEMD160=st._createHelper(xt),nt.HmacRIPEMD160=st._createHmacHelper(xt)}(),tt.RIPEMD160})}(ripemd160)),ripemd160.exports}var hmac={exports:{}},hasRequiredHmac;function requireHmac(){return hasRequiredHmac||(hasRequiredHmac=1,function(_e,et){(function(tt,rt){_e.exports=rt(requireCore())})(commonjsGlobal,function(tt){(function(){var rt=tt,nt=rt.lib,it=nt.Base,at=rt.enc,st=at.Utf8,lt=rt.algo;lt.HMAC=it.extend({init:function(dt,ht){dt=this._hasher=new dt.init,typeof ht=="string"&&(ht=st.parse(ht));var pt=dt.blockSize,mt=pt*4;ht.sigBytes>mt&&(ht=dt.finalize(ht)),ht.clamp();for(var gt=this._oKey=ht.clone(),vt=this._iKey=ht.clone(),xt=gt.words,yt=vt.words,bt=0;bt>>2]&255;Dt.sigBytes-=Ht}};it.BlockCipher=gt.extend({cfg:gt.cfg.extend({mode:yt,padding:wt}),reset:function(){gt.reset.call(this);var Dt=this.cfg,Ht=Dt.iv,Xt=Dt.mode;if(this._xformMode==this._ENC_XFORM_MODE)var Mt=Xt.createEncryptor;else{var Mt=Xt.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==Mt?this._mode.init(this,Ht&&Ht.words):(this._mode=Mt.call(Xt,this,Ht&&Ht.words),this._mode.__creator=Mt)},_doProcessBlock:function(Dt,Ht){this._mode.processBlock(Dt,Ht)},_doFinalize:function(){var Dt=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){Dt.pad(this._data,this.blockSize);var Ht=this._process(!0)}else{var Ht=this._process(!0);Dt.unpad(Ht)}return Ht},blockSize:128/32});var Et=it.CipherParams=at.extend({init:function(Dt){this.mixIn(Dt)},toString:function(Dt){return(Dt||this.formatter).stringify(this)}}),$t=nt.format={},Pt=$t.OpenSSL={stringify:function(Dt){var Ht=Dt.ciphertext,Xt=Dt.salt;if(Xt)var Mt=st.create([1398893684,1701076831]).concat(Xt).concat(Ht);else var Mt=Ht;return Mt.toString(ht)},parse:function(Dt){var Ht=ht.parse(Dt),Xt=Ht.words;if(Xt[0]==1398893684&&Xt[1]==1701076831){var Mt=st.create(Xt.slice(2,4));Xt.splice(0,4),Ht.sigBytes-=16}return Et.create({ciphertext:Ht,salt:Mt})}},kt=it.SerializableCipher=at.extend({cfg:at.extend({format:Pt}),encrypt:function(Dt,Ht,Xt,Mt){Mt=this.cfg.extend(Mt);var _t=Dt.createEncryptor(Xt,Mt),At=_t.finalize(Ht),Tt=_t.cfg;return Et.create({ciphertext:At,key:Xt,iv:Tt.iv,algorithm:Dt,mode:Tt.mode,padding:Tt.padding,blockSize:Dt.blockSize,formatter:Mt.format})},decrypt:function(Dt,Ht,Xt,Mt){Mt=this.cfg.extend(Mt),Ht=this._parse(Ht,Mt.format);var _t=Dt.createDecryptor(Xt,Mt).finalize(Ht.ciphertext);return _t},_parse:function(Dt,Ht){return typeof Dt=="string"?Ht.parse(Dt,this):Dt}}),Lt=nt.kdf={},jt=Lt.OpenSSL={execute:function(Dt,Ht,Xt,Mt){Mt||(Mt=st.random(64/8));var _t=mt.create({keySize:Ht+Xt}).compute(Dt,Mt),At=st.create(_t.words.slice(Ht),Xt*4);return _t.sigBytes=Ht*4,Et.create({key:_t,iv:At,salt:Mt})}},qt=it.PasswordBasedCipher=kt.extend({cfg:kt.cfg.extend({kdf:jt}),encrypt:function(Dt,Ht,Xt,Mt){Mt=this.cfg.extend(Mt);var _t=Mt.kdf.execute(Xt,Dt.keySize,Dt.ivSize);Mt.iv=_t.iv;var At=kt.encrypt.call(this,Dt,Ht,_t.key,Mt);return At.mixIn(_t),At},decrypt:function(Dt,Ht,Xt,Mt){Mt=this.cfg.extend(Mt),Ht=this._parse(Ht,Mt.format);var _t=Mt.kdf.execute(Xt,Dt.keySize,Dt.ivSize,Ht.salt);Mt.iv=_t.iv;var At=kt.decrypt.call(this,Dt,Ht,_t.key,Mt);return At}})}()})}(cipherCore)),cipherCore.exports}var modeCfb={exports:{}},hasRequiredModeCfb;function requireModeCfb(){return hasRequiredModeCfb||(hasRequiredModeCfb=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireCipherCore())})(commonjsGlobal,function(tt){return tt.mode.CFB=function(){var rt=tt.lib.BlockCipherMode.extend();rt.Encryptor=rt.extend({processBlock:function(it,at){var st=this._cipher,lt=st.blockSize;nt.call(this,it,at,lt,st),this._prevBlock=it.slice(at,at+lt)}}),rt.Decryptor=rt.extend({processBlock:function(it,at){var st=this._cipher,lt=st.blockSize,dt=it.slice(at,at+lt);nt.call(this,it,at,lt,st),this._prevBlock=dt}});function nt(it,at,st,lt){var dt=this._iv;if(dt){var ht=dt.slice(0);this._iv=void 0}else var ht=this._prevBlock;lt.encryptBlock(ht,0);for(var pt=0;pt>24&255)===255){var lt=st>>16&255,dt=st>>8&255,ht=st&255;lt===255?(lt=0,dt===255?(dt=0,ht===255?ht=0:++ht):++dt):++lt,st=0,st+=lt<<16,st+=dt<<8,st+=ht}else st+=1<<24;return st}function it(st){return(st[0]=nt(st[0]))===0&&(st[1]=nt(st[1])),st}var at=rt.Encryptor=rt.extend({processBlock:function(st,lt){var dt=this._cipher,ht=dt.blockSize,pt=this._iv,mt=this._counter;pt&&(mt=this._counter=pt.slice(0),this._iv=void 0),it(mt);var gt=mt.slice(0);dt.encryptBlock(gt,0);for(var vt=0;vt>>2]|=st<<24-lt%4*8,rt.sigBytes+=st},unpad:function(rt){var nt=rt.words[rt.sigBytes-1>>>2]&255;rt.sigBytes-=nt}},tt.pad.Ansix923})}(padAnsix923)),padAnsix923.exports}var padIso10126={exports:{}},hasRequiredPadIso10126;function requirePadIso10126(){return hasRequiredPadIso10126||(hasRequiredPadIso10126=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireCipherCore())})(commonjsGlobal,function(tt){return tt.pad.Iso10126={pad:function(rt,nt){var it=nt*4,at=it-rt.sigBytes%it;rt.concat(tt.lib.WordArray.random(at-1)).concat(tt.lib.WordArray.create([at<<24],1))},unpad:function(rt){var nt=rt.words[rt.sigBytes-1>>>2]&255;rt.sigBytes-=nt}},tt.pad.Iso10126})}(padIso10126)),padIso10126.exports}var padIso97971={exports:{}},hasRequiredPadIso97971;function requirePadIso97971(){return hasRequiredPadIso97971||(hasRequiredPadIso97971=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireCipherCore())})(commonjsGlobal,function(tt){return tt.pad.Iso97971={pad:function(rt,nt){rt.concat(tt.lib.WordArray.create([2147483648],1)),tt.pad.ZeroPadding.pad(rt,nt)},unpad:function(rt){tt.pad.ZeroPadding.unpad(rt),rt.sigBytes--}},tt.pad.Iso97971})}(padIso97971)),padIso97971.exports}var padZeropadding={exports:{}},hasRequiredPadZeropadding;function requirePadZeropadding(){return hasRequiredPadZeropadding||(hasRequiredPadZeropadding=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireCipherCore())})(commonjsGlobal,function(tt){return tt.pad.ZeroPadding={pad:function(rt,nt){var it=nt*4;rt.clamp(),rt.sigBytes+=it-(rt.sigBytes%it||it)},unpad:function(rt){for(var nt=rt.words,it=rt.sigBytes-1;!(nt[it>>>2]>>>24-it%4*8&255);)it--;rt.sigBytes=it+1}},tt.pad.ZeroPadding})}(padZeropadding)),padZeropadding.exports}var padNopadding={exports:{}},hasRequiredPadNopadding;function requirePadNopadding(){return hasRequiredPadNopadding||(hasRequiredPadNopadding=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireCipherCore())})(commonjsGlobal,function(tt){return tt.pad.NoPadding={pad:function(){},unpad:function(){}},tt.pad.NoPadding})}(padNopadding)),padNopadding.exports}var formatHex={exports:{}},hasRequiredFormatHex;function requireFormatHex(){return hasRequiredFormatHex||(hasRequiredFormatHex=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireCipherCore())})(commonjsGlobal,function(tt){return function(rt){var nt=tt,it=nt.lib,at=it.CipherParams,st=nt.enc,lt=st.Hex,dt=nt.format;dt.Hex={stringify:function(ht){return ht.ciphertext.toString(lt)},parse:function(ht){var pt=lt.parse(ht);return at.create({ciphertext:pt})}}}(),tt.format.Hex})}(formatHex)),formatHex.exports}var aes={exports:{}},hasRequiredAes;function requireAes(){return hasRequiredAes||(hasRequiredAes=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(tt){return function(){var rt=tt,nt=rt.lib,it=nt.BlockCipher,at=rt.algo,st=[],lt=[],dt=[],ht=[],pt=[],mt=[],gt=[],vt=[],xt=[],yt=[];(function(){for(var Et=[],$t=0;$t<256;$t++)$t<128?Et[$t]=$t<<1:Et[$t]=$t<<1^283;for(var Pt=0,kt=0,$t=0;$t<256;$t++){var Lt=kt^kt<<1^kt<<2^kt<<3^kt<<4;Lt=Lt>>>8^Lt&255^99,st[Pt]=Lt,lt[Lt]=Pt;var jt=Et[Pt],qt=Et[jt],Dt=Et[qt],Ht=Et[Lt]*257^Lt*16843008;dt[Pt]=Ht<<24|Ht>>>8,ht[Pt]=Ht<<16|Ht>>>16,pt[Pt]=Ht<<8|Ht>>>24,mt[Pt]=Ht;var Ht=Dt*16843009^qt*65537^jt*257^Pt*16843008;gt[Lt]=Ht<<24|Ht>>>8,vt[Lt]=Ht<<16|Ht>>>16,xt[Lt]=Ht<<8|Ht>>>24,yt[Lt]=Ht,Pt?(Pt=jt^Et[Et[Et[Dt^jt]]],kt^=Et[Et[kt]]):Pt=kt=1}})();var bt=[0,1,2,4,8,16,32,64,128,27,54],wt=at.AES=it.extend({_doReset:function(){if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var Et=this._keyPriorReset=this._key,$t=Et.words,Pt=Et.sigBytes/4,kt=this._nRounds=Pt+6,Lt=(kt+1)*4,jt=this._keySchedule=[],qt=0;qt6&&qt%Pt==4&&(Dt=st[Dt>>>24]<<24|st[Dt>>>16&255]<<16|st[Dt>>>8&255]<<8|st[Dt&255]):(Dt=Dt<<8|Dt>>>24,Dt=st[Dt>>>24]<<24|st[Dt>>>16&255]<<16|st[Dt>>>8&255]<<8|st[Dt&255],Dt^=bt[qt/Pt|0]<<24),jt[qt]=jt[qt-Pt]^Dt}for(var Ht=this._invKeySchedule=[],Xt=0;Xt>>24]]^vt[st[Dt>>>16&255]]^xt[st[Dt>>>8&255]]^yt[st[Dt&255]]}}},encryptBlock:function(Et,$t){this._doCryptBlock(Et,$t,this._keySchedule,dt,ht,pt,mt,st)},decryptBlock:function(Et,$t){var Pt=Et[$t+1];Et[$t+1]=Et[$t+3],Et[$t+3]=Pt,this._doCryptBlock(Et,$t,this._invKeySchedule,gt,vt,xt,yt,lt);var Pt=Et[$t+1];Et[$t+1]=Et[$t+3],Et[$t+3]=Pt},_doCryptBlock:function(Et,$t,Pt,kt,Lt,jt,qt,Dt){for(var Ht=this._nRounds,Xt=Et[$t]^Pt[0],Mt=Et[$t+1]^Pt[1],_t=Et[$t+2]^Pt[2],At=Et[$t+3]^Pt[3],Tt=4,Bt=1;Bt>>24]^Lt[Mt>>>16&255]^jt[_t>>>8&255]^qt[At&255]^Pt[Tt++],Ut=kt[Mt>>>24]^Lt[_t>>>16&255]^jt[At>>>8&255]^qt[Xt&255]^Pt[Tt++],Wt=kt[_t>>>24]^Lt[At>>>16&255]^jt[Xt>>>8&255]^qt[Mt&255]^Pt[Tt++],Ct=kt[At>>>24]^Lt[Xt>>>16&255]^jt[Mt>>>8&255]^qt[_t&255]^Pt[Tt++];Xt=Ot,Mt=Ut,_t=Wt,At=Ct}var Ot=(Dt[Xt>>>24]<<24|Dt[Mt>>>16&255]<<16|Dt[_t>>>8&255]<<8|Dt[At&255])^Pt[Tt++],Ut=(Dt[Mt>>>24]<<24|Dt[_t>>>16&255]<<16|Dt[At>>>8&255]<<8|Dt[Xt&255])^Pt[Tt++],Wt=(Dt[_t>>>24]<<24|Dt[At>>>16&255]<<16|Dt[Xt>>>8&255]<<8|Dt[Mt&255])^Pt[Tt++],Ct=(Dt[At>>>24]<<24|Dt[Xt>>>16&255]<<16|Dt[Mt>>>8&255]<<8|Dt[_t&255])^Pt[Tt++];Et[$t]=Ot,Et[$t+1]=Ut,Et[$t+2]=Wt,Et[$t+3]=Ct},keySize:256/32});rt.AES=it._createHelper(wt)}(),tt.AES})}(aes)),aes.exports}var tripledes={exports:{}},hasRequiredTripledes;function requireTripledes(){return hasRequiredTripledes||(hasRequiredTripledes=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(tt){return function(){var rt=tt,nt=rt.lib,it=nt.WordArray,at=nt.BlockCipher,st=rt.algo,lt=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],dt=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],ht=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],pt=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],mt=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],gt=st.DES=at.extend({_doReset:function(){for(var bt=this._key,wt=bt.words,Et=[],$t=0;$t<56;$t++){var Pt=lt[$t]-1;Et[$t]=wt[Pt>>>5]>>>31-Pt%32&1}for(var kt=this._subKeys=[],Lt=0;Lt<16;Lt++){for(var jt=kt[Lt]=[],qt=ht[Lt],$t=0;$t<24;$t++)jt[$t/6|0]|=Et[(dt[$t]-1+qt)%28]<<31-$t%6,jt[4+($t/6|0)]|=Et[28+(dt[$t+24]-1+qt)%28]<<31-$t%6;jt[0]=jt[0]<<1|jt[0]>>>31;for(var $t=1;$t<7;$t++)jt[$t]=jt[$t]>>>($t-1)*4+3;jt[7]=jt[7]<<5|jt[7]>>>27}for(var Dt=this._invSubKeys=[],$t=0;$t<16;$t++)Dt[$t]=kt[15-$t]},encryptBlock:function(bt,wt){this._doCryptBlock(bt,wt,this._subKeys)},decryptBlock:function(bt,wt){this._doCryptBlock(bt,wt,this._invSubKeys)},_doCryptBlock:function(bt,wt,Et){this._lBlock=bt[wt],this._rBlock=bt[wt+1],vt.call(this,4,252645135),vt.call(this,16,65535),xt.call(this,2,858993459),xt.call(this,8,16711935),vt.call(this,1,1431655765);for(var $t=0;$t<16;$t++){for(var Pt=Et[$t],kt=this._lBlock,Lt=this._rBlock,jt=0,qt=0;qt<8;qt++)jt|=pt[qt][((Lt^Pt[qt])&mt[qt])>>>0];this._lBlock=Lt,this._rBlock=kt^jt}var Dt=this._lBlock;this._lBlock=this._rBlock,this._rBlock=Dt,vt.call(this,1,1431655765),xt.call(this,8,16711935),xt.call(this,2,858993459),vt.call(this,16,65535),vt.call(this,4,252645135),bt[wt]=this._lBlock,bt[wt+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function vt(bt,wt){var Et=(this._lBlock>>>bt^this._rBlock)&wt;this._rBlock^=Et,this._lBlock^=Et<>>bt^this._lBlock)&wt;this._lBlock^=Et,this._rBlock^=Et<>>2]>>>24-yt%4*8&255;xt=(xt+gt[vt]+bt)%256;var wt=gt[vt];gt[vt]=gt[xt],gt[xt]=wt}this._i=this._j=0},_doProcessBlock:function(ht,pt){ht[pt]^=lt.call(this)},keySize:256/32,ivSize:0});function lt(){for(var ht=this._S,pt=this._i,mt=this._j,gt=0,vt=0;vt<4;vt++){pt=(pt+1)%256,mt=(mt+ht[pt])%256;var xt=ht[pt];ht[pt]=ht[mt],ht[mt]=xt,gt|=ht[(ht[pt]+ht[mt])%256]<<24-vt*8}return this._i=pt,this._j=mt,gt}rt.RC4=it._createHelper(st);var dt=at.RC4Drop=st.extend({cfg:st.cfg.extend({drop:192}),_doReset:function(){st._doReset.call(this);for(var ht=this.cfg.drop;ht>0;ht--)lt.call(this)}});rt.RC4Drop=it._createHelper(dt)}(),tt.RC4})}(rc4)),rc4.exports}var rabbit={exports:{}},hasRequiredRabbit;function requireRabbit(){return hasRequiredRabbit||(hasRequiredRabbit=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(tt){return function(){var rt=tt,nt=rt.lib,it=nt.StreamCipher,at=rt.algo,st=[],lt=[],dt=[],ht=at.Rabbit=it.extend({_doReset:function(){for(var mt=this._key.words,gt=this.cfg.iv,vt=0;vt<4;vt++)mt[vt]=(mt[vt]<<8|mt[vt]>>>24)&16711935|(mt[vt]<<24|mt[vt]>>>8)&4278255360;var xt=this._X=[mt[0],mt[3]<<16|mt[2]>>>16,mt[1],mt[0]<<16|mt[3]>>>16,mt[2],mt[1]<<16|mt[0]>>>16,mt[3],mt[2]<<16|mt[1]>>>16],yt=this._C=[mt[2]<<16|mt[2]>>>16,mt[0]&4294901760|mt[1]&65535,mt[3]<<16|mt[3]>>>16,mt[1]&4294901760|mt[2]&65535,mt[0]<<16|mt[0]>>>16,mt[2]&4294901760|mt[3]&65535,mt[1]<<16|mt[1]>>>16,mt[3]&4294901760|mt[0]&65535];this._b=0;for(var vt=0;vt<4;vt++)pt.call(this);for(var vt=0;vt<8;vt++)yt[vt]^=xt[vt+4&7];if(gt){var bt=gt.words,wt=bt[0],Et=bt[1],$t=(wt<<8|wt>>>24)&16711935|(wt<<24|wt>>>8)&4278255360,Pt=(Et<<8|Et>>>24)&16711935|(Et<<24|Et>>>8)&4278255360,kt=$t>>>16|Pt&4294901760,Lt=Pt<<16|$t&65535;yt[0]^=$t,yt[1]^=kt,yt[2]^=Pt,yt[3]^=Lt,yt[4]^=$t,yt[5]^=kt,yt[6]^=Pt,yt[7]^=Lt;for(var vt=0;vt<4;vt++)pt.call(this)}},_doProcessBlock:function(mt,gt){var vt=this._X;pt.call(this),st[0]=vt[0]^vt[5]>>>16^vt[3]<<16,st[1]=vt[2]^vt[7]>>>16^vt[5]<<16,st[2]=vt[4]^vt[1]>>>16^vt[7]<<16,st[3]=vt[6]^vt[3]>>>16^vt[1]<<16;for(var xt=0;xt<4;xt++)st[xt]=(st[xt]<<8|st[xt]>>>24)&16711935|(st[xt]<<24|st[xt]>>>8)&4278255360,mt[gt+xt]^=st[xt]},blockSize:128/32,ivSize:64/32});function pt(){for(var mt=this._X,gt=this._C,vt=0;vt<8;vt++)lt[vt]=gt[vt];gt[0]=gt[0]+1295307597+this._b|0,gt[1]=gt[1]+3545052371+(gt[0]>>>0>>0?1:0)|0,gt[2]=gt[2]+886263092+(gt[1]>>>0>>0?1:0)|0,gt[3]=gt[3]+1295307597+(gt[2]>>>0>>0?1:0)|0,gt[4]=gt[4]+3545052371+(gt[3]>>>0>>0?1:0)|0,gt[5]=gt[5]+886263092+(gt[4]>>>0>>0?1:0)|0,gt[6]=gt[6]+1295307597+(gt[5]>>>0>>0?1:0)|0,gt[7]=gt[7]+3545052371+(gt[6]>>>0>>0?1:0)|0,this._b=gt[7]>>>0>>0?1:0;for(var vt=0;vt<8;vt++){var xt=mt[vt]+gt[vt],yt=xt&65535,bt=xt>>>16,wt=((yt*yt>>>17)+yt*bt>>>15)+bt*bt,Et=((xt&4294901760)*xt|0)+((xt&65535)*xt|0);dt[vt]=wt^Et}mt[0]=dt[0]+(dt[7]<<16|dt[7]>>>16)+(dt[6]<<16|dt[6]>>>16)|0,mt[1]=dt[1]+(dt[0]<<8|dt[0]>>>24)+dt[7]|0,mt[2]=dt[2]+(dt[1]<<16|dt[1]>>>16)+(dt[0]<<16|dt[0]>>>16)|0,mt[3]=dt[3]+(dt[2]<<8|dt[2]>>>24)+dt[1]|0,mt[4]=dt[4]+(dt[3]<<16|dt[3]>>>16)+(dt[2]<<16|dt[2]>>>16)|0,mt[5]=dt[5]+(dt[4]<<8|dt[4]>>>24)+dt[3]|0,mt[6]=dt[6]+(dt[5]<<16|dt[5]>>>16)+(dt[4]<<16|dt[4]>>>16)|0,mt[7]=dt[7]+(dt[6]<<8|dt[6]>>>24)+dt[5]|0}rt.Rabbit=it._createHelper(ht)}(),tt.Rabbit})}(rabbit)),rabbit.exports}var rabbitLegacy={exports:{}},hasRequiredRabbitLegacy;function requireRabbitLegacy(){return hasRequiredRabbitLegacy||(hasRequiredRabbitLegacy=1,function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireEncBase64(),requireMd5(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(tt){return function(){var rt=tt,nt=rt.lib,it=nt.StreamCipher,at=rt.algo,st=[],lt=[],dt=[],ht=at.RabbitLegacy=it.extend({_doReset:function(){var mt=this._key.words,gt=this.cfg.iv,vt=this._X=[mt[0],mt[3]<<16|mt[2]>>>16,mt[1],mt[0]<<16|mt[3]>>>16,mt[2],mt[1]<<16|mt[0]>>>16,mt[3],mt[2]<<16|mt[1]>>>16],xt=this._C=[mt[2]<<16|mt[2]>>>16,mt[0]&4294901760|mt[1]&65535,mt[3]<<16|mt[3]>>>16,mt[1]&4294901760|mt[2]&65535,mt[0]<<16|mt[0]>>>16,mt[2]&4294901760|mt[3]&65535,mt[1]<<16|mt[1]>>>16,mt[3]&4294901760|mt[0]&65535];this._b=0;for(var yt=0;yt<4;yt++)pt.call(this);for(var yt=0;yt<8;yt++)xt[yt]^=vt[yt+4&7];if(gt){var bt=gt.words,wt=bt[0],Et=bt[1],$t=(wt<<8|wt>>>24)&16711935|(wt<<24|wt>>>8)&4278255360,Pt=(Et<<8|Et>>>24)&16711935|(Et<<24|Et>>>8)&4278255360,kt=$t>>>16|Pt&4294901760,Lt=Pt<<16|$t&65535;xt[0]^=$t,xt[1]^=kt,xt[2]^=Pt,xt[3]^=Lt,xt[4]^=$t,xt[5]^=kt,xt[6]^=Pt,xt[7]^=Lt;for(var yt=0;yt<4;yt++)pt.call(this)}},_doProcessBlock:function(mt,gt){var vt=this._X;pt.call(this),st[0]=vt[0]^vt[5]>>>16^vt[3]<<16,st[1]=vt[2]^vt[7]>>>16^vt[5]<<16,st[2]=vt[4]^vt[1]>>>16^vt[7]<<16,st[3]=vt[6]^vt[3]>>>16^vt[1]<<16;for(var xt=0;xt<4;xt++)st[xt]=(st[xt]<<8|st[xt]>>>24)&16711935|(st[xt]<<24|st[xt]>>>8)&4278255360,mt[gt+xt]^=st[xt]},blockSize:128/32,ivSize:64/32});function pt(){for(var mt=this._X,gt=this._C,vt=0;vt<8;vt++)lt[vt]=gt[vt];gt[0]=gt[0]+1295307597+this._b|0,gt[1]=gt[1]+3545052371+(gt[0]>>>0>>0?1:0)|0,gt[2]=gt[2]+886263092+(gt[1]>>>0>>0?1:0)|0,gt[3]=gt[3]+1295307597+(gt[2]>>>0>>0?1:0)|0,gt[4]=gt[4]+3545052371+(gt[3]>>>0>>0?1:0)|0,gt[5]=gt[5]+886263092+(gt[4]>>>0>>0?1:0)|0,gt[6]=gt[6]+1295307597+(gt[5]>>>0>>0?1:0)|0,gt[7]=gt[7]+3545052371+(gt[6]>>>0>>0?1:0)|0,this._b=gt[7]>>>0>>0?1:0;for(var vt=0;vt<8;vt++){var xt=mt[vt]+gt[vt],yt=xt&65535,bt=xt>>>16,wt=((yt*yt>>>17)+yt*bt>>>15)+bt*bt,Et=((xt&4294901760)*xt|0)+((xt&65535)*xt|0);dt[vt]=wt^Et}mt[0]=dt[0]+(dt[7]<<16|dt[7]>>>16)+(dt[6]<<16|dt[6]>>>16)|0,mt[1]=dt[1]+(dt[0]<<8|dt[0]>>>24)+dt[7]|0,mt[2]=dt[2]+(dt[1]<<16|dt[1]>>>16)+(dt[0]<<16|dt[0]>>>16)|0,mt[3]=dt[3]+(dt[2]<<8|dt[2]>>>24)+dt[1]|0,mt[4]=dt[4]+(dt[3]<<16|dt[3]>>>16)+(dt[2]<<16|dt[2]>>>16)|0,mt[5]=dt[5]+(dt[4]<<8|dt[4]>>>24)+dt[3]|0,mt[6]=dt[6]+(dt[5]<<16|dt[5]>>>16)+(dt[4]<<16|dt[4]>>>16)|0,mt[7]=dt[7]+(dt[6]<<8|dt[6]>>>24)+dt[5]|0}rt.RabbitLegacy=it._createHelper(ht)}(),tt.RabbitLegacy})}(rabbitLegacy)),rabbitLegacy.exports}(function(_e,et){(function(tt,rt,nt){_e.exports=rt(requireCore(),requireX64Core(),requireLibTypedarrays(),requireEncUtf16(),requireEncBase64(),requireMd5(),requireSha1(),sha256Exports,requireSha224(),requireSha512(),requireSha384(),requireSha3(),requireRipemd160(),requireHmac(),requirePbkdf2(),requireEvpkdf(),requireCipherCore(),requireModeCfb(),requireModeCtr(),requireModeCtrGladman(),requireModeOfb(),requireModeEcb(),requirePadAnsix923(),requirePadIso10126(),requirePadIso97971(),requirePadZeropadding(),requirePadNopadding(),requireFormatHex(),requireAes(),requireTripledes(),requireRc4(),requireRabbit(),requireRabbitLegacy())})(commonjsGlobal,function(tt){return tt})})(cryptoJs);var cryptoJsExports=cryptoJs.exports,__importDefault$3=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(Base$1,"__esModule",{value:!0});Base$1.Base=void 0;const buffer_1$2=buffer,crypto_js_1=__importDefault$3(cryptoJsExports);class Base{print(){Base.print(this)}bufferIndexOf(et,tt,rt=!1){if(rt)return this.binarySearch(et,tt,buffer_1$2.Buffer.compare);const nt=(it,at)=>it.equals(at);return this.linearSearch(et,tt,nt)}static binarySearch(et,tt,rt){let nt=0,it=et.length-1;for(;nt<=it;){const at=Math.floor((nt+it)/2),st=rt(et[at],tt);if(st===0){for(let lt=at-1;lt>=0;lt--)if(rt(et[lt],tt)!==0)return lt+1;return 0}else st<0?nt=at+1:it=at-1}return-1}binarySearch(et,tt,rt){return Base.binarySearch(et,tt,rt)}static linearSearch(et,tt,rt){for(let nt=0;nt{const rt=et(tt);return buffer_1$2.Buffer.isBuffer(rt)?rt:this.isHexString(rt)?buffer_1$2.Buffer.from(rt.replace("0x",""),"hex"):typeof rt=="string"?buffer_1$2.Buffer.from(rt):typeof rt=="bigint"?buffer_1$2.Buffer.from(tt.toString(16),"hex"):ArrayBuffer.isView(rt)?buffer_1$2.Buffer.from(rt.buffer,rt.byteOffset,rt.byteLength):buffer_1$2.Buffer.from(et(crypto_js_1.default.enc.Hex.parse(tt.toString("hex"))).toString(crypto_js_1.default.enc.Hex),"hex")}}isHexString(et){return Base.isHexString(et)}log2(et){return et===1?0:1+this.log2(et/2|0)}zip(et,tt){return et.map((rt,nt)=>[rt,tt[nt]])}static hexZeroPad(et,tt){return"0x"+et.replace("0x","").padStart(tt,"0")}}Base$1.Base=Base;Base$1.default=Base;var __importDefault$2=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(MerkleTree$1,"__esModule",{value:!0});MerkleTree$1.MerkleTree=void 0;const buffer_1$1=buffer,buffer_reverse_1=__importDefault$2(bufferReverse),sha256_1$1=__importDefault$2(sha256Exports),treeify_1$1=__importDefault$2(treeifyExports),Base_1$3=__importDefault$2(Base$1);class MerkleTree extends Base_1$3.default{constructor(et,tt=sha256_1$1.default,rt={}){if(super(),this.duplicateOdd=!1,this.concatenator=buffer_1$1.Buffer.concat,this.hashLeaves=!1,this.isBitcoinTree=!1,this.leaves=[],this.layers=[],this.sortLeaves=!1,this.sortPairs=!1,this.sort=!1,this.fillDefaultHash=null,this.complete=!1,rt.complete){if(rt.isBitcoinTree)throw new Error('option "complete" is incompatible with "isBitcoinTree"');if(rt.duplicateOdd)throw new Error('option "complete" is incompatible with "duplicateOdd"')}if(this.isBitcoinTree=!!rt.isBitcoinTree,this.hashLeaves=!!rt.hashLeaves,this.sortLeaves=!!rt.sortLeaves,this.sortPairs=!!rt.sortPairs,this.complete=!!rt.complete,rt.fillDefaultHash)if(typeof rt.fillDefaultHash=="function")this.fillDefaultHash=rt.fillDefaultHash;else if(buffer_1$1.Buffer.isBuffer(rt.fillDefaultHash)||typeof rt.fillDefaultHash=="string")this.fillDefaultHash=(nt,it)=>rt.fillDefaultHash;else throw new Error('method "fillDefaultHash" must be a function, Buffer, or string');this.sort=!!rt.sort,this.sort&&(this.sortLeaves=!0,this.sortPairs=!0),this.duplicateOdd=!!rt.duplicateOdd,rt.concatenator&&(this.concatenator=rt.concatenator),this.hashFn=this.bufferifyFn(tt),this.processLeaves(et)}getOptions(){var et,tt;return{complete:this.complete,isBitcoinTree:this.isBitcoinTree,hashLeaves:this.hashLeaves,sortLeaves:this.sortLeaves,sortPairs:this.sortPairs,sort:this.sort,fillDefaultHash:(tt=(et=this.fillDefaultHash)===null||et===void 0?void 0:et.toString())!==null&&tt!==void 0?tt:null,duplicateOdd:this.duplicateOdd}}processLeaves(et){if(this.hashLeaves&&(et=et.map(this.hashFn)),this.leaves=et.map(this.bufferify),this.sortLeaves&&(this.leaves=this.leaves.sort(buffer_1$1.Buffer.compare)),this.fillDefaultHash)for(let tt=this.leaves.length;tt1;){const tt=this.layers.length;this.layers.push([]);const rt=this.complete&&tt===1&&!Number.isInteger(Math.log2(et.length))?2*et.length-Math.pow(2,Math.ceil(Math.log2(et.length))):et.length;for(let nt=0;nt=rt){this.layers[tt].push(...et.slice(rt));break}else if(nt+1===et.length&&et.length%2===1){const dt=et[et.length-1];let ht=dt;if(this.isBitcoinTree){ht=this.hashFn(this.concatenator([buffer_reverse_1.default(dt),buffer_reverse_1.default(dt)])),ht=buffer_reverse_1.default(this.hashFn(ht)),this.layers[tt].push(ht);continue}else if(!this.duplicateOdd){this.layers[tt].push(et[nt]);continue}}const it=et[nt],at=nt+1===et.length?it:et[nt+1];let st=null;this.isBitcoinTree?st=[buffer_reverse_1.default(it),buffer_reverse_1.default(at)]:st=[it,at],this.sortPairs&&st.sort(buffer_1$1.Buffer.compare);let lt=this.hashFn(this.concatenator(st));this.isBitcoinTree&&(lt=buffer_reverse_1.default(this.hashFn(lt))),this.layers[tt].push(lt)}et=this.layers[tt]}}addLeaf(et,tt=!1){tt&&(et=this.hashFn(et)),this.processLeaves(this.leaves.concat(et))}addLeaves(et,tt=!1){tt&&(et=et.map(this.hashFn)),this.processLeaves(this.leaves.concat(et))}getLeaves(et){return Array.isArray(et)?(this.hashLeaves&&(et=et.map(this.hashFn),this.sortLeaves&&(et=et.sort(buffer_1$1.Buffer.compare))),this.leaves.filter(tt=>this.bufferIndexOf(et,tt,this.sortLeaves)!==-1)):this.leaves}getLeaf(et){return et<0||et>this.leaves.length-1?buffer_1$1.Buffer.from([]):this.leaves[et]}getLeafIndex(et){et=this.bufferify(et);const tt=this.getLeaves();for(let rt=0;rtthis.bufferToHex(et))}static marshalLeaves(et){return JSON.stringify(et.map(tt=>MerkleTree.bufferToHex(tt)),null,2)}static unmarshalLeaves(et){let tt=null;if(typeof et=="string")tt=JSON.parse(et);else if(et instanceof Object)tt=et;else throw new Error("Expected type of string or object");if(!tt)return[];if(!Array.isArray(tt))throw new Error("Expected JSON string to be array");return tt.map(MerkleTree.bufferify)}getLayers(){return this.layers}getHexLayers(){return this.layers.reduce((et,tt)=>(Array.isArray(tt)?et.push(tt.map(rt=>this.bufferToHex(rt))):et.push(tt),et),[])}getLayersFlat(){const et=this.layers.reduce((tt,rt)=>(Array.isArray(rt)?tt.unshift(...rt):tt.unshift(rt),tt),[]);return et.unshift(buffer_1$1.Buffer.from([0])),et}getHexLayersFlat(){return this.getLayersFlat().map(et=>this.bufferToHex(et))}getLayerCount(){return this.getLayers().length}getRoot(){return this.layers.length===0?buffer_1$1.Buffer.from([]):this.layers[this.layers.length-1][0]||buffer_1$1.Buffer.from([])}getHexRoot(){return this.bufferToHex(this.getRoot())}getProof(et,tt){if(typeof et>"u")throw new Error("leaf is required");et=this.bufferify(et);const rt=[];if(!Number.isInteger(tt)){tt=-1;for(let nt=0;ntthis.bufferToHex(rt.data))}getProofs(){const et=[],tt=[];return this.getProofsDFS(this.layers.length-1,0,et,tt),tt}getProofsDFS(et,tt,rt,nt){const it=tt%2;if(et===-1){it||nt.push([...rt].reverse());return}if(tt>=this.layers[et].length)return;const at=this.layers[et],st=it?tt-1:tt+1;let lt=!1;stthis.bufferToHex(et.data))}getPositionalHexProof(et,tt){return this.getProof(et,tt).map(rt=>[rt.position==="left"?0:1,this.bufferToHex(rt.data)])}static marshalProof(et){const tt=et.map(rt=>typeof rt=="string"?rt:buffer_1$1.Buffer.isBuffer(rt)?MerkleTree.bufferToHex(rt):{position:rt.position,data:MerkleTree.bufferToHex(rt.data)});return JSON.stringify(tt,null,2)}static unmarshalProof(et){let tt=null;if(typeof et=="string")tt=JSON.parse(et);else if(et instanceof Object)tt=et;else throw new Error("Expected type of string or object");if(!tt)return[];if(!Array.isArray(tt))throw new Error("Expected JSON string to be array");return tt.map(rt=>{if(typeof rt=="string")return MerkleTree.bufferify(rt);if(rt instanceof Object)return{position:rt.position,data:MerkleTree.bufferify(rt.data)};throw new Error("Expected item to be of type string or object")})}static marshalTree(et){const tt=et.getHexRoot(),rt=et.leaves.map(at=>MerkleTree.bufferToHex(at)),nt=et.getHexLayers(),it=et.getOptions();return JSON.stringify({options:it,root:tt,layers:nt,leaves:rt},null,2)}static unmarshalTree(et,tt=sha256_1$1.default,rt={}){let nt=null;if(typeof et=="string")nt=JSON.parse(et);else if(et instanceof Object)nt=et;else throw new Error("Expected type of string or object");if(!nt)throw new Error("could not parse json");return rt=Object.assign({},nt.options||{},rt),new MerkleTree(nt.leaves,tt,rt)}getProofIndices(et,tt){const rt=Math.pow(2,tt);let nt=new Set;for(const dt of et){let ht=rt+dt;for(;ht>1;)nt.add(ht^1),ht=ht/2|0}const it=et.map(dt=>rt+dt),at=Array.from(nt).sort((dt,ht)=>dt-ht).reverse();nt=it.concat(at);const st=new Set,lt=[];for(let dt of nt)if(!st.has(dt))for(lt.push(dt);dt>1&&(st.add(dt),!!st.has(dt^1));)dt=dt/2|0;return lt.filter(dt=>!et.includes(dt-rt))}getProofIndicesForUnevenTree(et,tt){const rt=Math.ceil(Math.log2(tt)),nt=[];for(let st=0;stpt%2===0?pt+1:pt-1).filter(pt=>!at.includes(pt));const ht=nt.find(({index:pt})=>pt===st);ht&&at.includes(ht.leavesCount-1)&&(dt=dt.slice(0,-1)),it.push(dt),at=[...new Set(at.map(pt=>pt%2===0?pt/2:pt%2===0?(pt+1)/2:(pt-1)/2))]}return it}getMultiProof(et,tt){if(this.complete||console.warn("Warning: For correct multiProofs it's strongly recommended to set complete: true"),tt||(tt=et,et=this.getLayersFlat()),this.isUnevenTree()&&tt.every(Number.isInteger))return this.getMultiProofForUnevenTree(tt);if(!tt.every(Number.isInteger)){let nt=tt;this.sortPairs&&(nt=nt.sort(buffer_1$1.Buffer.compare));let it=nt.map(dt=>this.bufferIndexOf(this.leaves,dt,this.sortLeaves)).sort((dt,ht)=>dt===ht?0:dt>ht?1:-1);if(!it.every(dt=>dt!==-1))throw new Error("Element does not exist in Merkle tree");const at=[],st=[];let lt=[];for(let dt=0;dtgt.indexOf(pt)===mt),lt=[]}return st.filter(dt=>!at.includes(dt))}return this.getProofIndices(tt,Math.log2(et.length/2|0)).map(nt=>et[nt])}getMultiProofForUnevenTree(et,tt){tt||(tt=et,et=this.getLayers());let rt=[],nt=tt;for(const it of et){const at=[];for(const lt of nt){if(lt%2===0){const ht=lt+1;if(!nt.includes(ht)&&it[ht]){at.push(it[ht]);continue}}const dt=lt-1;if(!nt.includes(dt)&&it[dt]){at.push(it[dt]);continue}}rt=rt.concat(at);const st=new Set;for(const lt of nt){if(lt%2===0){st.add(lt/2);continue}if(lt%2===0){st.add((lt+1)/2);continue}st.add((lt-1)/2)}nt=Array.from(st)}return rt}getHexMultiProof(et,tt){return this.getMultiProof(et,tt).map(rt=>this.bufferToHex(rt))}getProofFlags(et,tt){if(!Array.isArray(et)||et.length<=0)throw new Error("Invalid Inputs!");let rt;if(et.every(Number.isInteger)?rt=[...et].sort((st,lt)=>st===lt?0:st>lt?1:-1):rt=et.map(st=>this.bufferIndexOf(this.leaves,st,this.sortLeaves)).sort((st,lt)=>st===lt?0:st>lt?1:-1),!rt.every(st=>st!==-1))throw new Error("Element does not exist in Merkle tree");const nt=tt.map(st=>this.bufferify(st)),it=[],at=[];for(let st=0;st{if(!it.includes(lt[ht])){const mt=this.getPairNode(lt,ht),gt=nt.includes(lt[ht])||nt.includes(mt);mt&&at.push(!gt),it.push(lt[ht]),it.push(mt)}return dt.push(ht/2|0),dt},[])}return at}verify(et,tt,rt){let nt=this.bufferify(tt);if(rt=this.bufferify(rt),!Array.isArray(et)||!tt||!rt)return!1;for(let it=0;itthis.bufferify(pt)),it=it.map(pt=>this.bufferify(pt));const lt={};for(const[pt,mt]of this.zip(tt,rt))lt[Math.pow(2,st)+pt]=mt;for(const[pt,mt]of this.zip(this.getProofIndices(tt,st),it))lt[pt]=mt;let dt=Object.keys(lt).map(pt=>+pt).sort((pt,mt)=>pt-mt);dt=dt.slice(0,dt.length-1);let ht=0;for(;ht=2&&{}.hasOwnProperty.call(lt,pt^1)){let mt=[lt[pt-pt%2],lt[pt-pt%2+1]];this.sortPairs&&(mt=mt.sort(buffer_1$1.Buffer.compare));const gt=mt[1]?this.hashFn(this.concatenator(mt)):mt[0];lt[pt/2|0]=gt,dt.push(pt/2|0)}ht+=1}return!tt.length||{}.hasOwnProperty.call(lt,1)&<[1].equals(et)}verifyMultiProofWithFlags(et,tt,rt,nt){et=this.bufferify(et),tt=tt.map(this.bufferify),rt=rt.map(this.bufferify);const it=tt.length,at=nt.length,st=[];let lt=0,dt=0,ht=0;for(let pt=0;ptthis.bufferify(st)),it=it.map(st=>this.bufferify(st));const at=this.calculateRootForUnevenTree(tt,rt,nt,it);return et.equals(at)}getDepth(){return this.getLayers().length-1}getLayersAsObject(){const et=this.getLayers().map(rt=>rt.map(nt=>this.bufferToHex(nt,!1))),tt=[];for(let rt=0;rtpt-mt),at=it.map(([pt])=>pt),st=this.getProofIndicesForUnevenTree(at,rt);let lt=0;const dt=[];for(let pt=0;ptyt-bt).map(([,yt])=>yt),gt=ht[pt].map(([yt])=>yt),vt=[...new Set(gt.map(yt=>yt%2===0?yt/2:yt%2===0?(yt+1)/2:(yt-1)/2))],xt=[];for(let yt=0;yt0&&!(et&1<=tt));at--);if(nt!==rt.length)throw new Error("invalid bit calculation");return rt}numOfPeaks(et){let tt=et,rt=0;for(;tt>0;)tt%2===1&&rt++,tt=tt>>1;return rt}peakBagging(et,tt){const rt=this.getSize(et);if(this.numOfPeaks(et)!==tt.length)throw new Error("received invalid number of peaks");return et===0&&!tt.length?buffer_1.Buffer.alloc(0):this.peakBaggingFn?this.bufferify(this.peakBaggingFn(rt,tt)):this.hashFn(buffer_1.Buffer.concat([this.bufferify(rt),...tt.map(this.bufferify)]))}getSize(et){return(et<<1)-this.numOfPeaks(et)}getRoot(){return this.root}getHexRoot(){return this.bufferToHex(this.getRoot())}getNode(et){return this.hashes[et]}mountainHeight(et){let tt=1;for(;1<rt;)tt-=(1<this.size)throw new Error("out of range");if(!this.isLeaf(et))throw new Error("not a leaf");const tt=this.root,rt=this.width,nt=this.getPeakIndexes(this.width),it=[];let at=0;for(let pt=0;pt=et&&at===0&&(at=nt[pt]);let st=0,lt=0,dt=this.heightAt(at);const ht=[];for(;at!==et;)dt--,[st,lt]=this.getChildren(at),at=et<=st?st:lt,ht[dt-1]=this.hashes[et<=st?lt:st];return{root:tt,width:rt,peakBagging:it,siblings:ht}}verify(et,tt,rt,nt,it,at){if(nt=this.bufferify(nt),this.getSize(tt)=rt){dt=it[yt],lt=ht[yt];break}if(!dt)throw new Error("target not found");let pt=at.length+1;const mt=new Array(pt);let gt=0,vt=0;for(;pt>0&&(mt[--pt]=lt,lt!==rt);)[gt,vt]=this.getChildren(lt),lt=rt>gt?vt:gt;let xt;for(;ptthis.size)throw new Error("out of range");if(!this.hashes[et]){const[tt,rt]=this.getChildren(et),nt=this._getOrCreateNode(tt),it=this._getOrCreateNode(rt);this.hashes[et]=this.hashBranch(et,nt,it)}return this.hashes[et]}}MerkleMountainRange$1.MerkleMountainRange=MerkleMountainRange;typeof window<"u"&&(window.MerkleMountainRange=MerkleMountainRange);MerkleMountainRange$1.default=MerkleMountainRange;var IncrementalMerkleTree$1={},__importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(_e){return _e&&_e.__esModule?_e:{default:_e}};Object.defineProperty(IncrementalMerkleTree$1,"__esModule",{value:!0});IncrementalMerkleTree$1.IncrementalMerkleTree=void 0;const Base_1$1=__importDefault(Base$1),treeify_1=__importDefault(treeifyExports);class IncrementalMerkleTree extends Base_1$1.default{constructor(et,tt){if(super(),this.hashFn=et,tt.depth&&(this.depth=tt.depth),tt.arity&&(this.arity=tt.arity),this.depth<1)throw new Error("depth must be greater than 0");if(this.arity<1)throw new Error("arity must be greater than 0");const rt=[];let nt=tt.zeroValue;if(this.zeroValue=nt,this.zeroes=[],this.depth)for(let it=0;it=this.getMaxLeaves())throw new Error("tree is full");let tt=et,rt=this.nodes[0].length;for(let nt=0;nt=this.nodes[0].length)throw new Error("out of bounds");let rt=tt;for(let nt=0;ntBigInt(tt))}getLayers(){const et=[];for(const tt of this.nodes)et.push(this.copyList(tt));if(et[0].length=et[rt].length&&(et[rt][st]=this.zeroes[rt]);tt=Math.floor(tt/this.arity)}}return et.push([this.root]),et}getHexLayers(){return this.getLayers().reduce((et,tt)=>(Array.isArray(tt)?et.push(tt.map(rt=>this.bufferToHex(this.bufferify(rt)))):et.push(tt),et),[])}getLayersAsObject(){const et=this.getLayers().map(rt=>rt.map(nt=>this.bufferToHex(this.bufferify(nt),!1))),tt=[];for(let rt=0;rt=this.nodes[0].length)throw new Error("The leaf does not exist in this tree");const tt=[],rt=[],nt=et;for(let it=0;itBigInt(nt)),this.data=rt}getBucket(){let et;return this.data?et=this.hashFn(this.data):et=Buffer.alloc(32),new Bucket(BigInt(this.rng[1])-BigInt(this.rng[0]),et)}}MerkleSumTree$1.Leaf=Leaf;class ProofStep{constructor(et,tt){this.bucket=et,this.right=tt}}MerkleSumTree$1.ProofStep=ProofStep;class MerkleSumTree extends Base_1.Base{constructor(et,tt){super(),this.leaves=et,this.hashFn=tt,MerkleSumTree.checkConsecutive(et),this.buckets=[];for(const nt of et)this.buckets.push(nt.getBucket());let rt=[];for(const nt of this.buckets)rt.push(nt);for(;rt.length!==1;){const nt=[];for(;rt.length;)if(rt.length>=2){const it=rt.shift(),at=rt.shift(),st=it.size+at.size,lt=this.hashFn(Buffer.concat([this.sizeToBuffer(it.size),this.bufferify(it.hashed),this.sizeToBuffer(at.size),this.bufferify(at.hashed)])),dt=new Bucket(st,lt);at.parent=dt,it.parent=at.parent,it.right=at,at.left=it,nt.push(dt)}else nt.push(rt.shift());rt=nt}this.root=rt[0]}sizeToBuffer(et){const tt=Buffer.alloc(8);return new DataView(tt.buffer).setBigInt64(0,BigInt(et),!1),tt}static checkConsecutive(et){let tt=BigInt(0);for(const rt of et){if(rt.rng[0]!==tt)throw new Error("leaf ranges are invalid");tt=BigInt(rt.rng[1])}}getProof(et){let tt=this.buckets[Number(et)];const rt=[];for(;tt&&tt.parent;){const nt=!!tt.right,it=tt.right?tt.right:tt.left;tt=tt.parent,rt.push(new ProofStep(it,nt))}return rt}sum(et){let tt=BigInt(0);for(const rt of et)tt+=BigInt(rt);return tt}verifyProof(et,tt,rt){const nt=[this.sum(rt.filter(st=>!st.right).map(st=>st.bucket.size)),BigInt(et.size)-this.sum(rt.filter(st=>st.right).map(st=>st.bucket.size))];if(!(nt[0]===tt.rng[0]&&nt[1]===tt.rng[1]))return!1;let it=tt.getBucket(),at;for(const st of rt)st.right?at=this.hashFn(Buffer.concat([this.sizeToBuffer(it.size),this.bufferify(it.hashed),this.sizeToBuffer(st.bucket.size),this.bufferify(st.bucket.hashed)])):at=this.hashFn(Buffer.concat([this.sizeToBuffer(st.bucket.size),this.bufferify(st.bucket.hashed),this.sizeToBuffer(it.size),this.bufferify(it.hashed)])),it=new Bucket(BigInt(it.size)+BigInt(st.bucket.size),at);return it.size===et.size&&it.hashed.toString("hex")===et.hashed.toString("hex")}}MerkleSumTree$1.MerkleSumTree=MerkleSumTree;typeof window<"u"&&(window.MerkleSumTree=MerkleSumTree);MerkleSumTree$1.default=MerkleSumTree;(function(_e){var et=commonjsGlobal&&commonjsGlobal.__importDefault||function(at){return at&&at.__esModule?at:{default:at}};Object.defineProperty(_e,"__esModule",{value:!0}),_e.MerkleTree=void 0;const tt=et(MerkleTree$1);_e.MerkleTree=tt.default;var rt=MerkleMountainRange$1;Object.defineProperty(_e,"MerkleMountainRange",{enumerable:!0,get:function(){return rt.MerkleMountainRange}});var nt=IncrementalMerkleTree$1;Object.defineProperty(_e,"IncrementalMerkleTree",{enumerable:!0,get:function(){return nt.IncrementalMerkleTree}});var it=MerkleSumTree$1;Object.defineProperty(_e,"MerkleSumTree",{enumerable:!0,get:function(){return it.MerkleSumTree}}),_e.default=tt.default})(dist);const useMerkel=_e=>{const et=st=>{const lt=[];for(let dt=0;dt{const dt=it(st,lt,1);return rt.current.getHexProof(dt)},it=(st,lt,dt)=>buffer.Buffer.from(utils.solidityKeccak256(["uint16","string","uint16","string","uint8"],[st,",",lt,",",dt]).slice(2),"hex"),at=st=>{const lt=st.map(({x:ht,y:pt})=>[ht,pt]),dt=[];for(let ht=0;ht{_e.length!==0&&(tt.current=et(_e),rt.current=new dist.MerkleTree(tt.current.map(st=>it(st.x,st.y,st.value)),utils.keccak256,{sortPairs:!0}))},[_e]),at},Map$1=_e=>{const{width:et,height:tt,vertexCoordinate:rt}=_e,{x:nt,y:it}=rt,[at,st]=reactExports.useState({x:-1,y:-1}),{onPlayerMove:lt,players:dt,treasureChest:ht=[],curId:pt,mapData:mt}=reactExports.useContext(GameContext),gt=reactExports.useMemo(()=>Array(tt).fill(0).map(()=>Array(et).fill(0)),[et,tt]),vt=reactExports.useMemo(()=>simplifyMapData(mt),[mt]),xt=useMerkel(vt),yt=reactExports.useMemo(()=>{const $t={};return ht.forEach(Pt=>{$t[`${Pt.x}-${Pt.y}`]?$t[`${Pt.x}-${Pt.y}`].push(Pt):$t[`${Pt.x}-${Pt.y}`]=[Pt]}),$t},[ht]),bt=reactExports.useMemo(()=>{const $t={};return dt.forEach(Pt=>{$t[`${Pt.x}-${Pt.y}`]?$t[`${Pt.x}-${Pt.y}`].push(Pt):$t[`${Pt.x}-${Pt.y}`]=[Pt]}),$t},[dt]),wt=reactExports.useRef({}),Et=$t=>{console.log(dt,$t,"onMoveTo",pt);const{x:Pt,y:kt,speed:Lt}=dt.find(qt=>qt.addr.toLocaleLowerCase()===pt.toLocaleLowerCase()),jt=bfs(vt,{x:Pt,y:kt},$t).slice(1).slice(0,Number(Lt));lt(jt,xt(jt))};return mt.length===0?jsxRuntimeExports.jsx("div",{className:"mi-map-wrapper"}):jsxRuntimeExports.jsx("div",{className:"mi-map-wrapper",children:jsxRuntimeExports.jsx("div",{className:"mi-map-content",children:gt.map(($t,Pt)=>{const kt=it+Pt;return jsxRuntimeExports.jsx("div",{className:"mi-map-row",children:$t.map((Lt,jt)=>{const qt=nt+jt;return jsxRuntimeExports.jsx(MapCell,{coordinate:{x:qt,y:kt},prevActionCoordinate:at,onExeAction:st,cellClassCache:wt.current,players:bt[`${qt}-${kt}`],treasureChest:yt[`${qt}-${kt}`],onMoveTo:Et},nt+jt)})},kt)})})})},styles$9="";var Component={};function _typeof(_e){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof(_e)}Object.defineProperty(Component,"__esModule",{value:!0});Component.CopyToClipboard=void 0;var _react=_interopRequireDefault(reactExports),_copyToClipboard=_interopRequireDefault(copyToClipboard),_excluded=["text","onCopy","options","children"];function _interopRequireDefault(_e){return _e&&_e.__esModule?_e:{default:_e}}function ownKeys(_e,et){var tt=Object.keys(_e);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(_e);et&&(rt=rt.filter(function(nt){return Object.getOwnPropertyDescriptor(_e,nt).enumerable})),tt.push.apply(tt,rt)}return tt}function _objectSpread(_e){for(var et=1;et=0)&&Object.prototype.propertyIsEnumerable.call(_e,rt)&&(tt[rt]=_e[rt])}return tt}function _objectWithoutPropertiesLoose(_e,et){if(_e==null)return{};var tt={},rt=Object.keys(_e),nt,it;for(it=0;it=0)&&(tt[nt]=_e[nt]);return tt}function _classCallCheck(_e,et){if(!(_e instanceof et))throw new TypeError("Cannot call a class as a function")}function _defineProperties(_e,et){for(var tt=0;tt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf(_e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(tt){return tt.__proto__||Object.getPrototypeOf(tt)},_getPrototypeOf(_e)}function _defineProperty(_e,et,tt){return et in _e?Object.defineProperty(_e,et,{value:tt,enumerable:!0,configurable:!0,writable:!0}):_e[et]=tt,_e}var CopyToClipboard$1=function(_e){_inherits(tt,_e);var et=_createSuper(tt);function tt(){var rt;_classCallCheck(this,tt);for(var nt=arguments.length,it=new Array(nt),at=0;at{const{account:et,address:tt=""}=_e,rt=`${tt.slice(0,6)}...${tt.slice(-4)}`,nt=()=>{message$1.success("Successfully copied")};return jsxRuntimeExports.jsxs("div",{className:"user-address-wrapper",children:[jsxRuntimeExports.jsx("div",{className:"user-account",children:et}),jsxRuntimeExports.jsx(lib.CopyToClipboard,{text:tt,onCopy:nt,children:jsxRuntimeExports.jsx("div",{className:"user-address",children:rt})})]})},UserAvatar=_e=>{const{avatar:et,username:tt="user",hp:rt,maxHp:nt,ap:it,maxAp:at,roomId:st,address:lt,balance:dt}=_e;return jsxRuntimeExports.jsxs("div",{className:"mi-c-user-avatar",children:[jsxRuntimeExports.jsx("div",{className:"avatar-box",children:jsxRuntimeExports.jsx(Appearance$1,{..._e})}),jsxRuntimeExports.jsx(UserAddress,{address:lt,account:dt+"ETH"})]})},style="",Appearance=_e=>{const{boxesCount:et=0,leaderboard:tt=[]}=_e;return jsxRuntimeExports.jsxs("div",{className:"mi-leaderboard",children:[jsxRuntimeExports.jsxs("div",{className:"boxes",children:["Remaining Boxes: ",et]}),jsxRuntimeExports.jsx("div",{className:"section-title",children:"Leaderboard"}),tt.map((rt,nt)=>jsxRuntimeExports.jsxs("div",{className:"leaderboard-item",children:[jsxRuntimeExports.jsxs("span",{className:"player-score",children:[nt+1,"."]}),jsxRuntimeExports.jsx("span",{className:"player-name",children:rt.username}),jsxRuntimeExports.jsx("span",{className:"player-gems",children:rt.oreBalance})]},nt))]})},styles$7="",MUDContext=reactExports.createContext(null),MUDProvider=({children:_e,value:et})=>{if(reactExports.useContext(MUDContext))throw new Error("MUDProvider can only be used once");return jsxRuntimeExports.jsx(MUDContext.Provider,{value:et,children:_e})},useMUD=()=>{const _e=reactExports.useContext(MUDContext);if(!_e)throw new Error("Must be used within a MUDProvider");return _e},styles$6="",getRandomStr=_e=>{let et="abcdefghigklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXWZ0123456789",tt="";for(let rt=0;rt<_e;rt++){let nt=getRandom(0,62),it=et[nt];tt+=it}return tt},getRandom=(_e,et)=>(_e=Math.ceil(_e),et=Math.floor(et),Math.floor(Math.random()*(et-_e))+_e);let timeout$1=null,nonceHex="",battle={};function Battle(_e){const[et,tt]=reactExports.useState(1),[rt,nt]=reactExports.useState([]),[it,at]=reactExports.useState({}),[st,lt]=reactExports.useState(0),[dt,ht]=reactExports.useState(0),[pt,mt]=reactExports.useState(0),[gt,vt]=reactExports.useState(!1),[xt,yt]=reactExports.useState(!1),{components:{BattleList:bt},systemCalls:{confirmBattle:wt,revealBattle:Et,forceEnd:$t},network:Pt}=useMUD();let kt=localStorage.getItem("nonce")||"";kt||(kt=getRandomStr(18),localStorage.setItem("nonce",kt)),nonceHex||(nonceHex=formatBytes32String(kt));const Lt=async()=>{if(battle&&(battle.attackerState==1&&battle.defenderState==0||battle.attackerState==0&&battle.defenderState==1))timeout$1||(timeout$1=setTimeout(async()=>{let At=await $t(battle.id);if(console.log(At),At.isEnd&&At.winner){_e.finishBattle(At.winner,At.attacker,At.defender);return}},23e3));else if(battle&&(battle.attackerState==1&&battle.defenderState==1||battle.attackerState==2&&battle.defenderState==1||battle.attackerState==1&&battle.defenderState==2)&&st<=1){if(st==3)return;clearTimeout(timeout$1),timeout$1=null;let At=JSON.parse(localStorage.getItem("confirmBattleData")||"[]"),Tt=rt[0]||At[0]||"attack",Bt=rt[1]||At[1]||0,Ot=formatBytes32String(Tt);console.log(Bt,Tt);let Ut=await Et(battle.id,Ot,Bt,nonceHex);console.log(Ut),Ut?.type=="success"&&(battle=Ut.data,lt(3))}};let qt=ne([Ye$1(bt),Je$1(bt,{isEnd:!1})]).map(At=>{let Tt=ot({battleId:"uint256"},At),Bt=g$7(bt,At);return Bt.id=Tt.battleId.toString(),Bt})?.filter(At=>At.attacker.toLocaleLowerCase()==_e?.curPlayer?.addr.toLocaleLowerCase()||At.defender.toLocaleLowerCase()==_e?.curPlayer?.addr.toLocaleLowerCase())[0];qt?(battle=qt,Lt()):_e.finishBattle(),reactExports.useEffect(()=>{if(battle){if(!it.curHp||!it.targetHp){let At={attackerHP:battle.attackerHP.toString(),defenderHP:battle.defenderHP.toString(),attacker:battle.attacker.toLocaleLowerCase(),defender:battle.defender.toLocaleLowerCase()};at(At)}if(st==3){let At=JSON.parse(JSON.stringify(it)),Tt=document.querySelector(".battle-1"),Bt=document.querySelector(".battle-2");Tt&&Bt&&(console.log(battle.attackerHP,battle.defenderHP,At.attackerHP,At.defenderHP),mt(Number(At.attackerHP)-Number(battle.attackerHP)),ht(Number(At.defenderHP)-Number(battle.defenderHP)),Tt.classList.add("attack"),setTimeout(()=>{Tt.classList.remove("attack"),Bt.classList.add("back");let Ot=battle.defenderHP;ht(Number(At.defenderHP)-Number(Ot)),yt(!0),At.defenderHP=Ot,at(At),setTimeout(()=>{if(Bt.classList.remove("back"),yt(!1),Ot<=0||battle.isEnd){setTimeout(()=>{_e.finishBattle(battle.winner,battle.attacker,battle.defender)},600);return}setTimeout(()=>{Bt.classList.add("attack"),setTimeout(()=>{Bt.classList.remove("attack"),Tt.classList.add("back");let Ut=battle.attackerHP;if(vt(!0),At.attackerHP=Ut,at(At),Ut<=0||battle.isEnd){setTimeout(()=>{_e.finishBattle(battle.winner,battle.attacker,battle.defender)},600);return}setTimeout(()=>{Tt.classList.remove("back"),mt(0),ht(0),vt(!1),lt(0),tt(1)},400)},400)},500)},400)},400))}}},[st]);const Dt=(At,Tt)=>{console.log(At),st==0&&(Tt&&nt([Tt]),tt(At))},Ht=At=>{console.log(At),st==0&&At&&_t(At)},Xt=(At,Tt,Bt)=>utils.solidityKeccak256(["bytes32","uint256","bytes32"],[At,Tt,Bt]),Mt=()=>{let At="",Tt="",Bt=battle.defenderArg.toString()=="1"?"Sprint":battle.defenderArg.toString()=="2"?"Sneak":"Magic",Ot=battle.attackerArg.toString()=="1"?"Sprint":battle.attackerArg.toString()=="2"?"Sneak":"Magic";return battle.attacker.toLocaleLowerCase()==_e.curPlayer.addr.toLocaleLowerCase()?(At=_e.curPlayer.name,Tt=_e.targetPlayer.name):(Tt=_e.curPlayer.name,At=_e.targetPlayer.name),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("p",{children:[At," used a ",Ot,": ",pt.toFixed(0)]}),jsxRuntimeExports.jsxs("p",{children:[Tt," used a ",Bt,": ",dt.toFixed(0)]})]})},_t=async At=>{if(st!=0)return;let Tt=rt[0]||"attack",Bt=formatBytes32String(Tt),Ot=Xt(Bt,At,nonceHex);nt([Tt,At]),localStorage.setItem("confirmBattleData",JSON.stringify([Tt,At])),lt(1);let Ut=await wt(Ot,battle.id);Ut.type=="success"&&(battle=Ut.data)};return jsxRuntimeExports.jsx("div",{className:"mi-battle-wrap",children:jsxRuntimeExports.jsx("div",{className:"mi-battle-content",children:jsxRuntimeExports.jsx("div",{className:"mi-battle",children:jsxRuntimeExports.jsxs("div",{className:"mi-battle-main",children:[jsxRuntimeExports.jsxs("div",{className:"mi-battle-character",children:[jsxRuntimeExports.jsxs("div",{className:"mi-battle-character-card battle-1",children:[jsxRuntimeExports.jsxs("div",{className:"mi-battle-character-card-hp",children:[jsxRuntimeExports.jsxs("div",{className:"user-info",children:[jsxRuntimeExports.jsx("div",{children:_e?.curPlayer?.addr==it.attacker?_e?.curPlayer?.name:_e?.targetPlayer?.name}),jsxRuntimeExports.jsxs("div",{children:["ATK:",_e?.curPlayer?.addr==it.attacker?_e?.curPlayer?.attack?.toString():_e?.targetPlayer?.attack.toString()]})]}),jsxRuntimeExports.jsxs("div",{className:"hp-wrap",children:[jsxRuntimeExports.jsx("div",{className:"hp",style:{position:"absolute",borderRadius:"2px",borderTopLeftRadius:0,borderBottomLeftRadius:0,background:"#FF6161",width:Math.floor(272*(Number(it?.attackerHP)/Number(_e?.curPlayer?.addr==it?.attacker?_e?.curPlayer?.maxHp:_e?.targetPlayer?.maxHp)))+"px",height:"22px"}}),jsxRuntimeExports.jsxs("div",{className:"hp-text",children:[Number(it?.attackerHP),"/",Number(_e?.curPlayer?.addr==it?.attacker?_e?.curPlayer?.maxHp:_e?.targetPlayer?.maxHp)]})]}),gt?jsxRuntimeExports.jsxs("div",{className:"hp-loss",children:["-",pt.toFixed(0)]}):null]}),jsxRuntimeExports.jsx("div",{className:"dark-attacker",children:_e?.curPlayer?.addr==it.attacker?jsxRuntimeExports.jsx(Appearance$1,{..._e?.curPlayer?.equip}):jsxRuntimeExports.jsx(Appearance$1,{..._e?.targetPlayer?.equip})})]}),jsxRuntimeExports.jsxs("div",{className:"mi-battle-character-card battle-2",children:[jsxRuntimeExports.jsxs("div",{className:"mi-battle-character-card-hp",children:[jsxRuntimeExports.jsxs("div",{className:"user-info",children:[jsxRuntimeExports.jsx("div",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:_e?.curPlayer?.addr==it.defender?_e?.curPlayer?.name:_e?.targetPlayer?.name}),jsxRuntimeExports.jsxs("div",{children:["ATK:",_e?.curPlayer?.addr==it.defender?_e?.curPlayer?.attack?.toString():_e?.targetPlayer?.attack.toString()]})]}),jsxRuntimeExports.jsxs("div",{className:"hp-wrap",children:[jsxRuntimeExports.jsx("div",{className:"hp",style:{position:"absolute",borderRadius:"2px",borderTopLeftRadius:0,borderBottomLeftRadius:0,background:"#FF6161",width:Math.floor(272*(Number(it?.defenderHP)/Number(_e?.curPlayer?.addr==it?.defender?_e?.curPlayer?.maxHp:_e?.targetPlayer?.maxHp)))+"px",height:"22px"}}),jsxRuntimeExports.jsxs("div",{className:"hp-text",children:[Number(it?.defenderHP),"/",Number(_e?.curPlayer?.addr==it?.defender?_e?.curPlayer?.maxHp:_e?.targetPlayer?.maxHp)]})]}),xt?jsxRuntimeExports.jsxs("div",{className:"hp-loss",children:["-",dt.toFixed(0)]}):null]}),jsxRuntimeExports.jsx("div",{className:"dark-defender",children:_e?.curPlayer?.addr==it.defender?jsxRuntimeExports.jsx(Appearance$1,{..._e?.curPlayer?.equip}):jsxRuntimeExports.jsx(Appearance$1,{..._e?.targetPlayer?.equip})})]})]}),jsxRuntimeExports.jsxs("div",{className:"battle-action",children:[jsxRuntimeExports.jsx("div",{className:"action-step",children:st==0?jsxRuntimeExports.jsx("p",{children:"what will you do ?"}):st==1?jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("p",{children:[_e?.curPlayer?.name," used a ",rt[1]==1?"Sprint":rt[1]==2?"Sneak":"Magic","!"]}),jsxRuntimeExports.jsxs("p",{children:[_e?.targetPlayer?.name," is thinking..."]})]}):st==3?Mt():null}),jsxRuntimeExports.jsx("div",{className:"battle-tactics",children:et==1?jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:[jsxRuntimeExports.jsx("div",{className:"tactics-item",onClick:()=>Dt(2,"attack"),children:"Attack"}),jsxRuntimeExports.jsx("div",{className:"tactics-item bag",children:"Bag"}),jsxRuntimeExports.jsx("div",{className:"tactics-item",onClick:()=>Dt(2,"escape"),children:"Escape"})]}):et==2?jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:[jsxRuntimeExports.jsx("div",{className:"tactics-item",onClick:()=>Ht(1),children:"Sprint"}),jsxRuntimeExports.jsx("div",{className:"tactics-item",onClick:()=>Ht(2),children:"Sneak"}),jsxRuntimeExports.jsx("div",{className:"tactics-item",onClick:()=>Ht(3),children:"Magic"}),jsxRuntimeExports.jsxs("div",{className:"tactics-item",onClick:()=>Dt(1),children:[jsxRuntimeExports.jsx("span",{style:{transform:"rotate(180deg)",marginBottom:"2px",marginRight:"4px"},children:"→"}),"Back"]})]}):null})]})]})})})})}function useModal(_e={title:""}){const[et,tt]=reactExports.useState(!1),rt=reactExports.useRef(null);function nt(){tt(!0)}function it(){tt(!1)}function at(st){return jsxRuntimeExports.jsx(Modal$1,{..._e,className:"mi-modal",open:et,onCancel:it,footer:null,children:rt.current})}return{Modal:at,open:nt,close:it,setContent:st=>{rt.current=st}}}const styles$5="",gemImg="/assets/gem-71e0d154.png",styles$4="",UserPackage=_e=>{const et=new Array(10).fill(0);return et[0]=_e.gem,jsxRuntimeExports.jsxs("div",{className:"mi-user-package",children:[jsxRuntimeExports.jsx("h3",{children:_e.title}),jsxRuntimeExports.jsx("div",{className:"package-items-wrapper",children:et.map((tt,rt)=>jsxRuntimeExports.jsx("div",{className:"package-item",children:tt>0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("img",{src:gemImg,alt:"",className:"package-item-gem"}),jsxRuntimeExports.jsx("div",{className:"package-item-count",children:tt})]})},rt))})]})},UserInfo=_e=>{const{handheld:et,head:tt,clothes:rt,userUrl:nt,lootUrl:it,player:at}=_e,st=et&&tt&&rt||at?.equip?.handheld&&at?.equip?.head&&at?.equip?.clothes;return jsxRuntimeExports.jsxs("div",{className:"mi-userinfo-wrapper",children:[jsxRuntimeExports.jsxs("div",{className:"left-main-content",children:[jsxRuntimeExports.jsx("h3",{children:"User info"}),jsxRuntimeExports.jsxs("div",{className:"user-detail-wrapper",children:[jsxRuntimeExports.jsx("div",{className:"user-appearance-wrapper",children:jsxRuntimeExports.jsx("div",{className:"user-appearance-box",children:jsxRuntimeExports.jsx(Appearance$1,{clothes:rt||at?.equip?.clothes,handheld:et||at?.equip?.handheld,head:tt||at?.equip?.head})})}),jsxRuntimeExports.jsxs("div",{className:`loot-wrapper ${st?"loaded":""}`,children:[jsxRuntimeExports.jsx("div",{className:"loot-detail",children:nt?jsxRuntimeExports.jsx("img",{src:nt,alt:""}):null}),jsxRuntimeExports.jsx("div",{className:"loot-detail",children:it?jsxRuntimeExports.jsx("img",{src:it,alt:""}):null})]}),jsxRuntimeExports.jsxs("div",{className:`user-attr-wrapper ${st?"loaded":""}`,children:[jsxRuntimeExports.jsxs("dl",{children:[jsxRuntimeExports.jsx("dt",{children:"HP"}),jsxRuntimeExports.jsxs("dd",{children:[jsxRuntimeExports.jsx("span",{className:"base-attr",children:st?at?.maxHp.toString():0}),jsxRuntimeExports.jsx("span",{className:"extra-attr",children:st?at?.maxHp?.toString():""})]})]}),jsxRuntimeExports.jsxs("dl",{children:[jsxRuntimeExports.jsx("dt",{children:"Attack"}),jsxRuntimeExports.jsxs("dd",{children:[jsxRuntimeExports.jsx("span",{className:"base-attr",children:st?at?.attack?.toString():0}),jsxRuntimeExports.jsx("span",{className:"extra-attr",children:st?at?.attack?.toString():""})]})]}),jsxRuntimeExports.jsxs("dl",{children:[jsxRuntimeExports.jsx("dt",{children:"AttackRange"}),jsxRuntimeExports.jsxs("dd",{children:[jsxRuntimeExports.jsx("span",{className:"base-attr",children:st?at?.attackRange?.toString():0}),jsxRuntimeExports.jsx("span",{className:"extra-attr",children:st?at?.attackRange?.toString():""})]})]}),jsxRuntimeExports.jsxs("dl",{children:[jsxRuntimeExports.jsx("dt",{children:"Speed"}),jsxRuntimeExports.jsxs("dd",{children:[jsxRuntimeExports.jsx("span",{className:"base-attr",children:st?at?.speed?.toString():0}),jsxRuntimeExports.jsx("span",{className:"extra-attr",children:st?at?.speed?.toString():""})]})]}),jsxRuntimeExports.jsxs("dl",{children:[jsxRuntimeExports.jsx("dt",{children:"Strength"}),jsxRuntimeExports.jsxs("dd",{children:[jsxRuntimeExports.jsx("span",{className:"base-attr",children:st?at?.strength?.toString():0}),jsxRuntimeExports.jsx("span",{className:"extra-attr",children:st?at?.strength?.toString():""})]})]}),jsxRuntimeExports.jsxs("dl",{children:[jsxRuntimeExports.jsx("dt",{children:"Space"}),jsxRuntimeExports.jsxs("dd",{children:[jsxRuntimeExports.jsx("span",{className:"base-attr",children:st?at?.space?.toString():0}),jsxRuntimeExports.jsx("span",{className:"extra-attr",children:st?at?.space?.toString():""})]})]})]})]})]}),jsxRuntimeExports.jsxs("div",{className:"right-main-content",children:[jsxRuntimeExports.jsx(UserPackage,{gem:at?.oreBalance,title:"User Package"}),jsxRuntimeExports.jsx(UserPackage,{gem:at?.seasonOreBalance,title:"Season Package"})]})]})},styles$3="",UserInfoDialog=_e=>{const{visible:et,onClose:tt,...rt}=_e;return jsxRuntimeExports.jsxs("div",{className:`mi-userinfo-dialog ${et?"":"hidden"}`,children:[jsxRuntimeExports.jsx(UserInfo,{...rt,player:rt}),jsxRuntimeExports.jsx("button",{className:"mi-btn close-btn",onClick:tt,children:"OK"})]})},updatePlayerPosition=(_e,et)=>{const tt=_e.x-et.x,rt=tt===0?void 0:tt<0?"Right":"Left";Object.assign(_e,et),rt&&(_e.toward=rt)},getPlayersCache=(_e=[])=>_e.map(et=>`${et.addr}-${et.x}-${et.y}`).join("*"),lootAbi=[{inputs:[{internalType:"string",name:"_desc",type:"string"},{internalType:"string",name:"symbol",type:"string"},{internalType:"string",name:"name",type:"string"},{internalType:"string",name:"_notRevealedInfo",type:"string"},{internalType:"uint256",name:"_waitBlockCount",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"randomId",type:"uint256"},{indexed:!1,internalType:"address",name:"author",type:"address"}],name:"NewRandom",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"getStructIndexInfo",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"getStructInfo",outputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserTokenIdList",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"lootList",outputs:[{internalType:"uint256",name:"randomId",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"Weapon",type:"string"},{internalType:"string",name:"Chest",type:"string"},{internalType:"string",name:"Head",type:"string"},{internalType:"string",name:"Waist",type:"string"},{internalType:"string",name:"Foot",type:"string"},{internalType:"string",name:"Hand",type:"string"},{internalType:"string",name:"Neck",type:"string"},{internalType:"string",name:"Ring",type:"string"},{internalType:"enum MRandom.RandomState",name:"state",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"randomId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"randomList",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"address",name:"author",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"revealNFT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"tokenId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"waitBlockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_targetAddress",type:"address"},{internalType:"address",name:"_contractAddress",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"withdrawErc20",outputs:[],stateMutability:"nonpayable",type:"function"}],userAbi=[{inputs:[{internalType:"uint256",name:"_waitBlockCount",type:"uint256"},{internalType:"string",name:"_symbol",type:"string"},{internalType:"string",name:"_name",type:"string"},{internalType:"string",name:"_notRevealedInfo",type:"string"},{internalType:"string",name:"_revealedDesc",type:"string"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"randomId",type:"uint256"},{indexed:!1,internalType:"address",name:"author",type:"address"}],name:"NewRandom",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"getStructInfo",outputs:[{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getUserTokenIdList",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"randomId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"randomList",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"address",name:"author",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"revealNFT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"tokenId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"userList",outputs:[{internalType:"uint256",name:"randomId",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"HP",type:"uint256"},{internalType:"uint256",name:"Attack",type:"uint256"},{internalType:"uint256",name:"AttackRange",type:"uint256"},{internalType:"uint256",name:"Speed",type:"uint256"},{internalType:"uint256",name:"Strength",type:"uint256"},{internalType:"uint256",name:"Space",type:"uint256"},{internalType:"enum MRandom.RandomState",name:"state",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"waitBlockCount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],toObject=_e=>JSON.parse(JSON.stringify(_e,(et,tt)=>typeof tt=="bigint"?tt.toString():tt));let userContract$2,lootContract$2,timeout=null;const Game=()=>{const _e=useNavigate(),{components:{Player:et,PlayerAddon:tt,BattleList:rt,BoxList:nt,GlobalConfig:it,LootList1:at,LootList2:st,PlayerLocationLock:lt,PlayerSeason:dt},systemCalls:{move:ht,openBox:pt,revealBox:mt,getCollections:gt,battleInvitation:vt,unlockUserLocation:xt,submitGem:yt},network:bt}=useMUD(),[wt,Et]=reactExports.useState([]),[$t,Pt]=reactExports.useState({x:0,y:0}),kt=reactExports.useMemo(()=>simplifyMapData(wt),[wt]),Lt=useMerkel(kt),[jt,qt]=reactExports.useState(null),[Dt,Ht]=reactExports.useState(null),[Xt,Mt]=reactExports.useState(),[_t,At]=reactExports.useState(!1),[Tt,Bt]=reactExports.useState(!1),[Ot,Ut]=reactExports.useState(0),[Wt,Ct]=reactExports.useState(),{account:St}=bt,Ft=St,{Modal:Vt,open:Rt,close:Kt,setContent:Zt}=useModal(),Jt=reactExports.useRef([]),rr=reactExports.useRef(),or=ne([Ye$1(it)]).map(Yt=>g$7(it,Yt));if(or.length&&or[0].userContract){let Yt=bt.privateKey,tr=bt.walletClient?.chain?.rpcUrls?.default?.http[0]||"http://127.0.0.1:8545",dr=new JsonRpcProvider(tr),br=new Wallet(Yt,dr),Qt=or[0].userContract;userContract$2=new Contract(Qt,userAbi,br)}if(or.length&&or[0].lootContract&&!lootContract$2){let Yt=bt.privateKey,tr=bt.walletClient?.chain?.rpcUrls?.default?.http[0]||"http://127.0.0.1:8545",dr=new JsonRpcProvider(tr),br=new Wallet(Yt,dr),Qt=or[0].lootContract;lootContract$2=new Contract(Qt,lootAbi,br)}const ar=ne([Ye$1(at)]).map(Yt=>{const tr=g$7(at,Yt),dr=ot({addr:"address"},Yt)?.addr?.toLocaleLowerCase()||"";return tr.addr=dr,tr}),ir=ne([Ye$1(et)]).map(Yt=>{const tr=ot({addr:"address"},Yt)?.addr?.toLocaleLowerCase()||"",dr=g$7(et,Yt);return dr.addr=tr,dr.username=dr.name,ar.forEach(br=>{if(br.addr.toLocaleLowerCase()===tr.toLocaleLowerCase()){let Qt=br.chest.replace(/"(.*?)"/,"").split(" of")[0].replace(/^\s+|\s+$/g,""),sr=br.weapon.replace(/"(.*?)"/,"").split(" of")[0].replace(/^\s+|\s+$/g,""),cr=br.head.replace(/"(.*?)"/,"").split(" of")[0].replace(/^\s+|\s+$/g,"");dr.equip={clothes:Qt,handheld:sr,head:cr}}}),dr}).filter(Yt=>Yt.state>1),pr=ne([Ye$1(dt)]).map(Yt=>{const tr=g$7(dt,Yt),dr=ot({addr:"address"},Yt)?.addr?.toLocaleLowerCase()||"";return tr.addr=dr,tr.username=ir.filter(br=>br.addr.toLocaleLowerCase()==dr.toLocaleLowerCase())[0]?.name,tr}).sort((Yt,tr)=>tr.oreBalance-Yt.oreBalance),[nr,hr]=reactExports.useState([]),Ar=getPlayersCache(ir);reactExports.useEffect(()=>{let Yt=[...nr];ir.forEach(tr=>{const dr=nr.findIndex(br=>br.addr===tr.addr);dr===-1?Yt.push({...tr}):Yt[dr]=Object.assign(Yt[dr],tr)}),Yt=Yt.filter(tr=>ir.findIndex(dr=>dr.addr===tr.addr)!==-1),hr(Yt)},[Ar]);const ur=nr.find(Yt=>Yt.addr.toLocaleLowerCase()==St.toLocaleLowerCase());ur&&ur.addr&&(localStorage.setItem("curPlayer",JSON.stringify(toObject(ur))),localStorage.setItem("worldContractAddress",bt.worldContract.address));const vr=ne([Ye$1(rt)]).map(Yt=>{const tr=ot({battleId:"uint256"},Yt),dr=g$7(rt,Yt);return dr.id=tr.battleId.toString(),dr});if(vr.length&&!_t){const Yt=vr.filter(tr=>(tr.attacker.toLocaleLowerCase()==St.toLocaleLowerCase()||tr.defender.toLocaleLowerCase()==St.toLocaleLowerCase())&&!tr.isEnd)[0];if(Yt){const tr=Yt.attacker.toLocaleLowerCase()==St.toLocaleLowerCase()?Yt.defender:Yt.attacker,dr=ir.filter(Qt=>Qt.addr.toLocaleLowerCase()==tr.toLocaleLowerCase())[0],br=ir.find(Qt=>Qt.addr.toLocaleLowerCase()==St.toLocaleLowerCase());Dt||Ht(br),jt||qt(dr),At(!0)}}const wr=Yt=>{Zt(jsxRuntimeExports.jsxs("div",{className:"mi-modal-content-wrapper",children:[jsxRuntimeExports.jsxs("div",{className:"mi-modal-content",children:["Congrats,you got ",Yt.oreBalance," gems!",jsxRuntimeExports.jsx("div",{className:"mi-treasure-chest-wrapper",children:jsxRuntimeExports.jsx(TreasureChest,{})})]}),jsxRuntimeExports.jsx("div",{className:"mi-modal-footer",children:jsxRuntimeExports.jsx("button",{className:"mi-btn",onClick:async()=>{await gt(Yt.id,Yt.oreBalance,Yt.treasureBalance),Kt()},children:"OK"})})]})),Rt()},gr=ne([Ye$1(nt)]).map(Yt=>{const tr=ot({boxId:"uint256"},Yt),dr=g$7(nt,Yt);return dr.id=tr.boxId.toString(),dr}).filter(Yt=>Yt.opened==!1||Yt.opened&&(Yt.oreBalance||Yt.treasureBalance)),yr=async()=>{const Yt=await bt.publicClient.getBalance({address:bt.walletClient.account.address}),tr=(+formatEther$1(Yt.toString())).toFixed(2);Ut(tr)};reactExports.useEffect(()=>{loadMapData().then(Yt=>{Et(Yt),Jt.current=Yt}),yr()},[]);const Er=(Yt,tr,dr)=>{if(At(!1),Yt&&tr&&dr){let br=Yt.toLocaleLowerCase()==tr.toLocaleLowerCase()?dr:tr,Qt=g$7(et,u$1({addr:"address"},{addr:br}));if(Yt.toLocaleLowerCase()==St.toLocaleLowerCase())console.log("win"),Qt?.state==1||Qt?.state==0?message$1.success("You win the battle"):(message$1.info("Target has escaped"),timeout=setTimeout(()=>{xt(),timeout=null},23e3)),qt(null);else{console.log("lose");let sr=g$7(et,bt.playerEntity);if(sr?.state==1||sr?.state==0){message$1.error("You lose the battle"),_e("/");return}else message$1.info("You escaped the battle")}}else{let br=g$7(et,bt.playerEntity);if(br?.state==1||br?.state==0){_e("/");return}}},_r=async(Yt,tr)=>{if(ur.waiting){message$1.error("Waiting for transaction");return}let dr=g$7(lt,u$1({addr:"address"},{addr:St}));if(console.log(dr,"playerLock"),dr&&Number(dr.lockTime)){message$1.error("You are locked"),timeout||(timeout=setTimeout(()=>{xt(),timeout=null},2e3));return}let br=!1;clearInterval(rr.current);let Qt=0;const sr=~~(1500/Number(ur.speed));rr.current=setInterval(async()=>{if(Pt(triggerVertexUpdate(Yt[Qt],ur,Jt.current,$t)),updatePlayerPosition(ur,Yt[Qt]),hr([...nr]),Qt++,Qt===Yt.length){clearInterval(rr.current),br||(ur.waiting=!0);const xr=Yt[Qt-1];if(DELIVERY.x===xr.x&&DELIVERY.y===xr.y){let Pr=ur,Nr=g$7(tt,u$1({addr:"address"},{addr:Pr.addr})),Or=Nr.userId.toString(),Tr=Nr.lootId.toString(),Ir=await Promise.all([userContract$2.tokenURI(Or),lootContract$2.tokenURI(Tr)]),Ur=Ir[0],Br=Ir[1];Ur=$r(Ur),Br=$r(Br),Pr.userUrl=Ur.image,Pr.lootUrl=Br.image,Pr.seasonOreBalance=pr.filter(Mr=>Mr.addr.toLocaleLowerCase()==Pr.addr.toLocaleLowerCase())[0]?.oreBalance,Mt(Pr),kr()}}},sr);const cr=await ht(tr);if(br=!0,ur.waiting=!1,Nt.length>0){const xr=Nt[Nt.length-1];er(xr.x,xr.y)}cr?.type==="error"&&message$1.error(cr.message)},$r=Yt=>(Yt=Yt.replace("data:application/json;base64,",""),Yt=atob(Yt),Yt=JSON.parse(Yt),Yt),Dr=async Yt=>{if(!Yt.userUrl||!Yt.lootUrl){let tr=g$7(tt,u$1({addr:"address"},{addr:Yt.addr}));console.log(tr);let dr=tr.userId.toString(),br=tr.lootId.toString(),Qt=await Promise.all([userContract$2.tokenURI(dr),lootContract$2.tokenURI(br)]),sr=Qt[0],cr=Qt[1];sr=$r(sr),cr=$r(cr),Yt.userUrl=sr.image,Yt.lootUrl=cr.image}Yt.seasonOreBalance=pr.filter(tr=>tr.addr.toLocaleLowerCase()==Yt.addr.toLocaleLowerCase())[0]?.oreBalance,Mt(Yt),Bt(!0)},kr=async()=>{Bt(!0);try{ur.oreBalance>0&&(await yt(),Zt(jsxRuntimeExports.jsxs("div",{className:"mi-modal-content-wrapper",children:[jsxRuntimeExports.jsxs("div",{className:"mi-modal-content",children:["Congrats,you submitted ",ur.oreBalance," gems!",jsxRuntimeExports.jsx("div",{className:"mi-treasure-chest-wrapper",children:jsxRuntimeExports.jsx(TreasureChest,{})})]}),jsxRuntimeExports.jsx("div",{className:"mi-modal-footer",children:jsxRuntimeExports.jsx("button",{className:"mi-btn",onClick:()=>{ur.seasonOreBalance+=ur.oreBalance,ur.oreBalance=0,Kt()},children:"OK"})})]})),Rt())}catch(Yt){console.log(Yt)}},zt=async Yt=>{const tr=bfs(kt,{x:ur.x,y:ur.y},{x:Yt.x,y:Yt.y}).slice(1);await vt(Yt.addr,Lt(tr))&&(qt(Yt),Ht(ur),At(!0))},It=async Yt=>{const tr=gr.findIndex(sr=>sr.id===Yt),dr=gr[tr];if(dr.opened)if(dr.owner.toLocaleLowerCase()!=St.toLocaleLowerCase()){message$1.error("The treasure chest has been opened by others");return}else{wr(dr);return}Ct(gr[tr].id),await pt(Yt);const br=await bt.publicClient.getBlockNumber(),Qt=setInterval(async()=>{if(await bt.publicClient.getBlockNumber()-br>=2){clearInterval(Qt);let cr=await mt(Yt);cr.id=Yt,Ct(null),wr(cr)}},1e3)},[Nt,Gt]=reactExports.useState([]),er=(Yt,tr)=>{if(!(Yt===ur?.x&&tr===ur?.y)&&ur){const dr=bfs(kt,ur,{x:Yt,y:tr}).slice(1);ur.waiting||dr.slice(0,Number(ur.speed)).forEach(br=>br.movable=!0),Gt(dr)}};return jsxRuntimeExports.jsx(GameContext.Provider,{value:{curId:Ft,curAddr:ur?.addr,players:nr,renderPreviewPaths:Nt,mapData:wt,onPlayerMove:_r,openingBox:Wt,showUserInfo:Dr,treasureChest:gr,openTreasureChest:It,setStartBattle:zt,previewPath:er},children:jsxRuntimeExports.jsxs("div",{className:"mi-game",tabIndex:0,children:[jsxRuntimeExports.jsx("div",{className:"mi-game-user-avatar",children:jsxRuntimeExports.jsx(UserAvatar,{username:ur?.username,hp:ur?.hp,maxHp:ur?.maxHp,ap:50,maxAp:100,clothes:ur?.equip?.clothes,handheld:ur?.equip?.handheld,head:ur?.equip?.head,address:St,balance:Ot})}),jsxRuntimeExports.jsx(Map$1,{width:MapConfig.visualWidth,height:MapConfig.visualHeight,vertexCoordinate:$t}),_t?jsxRuntimeExports.jsx(Battle,{curPlayer:Dt,targetPlayer:jt,finishBattle:Er}):null,jsxRuntimeExports.jsx(UserInfoDialog,{visible:Tt,onClose:()=>{Bt(!1)},...Xt}),jsxRuntimeExports.jsx(Vt,{}),jsxRuntimeExports.jsx(Appearance,{boxesCount:gr.length,leaderboard:pr})]})})};let map_info=[],line=Array.from({length:100},()=>1);for(let _e=0;_e<10;_e++)map_info.push(line);function convertToLeafs(_e){let et=[];for(let tt=0;tt<_e.length;tt++)for(let rt=0;rt<_e[tt].length;rt++)et.push({x:tt,y:rt,value:_e[tt][rt]});return et}let leafs=convertToLeafs(map_info);console.log("leafs.length",leafs.length);function generateLeaf(_e,et,tt){return buffer.Buffer.from(utils.solidityKeccak256(["uint16","string","uint16","string","uint8"],[_e,",",et,",",tt]).slice(2),"hex")}new dist.MerkleTree(leafs.map(_e=>generateLeaf(_e.x,_e.y,_e.value)),utils.keccak256,{sortPairs:!0});const index="";let userContract$1,lootContract$1,transfering$1=!1,boxData1=[{x:13,y:1},{x:23,y:5},{x:26,y:8},{x:23,y:18},{x:30,y:20},{x:8,y:21},{x:5,y:25},{x:30,y:36},{x:19,y:30},{x:3,y:37},{x:28,y:39},{x:36,y:51},{x:40,y:55},{x:27,y:59},{x:13,y:55},{x:3,y:49},{x:3,y:40},{x:21,y:29},{x:41,y:26},{x:59,y:20}];const Test=()=>{const[_e,et]=reactExports.useState([]),[tt,rt]=reactExports.useState([]),[nt,it]=reactExports.useState([]),[at,st]=reactExports.useState(["attack",1]),[lt,dt]=reactExports.useState([]),[ht,pt]=reactExports.useState([]),[mt,gt]=reactExports.useState([]),[vt,xt]=reactExports.useState(""),[yt,bt]=reactExports.useState([]),[wt,Et]=reactExports.useState(""),[$t,Pt]=reactExports.useState([]),{components:{Player:kt,GameConfig:Lt,BattleList:jt,BoxList:qt,GlobalConfig:Dt},systemCalls:{move:Ht,joinBattlefield:Xt,transfer:Mt,battleInvitation:_t,confirmBattle:At,selectUserNft:Tt,revealBattle:Bt,openBox:Ot,revealBox:Ut,getCollections:Wt,CreateBox:Ct,getBattlePlayerHp:St},network:Ft}=useMUD(),{account:Vt}=Ft,Rt=reactExports.useMemo(()=>simplifyMapData($t),[$t]),Kt=useMerkel(Rt);reactExports.useEffect(()=>{loadMapData().then(Qt=>{Pt(Qt),mapDataRef.current=Qt})},[]);const Zt=async Qt=>{if(transfering$1)return;transfering$1=!0;let sr="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",cr=Ft.walletClient?.chain?.rpcUrls?.default?.http[0]||"http://127.0.0.1:8545",xr=new JsonRpcProvider(cr),Sr=new Wallet(sr,xr);console.log(Sr,"wallet"),Sr.sendTransaction({to:Qt,value:parseEther$1("1")}).then(Pr=>{console.log(Pr,"res"),transfering$1=!1,Jt()}).catch(Pr=>{console.log(Pr)})},Jt=()=>{Ft.publicClient.getBalance({address:Ft.walletClient.account.address}).then(Qt=>{if(Qt.toString()==0)Zt(Ft.walletClient.account.address);else{let sr=(+formatEther$1(Qt.toString())).toFixed(2);console.log(sr),Et(sr)}})};Jt();const rr=ne([Ye$1(Lt)]).map(Qt=>g$7(Lt,Qt));console.log(rr,"GameData");const or=ne([Ye$1(Dt)]).map(Qt=>g$7(Dt,Qt));if(console.log(or,"GlobalConfigData"),or.length&&or[0].userContract&&!userContract$1){console.log(userAbi,"userAbi");let Qt=Ft.privateKey,sr=Ft.walletClient?.chain?.rpcUrls?.default?.http[0]||"http://127.0.0.1:8545",cr=new JsonRpcProvider(sr),xr=new Wallet(Qt,cr),Sr=or[0].userContract;userContract$1=new Contract(Sr,userAbi,xr)}if(or.length&&or[0].lootContract&&!lootContract$1){console.log(lootAbi,"lootAbi");let Qt=Ft.privateKey,sr=Ft.walletClient?.chain?.rpcUrls?.default?.http[0]||"http://127.0.0.1:8545",cr=new JsonRpcProvider(sr),xr=new Wallet(Qt,cr),Sr=or[0].lootContract;lootContract$1=new Contract(Sr,lootAbi,xr)}const ar=ne([Ye$1(jt)]).map(Qt=>{let sr=ot({battleId:"uint256"},Qt),cr=g$7(jt,Qt);return console.log(cr,"battle",sr,Qt),cr.id=sr.battleId.toString(),cr}).filter(Qt=>!Qt.isEnd);console.log(ar,"battles");const ir=ne([Ye$1(qt)]).map(Qt=>{let sr=ot({boxId:"uint256"},Qt),cr=g$7(qt,Qt);return cr.id=sr.boxId.toString(),cr}).filter(Qt=>!Qt.opened);console.log(ir,"boxs");const pr=ne([Ye$1(kt)]).map(Qt=>{console.log("entity",Qt);let sr=Vt,xr=ot({addr:"address"},Qt)?.addr?.toLocaleLowerCase()||"",Sr=g$7(kt,Qt);return xr.toLocaleLowerCase()==sr.toLocaleLowerCase()?(console.log("当前用户"),console.log(Sr,"player"),Sr.isMe=!0):Sr.isMe=!1,Sr.addr=xr,Sr});console.log("players",pr);const nr=async()=>{let Qt=await userContract$1.getUserTokenIdList();Qt=Qt.map(sr=>sr.toString()),console.log(Qt),bt(Qt)},hr=()=>{userContract$1.mint().then(async Qt=>{await Qt.wait(),console.log(Qt),nr()})},Ar=()=>{userContract$1.revealNFT(vt).then(async Qt=>{console.log(Qt),await Qt.wait()})},ur=(Qt,sr)=>{console.log(Qt);let cr=Qt.target.value,xr=[..._e];xr[sr]=+cr,et(xr)},vr=Qt=>{console.log(Qt);let sr=Qt.target.value;gt(sr)},wr=Qt=>{console.log(Qt);let sr=+Qt.target.value;xt(sr)},gr=(Qt,sr)=>{console.log(Qt);let cr=Qt.target.value,xr=[...ht];xr[sr]=+cr,pt(xr)},yr=(Qt,sr)=>{console.log(Qt);let cr=Qt.target.value,xr=[...tt];xr[sr]=+cr,rt(xr)},Er=(Qt,sr)=>{console.log(Qt.target.value);let cr=Qt.target.value,xr=[...nt];xr[sr]=+cr,it(xr)},_r=(Qt,sr)=>{let cr=sr==1?+Qt.target.value:Qt.target.value,xr=[...at];xr[sr]=cr,console.log(xr),st(xr)},$r=()=>{Tt(vt)},Dr=()=>{console.log(_e,"move");let Qt=pr.find(Sr=>Sr.isMe),sr={x:Qt.x,y:Qt.y},cr={x:_e[0],y:_e[1]};const xr=bfs(Rt,sr,cr).slice(1);Ht(Kt(xr))},kr=()=>{console.log(tt,"transfer"),Mt(Vt,tt)},zt=()=>{console.log(nt,"battle");let Qt=pr.find(sr=>sr.x==nt[0]&&sr.y==nt[1]);if(!Qt)alert("该位置没有玩家");else{let sr=pr.find(Nr=>Nr.isMe),cr={x:sr.x,y:sr.y},xr={x:nt[0],y:nt[1]};const Sr=bfs(Rt,cr,xr).slice(1);let Pr=Kt(Sr);_t(Qt.addr,Pr)}},It=()=>{console.log(at,"confirmBattle");let Qt=ar.filter(xr=>xr.attacker.toLocaleLowerCase()==Vt.toLocaleLowerCase()||xr.defender.toLocaleLowerCase()==Vt.toLocaleLowerCase())[0],sr=[...lt],cr=sr.find(xr=>xr.id==Qt.id);if(Qt&&!cr){let xr=at[0],Sr=at[1],Pr=getRandomStr(18);console.log(Pr,Sr);let Nr=formatBytes32String(xr),Or=formatBytes32String(Pr),Tr=br(Nr,Sr,Or);At(Tr,Qt.id),sr.push({id:Qt.id,action:Nr,arg:Sr,nonce:Or}),dt(sr)}else alert("已经确认过了")},Nt=()=>{Xt()},Gt=()=>{let Qt=ar.filter(Sr=>Sr.attacker.toLocaleLowerCase()==Vt.toLocaleLowerCase()||Sr.defender.toLocaleLowerCase()==Vt.toLocaleLowerCase())[0],sr=lt.filter(Sr=>Sr.id==Qt.id)[0];console.log(sr,"bettleItem"),Bt(Qt.id,sr.action,sr.arg,sr.nonce);let cr=[...lt],xr=cr.findIndex(Sr=>Sr.id==Qt.id);cr.splice(xr,1),dt(cr)},er=async Qt=>{Qt==null&&(Qt=0);let sr=boxData1[Qt];console.log(sr,"box",Qt,boxData1),await Ct(sr.x,sr.y),Qt>=boxData1.length||setTimeout(()=>{er(Qt+1)},100)},Yt=()=>{Ot(mt)},tr=()=>{Ut(mt)},dr=()=>{let Qt=ir.find(sr=>sr.id==mt);Wt(mt,Qt.oreBalance,Qt.treasureBalance)},br=(Qt,sr,cr)=>utils.solidityKeccak256(["bytes32","uint256","bytes32"],[Qt,sr,cr]);return jsxRuntimeExports.jsxs("div",{className:"content",children:[jsxRuntimeExports.jsxs("div",{className:"nav",children:[jsxRuntimeExports.jsx("h3",{children:"测试面板"}),jsxRuntimeExports.jsxs("div",{className:"addr",children:["当前用户地址:",Vt," | ",wt," ETH"]})]}),jsxRuntimeExports.jsx("div",{className:"hd",children:pr.map((Qt,sr)=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("h6",{children:["用户信息 ",Qt.isMe?"(自己)":""]}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px"},children:["addr: ",Qt.addr]}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px"},children:["hp: ",Qt.hp.toString()]}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px"},children:["attack: ",Qt.attack.toString()]}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px"},children:["oreBalance: ",Qt.oreBalance.toString()]}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px"},children:["treasureBalance: ",Qt.treasureBalance.toString()]}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px"},children:["坐标:",Qt?.x||0,",",Qt?.y||0]})]},sr))}),jsxRuntimeExports.jsx("div",{className:"hd",children:ir.map((Qt,sr)=>jsxRuntimeExports.jsxs("div",{style:{marginBottom:"20px"},children:[jsxRuntimeExports.jsx("h6",{children:"宝箱信息"}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px"},children:["id: ",Qt.id]}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px"},children:["opened: ",Qt.opened.toString()]}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px"},children:["owner: ",Qt.owner]}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px"},children:["oreBalance: ",Qt.opened?Qt.oreBalance:"--"]}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px"},children:["treasureBalance: ",Qt.opened?Qt.treasureBalance:"--"]}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px"},children:["坐标:",Qt?.x||0,",",Qt?.y||0]})]},sr))}),ar.map((Qt,sr)=>jsxRuntimeExports.jsxs("div",{className:"battle-item",children:[jsxRuntimeExports.jsxs("h6",{children:["战场信息(id: ",Qt.id,")"]}),jsxRuntimeExports.jsxs("div",{style:{marginTop:"12px",fontSize:"12px"},children:["胜利者:",Qt.winner]}),jsxRuntimeExports.jsxs("div",{className:"info-w",children:[jsxRuntimeExports.jsxs("div",{className:"battle-section",children:[jsxRuntimeExports.jsx("p",{children:"攻击者信息"}),jsxRuntimeExports.jsxs("div",{children:["地址: ",Qt?.attacker]}),jsxRuntimeExports.jsxs("div",{children:["Action: ",Qt?.attackerAction]}),jsxRuntimeExports.jsxs("div",{children:["Arg: ",Qt?.attackerArg.toString()]}),jsxRuntimeExports.jsxs("div",{children:["BuffHash: ",Qt?.attackerBuffHash]}),jsxRuntimeExports.jsxs("div",{children:["HP: ",Qt?.attackerHP.toString()]}),jsxRuntimeExports.jsxs("div",{children:["State: ",Qt?.attackerState]})]}),jsxRuntimeExports.jsxs("div",{className:"battle-section",children:[jsxRuntimeExports.jsx("p",{children:"被攻击者信息"}),jsxRuntimeExports.jsxs("div",{children:["地址: ",Qt?.defender]}),jsxRuntimeExports.jsxs("div",{children:["Action: ",Qt?.defenderAction]}),jsxRuntimeExports.jsxs("div",{children:["Arg: ",Qt?.defenderArg.toString()]}),jsxRuntimeExports.jsxs("div",{children:["BuffHash: ",Qt?.defenderBuffHash]}),jsxRuntimeExports.jsxs("div",{children:["HP: ",Qt?.defenderHP.toString()]}),jsxRuntimeExports.jsxs("div",{children:["State: ",Qt?.defenderState]})]})]})]},sr)),jsxRuntimeExports.jsxs("div",{className:"main",children:[jsxRuntimeExports.jsxs("div",{className:"section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:"mintNFT"}),jsxRuntimeExports.jsx("div",{className:"input"}),jsxRuntimeExports.jsx("div",{className:"btn",onClick:hr,children:"确认"})]}),jsxRuntimeExports.jsxs("div",{className:"section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:"revealNFT"}),jsxRuntimeExports.jsx("div",{className:"input",children:jsxRuntimeExports.jsx("select",{value:vt,onChange:wr,children:yt.map((Qt,sr)=>jsxRuntimeExports.jsx("option",{value:Qt,children:Qt},sr))})}),jsxRuntimeExports.jsx("div",{className:"btn",onClick:Ar,children:"确认"})]}),jsxRuntimeExports.jsxs("div",{className:"section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:"初始化玩家"}),jsxRuntimeExports.jsx("div",{className:"input",children:jsxRuntimeExports.jsx("select",{value:vt,onChange:wr,children:yt.map((Qt,sr)=>jsxRuntimeExports.jsx("option",{value:Qt,children:Qt},sr))})}),jsxRuntimeExports.jsx("div",{className:"btn",onClick:$r,children:"确认"})]}),jsxRuntimeExports.jsxs("div",{className:"section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:"加入游戏"}),jsxRuntimeExports.jsx("div",{className:"input"}),jsxRuntimeExports.jsx("div",{className:"btn",onClick:Nt,children:"确认"})]}),jsxRuntimeExports.jsxs("div",{className:"section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:"移动"}),jsxRuntimeExports.jsxs("div",{className:"input",children:[jsxRuntimeExports.jsx("input",{type:"text",onChange:Qt=>ur(Qt,0),placeholder:"x"}),jsxRuntimeExports.jsx("input",{type:"text",onChange:Qt=>ur(Qt,1),placeholder:"y"})]}),jsxRuntimeExports.jsx("div",{className:"btn",onClick:Dr,children:"确认"})]}),jsxRuntimeExports.jsxs("div",{className:"section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:"传送"}),jsxRuntimeExports.jsxs("div",{className:"input",children:[jsxRuntimeExports.jsx("input",{type:"text",onChange:Qt=>yr(Qt,0),placeholder:"x"}),jsxRuntimeExports.jsx("input",{type:"text",onChange:Qt=>yr(Qt,1),placeholder:"y"})]}),jsxRuntimeExports.jsx("div",{className:"btn",onClick:kr,children:"确认"})]}),jsxRuntimeExports.jsxs("div",{className:"section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:"攻击"}),jsxRuntimeExports.jsxs("div",{className:"input",children:[jsxRuntimeExports.jsx("input",{type:"text",onChange:Qt=>Er(Qt,0),placeholder:"x"}),jsxRuntimeExports.jsx("input",{type:"text",onChange:Qt=>Er(Qt,1),placeholder:"y"})]}),jsxRuntimeExports.jsx("div",{className:"btn",onClick:zt,children:"确认"})]}),jsxRuntimeExports.jsxs("div",{className:"section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:"攻击策略"}),jsxRuntimeExports.jsxs("div",{className:"input",children:[jsxRuntimeExports.jsxs("select",{onChange:Qt=>_r(Qt,0),children:[jsxRuntimeExports.jsx("option",{value:"attack",children:"Attack"}),jsxRuntimeExports.jsx("option",{value:"escape",children:"Escape"}),jsxRuntimeExports.jsx("option",{value:"props",children:"Props"})]}),jsxRuntimeExports.jsxs("select",{onChange:Qt=>_r(Qt,1),children:[jsxRuntimeExports.jsx("option",{value:"1",children:"Fire"}),jsxRuntimeExports.jsx("option",{value:"2",children:"Water"}),jsxRuntimeExports.jsx("option",{value:"3",children:"Wind"})]})]}),jsxRuntimeExports.jsx("div",{className:"btn",onClick:It,children:"确认"})]}),jsxRuntimeExports.jsxs("div",{className:"section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:"揭示结果"}),jsxRuntimeExports.jsx("div",{className:"input"}),jsxRuntimeExports.jsx("div",{className:"btn",onClick:Gt,children:"确认"})]}),jsxRuntimeExports.jsxs("div",{className:"section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:"创建宝箱"}),jsxRuntimeExports.jsxs("div",{className:"input",children:[jsxRuntimeExports.jsx("input",{type:"text",onChange:Qt=>gr(Qt,0),placeholder:"x"}),jsxRuntimeExports.jsx("input",{type:"text",onChange:Qt=>gr(Qt,1),placeholder:"y"})]}),jsxRuntimeExports.jsx("div",{className:"btn",onClick:()=>er(0),children:"确认"})]}),jsxRuntimeExports.jsxs("div",{className:"section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:"打开宝箱"}),jsxRuntimeExports.jsx("div",{className:"input",children:jsxRuntimeExports.jsx("input",{type:"text",onChange:vr,placeholder:"boxId"})}),jsxRuntimeExports.jsx("div",{className:"btn",onClick:Yt,children:"确认"})]}),jsxRuntimeExports.jsxs("div",{className:"section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:"揭示宝箱"}),jsxRuntimeExports.jsx("div",{className:"input",children:jsxRuntimeExports.jsx("input",{type:"text",value:mt,disabled:!0,placeholder:"boxId"})}),jsxRuntimeExports.jsx("div",{className:"btn",onClick:tr,children:"确认"})]}),jsxRuntimeExports.jsxs("div",{className:"section",children:[jsxRuntimeExports.jsx("div",{className:"title",children:"获取宝物"}),jsxRuntimeExports.jsx("div",{className:"input",children:jsxRuntimeExports.jsx("input",{type:"text",value:mt,disabled:!0,placeholder:"boxId"})}),jsxRuntimeExports.jsx("div",{className:"btn",onClick:dr,children:"确认"})]})]})]})},Logo="/assets/logo-4ce51cd9.png",styles$2="",imgTelegram="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACUAAAAfCAYAAABgfwTIAAACWUlEQVRYhc2XT4hNURzHv28wpjRkojQLJM2TDTU0RZQoplGSGEoSs2ChwdqGhexEMhuFhZ0Ny1eUYmaaxp+ViJKFUVPITI+i6aMznavjvTPv3nvOZXzr9N455/f79jnv3fu7v1sC9B9ok6QjkvZKGptNqHZJ+yUdlrTB3Zg7CzA9kg5ZoGbP/uS/glpjQXollVNiS38TqsVCmNGdI2+ezDVV8OgCrgIfmVnjwADw0xPxriigZcBJYLgBSKI7NmcPMOXbj4XZBdwGvmeAGQN6bN6ZBnH9ISAdwDngVQaQRNec/IGU2K1ZQZqBg8C9HCBGL4Atjs/9lPgfQGsaTCdwGfiQEwb7ayY+LcBQhpyR6WLuAVkCnAAGA0CMKsBax2858DZj7vVaqB3ATWAyEOYL0FdzwHXA5xwefQnUNuBpIEiiW0BbDdD2AJ/1CVSM3gC7PZdAb4DnJ2BOAnUUeB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aqMQHZhuQoMzBIhk5grAUmpM3JnAsj1uubAroY3gLESCdkat4F2YA1wDZjI8OkqtkzrnWq3pxg/dYteBJa4u6sFWu2ea4H5LiOjrkGwLA0Dr9xpcQQ46q6ZPjwCTgF34xrUIelZxie+0HPGhozBNOmQdDzkatjmubdumgExG7UJa/ZJ6ozoZya54miWdM6J7fkZEiuOY253LqV0OkjiD5w2QLNvH7qiAAAAAElFTkSuQmCC",HomeHeader=_e=>jsxRuntimeExports.jsxs("div",{className:"home-header",children:[jsxRuntimeExports.jsx("a",{href:"/",children:jsxRuntimeExports.jsx("img",{src:Logo,alt:"MISSISSIPPI",className:"header-logo"})}),jsxRuntimeExports.jsx("nav",{className:"header-nav",children:jsxRuntimeExports.jsx("ul",{className:"menu-lv1",children:jsxRuntimeExports.jsxs("li",{className:"menu-socials",children:[jsxRuntimeExports.jsx("a",{href:"",children:"Socials"}),jsxRuntimeExports.jsxs("ul",{className:"menu-lv2",children:[jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("a",{href:"https://twitter.com/0xMississippi",target:"_blank",rel:"noreferrer",children:"Twitter"}),jsxRuntimeExports.jsx("img",{src:imgTwitter,alt:""})]}),jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("a",{href:"",title:"coming soon",children:"Discord"}),jsxRuntimeExports.jsx("img",{src:imgDiscord,alt:""})]}),jsxRuntimeExports.jsxs("li",{children:[jsxRuntimeExports.jsx("a",{href:"",title:"coming soon",children:"Telegram"}),jsxRuntimeExports.jsx("img",{src:imgTelegram,alt:""})]})]})]})})}),_e.walletAddress?jsxRuntimeExports.jsx(UserAddress,{address:_e.walletAddress,account:_e.walletBalance+"ETH"}):jsxRuntimeExports.jsx("button",{className:"play-btn mi-btn",onClick:_e.onPlayBtnClick,children:"PLAY NOW"})]}),styles$1="",indexDuckImg="/assets/duck_index-627ed778.svg",pluginAbi=[{inputs:[{internalType:"address",name:"_lootAddress",type:"address"},{internalType:"address",name:"_userAddress",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"lootAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"multMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_lootTokenId",type:"uint256"},{internalType:"uint256",name:"_userTokenId",type:"uint256"}],name:"multRevealNFT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"userAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}];let userContract,lootContract,pluginContract,userTokenIds,lootTokenIds,transfering=!1;const Home=()=>{const[_e,et]=message$1.useMessage(),{components:{GlobalConfig:tt,Player:rt,LootList1:nt,PlayerAddon:it},systemCalls:{selectBothNFT:at,joinBattlefield:st,setInfo:lt,initUserInfo:dt},network:ht}=useMUD(),[pt,mt]=reactExports.useState(""),[gt,vt]=reactExports.useState(""),[xt,yt]=reactExports.useState("play"),bt=reactExports.useRef(),[wt,Et]=reactExports.useState(!1),[$t,Pt]=reactExports.useState(!1),kt=useNavigate(),[Lt,jt]=reactExports.useState(),[qt,Dt]=reactExports.useState(),[Ht,Xt]=reactExports.useState(),[Mt,_t]=reactExports.useState(),[At,Tt]=reactExports.useState(),[Bt,Ot]=reactExports.useState(),[Ut,Wt]=reactExports.useState(),Ct=ne([Ye$1(nt)]).map(nr=>{const hr=g$7(nt,nr),Ar=ot({addr:"address"},nr)?.addr?.toLocaleLowerCase()||"";return hr.addr=Ar,hr}),Ft=ne([Ye$1(rt)]).map(nr=>{const hr=ot({addr:"address"},nr)?.addr?.toLocaleLowerCase()||"",Ar=g$7(rt,nr);return Ar.addr=hr,Ct.forEach(ur=>{if(ur.addr.toLocaleLowerCase()===hr.toLocaleLowerCase()){let vr=ur.chest.replace(/"(.*?)"/,"").split(" of")[0].replace(/^\s+|\s+$/g,""),wr=ur.weapon.replace(/"(.*?)"/,"").split(" of")[0].replace(/^\s+|\s+$/g,""),gr=ur.head.replace(/"(.*?)"/,"").split(" of")[0].replace(/^\s+|\s+$/g,"");Ar.equip={clothes:vr,handheld:wr,head:gr}}}),Ar}).find(nr=>nr.addr.toLocaleLowerCase()==ht?.account.toLocaleLowerCase()),Vt=ne([Ye$1(tt)]).map(nr=>g$7(tt,nr));if(Vt.length&&Vt[0].userContract){let nr=ht.privateKey,hr=ht.walletClient?.chain?.rpcUrls?.default?.http[0]||"http://127.0.0.1:8545",Ar=new JsonRpcProvider(hr),ur=new Wallet(nr,Ar),vr=Vt[0].userContract;userContract=new Contract(vr,userAbi,ur),userContract?.getUserTokenIdList().then(wr=>{userTokenIds=wr})}if(Vt.length&&Vt[0].lootContract&&!lootContract){let nr=ht.privateKey,hr=ht.walletClient?.chain?.rpcUrls?.default?.http[0]||"http://127.0.0.1:8545",Ar=new JsonRpcProvider(hr),ur=new Wallet(nr,Ar),vr=Vt[0].lootContract;lootContract=new Contract(vr,lootAbi,ur),lootContract?.getUserTokenIdList().then(wr=>{lootTokenIds=wr})}if(Vt.length&&Vt[0].pluginContract&&!pluginContract){let nr=ht.privateKey,hr=ht.walletClient?.chain?.rpcUrls?.default?.http[0]||"http://127.0.0.1:8545",Ar=new JsonRpcProvider(hr),ur=new Wallet(nr,Ar),vr=Vt[0].pluginContract;pluginContract=new Contract(vr,pluginAbi,ur)}const Rt=nr=>(nr=nr.replace("data:application/json;base64,",""),nr=atob(nr),nr=JSON.parse(nr),nr);reactExports.useEffect(()=>{ir();async function nr(){if(Ft?.state>=1&&Ft?.name){let hr=g$7(it,u$1({addr:"address"},{addr:Ft.addr})),Ar=hr.userId.toString(),ur=hr.lootId.toString(),vr=await Promise.all([userContract.tokenURI(Ar),lootContract.tokenURI(ur)]),wr=vr[0],gr=vr[1];wr=Rt(wr),gr=Rt(gr),Ft.userUrl=wr.image,Ft.lootUrl=gr.image,_t(Ft.name),jt(Ft?.equip?.clothes),Dt(Ft?.equip?.handheld),Xt(Ft?.equip?.head),Tt(Ft.userUrl),Ot(Ft.lootUrl),Wt(Ft),yt("mint")}}nr()},[Ft]);const Kt=()=>{Et(!0)},Zt=async()=>{if(!bt.current.value){message$1.error("Please input your username");return}_t(bt.current.value),Et(!1),yt("mint")},Jt=async()=>new Promise(async(nr,hr)=>{try{await(await pluginContract.multMint()).wait();let ur=await ht.publicClient.getBlockNumber(),vr=setInterval(async()=>{if(await ht.publicClient.getBlockNumber()-ur>=2){clearInterval(vr);let gr=await Promise.all([userContract.getUserTokenIdList(),lootContract.getUserTokenIdList()]);userTokenIds=gr[0],lootTokenIds=gr[1],await(await pluginContract.multRevealNFT(lootTokenIds[lootTokenIds.length-1].toString(),userTokenIds[userTokenIds.length-1].toString())).wait(),nr("success")}},1e3)}catch(Ar){console.log(Ar),hr(Ar)}}),rr=async()=>{Pt(!0);try{_e.open({type:"loading",content:"minting loot and user,please wait...",duration:7}),userTokenIds.length&&lootTokenIds.length||await Jt();let nr=userTokenIds[userTokenIds.length-1].toString(),hr=lootTokenIds[lootTokenIds.length-1].toString(),Ar=await Promise.all([userContract.tokenURI(nr),lootContract.tokenURI(hr)]),ur=Ar[0],vr=Ar[1];console.log(Ar,"url"),ur=Rt(ur),vr=Rt(vr),Tt(ur.image),Ot(vr.image);let{playerData:wr,lootData:gr}=await at(nr,hr,ht.account),yr=gr.chest.replace(/"(.*?)"/,"").split(" of")[0].replace(/^\s+|\s+$/g,""),Er=gr.weapon.replace(/"(.*?)"/,"").split(" of")[0].replace(/^\s+|\s+$/g,""),_r=gr.head.replace(/"(.*?)"/,"").split(" of")[0].replace(/^\s+|\s+$/g,"");Wt(wr),jt(yr),Dt(Er),Xt(_r),wr.equip={clothes:yr,handheld:Er,head:_r};let $r=Object.assign(wr,{username:Mt,clothes:yr,handheld:Er,head:_r,userUrl:ur.image,lootUrl:vr.image});console.log($r,"player");let Dr=await Promise.all([lt(Mt,""),st()]);console.log(Dr,"result"),Pt(!1),kt("/game",{state:{username:Mt,clothes:yr,handheld:Er,head:_r}})}catch(nr){Pt(!1),console.log(nr),message$1.error(nr)}},or=()=>{if(!ht.account){message$1.error("waiting for wallet connection");return}Ft&&Ft.state!=1&&Ft.state!=0?kt("/game",{state:{username:"",clothes:"",handheld:"",head:""}}):(localStorage.removeItem("curPlayer"),localStorage.removeItem("worldContractAddress"),Kt())},ar=async nr=>{if(transfering)return;transfering=!0;let hr="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",Ar=ht.walletClient?.chain?.rpcUrls?.default?.http[0]||"http://127.0.0.1:8545",ur=new JsonRpcProvider(Ar),vr=new Wallet(hr,ur);console.log(vr,"wallet"),vr.sendTransaction({to:nr,value:parseEther$1("1")}).then(wr=>{console.log(wr,"res"),transfering=!1,ir()}).catch(wr=>{console.log(wr)})},ir=async()=>{let nr=await ht.publicClient.getBalance({address:ht.walletClient.account.address});if(nr.toString()=="0")ar(ht.walletClient.account.address);else{let hr=(+formatEther$1(nr.toString())).toFixed(2);mt(ht.walletClient.account.address),vt(hr),localStorage.setItem("mi_user_address",ht.walletClient.account.address)}},pr=async()=>{await dt(),localStorage.removeItem("curPlayer"),localStorage.removeItem("worldContractAddress"),message$1.success("init success")};return jsxRuntimeExports.jsxs("div",{className:"mi-home-page",children:[et,jsxRuntimeExports.jsx(HomeHeader,{onPlayBtnClick:or,walletAddress:pt,walletBalance:gt}),xt==="play"&&jsxRuntimeExports.jsxs("section",{className:"mi-section index-section",children:[jsxRuntimeExports.jsx("div",{className:"section-box",children:jsxRuntimeExports.jsxs("div",{className:"intro-box",children:[jsxRuntimeExports.jsx("h1",{className:"intro-title",children:"Welcome to Mississippi"}),jsxRuntimeExports.jsxs("p",{children:["An ancient cave, cursed by its creator, opens intermittently as if alive ",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"The cavern is rich in energy gems that prudent adventurers can take, while those who miss the time to leave due to greed will be trapped in the cavern forever ",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"The Mississippi Company executives saw the value of the caves and decided to monopolize them ",jsxRuntimeExports.jsx("br",{}),jsxRuntimeExports.jsx("br",{}),"Just when the plan was about to succeed, a group of crazy duck adventurers stormed into the cave..."]}),jsxRuntimeExports.jsx("button",{className:"play-btn mi-btn",onClick:or,children:"PLAY NOW"}),jsxRuntimeExports.jsx("button",{className:"play-btn mi-btn",onClick:pr,children:"INIT USER"})]})}),jsxRuntimeExports.jsx("img",{src:indexDuckImg,alt:"duck",className:"duck-index"})]}),xt==="mint"&&jsxRuntimeExports.jsx("div",{className:"mi-section mint-section",children:jsxRuntimeExports.jsxs("div",{className:"mint-box",children:[jsxRuntimeExports.jsx("h2",{className:"mint-title",children:"HOME"}),jsxRuntimeExports.jsx(UserInfo,{clothes:Lt,handheld:qt,head:Ht,userUrl:At,lootUrl:Bt,player:Ut}),jsxRuntimeExports.jsx("button",{className:"mi-btn",onClick:rr,disabled:$t,children:$t?"Loading...":"MINT AND GO"}),$t?jsxRuntimeExports.jsx("div",{style:{textAlign:"center",fontSize:"12px"},children:"The minting process may take up to several tens of seconds"}):null]})}),jsxRuntimeExports.jsx(Modal$1,{visible:wt,className:"mi-modal",footer:null,onCancel:()=>Et(!1),children:jsxRuntimeExports.jsxs("div",{className:"create-wallet-wrapper",children:[jsxRuntimeExports.jsx("div",{className:"create-wallet-content",children:"You have successfully created a wallet.Name your character and start your journey!"}),jsxRuntimeExports.jsxs("div",{className:"mint-name",children:[jsxRuntimeExports.jsx("input",{type:"text",className:"mi-input",ref:bt}),jsxRuntimeExports.jsx("button",{className:"mi-btn",onClick:Zt,children:"OK"})]})]})})]})},Hero={Armor:["ArcherTunic","BanditTunic","BlueKnight","BlueWizardTunic","CaptainArmor","Chief","ChumDoctorTunic","ClericRobe","DeathRobe","DeerCostume","DemigodArmour","DruidRobe","ElfTunic","Executioner","FarmerClothes","FemaleOutfit","FemaleSwimmingSuit","FireWizardRobe","GuardianTunic","HeavyKnightArmor","HolowKnight","HornsKnight","IronKnight","LegionaryArmor","MilitiamanArmor","MinerArmour","MonkRobe","MusketeerTunic","NecromancerRobe","NinjaTunic","Overalls","PilotArmor","PirateCostume","PirateRobe","PumpkinOveralls","Samurai","SantaHelperTunic","SantaTunic","ThiefTunic","TravelerTunic"],Arms:["DarkElf","Demigod","Demon","Elf","FireLizard","Furry","Goblin","Human","HumanShadow","Lizard","Merman","Orc","Skeleton","Vampire","Werewolf","ZombieA","ZombieB"],Back:["BackSword","LargeBackpack","LeatherQuiver","SmallBackpack"],Body:["DarkElf","Demigod","Demon","Elf","FireLizard","Furry","Goblin","Human","HumanShadow","Lizard","Merman","Orc","Skeleton","Vampire","Werewolf","ZombieA","ZombieB"],Bracers:["ArcherTunic","BlueKnight","BlueWizardTunic","CaptainArmor","Chief","ChumDoctorTunic","ClericRobe","DeathTunic","DeerTunic","DemigodArmour","DruidRobe","Executioner","FireWizardRobe","GreenElfTunic","GuardianTunic","HaloweenTunic","HeavyKnightArmor","HolowKnight","HornsKnight","IronKnight","LegionaryArmor","MilitiamanArmor","MonkRobe","MusketeerTunic","NecromancerRobe","NinjaTunic","PilotArmor","PirateRobe","Samurai","SantaTunic","ThiefTunic"],Cape:["Cape"],Ears:["DarkElf","Demigod","Demon","Elf","FireLizard","Furry","Goblin","Human","HumanShadow","Lizard","Merman","Orc","Skeleton","Vampire","Werewolf","ZombieA","ZombieB"],Eyes:["DarkElf","Demigod","Demon","Elf","FireLizard","Furry","Goblin","Human","Lizard","Merman","Orc","Skeleton","Vampire","Werewolf","ZombieA","ZombieB"],Firearm:["AssaultRifle","Pistol","SniperRifle","Uzi"],Hair:["Hair1","Hair10","Hair11","Hair12","Hair13","Hair14","Hair15","Hair2","Hair3","Hair4","Hair5","Hair6","Hair7","Hair8","Hair9"],Head:["DarkElf","Demigod","Demon","Elf","FireLizard","Furry","Goblin","Human","HumanShadow","Lizard","Merman","Orc","Skeleton","Vampire","Werewolf","ZombieA","ZombieB"],Helmet:["ArcherHood","BanditBandana","BanditPatch [ShowEars]","BlueKnightHelmet","BlueWizzardHat","CaptainHelmet","ChiefHat [ShowEars]","ChumDoctorHelmet","ClericHood","DeathHood","DeerHorns [ShowEars]","DruidHelmet","ExecutionerHood","FireWizardHood","GuardianHelmet","HeavyKnightHelmet","HolowKnightHelmet","HornsHelmet","HornsKnightHelmet","IronKnightHelmet","LegionaryHelmet","MilitiamanHelmet","MinerHelment","MusketeerHat [ShowEars]","NecromancerHood","NinjaMask","PilotHelment","PirateBandana [ShowEars]","PirateHelmet [ShowEars]","PumpkinHead","SamuraiHelmet","SantaHelperCap [ShowEars]","SantaHood","SantaHoodBeard","ThiefHood","VikingHelmet"],Horns:["Demon"],Mask:["AnimeMask","BanditMask","BlackMask","ChumMask","DarkMask","IronMask","Shadow","SuperMask"],Shield:["AncientGreatShield","BlueShield","BrassRoundShield","CrusaderShield","Dreadnought","GoldenEagle","GuardianShield","IronBuckler","KnightShield","LegionShield","RoyalGreatShield","SteelShield","TowerShield","WoodenBuckler"],Weapon:["AmurWand","ArchStaff","AssaultSword","Axe","BastardSword","BattleAxe","BattleBow","BattleHammer","Bident","BishopStaff","BlacksmithHammer","Blade","BlueStick","BlueWand","Bow","Branch","Broadsword","Butcher","Crusher","CrystalWand","CurveBranch","CurvedBow","Cutlass","Dagger","DeathScythe","ElderStaff","Epee","Executioner","FireWand","FlameStaff","Fork","GiantBlade","GiantSword","GoldenSkepter","GoldenSkullWand","Greataxe","GreatHammer","Greatsword","GreenWand","GuardianHalberd","Halberd","Hammer","HermitStaff","HunterKnife","IronSword","Katana","KitchenAxe","Knife","Lance","LargePickaxe","LargeScythe","LongBow","LongKatana","Longsword","Mace","MagicWand","MarderDagger","MasterGreataxe","MasterWand","Morgenstern","NatureWand","NecromancerStaff","Pan","Pickaxe","Pitchfork","PriestWand","Rake","RedKatana","RedStick","RedWand","RoundMace","RoyalLongsword","RustedHammer","RustedPickaxe","RustedShortSword","RustedShovel","Saber","Scythe","Shestoper","ShitOnStick","ShortBow","ShortDagger","Sickle","SkullWand","SmallAxe","SmallPitchfork","SpikedClub","Stick","StormStaff","Sword","Tanto","WaterWand","WideDagger","WoodcutterAxe"]},styles="",HeroComps=["Back","Cape","Shield","Head","Ears","Body","Eyes","Mask","Hair","Armor","Helmet","Weapon"],Actions=["idle","ready","run","jump","jab","slash","shot","climb","die","crawl","block"],HeroEdit=()=>{const[_e,et]=reactExports.useState({}),[tt,rt]=reactExports.useState(Actions[0]);return reactExports.useEffect(()=>{HeroComps.forEach(nt=>{_e[nt]=Hero[nt][0]}),et({..._e})},[]),jsxRuntimeExports.jsxs("div",{className:"mi-hero-page",children:[jsxRuntimeExports.jsxs("div",{className:"actions",children:[jsxRuntimeExports.jsx("select",{onChange:nt=>{rt(nt.target.value)},children:Actions.map(nt=>jsxRuntimeExports.jsx("option",{value:nt,children:nt},nt))}),jsxRuntimeExports.jsx("img",{src:"/assets/img/duck/default.png",alt:"",className:"user-appearance"})]}),jsxRuntimeExports.jsx("div",{className:"hero-preview-wrap",children:jsxRuntimeExports.jsx("div",{className:`hero-preview action-${tt}`,children:HeroComps.map(nt=>jsxRuntimeExports.jsx("div",{className:`hero-comp ${nt}`,style:{backgroundImage:_e[nt]?`url("/src/assets/img/hero/${nt}/${_e[nt]}.png")`:"none"}},nt))})}),jsxRuntimeExports.jsx("div",{className:"select-wrap",children:HeroComps.map(nt=>jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("label",{htmlFor:"",children:[nt,": "]}),jsxRuntimeExports.jsx("select",{name:"",id:"",onChange:it=>{_e[nt]=it.target.value,et({..._e})},children:Hero[nt].map(it=>jsxRuntimeExports.jsx("option",{value:it,children:it},it))},nt)]}))})]})},App=()=>jsxRuntimeExports.jsx("div",{className:"mi-app",children:jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(Routes,{children:jsxRuntimeExports.jsxs(Route,{path:"/",children:[jsxRuntimeExports.jsx(Route,{index:!0,element:jsxRuntimeExports.jsx(Home,{})}),jsxRuntimeExports.jsx(Route,{path:"game",element:jsxRuntimeExports.jsx(Game,{})}),jsxRuntimeExports.jsx(Route,{path:"test",element:jsxRuntimeExports.jsx(Test,{})}),jsxRuntimeExports.jsx(Route,{path:"heroEdit",element:jsxRuntimeExports.jsx(HeroEdit,{})})]})})})}),common="",{network}=await setup(),rootElement=document.getElementById("root");if(!rootElement)throw new Error("React root not found");const root=client.createRoot(rootElement);setup().then(async _e=>{root.render(jsxRuntimeExports.jsx(MUDProvider,{value:_e,children:jsxRuntimeExports.jsx(App,{})}));{const{mount:et}=await __vitePreload(()=>import("./index-b92d711e.js"),[]);et({config:mudConfig,publicClient:network.publicClient,walletClient:network.walletClient,latestBlock$:network.latestBlock$,blockStorageOperations$:network.blockStorageOperations$,worldAddress:network.worldContract.address,worldAbi:network.worldContract.abi,write$:network.write$,recsWorld:network.world})}});export{BaseError as B,HttpRequestError as H,InvalidAddressError as I,P$7 as P,Ye$1 as Y,P$a as a,decodeErrorResult as b,c$1 as c,de$2 as d,call$1 as e,f$5 as f,getUrl$1 as g,concat as h,isAddress as i,encodeAbiParameters as j,isHex as k,ot as o,stringify$2 as s,t$4 as t,ut as u,ye$1 as y}; +//# sourceMappingURL=index-87f2e809.js.map diff --git a/packages/client/dist/assets/index-87f2e809.js.map b/packages/client/dist/assets/index-87f2e809.js.map new file mode 100644 index 00000000..56a62447 --- /dev/null +++ b/packages/client/dist/assets/index-87f2e809.js.map @@ -0,0 +1 @@ +{"version":3,"mappings":";;;;;;;;GASa,IAAIA,IAAE,OAAO,IAAI,eAAe,EAAEC,IAAE,OAAO,IAAI,cAAc,EAAEC,IAAE,OAAO,IAAI,gBAAgB,EAAEC,IAAE,OAAO,IAAI,mBAAmB,EAAEC,IAAE,OAAO,IAAI,gBAAgB,EAAEC,IAAE,OAAO,IAAI,gBAAgB,EAAEC,IAAE,OAAO,IAAI,eAAe,EAAEC,IAAE,OAAO,IAAI,mBAAmB,EAAEC,IAAE,OAAO,IAAI,gBAAgB,EAAEC,IAAE,OAAO,IAAI,YAAY,EAAEC,IAAE,OAAO,IAAI,YA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ypC,GAAM,UAChD,aAAAokF,GACA,mBAAAC,EAAA,CAEJ,CCtCO,MAAM,MAAQE,GAAY,ECM3B,KAAO,CACX,CACE,OAAQ,CACN,CACE,aAAc,SACd,KAAM,WACN,KAAM,QACR,EACA,CACE,aAAc,UACd,KAAM,SACN,KAAM,SACR,CACF,EACA,KAAM,eACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,SACd,KAAM,mBACN,KAAM,QACR,CACF,EACA,KAAM,yBACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,SACd,KAAM,mBACN,KAAM,QACR,CACF,EACA,KAAM,2BACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,SACd,KAAM,WACN,KAAM,QACR,CACF,EACA,KAAM,kBACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,SACd,KAAM,SACN,KAAM,QACR,CACF,EACA,KAAM,yBACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,SACd,KAAM,WACN,KAAM,QACR,CACF,EACA,KAAM,iBACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,SACd,KAAM,WACN,KAAM,QACR,CACF,EACA,KAAM,mBACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,SACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,WACN,KAAM,SACR,CACF,EACA,KAAM,8BACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,WACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,WACN,KAAM,SACR,CACF,EACA,KAAM,8BACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,WACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,WACN,KAAM,SACR,CACF,EACA,KAAM,oCACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,WACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,WACN,KAAM,SACR,CACF,EACA,KAAM,kCACN,KAAM,OACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,4BACN,KAAM,OACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,2BACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,UACN,KAAM,SACR,EACA,CACE,aAAc,SACd,KAAM,gBACN,KAAM,QACR,CACF,EACA,KAAM,+BACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,UACN,KAAM,SACR,EACA,CACE,aAAc,SACd,KAAM,gBACN,KAAM,QACR,CACF,EACA,KAAM,0BACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,SACN,KAAM,SACR,CACF,EACA,KAAM,eACN,KAAM,OACR,EACA,CACE,UAAW,GACX,OAAQ,CAAC,EACT,KAAM,aACN,KAAM,OACR,EACA,CACE,UAAW,GACX,OAAQ,CACN,CACE,QAAS,GACT,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,YACd,KAAM,MACN,KAAM,WACR,CACF,EACA,KAAM,oBACN,KAAM,OACR,EACA,CACE,UAAW,GACX,OAAQ,CACN,CACE,QAAS,GACT,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,QAAS,GACT,aAAc,QACd,KAAM,OACN,KAAM,OACR,CACF,EACA,KAAM,uBACN,KAAM,OACR,EACA,CACE,UAAW,GACX,OAAQ,CACN,CACE,QAAS,GACT,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,QAAS,GACT,aAAc,QACd,KAAM,cACN,KAAM,OACR,EACA,CACE,QAAS,GACT,aAAc,QACd,KAAM,OACN,KAAM,OACR,CACF,EACA,KAAM,gBACN,KAAM,OACR,EACA,CACE,UAAW,GACX,OAAQ,CACN,CACE,QAAS,GACT,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,QAAS,GACT,aAAc,QACd,KAAM,OACN,KAAM,OACR,CACF,EACA,KAAM,iBACN,KAAM,OACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,SACd,KAAM,KACN,KAAM,QACR,EACA,CACE,aAAc,SACd,KAAM,KACN,KAAM,QACR,CACF,EACA,KAAM,YACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,gBACN,QAAS,CACP,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,CACF,EACA,KAAM,mBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,SACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,OACN,KAAM,SACR,CACF,EACA,KAAM,gBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,CACF,EACA,KAAM,kBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,iBACN,KAAM,SACR,EACA,CACE,WAAY,CACV,CACE,aAAc,SACd,KAAM,IACN,KAAM,QACR,EACA,CACE,aAAc,SACd,KAAM,IACN,KAAM,QACR,EACA,CACE,aAAc,YACd,KAAM,QACN,KAAM,WACR,CACF,EACA,aAAc,oBACd,KAAM,eACN,KAAM,SACR,CACF,EACA,KAAM,mBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,mBACN,KAAM,SACR,EACA,CACE,aAAc,QACd,KAAM,sBACN,KAAM,OACR,CACF,EACA,KAAM,OACN,QAAS,CACP,CACE,aAAc,QACd,KAAM,GACN,KAAM,OACR,CACF,EACA,gBAAiB,UACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,YACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,YACN,KAAM,SACR,CACF,EACA,KAAM,gBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,aAAc,SACd,KAAM,cACN,KAAM,SACR,CACF,EACA,KAAM,eACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,aAAc,QACd,KAAM,OACN,KAAM,OACR,EACA,CACE,aAAc,SACd,KAAM,cACN,KAAM,SACR,CACF,EACA,KAAM,sBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,YACN,KAAM,SACR,CACF,EACA,KAAM,WACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,YACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,OACN,KAAM,SACR,CACF,EACA,KAAM,oBACN,QAAS,CACP,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,SACN,KAAM,SACR,EACA,CACE,aAAc,SACd,KAAM,aACN,KAAM,QACR,EACA,CACE,aAAc,SACd,KAAM,kBACN,KAAM,QACR,CACF,EACA,KAAM,iBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,aAAc,QACd,KAAM,cACN,KAAM,OACR,EACA,CACE,aAAc,SACd,KAAM,cACN,KAAM,SACR,CACF,EACA,KAAM,WACN,QAAS,CACP,CACE,aAAc,QACd,KAAM,OACN,KAAM,OACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,aAAc,QACd,KAAM,cACN,KAAM,OACR,EACA,CACE,aAAc,SACd,KAAM,cACN,KAAM,SACR,CACF,EACA,KAAM,iBACN,QAAS,CACP,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,aAAc,QACd,KAAM,cACN,KAAM,OACR,EACA,CACE,aAAc,SACd,KAAM,cACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,MACN,KAAM,SACR,CACF,EACA,KAAM,gBACN,QAAS,CACP,CACE,aAAc,QACd,KAAM,OACN,KAAM,OACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,OACN,KAAM,SACR,CACF,EACA,KAAM,UACN,QAAS,CACP,CACE,aAAc,SACd,KAAM,GACN,KAAM,QACR,EACA,CACE,aAAc,SACd,KAAM,GACN,KAAM,QACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,CACF,EACA,KAAM,eACN,QAAS,CACP,CACE,aAAc,SACd,KAAM,SACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,OACN,KAAM,SACR,CACF,EACA,KAAM,cACN,QAAS,CACP,CACE,aAAc,SACd,KAAM,GACN,KAAM,QACR,EACA,CACE,aAAc,SACd,KAAM,GACN,KAAM,QACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,aAAc,SACd,KAAM,cACN,KAAM,SACR,CACF,EACA,KAAM,YACN,QAAS,CACP,CACE,aAAc,QACd,KAAM,OACN,KAAM,OACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,oBACN,QAAS,CACP,CACE,aAAc,SACd,KAAM,GACN,KAAM,QACR,EACA,CACE,aAAc,SACd,KAAM,GACN,KAAM,QACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,UACN,KAAM,SACR,CACF,EACA,KAAM,cACN,QAAS,CACP,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,CACF,EACA,KAAM,iBACN,QAAS,CACP,CACE,aAAc,SACd,KAAM,SACN,KAAM,SACR,CACF,EACA,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,SACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,mBACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,UACN,KAAM,SACR,CACF,EACA,KAAM,cACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,UACN,KAAM,SACR,CACF,EACA,KAAM,eACN,QAAS,CACP,CACE,aAAc,UACd,KAAM,GACN,KAAM,SACR,CACF,EACA,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,eACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,mBACd,KAAM,SACN,KAAM,SACR,EACA,CACE,aAAc,QACd,KAAM,OACN,KAAM,OACR,CACF,EACA,KAAM,gBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,mBACd,KAAM,SACN,KAAM,SACR,EACA,CACE,aAAc,QACd,KAAM,OACN,KAAM,OACR,CACF,EACA,KAAM,oBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,kBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,WAAY,CACV,CACE,aAAc,SACd,KAAM,IACN,KAAM,QACR,EACA,CACE,aAAc,SACd,KAAM,IACN,KAAM,QACR,EACA,CACE,aAAc,YACd,KAAM,QACN,KAAM,WACR,CACF,EACA,aAAc,oBACd,KAAM,WACN,KAAM,SACR,CACF,EACA,KAAM,OACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,SACN,KAAM,SACR,CACF,EACA,KAAM,UACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,aAAc,QACd,KAAM,cACN,KAAM,OACR,EACA,CACE,aAAc,UACd,KAAM,kBACN,KAAM,SACR,EACA,CACE,aAAc,SACd,KAAM,cACN,KAAM,SACR,CACF,EACA,KAAM,eACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,aAAc,QACd,KAAM,cACN,KAAM,OACR,EACA,CACE,aAAc,QACd,KAAM,aACN,KAAM,OACR,EACA,CACE,aAAc,SACd,KAAM,cACN,KAAM,SACR,CACF,EACA,KAAM,cACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,mBACN,KAAM,SACR,EACA,CACE,aAAc,SACd,KAAM,qBACN,KAAM,QACR,EACA,CACE,aAAc,SACd,KAAM,0BACN,KAAM,QACR,CACF,EACA,KAAM,2BACN,QAAS,CACP,CACE,aAAc,SACd,KAAM,wBACN,KAAM,QACR,CACF,EACA,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,YACN,KAAM,SACR,CACF,EACA,KAAM,oBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,mBACN,KAAM,SACR,EACA,CACE,aAAc,SACd,KAAM,wBACN,KAAM,QACR,EACA,CACE,aAAc,SACd,KAAM,yBACN,KAAM,QACR,CACF,EACA,KAAM,+BACN,QAAS,CACP,CACE,aAAc,SACd,KAAM,GACN,KAAM,QACR,CACF,EACA,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,sBACd,KAAM,OACN,KAAM,SACR,CACF,EACA,KAAM,oBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,mBACN,KAAM,SACR,EACA,CACE,aAAc,kBACd,KAAM,SACN,KAAM,SACR,EACA,CACE,aAAc,OACd,KAAM,eACN,KAAM,MACR,CACF,EACA,KAAM,iBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,mBACN,KAAM,SACR,EACA,CACE,aAAc,uBACd,KAAM,OACN,KAAM,SACR,CACF,EACA,KAAM,qBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,SACd,KAAM,YACN,KAAM,SACR,EACA,CACE,aAAc,SACd,KAAM,cACN,KAAM,SACR,EACA,CACE,aAAc,WACd,KAAM,WACN,KAAM,UACR,EACA,CACE,aAAc,WACd,KAAM,aACN,KAAM,UACR,CACF,EACA,KAAM,gBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,YACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,UACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,OACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,SACN,KAAM,SACR,CACF,EACA,KAAM,eACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,SACN,KAAM,SACR,CACF,EACA,KAAM,YACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,YACN,KAAM,SACR,CACF,EACA,KAAM,eACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,mBACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,UACN,KAAM,SACR,CACF,EACA,KAAM,eACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,eACN,KAAM,SACR,EACA,CACE,aAAc,UACd,KAAM,eACN,KAAM,SACR,CACF,EACA,KAAM,gBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,WACN,KAAM,SACR,CACF,EACA,KAAM,gBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,WACN,KAAM,SACR,CACF,EACA,KAAM,gBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,aAAc,QACd,KAAM,cACN,KAAM,OACR,EACA,CACE,aAAc,QACd,KAAM,OACN,KAAM,OACR,EACA,CACE,aAAc,SACd,KAAM,cACN,KAAM,SACR,CACF,EACA,KAAM,WACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,SACd,KAAM,OACN,KAAM,QACR,EACA,CACE,aAAc,SACd,KAAM,MACN,KAAM,QACR,CACF,EACA,KAAM,UACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,aAAc,QACd,KAAM,OACN,KAAM,OACR,EACA,CACE,aAAc,SACd,KAAM,cACN,KAAM,SACR,CACF,EACA,KAAM,YACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,YACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,OACN,KAAM,SACR,EACA,CACE,aAAc,SACd,KAAM,IACN,KAAM,QACR,EACA,CACE,aAAc,SACd,KAAM,IACN,KAAM,QACR,CACF,EACA,KAAM,WACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,qBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CACE,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,aAAc,YACd,KAAM,MACN,KAAM,WACR,EACA,CACE,aAAc,QACd,KAAM,cACN,KAAM,OACR,EACA,CACE,aAAc,UACd,KAAM,iBACN,KAAM,SACR,EACA,CACE,aAAc,QACd,KAAM,YACN,KAAM,OACR,EACA,CACE,aAAc,SACd,KAAM,cACN,KAAM,SACR,CACF,EACA,KAAM,gBACN,QAAS,CAAC,EACV,gBAAiB,aACjB,KAAM,UACR,CACF,EAEO,MAAM,eAAgB,CAE3B,OAAO,iBAAmC,CACjC,WAAIC,UAAgB,IAAI,CACjC,CACA,OAAO,QAAQniH,GAAiB0b,GAA6C,CAC3E,O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AAU,QACV,QAAU,QACV,QAAU,QACV,OACF,EACA,KAAM,CACJ,UAAe,UACf,QAAe,MACf,aAAe,QACf,SAAe,QACf,cAAe,SACf,SAAe,MACf,WAAe,UACf,WAAe,UACf,SACF,EACA,OAAQ,CACN,aACA,gBACA,yBACA,mBACA,iBACA,gBACA,sBACA,mBACA,aACA,YACA,uBACA,cACA,kBACA,iBACA,iBACA,oBACA,oBACA,cACA,oBACA,mBACA,kBACA,mBACA,eACA,0BACA,kBACA,YACA,eACA,2BACA,0BACA,cACA,gBACA,4BACA,YACA,iBACA,YACA,cACF,EACA,MAAO,CAAE,OAAQ,EACjB,KAAM,CACJ,YACA,aACA,YACA,WACA,WACA,WACA,SACA,WACF,EACA,OAAQ,CACN,qBACA,aACA,mBACA,iBACA,cACA,cACA,iBACA,cACA,eACA,eACA,mBACA,cACA,cACA,eACF,EACA,OAAQ,CACN,WAAmB,YAAoB,eACvC,MAAmB,eAAoB,YACvC,YAAmB,eAAoB,SACvC,cAAmB,mBAAoB,QACvC,YAAmB,WAAoB,MACvC,SAAmB,aAAoB,UACvC,UAAmB,cAAoB,cACvC,YAAmB,UAAoB,SACvC,cAAmB,aAAoB,OACvC,cAAmB,WAAoB,aACvC,OAAmB,aAAoB,aACvC,gBAAmB,kBAAoB,WACvC,cAAmB,aAAoB,YACvC,kBAAmB,UAAoB,SACvC,cAAmB,cAAoB,YACvC,SAAmB,aAAoB,QACvC,QAAmB,eAAoB,cACvC,UAAmB,aAAoB,YACvC,OAAmB,YAAoB,eACvC,iBAAmB,aAAoB,cACvC,aAAmB,mBAAoB,MACvC,UAAmB,YAAoB,aACvC,OAAmB,YAAoB,WACvC,UAAmB,YAAoB,iBACvC,eAAmB,gBAAoB,mBACvC,eAAmB,QAAoB,SACvC,YAAmB,cAAoB,WACvC,cAAmB,SAAoB,YACvC,WAAmB,iBAAoB,aACvC,QAAmB,aAAoB,QACvC,QAAmB,YAAoB,aACvC,eACF,CACF,YC3MM,UAAY,CAAC,OAAQ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d","c","k","h","g","f","m","N","O","escape","P","Q","R","S","T","U","V","W","reactModule","require$$0","jsxRuntimeModule","components","error","_len","args","_key","getGlobal","defineProperty","func","invoked","noop","isFunction","fn","value","isObject","isPlainObject","proto","protoConstructor","obj","constructor","object","propName","name","theClass","thing","keys","symbols","s","ownKeys","target","prop","res","key","_defineProperties","props","i","descriptor","_toPropertyKey","_createClass","Constructor","protoProps","staticProps","_extends","source","_inheritsLoose","subClass","superClass","_setPrototypeOf","o","_assertThisInitialized","self","_unsupportedIterableToArray","minLen","_arrayLikeToArray","arr","len","arr2","allowArrayLike","it","_toPrimitive","input","hint","prim","arg","annotation","decorator","property","prototype","Atom","name_","_proto","listener","onBecomeObservedHandler","onBecomeUnobservedHandler","atom","_","observable","newValue","oldValue","options","adm","_this$options_","actionDescriptor","proxyTrap","_ref","_ref2","safeDescriptors","_annotation$options_","_annotation$options_$","_annotation$options_2","_annotation$options_$2","_annotation$options_3","_annotation$options_4","_adm$proxy_2","_adm$proxy_","flowDescriptor","_this$options_2","bound","_this$options_$enhanc","_this$options_3","_this$options_4","set","flowAnnotation","actionAnnotation","observableAnnotation","_this$options_5","_this$options_6","_options$defaultDecor","arg2","arg3","initialValues","decorators","arg1","opts","actionName","autoAction","ref","canRunAsDerivation","scope","runInfo","err","notifySpy_","startTime_","prevDerivation_","runAsAction","prevAllowStateChanges_","prevAllowStateReads_","allowStateChanges","prev","_Atom","ObservableValue","enhancer","notifySpy","equals","_this","change","handler","fireImmediately","ComputedValue","prevTrackingContext","result","wasSuspended","changed","track","firstTime","prevValue","prevU","IDerivationState_","TraceMode","cause","derivation","prevAllowStateReads","prevUntracked","obs","context","prevTracking","prevObserving","observing","lowestNewObservingDerivationState","i0","dep","_dep","_dep2","action","allowStateReads","global","node","list","Reaction","onInvalidate_","errorHandler_","requiresObservable_","prevReaction","message","abortSignal","_this2","dispose","enterBreakPoint","allReactions","iterations","remainingReactions","event","view","_opts$name","_opts","_opts2","_opts2$signal","_opts3","runSync","reaction","reactionRunner","scheduler","isScheduled","run","hook","cb","listenersKey","hookListeners","properties","annotations","descriptors","generator","ctx","runId","gen","rejector","pendingPromise","promise","resolve","reject","stepId","onFulfilled","ret","next","onRejected","_res","yieldedPromise","thisArg","_getAdm$set_","_getAdm$delete_","_getAdm$definePropert","_target$$mobx","_target$$mobx$proxy_","interceptable","interceptors","idx","listenable","listeners","ObservableArrayAdministration","owned_","legacyMode_","newV","oldV","values","newLength","currentLength","newItems","oldLength","delta","index","deleteCount","length","lengthDelta","_this$values_","oldItems","_i","notify","added","removed","owned","proxy","_len2","items","_key2","_len3","_key3","copy","funcName","funcFactory","dehancedValues","callback","element","_this3","accumulator","currentValue","ObservableMap","initialData","enhancer_","entry","newEntry","hasKey","_change","_this3$hasMap_$get","_this4","_this4$hasMap_$get","_keys$next","done","_keys$next2","_iterator","_step","_step$value","other","_this5","_this6","_iterator2","_step2","_this7","replacementMap","orderedData","keysReportChangedCalled","_iterator3","_step3","deleted","_iterator4","_step4","_step4$value","_value","keyExisted","_value2","iter1","iter2","next1","next2","dataStructure","map","ObservableSet","callbackFn","_change2","nextIndex","observableValues","ObservableObjectAdministration","target_","values_","defaultAnnotation_","_this$target_$storedA","outcome","deleteOutcome","cachedDescriptor","_this$pendingKeys_","_this$pendingKeys_$ge","_getDescriptor","_this$pendingKeys_2","_this$pendingKeys_2$g","_options$name","_adm$target_$storedAn","ctor","_StubArray","_Symbol$toStringTag","_Symbol$iterator","LegacyObservableArray","arrays","max","_observable","named","depth","aStack","bStack","type","className","areArrays","aCtor","bCtor","iterator","__extends","__","__awaiter","_arguments","adopt","fulfilled","step","rejected","body","verb","op","__read","ar","__spreadArray","to","from","pack","resume","settle","fulfill","createImpl","_super","instance","ctorFunc","errors","item","Subscription","initialTeardown","e_1","_a","e_2","_b","_parentage","_parentage_1","_parentage_1_1","parent_1","e_1_1","initialFinalizer","_finalizers","_finalizers_1","_finalizers_1_1","finalizer","e_2_1","teardown","parent","empty","timeout","delegate","handle","Subscriber","destination","complete","ConsumerObserver","partialObserver","SafeSubscriber","observerOrNext","context_1","identity","fns","pipeFromArray","Observable","subscribe","operator","subscriber","sink","promiseCtor","Symbol_observable","operations","init","liftedSource","onNext","onComplete","onError","onFinalize","OperatorSubscriber","shouldUnsubscribe","closed_1","Subject","subject","_c","observer","observers","hasError","isStopped","thrownError","AnonymousSubject","ReplaySubject","_bufferSize","_windowTime","_timestampProvider","_buffer","_infiniteTimeWindow","subscription","adjustedBufferSize","now","last","defaultValue","isAsyncIterable","isIterable","Symbol_iterator","readableStream","reader","array","iterable","iterable_1","iterable_1_1","asyncIterable","process","asyncIterable_1","asyncIterable_1_1","parentSubscription","work","delay","repeat","scheduleSubscription","of","config","hasConfig","project","isArray","getPrototypeOf","first_1","resultSelector","observables","valueTransform","active","remainingFirstValues","_loop_1","hasFirstValue","execute","concurrent","onBeforeNext","expand","innerSubScheduler","additionalFinalizer","buffer","isComplete","checkComplete","outerNext","doInnerSub","innerComplete","innerValue","bufferedValue","ii","concat","observableFactory","merge","sources","predicate","selector","innerSub","syncUnsub","handledResult","count","seen","comparator","keySelector","previousKey","first","currentKey","share","connector","resetOnError","resetOnComplete","_d","resetOnRefCountZero","wrapperSource","connection","resetConnection","refCount","hasCompleted","hasErrored","cancelReset","reset","resetAndUnsubscribe","conn","dest","on","configOrBufferSize","windowTime","bufferSize","tapObserver","isUnsub","module","exports","assert","val","msg","inherits","superCtor","TempCtor","BN","number","base","endian","Buffer","num","left","right","start","j","off","parseHex4Bits","string","parseHexByte","lowerBound","parseLength","parseBase","str","end","mul","limbLen","limbPow","total","mod","word","pow","move","src","size","inspect","zeros","groupSizes","groupBases","padding","out","carry","groupSize","groupBase","allocate","ArrayType","byteLength","reqLength","postfix","position","shift","hi","toBitArray","bit","wbit","width","bytesNeeded","bitsLeft","cmp","smallMulTo","lo","ncarry","rword","maxJ","comb10MulTo","mid","a0","al0","ah0","a1","al1","ah1","a2","al2","ah2","a3","al3","ah3","a4","al4","ah4","a5","al5","ah5","a6","al6","ah6","a7","al7","ah7","a8","al8","ah8","a9","al9","ah9","b0","bl0","bh0","b1","bl1","bh1","b2","bl2","bh2","b3","bl3","bh3","b4","bl4","bh4","b5","bl5","bh5","b6","bl6","bh6","b7","bl7","bh7","b8","bl8","bh8","b9","bl9","bh9","w0","w1","w2","w3","w4","w5","w6","w7","w8","w9","w10","w11","w12","w13","w14","w15","w16","w17","w18","bigMulTo","hncarry","jumboMulTo","isNegNum","bits","carryMask","newCarry","extended","mask","maskedWords","mode","bhi","bhiBits","diff","qj","positive","div","dm","half","r2","acc","yp","xp","im","jm","x1","x2","negative","Red","primes","MPrime","tmp","rlen","K256","output","outLen","P224","P192","P25519","prime","mod3","one","nOne","lpow","inv","windowSize","wnd","current","currentLen","Mont","this","version","missing","form","LogLevel","ErrorCode","logLevel","level","code","params","messageDetails","hex","reason","url","fault","condition","expectedCount","kind","censorship","permanent","logger","objects","accum","offset","data","endOffset","trimmed","signature","bytes","vs","recoveryParam","recId","_vs","_BN","_constructorGuard","constructorGuard","throwFault","toHex","anyValue","operation","Zero","NegativeOne","decimals","multiplier","fraction","whole","comps","wholeValue","fractionValue","wei","signed","match","check","format","hasFraction","ONE","factor","bump","fixedFormat","numeric","decimal","promises","info","param","allowIndexed","originalParam","throwError","newNode","child","sibling","comp","ParamTypify","allowIndex","anonymous","modifier","state","parens","returns","fragment","sig","checkErrors","path","childPath","localName","dynamic","wordSize","writer","paddingOffset","Reader","coerceFunc","allowLoose","loose","alignedLength","INPUT_ERROR","FINALIZE_ERROR","WINDOW","root","WEB_WORKER","NODE_JS","COMMON_JS","ARRAY_BUFFER","HEX_CHARS","SHAKE_PADDING","CSHAKE_PADDING","KECCAK_PADDING","PADDING","SHIFT","RC","BITS","SHAKE_BITS","OUTPUT_TYPES","CSHAKE_BYTEPAD","createOutputMethod","outputType","Keccak","createShakeOutputMethod","outputBits","createCshakeOutputMethod","methods","createKmacOutputMethod","createOutputMethods","method","createMethod","createShakeMethod","createCshakeMethod","createKmacMethod","Kmac","algorithms","methodNames","algorithm","methodName","newMethodName","notString","blocks","byteCount","blockCount","strs","paddingBytes","outputBlocks","extraBytes","block","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","b10","b11","b12","b13","b14","b15","b16","b17","b18","b19","b20","b21","b22","b23","b24","b25","b26","b27","b28","b29","b30","b31","b32","b33","b34","b35","b36","b37","b38","b39","b40","b41","b42","b43","b44","b45","b46","b47","b48","b49","keccak256","sha3","payload","encode","childOffset","decoded","lengthLength","decode","address","chars","expanded","hashed","checksum","getAddress","isAddress","base36","getContractAddress","transaction","nonce","salt","initCodeHash","coder","coders","arrayValues","unique","staticWriter","Writer","dynamicWriter","updateFuncs","dynamicOffset","updateFunc","baseOffset","baseReader","offsetReader","uniqueNames","defaultChild","One","MaxUint256","maxUintValue","bounds","UnicodeNormalizationForm","Utf8ErrorReason","badCodepoint","extraLength","overlongMask","nextChar","pair","codePoint","codePoints","text","ranges","range","codepoint","codes","complex","codesTableB2","types","component","id","textData","forEach","flatDeep","pos","u16","symbol_count","skip","pos_payload","read_width","read_buffer","read_bit","FULL","HALF","QRTR","MASK","register","low","lookup","vX","vN","dx","dy","ys","j_dy","sorted","read","branches","temp","valid","fe0f","save","cps","cp","label","normalize","emoji_filter","emoji","eaten","saved","stack","Zeros","namehash","hashMessage","padOffset","boundsUpper","boundsLower","encodeType","fields","links","parents","subtypes","field","baseType","primaryTypes","checkCircular","found","subtype","st","encoder","subEncoder","encodedType","domain","domainFields","resolveName","ensCache","domainValues","domainTypes","typesWithDomain","wrap","fragments","abi","bucket","eventFragment","nameOrSignatureOrSighash","matching","nameOrSignatureOrTopic","topichash","getSighash","functionFragment","errorArgs","errorName","errorSignature","builtin","topics","encodeTopic","dataTypes","dataValues","topicHash","indexed","nonIndexed","resultIndexed","resultNonIndexed","nonIndexedIndex","indexedIndex","tx","log","hexData","gasPrice","lastBaseFeePerGas","maxFeePerGas","maxPriorityFeePerGas","eventName","allowedTransactionKeys","blockTag","signedTx","hasEip1559","feeData","results","provider","minimalisticAssert","inherits_browserModule","require$$1","utils","toArray","enc","rotr32","rotl32","sum32","sum32_3","sum32_4","sum32_5","sum64","buf","ah","al","bh","bl","sum64_hi","sum64_lo","sum64_4_hi","ch","cl","dh","dl","sum64_4_lo","sum64_5_hi","eh","el","sum64_5_lo","rotr64_hi","rotr64_lo","shr64_hi","shr64_lo","BlockHash","common","ft_1","ch32","maj32","s0_256","s1_256","g0_256","g1_256","shaCommon","require$$2","require$$3","SHA256","T1","T2","SHA224","SHA512","c0_hi","c0_lo","c1_hi","c1_lo","c2_hi","c2_lo","c3_hi","c3_lo","fh","fl","gh","gl","hh","hl","c4_hi","c4_lo","T1_hi","T1_lo","T2_hi","T2_lo","xh","xl","yh","yl","zh","zl","require$$4","Ah","Bh","Ch","Dh","Eh","rh","Kh","sh","hash","hmac","basedir","zero2","getNAF","naf","ws","getJSF","k1","k2","jsf","d1","d2","m8","m14","m24","u1","u2","cachedProperty","computer","parseBytes","intFromLE","assert$1","conf","adjustCount","doubles","repr","nafW","nafPoints","defW","points","coeffs","jacobianResult","wndWidth","comb","ja","jb","zero","curve","compact","power","precomputed","dbl","assert$2","beta","lambda","betas","lambdas","basis","vec","red","tinv","ntinv","l1","l2","aprxSqrt","y1","y2","prevR","len1","len2","v1","v2","p1","p2","q1","q2","odd","isOdd","point","ax","rhs","npoints","ncoeffs","split","isRed","pre","endoMul","obj2point","nx","ny","ys1","dyinv","_precompute","negate","zinv","zinv2","ay","pz2","z2","s1","s2","h2","h3","nz","jx","jy","jz","jz4","jyd","jx2","jyd2","jyd4","t1","t2","dny","xx","yy","yyyy","yyyy8","gamma","alpha","beta4","beta8","ggamma8","jy2","jxd4","jyd8","zz","mm","ee","yyu4","kbase","z3","pz3","zs","rx","xc","curves","PresetCurve","defineCurve","entropy","pers","seed","kmac","entropyEnc","add","addEnc","ec","pub","priv","initial","octetLen","slen","octets","backHalf","drbg","ns2","truncOnly","bkey","ns1","iter","kp","kpX","signature$1","sinv","isYOdd","isSecondKey","rInv","Qprime","elliptic","EC","privateKey","keyPair","p0","digest","digestBytes","otherKey","otherKeyPair","rs","compressed","signingKey","TransactionTypes","publicKey","addr","storageKeys","storageKey","RLP.encode","raw","fieldInfo","chainId","serialize","recid","RLP.decode","rawTransaction","parse","resolver","nameOrPromise","paramType","contract","overrides","resolved","ro","intrinsic","roValue","leftovers","signerOrProvider","wait","confirmations","receipt","parsed","collapseSimple","txRequest","getEventTag","filter","topic","tag","once","listenerCount","argsCopy","contractInterface","addressOrName","uniqueFilters","eventSignature","filters","uniqueSignatures","signatures","runningEvent","emit","wrappedEmit","fromBlockOrBlockhash","toBlock","logs","alphabet","digits","byte","SupportedAlgorithm","ripemd160","sha256","sha512","pbkdf2","password","keylen","hashAlgorithm","hLen","DK","block1","destPos","locale","mnemonic","words","wordlist","lang","en","parentFingerprint","chainCode","mnemonicOrPath","IL","IR","ki","Ki","srcMnemonic","seedArray","extendedKey","entropyBits","checksumBits","checksumMask","indices","remainingBits","crypto","randomBytes","checkInt","checkInts","arrayish","coerceArray","createArray","copyArray","sourceArray","targetArray","targetStart","sourceStart","sourceEnd","convertUtf8","toBytes","fromBytes","convertHex","Hex","numberOfRounds","rcon","Si","T3","T4","T5","T6","T7","T8","U1","U2","U3","U4","convertToInt32","AES","rounds","roundKeyCount","KC","tk","rconpointer","tt","plaintext","ciphertext","ModeOfOperationECB","ModeOfOperationCBC","iv","ModeOfOperationCFB","segmentSize","encrypted","xorSegment","ModeOfOperationOFB","Counter","initialValue","ModeOfOperationCTR","counter","pkcs7pad","padder","pkcs7strip","aesjs","hexString","currentChild","matchingChild","decrypt","json","ethaddr","encseed","encryptedSeed","aesCbc","aes","seedHex","seedHexBytes","h0","h1","h4","h5","h6","h7","bytesLeft","bitLenHi","bitLenLo","numZeros","PBKDF2_HMAC_SHA256_OneIter","dkLen","innerLen","inner","outerKey","dk","incrementCounter","blockmix_salsa8","BY","Yi","_X","arraycopy","blockxor","salsa20_8","srcPos","checkBufferish","ensureInteger","_scrypt","XY","totalOps","currentOp","lastPercent10","stop","i1","Bi","limit","nextTick","incrementalSMix","steps","percent10","derivedKey","lib","progressCallback","lastProgress","progress","hasMnemonic","aesCtr","mnemonicKey","account","mnemonicCiphertext","mnemonicIv","mnemonicCounter","mnemonicAesCtr","passwordBytes","prfFunc","_pbkdf2","pbkdf2Func","scryptFunc","kdf","prf","client","uuidRandom","macPrefix","mac","timestamp","decryptCrowdsale","decryptKeystore","decryptKeystoreSync","populated","_TypedDataEncoder","encryptKeystore","verifyMessage","verifyTypedData","network","providers","providerList","quorum","standard","defaultProvider","getUrl","href","request","response","headers","duration","all","processFunc","attemptLimit","throttleCallback","throttleSlotInterval","errorPassThrough","allow304","authorization","base64Encode","reData","dataMatch","base64Decode","flatHeaders","header","runningTimeout","timer","runningFetch","attempt","location","tryAgain","stall","retryAfter","processJsonFunc","updated","poll","cancel","retryLimit","prefix","chk","LIMIT","lowered","uppered","wordChars","inBits","outBits","pad","maxV","formats","bigNumber","strictData","accessList","strict","difficulty","parseTransaction","nullValue","replaceValue","matchers","link","padded","encodeBytes","datas","resolvedAddress","parameters","coinType","hexBytes","coinInfo","p2pkh","p2sh","bech32","linkage","avatar","scheme","owner","tokenId","tokenOwner","balance","metadataUrl","metadata","imageUrl","ipfs","ipns","swarm","skynet","urlSafe","keyBytes","knownNetwork","calldata","urls","sender","errorMessages","errorMessage","maxAge","internalBlockNumber","reqTime","checkInternalBlockNumber","blockNumber","networkError","respTime","pollId","runners","eventBlockNumber","runner","minFromBlock","currentNetwork","transactionHash","replaceable","cancelFuncs","alreadyDone","minedHandler","lastBlockNumber","scannedBlock","replaceHandler","mined","ti","startBlock","confirms","replacement","signedTransaction","hexTx","txSender","urlsOffset","urlsLength","urlsData","callbackSelector","extraData","ccipResult","blockHashOrBlockTag","includeTransactions","blockWithTxs","currentName","addrData","resolverAddr","nameOrAddress","resolverAddress","Event","stopped","eventTag","requireData","addressOrIndex","accounts","fromAddress","estimate","networkOrReady","getNetwork","cache","pendingFilter","filterId","hashes","seq","allowExtra","allowed","tight","hashKeccak256","hashSha256","names","suffix","formatted","formatUnits","unitName","parseUnits","formatEther","parseEther","ether","__createBinding","__setModuleDefault","__importStar","abi_1","address_1","base64","basex_1","bytes_1","hash_1","hdnode_1","json_wallets_1","keccak256_1","logger_1","sha2_1","solidity_1","random_1","properties_1","RLP","signing_key_1","strings_1","transactions_1","units_1","wallet_1","web_1","sha2_2","strings_2","tr","fe","Y","ie","$","ue","se","le","de","ce","Ye","Je","BaseError","shortMessage","details","docsPath","regex","bytesRegex","integerRegex","abiParameter","structs","inputParams","inputs","inputLength","outputs","outputParams","outputLength","abiParameters","parameterCacheKey","isTuple","components_","char","tail","shallowStructs","signaturesLength","propertiesLength","resolvedStructs","entries","entriesLength","ancestors","parseAbiParameter_","abiItem","includeName","expectedLength","givenLength","expectedSize","functionName","givenSize","targetSize","hexOrBytes","dir","hex_","paddedBytes","padEnd","min","maxSize","trim","sliceLength","size_","hexToNumber","hexToBytes","hexes","_v","bytesToHex","value_","maxValue","minValue","hexByte","def","parts","bool","lengths","exists","checkFinished","lst","Al","Bl","Cl","Dl","El","isLE","utf8ToBytes","wrapConstructor","hashConstructor","hashC","hashCons","_0n","_1n","_2n","round","idx1","idx0","B0","B1","Th","Tl","curH","curL","PI","Hash","blockLen","outputLen","enableXOF","take","bufferOut","to_","concatBytes","slice","preparedParams","arrayComponents","staticSize","encoded","staticParams","dynamicParams","dynamicSize","dynamicChild","preparedParam","paramSize","bytesSize","hexValue","partsLength","param_","matches","abiItems","argType","abiParameterType","definition","indexedInputs","args_","requestMap","method_","status","transport","fromBlock","getRequest","address_","hexAddress","decodedValues","consumed","decodedChild","hasUnnamedChild","stringify","replacer","space","includeFunctionName","display","integer","unit","maxLength","chain","gas","prettyArgs","blockHash","identifier","account_","contractAddress","formattedArgs","functionWithParams","decodedData","metaMessages","firstArg","errorWithParams","transactionRequest","transaction_","transactions","blockTag_","includeTransactions_","blockNumberHex","defaultPriorityFee","rest","currentChainId","fees","formatters","serializers","shouldSplitBatch","exec","getScheduler","flush","getBatchedArgs","setScheduler","call","batch","offchainLookup","offchainLookupSignature","request_","batchSize","multicallAddress_","multicallAddress","schedule","requests","calls","returnData","success","callRequest","dataSuffix","observerId","callbacks","callbackId","getListeners","unsubscribe","unwatch","cleanup","time","emitOnBegin","initialWaitTime","interval","initialWait","cacheKey","buildCache","cacheTime","strict_","argTopics","isUnnamed","nonIndexedInputs","_client","events_","events","onLogs","poll_","pollingInterval","previousBlockNumber","initialized","unsubscribe_","chainIdHex","serializer","signedRequest","publicClient","walletClient","hasPublicClient","hasWalletClient","hasReadFunction","hasWriteFunction","hasEvent","abiEvent","hasArgs","nativeCurrency","rpcUrls","blockExplorers","createClient","extend","extendFn","combined","delay_","retryCount","shouldRetry","attemptRetry","retry","retryDelay","err_","transports_","rank","transports","onResponse","fetch","rankOptions","onTransports","sampleCount","weights","stabilityWeight","latencyWeight","samples","rankTransports_","sample","transport_","maxLatency","latency","scores","latencies","latencyScore","successes","stabilityScore","errorInstance","signal","timeoutId","controller","http","fetchOptions","signal_","url_","urlKey","socket","WebSocket","webSocket","subscriptions","onMessage","isSubscription","onClose","socket_","id_","rpc","retryCount_","timeout_","callType","primaryType","types_","validateData","struct","type_","integerMatch","_type","bytesMatch","bytecode","description","transactionReceipt","domain_","encodedTypes","encodedValues","encodedHashType","unsortedDeps","deps","primaryType_","parsedType","typeValuePairs","messageBytes","prefixBytes","serializedAccessList","serializedTransaction","rounded","labels","hashFromEncodedLabel","packet","universalResolverAddress_","universalResolverAddress","functionData","uri","namespace","img","custom","defaultGateway","gatewayUrls","isEncoded","ipfsGateway","arweaveGateway","networkRegexMatch","protocol","subpath","subtarget","isIPNS","isIPFS","replacedUri","parsedUri","resolvedURI","isOnChain","uri_","reference","asset_namespace","tokenID","eip_namespace","chainID","erc_namespace","nft","record","nftUri","resolvedNftUri","encodedJson","uriTokenId","reverseNode","feeHistory","reward","rewardPercentiles","slot","transactionBlockNumber","allowFailure","batchSize_","contracts_","contracts","chunkedCalls","currentChunk","currentChunkSize","callData","u8a","title","sum","hashLen","qByteLen","hmacFn","reseed","sl","pred","validators","optValidators","checkField","fieldName","isOptional","checkVal","a_","b_","signatureHex","emitMissed","onBlockNumber","enablePolling","prevBlockNumber","onReplaced","replacedTransaction","retrying","_unobserve","_unwatch","blockNumber_","replacementTransaction","onBlock","prevBlock","onTransactions","permissions","signMessage","message_","signTypedData","typedData","onData","subscriptionId","bytesLength","byteOffset","_32n","_u32_max","wh","wl","dataView","oview","finished","destroyed","W15","W2","s0","sigma1","_3n","modulo","invert","legendreC","Z","p1div4","Fp","Q1div2","ge","n2","nv","nums","lastMultiplied","inverted","nBitLength","_nBitLength","nByteLength","Field","ORDER","bitLen","redef","BYTES","sqrtP","lhs","groupOrder","constTimeNegate","neg","windows","elm","window","precomputes","maxNumber","shiftBy","wbits","offset1","offset2","cond1","cond2","precomputesMap","transform","ut.validateObject","endo","ut","sBytes","rBytesLeft","shl","rhl","rl","CURVE","isCompressed","ut.concatBytes","weierstrassEquation","x3","isWithinCurveOrder","assertGE","normPrivateKeyToScalar","wrapPrivateKey","ut.bytesToHex","ut.bytesToNumberBE","mod.mod","pointPrecomputes","assertPrjPoint","Point","px","py","pz","is0","toInv","X1","Y1","Z1","X2","Y2","Z2","X3","Y3","Z3","t0","t3","t4","t5","wnaf","k1neg","k2neg","k1p","k2p","scalar","fake","f1p","f2p","iz","cofactor","isTorsionFree","clearCofactor","_bits","curveDef","CURVE_ORDER","compressedLen","uncompressedLen","isValidFieldElement","modN","invN","mod.invert","cat","head","numToNByteStr","ut.numberToBytesBE","isBiggerThanHalfOrder","normalizeS","slcNum","Signature","recovery","msgHash","rec","bits2int_modN","radj","ir","ut.hexToBytes","rand","mod.hashToPrivateScalar","getPublicKey","isProbPub","getSharedSecret","privateA","publicB","bits2int","ORDER_MASK","ut.bitMask","int2octets","prepSig","defaultSigOpts","lowS","prehash","ent","h1int","seedArgs","k2sig","kBytes","ik","normS","defaultVerOpts","sign","privKey","ut.createHmacDrbg","verify","sg","_sig","derError","is","oHash","iHash","msgs","defHash","create","_6n","_11n","_22n","_23n","_44n","_88n","b88","b176","b220","b223","POW_2_128","ne","ke","ze","X","te","fmtLong","fmtShort","ms","msAbs","plural","isPlural","setup","env","createDebug","coerce","disable","enable","enabled","destroy","selectColor","prevTime","enableOverride","namespacesCache","enabledCache","debug","curr","formatter","delimiter","newDebug","namespaces","toNamespace","regexp","formatArgs","load","useColors","localstorage","warned","lastC","timeouts","currentTime","timeoutOps","counts","mainError","mainErrorCount","RetryOperation","random","original","attemptNumber","retriesLeft","AbortError","me","be","ye","He","Ee","util","assertIs","_arg","assertNever","_x","validKeys","filtered","checker","joinValues","separator","objectUtil","second","issues","sub","subs","actualProto","_mapper","mapper","issue","fieldErrors","processError","formErrors","_ctx","errorMaps","issueData","fullPath","fullIssue","maps","arrayValue","pairs","syncPairs","finalObject","errorUtil","errorMap","invalid_type_error","required_error","iss","maybeAsyncResult","getIssueProperties","setError","refinementData","refinement","option","incoming","defaultValueFunc","catchValueFunc","This","ip","tooBig","tooSmall","validation","minLength","valDecCount","stepDecCount","decCount","valInt","stepInt","inclusive","minDate","maxDate","schema","newShape","fieldSchema","shape","shapeKeys","extraKeys","keyValidator","unknownKeys","catchall","defaultError","augmentation","merging","newField","handleResults","unionErrors","childCtx","dirty","discriminator","discriminatorValue","optionsMap","discriminatorValues","aType","bType","bKeys","sharedKeys","newObj","sharedValue","newArray","itemA","itemB","handleParsed","parsedLeft","parsedRight","merged","itemIndex","schemas","keyType","valueType","third","finalMap","finalizeSet","elements","parsedSet","minSize","makeArgsIssue","makeReturnsIssue","parsedArgs","parsedReturns","returnType","getter","expectedValues","enumValues","opt","nativeEnumValues","promisified","effect","checkCtx","processed","executeRefinement","preprocess","newCtx","inResult","fatal","_fatal","ZodFirstPartyTypeKind","cls","green","blue","styles","groupName","group","styleName","style","colorString","character","remainder","brand","substring","substringLength","endIndex","returnValue","gotCR","supportsColor","colorLevel","chalk","strings","ansiStyles","builder","model","arguments_","styler","bgModel","open","close","openAll","closeAll","_styler","_isEmpty","lfIndex","issueSeparator","unionSeparator","zodError","newIssues","prefixSeparator","maxIssuesInMessage","E.isAddress","re","_obj","_1","_2","isApply","DoubleIndexedKV","Registry","generateIdentifier","extendStatics","ClassRegistry","valuesNotNever","CustomTransformerRegistry","transformer","getType","isString","parsePath","segment","isEscapedDot","isEndOfSegment","lastSegment","__assign","il","isApplicable","untransform","superJson","baseError","flags","isRegistered","potentialClass","clazz","allowedProps","applicableCompositeRule","rule","applicableSimpleRule","transformation","row","keyOfRow","isEnd","lastKey","keyToRow","newKey","tree","walker","origin","subtree","nodeValue","children","plain","apply","identicalPaths","identicalObjectPath","identicalPath","identities","existingSet","identitites","dedupe","rootEqualityPaths","paths","representativePath","objectsInThisPath","seenObjects","primitive","transformed_1","result_1","transformationResult","transformed","transformedValue","innerAnnotations","recursiveResult","newVal","originalObject","includeNonenumerable","propType","SuperJSON","equalityAnnotations","meta","teardownRef","isDone","unsubscribed","teardownImmediately","originalObserver","startIfNeeded","resetIfNeeded","_sub","abort","onDone","obs$","nextOp","customFetchImpl","customAbortControllerImpl","dict","_input","queryParts","ac","resolvedHeaders","runtime","batchLoader","pendingItems","dispatchTimer","destroyTimerAndPendingItems","groupItems","groupedItems","lastGroup","dispatch","unitResolver","_item","requester","resolvedOpts","maxURLLength","validate","batchOps","query","mutation","loaders","loader","requesterOpts","req$","envelope","combinedTransformer","clientCallType","pathCopy","procedureType","ae","hasOwn","classNames","classes","reactIsModule","isFragment","warning","_typeof","toPrimitive","_defineProperty","toPropertyKey","getValue","shouldUpdate","cacheRef","React.useRef","refs","refList","nodeOrComponent","_type$prototype","_nodeOrComponent$prot","isMemo","schedulerModule","Oe","na","xa","$a","ba","reactDomModule","_classCallCheck","_inherits","setPrototypeOf","_getPrototypeOf","_isNativeReflectConstruct","_possibleConstructorReturn","assertThisInitialized","_createSuper","Derived","hasNativeReflectConstruct","isNativeReflectConstruct","Super","NewTarget","possibleConstructorReturn","clone","_objectSpread","arrayLikeToArray","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","times","callRef","leftTimes","realId","_objectWithoutPropertiesLoose","excluded","sourceKeys","_objectWithoutProperties","objectWithoutPropertiesLoose","sourceSymbolKeys","obj1","obj2","shallow","refSet","deepEqual","circular","newLevel","SPLIT","Entity","instanceId","valueFn","nextValue","cssinjsInstanceId","firstChild","styleHash","_style$parentNode","CacheEntity","React.createContext","mark","prepend","container","css","csp","_option$priority","priority","mergedOrder","isPrependQueue","styleNode","existStyle","nodePriority","existNode","cachedRealContainer","placeholderStyle","parentNode","_option$csp","_option$csp2","_option$csp3","arrayWithHoles","iterableToArrayLimit","nonIterableRest","ThemeCache","derivativeOption","_cache2","_cache3","updateCallTimes","derivative","_cache","_cache$map","_this$internalGet","_this$keys$reduce","_result","callTimes","_this$keys$reduce2","targetKey","cacheValue","currentCache","derivatives","_cache$value","uuid","Theme","token","derivativeArr","styleStr","handleElement","supportCheck","_getComputedStyle$con","_ele$parentNode","_ele","support","ele","React.useLayoutEffect","React.useEffect","firstMountRef","fullClone","React","useInsertionEffect","renderEffect","React.useMemo","effectCleanups","cleanupFlag","keyPath","cacheFn","onCacheRemove","onCacheEffect","_React$useContext","React.useContext","StyleContext","globalCache","useEffectCleanupRegister","updater","prevCache","_ref2$","tmpCache","mergedCache","cacheEntity","cacheContent","useCompatibleInsertionEffect","polyfill","_ref3","_ref4","_ref5","_ref6","_ref6$","nextCount","tokenKey","tokenKeyList","cleanableKeyList","getComputedToken","originToken","overrideToken","theme","derivativeToken","mergedDerivativeToken","tokens","_useContext","useContext","_option$salt","_option$override","override","formatToken","compute","mergedToken","tokenStr","overrideTokenStr","cachedToken","hashId","pattern","search","begin","line","siblings","whitespace","rules","rulesets","pseudo","declarations","atrule","previous","variable","scanning","ampersand","characters","post","content","_item$split","_item$split2","inlineMapStyle","_inlineMapStyle$paren","_style","serialized","hashPriority","hashClassName","hashSelector","_firstPath$match","firstPath","htmlElement","parseStyle","interpolation","injectHash","parentSelectors","layer","_config$transformers","transformers","effectStyle","parseKeyframes","keyframes","animationName","_parseStyle","_parseStyle2","_parsedStr","flattenList","fullList","flattenStyleList","originStyle","mergedStyle","trans","_trans$visit","subInjectHash","mergedKey","nextRoot","_parseStyle3","_parseStyle4","_parsedStr2","childEffectStyle","appendStyle","cssKey","cssValue","formatValue","unitless","actualValue","layerCells","layerName","styleFn","clientOnly","_info$order","order","autoClear","defaultCache","ssrInline","linters","isMergedClientSide","_useGlobalCache","cachePath","_getStyleAndHash","_getStyleAndHash2","inlineCacheStyleStr","styleObj","_parseStyle5","_parseStyle6","parsedStyle","styleId","fromHMR","mergedCSSConfig","nonceStr","effectKey","_useGlobalCache2","cachedStyleStr","cachedTokenKey","cachedStyleId","React.createElement","React.Fragment","Keyframe","createContext","entity","removeIfUndefined","_paths","restPath","internalMerge","parentLoopSet","loopSet","isArr","originValue","CalendarLocale","TimePickerLocale","typeTemplate","Pagination","DatePicker","Calendar","newLocale","cloneLocale","componentName","defaultLocale","fullLocale","LocaleContext","getLocale","defaultLocaleData","localeFromContext","getLocaleCode","localeCode","_ANT_MARK__","getMemoizedContextValue","isPercent","allow3Char","allow4Char","color","rgb","ok","TinyColor","RsRGB","GsRGB","BsRGB","hsv","hsl","allowShortChar","fmt","rnd","formatSet","formattedString","hasAlpha","needsAlphaFormat","amount","hue","rgb1","rgb2","rgba","slices","part","modification","background","fg","bg","increment","light","saturation","generate","patterns","pColor","_hsv","_colorString","opacity","darkColorString","controlHeight","sizeUnit","sizeStep","generateColorPalettes","generateNeutralColorPalettes","colorSuccessBase","colorWarningBase","colorErrorBase","colorInfoBase","colorPrimaryBase","colorBgBase","colorTextBase","primaryColors","successColors","warningColors","errorColors","infoColors","neutralColors","colorLink","linkColors","radiusBase","radiusLG","radiusSM","radiusXS","radiusOuter","motionUnit","motionBase","borderRadius","lineWidth","genRadius","getAlphaColor","baseColor","brightness","colors","bgBaseColor","textBaseColor","fontSizes","baseSize","intSize","height","fontSize","fontSizePairs","genFontSizes","lineHeights","colorPalettes","colorKey","cur","genFontMapToken","genControlHeight","defaultDerivative","defaultSeedToken","suffixCls","customizePrefixCls","globalPrefixCls","variables","formatColor","fillColor","colorVal","primaryColor","primaryActiveColor","disabled","originDisabled","originSize","componentDisabled","componentSize","SizeContext","frontColor","backgroundColor","fR","fG","fB","originAlpha","bR","bG","bB","fA","__rest","restToken","overrideTokens","seedToken","screenXS","screenSM","screenMD","screenLG","screenXL","screenXXL","fastDuration","componentTheme","componentTokens","mergedComponentToken","rootDesignToken","mergedTheme","fnRef","memoFn","React.useCallback","_fnRef$current","destroyRef","_React$useState","React.useState","_React$useState2","setValue","safeSetState","ignoreDestroy","needInheritFontFamily","componentPrefixCls","fontFamily","rootPrefixSelector","objs","tokenKeys","componentToken","iconPrefixCls","getDefaultToken","cells","concatComponent","prefixCls","getPrefixCls","rootPrefixCls","sharedConfig","useResetIconStyle","proxyToken","customComponentToken","deprecatedTokens","oldTokenKey","newTokenKey","defaultComponentToken","mergeToken","componentCls","styleInterpolation","useStyle","parentTheme","themeConfig","parentThemeConfig","mergedComponents","prevTheme","nextTheme","_excluded","Context","_React$Component","DomWrapper","React.Component","styleProp","prefixes","domSupport","win","canUseDOM","prefixMap","stylePropList","getTransitionName","transitionName","transitionType","cacheElementRef","useRef","callbackRef","onInternalMotionEnd","removeMotionEvents","patchMotionEvents","useIsomorphicLayoutEffect","useLayoutEffect","useEffect","nextFrameRef","cancelNextFrame","raf","nextFrame","nextFrameId","prepareOnly","_useState","useState","_useState2","setStep","_useNextFrame","_useNextFrame2","startQueue","STEP_QUEUE","nextStep","doNext","supportMotion","visible","getElement","_ref$motionEnter","motionEnter","_ref$motionAppear","motionAppear","_ref$motionLeave","motionLeave","motionDeadline","motionLeaveImmediately","onAppearPrepare","onEnterPrepare","onLeavePrepare","onAppearStart","onEnterStart","onLeaveStart","onAppearActive","onEnterActive","onLeaveActive","onAppearEnd","onEnterEnd","onLeaveEnd","onVisibleChanged","asyncVisible","setAsyncVisible","_useState3","_useState4","setStatus","_useState5","_useState6","setStyle","mountedRef","deadlineRef","getDomElement","activeRef","updateMotionEndStatus","currentActive","canEnd","_useDomMotionEvents","_useDomMotionEvents2","getEventHandlers","targetStatus","eventHandlers","_useStepQueue","newStep","onPrepare","_eventHandlers$step","_useStepQueue2","startStep","isMounted","nextStatus","nextEventHandlers","firstMountChangeRef","transitionSupport","isSupportTransition","contextMotion","CSSMotion","React.forwardRef","_props$visible","_props$removeOnLeave","removeOnLeave","forceRender","motionName","leavedClassName","eventProps","nodeRef","wrapperNodeRef","_useStatus","_useStatus2","statusStep","statusStyle","mergedVisible","renderedRef","setNodeRef","motionChildren","mergedProps","_classNames","statusSuffix","motionCls","React.isValidElement","originNodeRef","React.cloneElement","keyObj","prevKeys","currentKeys","currentIndex","prevKeyObjects","currentKeyObjects","hit","currentKeyObj","duplicatedKeys","matchKey","OriginCSSMotion","CSSMotionList","removeKey","keyEntities","nextKeyEntities","_this$props","_onVisibleChanged","onAllRemoved","restProps","Component","motionProps","changedVisible","restKeysCount","parsedKeyObjects","mixedKeyEntities","prevEntity","motion","needWrapMotionProviderRef","customCsp","autoInsertSpaceInButton","alert","anchor","direction","virtual","dropdownMatchSelectWidth","popupMatchSelectWidth","popupOverflow","legacyLocale","parentContext","customIconPrefixCls","segmented","statistic","spin","calendar","carousel","cascader","collapse","typography","checkbox","descriptions","divider","drawer","skeleton","image","layout","mentions","modal","slider","breadcrumb","menu","pagination","badge","radio","rate","SWITCH","transfer","table","card","tabs","timeline","timePicker","upload","notification","colorPicker","datePicker","flex","wave","warningConfig","mergedPrefixCls","baseConfig","propValue","memoedConfig","prevConfig","currentConfig","memoIconContextValue","childNode","validateMessages","LocaleProvider","IconContext","memoTheme","themeObj","parsedComponents","parsedToken","antLocale","CheckCircleFilled","_ele$getRootNode","warn","attrs","rootProps","generateColor","twoToneColor","eleRef","mergedStyleStr","shadowRoot","secondaryColor","icon","onClick","svgRef","_normalizeTwoToneColo","_normalizeTwoToneColo2","rotate","tabIndex","_React$useContext$pre","rootClassName","classString","iconTabIndex","svgStyle","CloseCircleFilled","CloseOutlined","ExclamationCircleFilled","InfoCircleFilled","ariaOnly","mergedConfig","keyCode","_props$duration","eventKey","closable","_props$closeIcon","closeIcon","divProps","onNoticeClose","forcedHovering","hovering","setHovering","mergedHovering","onInternalClose","onCloseKeyDown","noticePrefixCls","_divProps$onMouseEnte","_divProps$onMouseLeav","DEFAULT_OFFSET","_config$offset","_config$threshold","_config$gap","_clsx","configList","placement","onAllNoticeRemoved","stackConfig","ctxCls","dictRef","latestNotice","setLatestNotice","hoverKeys","setHoverKeys","_useStack","_useStack2","_useStack2$","threshold","gap","placementMotion","dataKey","_keys","_keys2","clsx","motionClassName","motionStyle","motionIndex","configClassName","configStyle","dataIndex","stackStyle","transformX","_dictRef$current$key","_dictRef$current$key2","_dictRef$current$key3","verticalOffset","_dictRef$current$keys","transformY","scaleX","Notice","_props$prefixCls","maxCount","renderNotifications","setConfigList","_config$onClose","React.useImperativeHandle","innerConfig","_list$index","_React$useState3","_React$useState4","placements","setPlacements","nextPlacements","_config$placement","originPlacements","emptyRef","placementList","createPortal","placementConfigList","objList","rootConfig","_rootConfig$getContai","getContainer","shareConfig","setContainer","notificationsRef","contextHolder","taskQueue","setTaskQueue","api","queue","task","oriQueue","LoadingOutlined","iconCls","boxShadow","colorText","colorSuccess","colorError","colorWarning","colorInfo","fontSizeLG","motionEaseInOutCirc","motionDurationSlow","marginXS","paddingXS","borderRadiusLG","zIndexPopup","contentPadding","contentBg","noticeCls","messageMoveIn","Keyframes","messageMoveOut","noticeStyle","combinedToken","PurePanel","staticPrefixCls","openFn","closeFn","closePromise","filled","top","staticGetContainer","rtl","getPopupContainer","getStyle","getClassName","getNotificationMotion","mergedCloseIcon","holder","useRcNotification","messageConfig","holderRef","fakeResult","originOpen","restConfig","typeOpen","jointContent","mergedDuration","mergedOnClose","setElements","patchElement","originElements","define","Generator","makeInvokeMethod","tryCatch","GeneratorFunction","GeneratorFunctionPrototype","defineIteratorMethods","AsyncIterator","invoke","callInvokeWithMethodAndArg","maybeInvokeDelegate","pushTryEntry","resetTryEntry","_next","_throw","ReactDOM","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","_callee","_context","_container$MARK","_x2","_callee2","_context2","_getBBox","_element$getBoundingC","_width","_height","colorPrimary","borderTopColor","borderColor","divRef","setWaveColor","setBorderRadius","setLeft","setTop","setWidth","setHeight","setEnabled","waveStyle","radius","syncPos","nodeStyle","isStatic","borderLeftWidth","borderTopWidth","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","resizeObserver","isSmallComponent","showWave","targetNode","showEffect","showWaveEffect","rafId","containerRef","customSize","compactItemContext","compactItemClassnames","compactDirection","isFirstItem","isLastItem","others","sizeCls","needInserted","SPACE","isPrevChildPure","childList","isCurrentChildPure","lastIndex","lastChild","forwardRef","iconWrapperCls","iconClassName","mergedIconCls","IconWrapper","loading","existIcon","buttonTypeCls","groupBorderColor","colorErrorHover","fontWeight","btnCls","hoverStyle","activeStyle","textColor","textColorDisabled","borderColorDisabled","sizePrefixCls","lineHeight","buttonPaddingHorizontal","paddingVertical","iconOnlyCls","smallToken","largeToken","prepareToken","paddingInline","onlyIconSize","prepareComponentToken","buttonToken","genGroupStyle","parentCls","focusElCls","focus","borderElCls","childCombinator","hoverEffects","compactCls","danger","customizeSize","customDisabled","ghost","htmlType","customClassNames","customStyle","button","wrapSSR","mergedDisabled","loadingOrDelay","useMemo","innerLoading","setLoading","hasTwoCNChar","setHasTwoCNChar","buttonRef","createRef","Children","delayTimer","cleanupTimer","buttonText","handleClick","autoInsertSpace","compactSize","sizeClassNameMap","sizeFullName","useSize","ctxSize","iconType","linkButtonRestProps","fullStyle","iconClasses","iconStyle","iconNode","LoadingIcon","kids","buttonNode","Wave","buttonProps","autoFocus","emitEvent","isSilent","quitOnNullishReturnValue","actionFn","clickedRef","handlePromiseOnOk","returnValueOfOnOk","Button","autoFocusButton","cancelButtonProps","cancelTextLocale","mergedOkCancel","onCancel","onConfirm","ActionButton","okButtonProps","okTextLocale","okType","onOk","render","defaultEle","appendedRef","queueCreate","setQueue","mergedQueueCreate","appendFn","newQueue","append","_ele$parentElement","fresh","outer","outerStyle","widthContained","widthScroll","_getComputedStyle","lock","mergedLock","scrollbarSize","isOverflow","nextInline","autoLock","_props$autoDestroy","autoDestroy","shouldRender","setShouldRender","mergedRender","innerContainer","setInnerContainer","customizeContainer","_useDom","_useDom2","defaultContainer","mergedContainer","childRef","mergedRef","renderInline","reffedChildren","reactId","innerId","setInnerId","nextId","rect","doc","React.memo","ariaId","footer","bodyStyle","bodyProps","modalRender","onMouseDown","onMouseUp","modalClassNames","modalStyles","panelRef","sentinelStartRef","sentinelEndRef","_sentinelStartRef$cur","_document","activeElement","contentStyle","footerNode","headerNode","closer","destroyOnClose","mousePosition","dialogRef","transformOrigin","setTransformOrigin","elementOffset","motionRef","maskProps","zIndex","_props$keyboard","keyboard","_props$focusTriggerAf","focusTriggerAfterClose","wrapStyle","wrapClassName","wrapProps","afterOpenChange","afterClose","animation","_props$closable","_props$mask","maskTransitionName","maskAnimation","_props$maskClosable","maskClosable","maskStyle","lastOutSideActiveElementRef","wrapperRef","contentRef","animatedVisible","setAnimatedVisible","saveLastOutSideActiveElementRef","focusDialogContent","_contentRef$current","onDialogVisibleChanged","newVisible","contentClickRef","contentTimeoutRef","onContentMouseDown","onContentMouseUp","onWrapperClick","onWrapperKeyDown","_props$destroyOnClose","_afterClose","refContext","defaultClosable","customCloseIconRender","defaultCloseIcon","Parent","Class","Wrapper","template","arrLength","objArr","_Error","AsyncValidationError","_pending","flattenArr","firstFields","objArrKeys","objArrLength","pending","oe","fieldValue","v4","v6seg","v6","v46Exact","v4exact","v6exact","auth","ipv4","ipv6","host","tld","port","ruleType","spRegexp","_pattern","dateObject","cloned","Schema","_messages","source_","oc","_errors","messages$1","series","errorFields","doIt","deep","addFullField","errorList","filledErrors","fieldsSchema","paredFieldsSchema","fieldSchemaList","errs","finalErrors","messageIndex","validator","RawAsyncValidator","kv","_x3","_x4","_x5","messageVariables","cloneRule","originValidator","subRuleField","messages","subResults","fillVariableResult","mergedMessage","subValue","namePath","validateFirst","filledRules","currentRule","ruleIndex","originValidatorFunc","hasPromise","wrappedCallback","i2","summaryPromise","_x6","_x7","rulePromises","_x8","_callee3","_context3","errorsList","_x9","_callee4","_context4","ruleError","store","namePathList","newStore","partialMatch","subNamePath","nameUnit","targetKeys","sourceValue","targetValue","valuePropName","moveIndex","toIndex","preserve","isListField","_this$props2","fieldContext","_fieldContext$prefixN","prefixName","_this$props3","_this$props3$rules","resetCount","onMetaChange","_meta","prevStore","_this$props4","_this$props4$dependen","dependencies","onReset","curValue","namePathMatch","dependencyList","dependency","triggerName","_ref2$validateOnly","validateOnly","rootPromise","_this$props5","_this$props5$validate","validateDebounce","filteredRules","validateTrigger","triggerList","ruleErrors","_ruleErrors$forEach","nextErrors","nextWarnings","warningOnly","_ref4$errors","_fieldContext$getInte","getInitialValue","_meta2","toChildrenArray","getFieldsValue","childProps","_this$props6","trigger","getValueFromEvent","getValueProps","mergedValidateTrigger","getInternalHooks","_getInternalHooks","mergedGetValueProps","originTriggerFunc","control","validateTriggerList","originTrigger","_getInternalHooks2","initEntityValue","_this$props7","_getInternalHooks3","registerField","_this$getOnlyChild","returnChildNode","FieldContext","listContext","wrapperListContext","keyRef","keyManager","parentPrefixName","pathName","_ref3$value","onChange","getFieldValue","getNewValue","indexSet","keysIndex","valueIndex","_move","listValue","promiseList","cell","NameMap","_cell$match","_cell$match2","FormStore","forceRootUpdate","subscribable","_this$prevWithoutPres","nextStore","prevWithoutPreserves","initValue","allValues","pure","nameList","filterFunc","mergedNameList","mergedFilterFunc","mergedStrict","fieldEntities","filteredNameList","_isListField","_isList","fieldError","arg0","isAllFieldsTouched","isFieldTouched","shortNamePath","fieldNamePath","isNamePathListTouched","entities","namePathListEntities","testField","records","resetWithFields","formInitialValue","requiredFieldEntities","_requiredFieldEntitie","fieldData","fieldPreserve","mergedPreserve","_prevStore","_namePath","mergedInfo","onStoreChange","childrenFields","onValuesChange","changedValues","rootNamePath","dependencies2fields","dependencyNamePath","fillChildren","filedErrors","onFieldsChange","changedFields","_ref7","_options","provideNameList","TMP_SPLIT","validateNamePathList","recursive","mergedErrors","mergedWarnings","_ref8","resultNamePathList","_ref9","returnPromise","triggerNamePathList","onFinish","onFinishFailed","formRef","forceUpdate","forceReRender","formStore","onFormChange","onFormFinish","formContext","formsRef","newForms","_ref$component","_ref$validateTrigger","_onFieldsChange","_onFinish","_useForm","_useForm2","formInstance","useSubscribe","setInitialValues","setCallbacks","setValidateMessages","setPreserve","destroyForm","mountRef","childrenNode","childrenRenderProps","_values","prevFieldsRef","formContextValue","wrapperNode","_restProps$onReset","_args$","_args$2","_form","valueStr","valueStrRef","isValidForm","namePathRef","registerWatch","cancelRegister","nextValueStr","FieldForm","formItemInputContext","newFormItemInputContext","newContext","panelSelector","watermark","panelEleRef","innerContentEle","confirmLoading","okText","cancelText","useLocale","btnCtxValue","btnCtxValueMemo","NormalCancelBtn","NormalOkBtn","inKeyframes","outKeyframes","sameLevelPrefix","sameLevel","antCls","confirmComponentCls","headerPaddingVertical","headerFontSize","headerLineHeight","modalToken","Modal","getContextPopupContainer","handleCancel","handleOk","centered","wrapClassNameExtended","dialogFooter","mergedClosable","Dialog","titleFontSize","titleLineHeight","modalConfirmIconSize","titleHeight","contentHeight","confirmPrefixCls","okCancel","staticLocale","resetProps","mergedIcon","mergedLocale","footerOriginNode","hasTitle","bodyCls","ConfigProvider","triggerCancel","destroyFns","reactUnmount","runtimeLocale","getIconPrefixCls","getTheme","mergedGetContainer","reactRender","ConfirmDialog","update","configUpdate","hookAfterClose","setOpen","setInnerConfig","newConfig","originConfig","contextLocale","_props","useModal","actionQueue","setActionQueue","getConfirmFunc","withFunc","modalRef","React.createRef","resolvePromise","silent","closeFunc","HookModal","confirmed","destroyAction","updateAction","globalGetContainer","setMessageConfig","rootIconPrefixCls","sync","holderFragment","newMessage","skipped","_message$instance","additionalProps","selection","copyKey","reselectPrevious","successful","worldContract","waitForTransaction","ClientComponents","Player","LootList1","LootList2","BoxList","BattleList","getComponentValue","singletonEntity","transferData","buffHash","battleId","encodeEntity","boxId","oreAmount","treasureAmount","userTokenId","lootTokenId","high","unsigned","cachedObj","lowBits","highBits","radix","radixToPower","radixLong","rem1","rem","remDiv","intval","thisNeg","otherNeg","addend","a48","a32","a16","a00","b00","c48","c32","c16","c00","subtrahend","divisor","approx","halfThis","log2","approxRes","approxRem","numBits","b64","s64","chunk","invalidEncoding","evt","f32","f8b","writeFloat_f32_cpy","writeFloat_f32_rev","readFloat_f32_cpy","readFloat_f32_rev","writeFloat_ieee754","writeUint","exponent","mantissa","readFloat_ieee754","readUint","uint","f64","writeDouble_f64_cpy","writeDouble_f64_rev","readDouble_f64_cpy","readDouble_f64_rev","writeDouble_ieee754","off0","off1","readDouble_ieee754","utf8","alloc","SIZE","MAX","slab","LongBits","zeroHash","charCodeAt","part0","part1","part2","require$$5","require$$6","require$$7","sizeOrArray","dst","ifNotSet","newError","CustomError","fieldNames","fieldMap","encoding","BufferWriter","push","write_uint32","write_int32","write_sint32","write_uint64","write_sint64","write_bool","write_fixed32","write_fixed64","write_float","write_double","writeBytes_set","writeBytes_for","write_bytes","write_string","fork","ldelim","finish","BufferWriter_","write_bytes_buffer","write_string_buffer","BufferReader","writeLength","create_typed_array","create_array","read_uint32_setup","read_int32","read_sint32","read_bool","read_fixed32","read_sfixed32","read_float","read_double","read_bytes","nativeBuffer","read_string","wireType","BufferReader_","read_string_buffer","rpcImpl","requestDelimited","responseDelimited","rpcCall","requestCtor","responseCtor","endedByRPC","protobuf","configure","Metadata","Status","composeClientMiddleware_1","middleware1","middleware2","options2","propertyDescriptor","hasOwnProperty","objectCreate","propertyDescriptors","helpers","uglyErrorPrinting","extendableErrorName","ExtendableError","originalConstructor","constructorName","constructorNameMatch","constructorNameIsError","ClientError_1","ts_error_1","Status_1","composeServerMiddleware_1","context1","ServerError_1","desc","__exportStar","require$$8","require$$9","require$$10","requestEncode","requestFromPartial","responseEncode","responseFromPartial","grpc_web_1","serviceName","executor","removeAbortListener","callbackResult","dueTime","unlisten","sourceObj","innerAbortController","abortListener","rejection","settledCount","settled","baseMs","maxDelayMs","maxAttempts","delayMs","backoff","deferredFunctions","spawnAbortController","spawnSignal","abortSpawn","tasks","abortTasks","removeSpawnAbortListener","failure","forkFn","taskAbortController","taskSignal","taskPromise","deferPromise","abortController","attemptsExhausted","handleFulfilled","handleRejected","makeAttempts","AsyncSink_1","isAsyncIterable_1","factory","VERSION","_hasatob","_hasbtoa","_hasBuffer","_TD","_TE","b64ch","b64chs","b64tab","tab","b64re","_fromCC","_U8Afrom","_mkUriSafe","m0","_tidyB64","btoaPolyfill","bin","u32","asc","_btoa","_fromUint8Array","maxargs","fromUint8Array","urlsafe","cb_utob","cc","re_utob","utob","_encode","encodeURI","re_btou","cb_btou","cccc","btou","atobPolyfill","u24","r1","_atob","_toUint8Array","toUint8Array","_unURI","_decode","isValid","_noEnum","extendString","_add","extendUint8Array","extendBuiltins","gBase64","nice_grpc_common_1","grpcMetadata","createBidiStreamingMethod_1","abort_controller_x_1","service_definitions_1","convertMetadata_1","channel","middleware","defaultOptions","grpcMethodDefinition","methodDescriptor","bidiStreamingMethod","onHeader","onTrailer","pipeAbortController","trailers","pipeError","pipeRequest","createClientStreamingMethod_1","clientStreamingMethod","createServerStreamingMethod_1","serverStreamingMethod","createUnaryMethod_1","unaryMethod","defaultCallOptions","newMiddleware","methodEntries","methodDefinition","createChannel","arbitrumGoerli","foundry","sepolia","chains.arbitrumGoerli","chains.foundry","chains.sepolia","mudFoundry","latticeTestnet","chainIndex","world","worldAddress","initialBlockNumber","getBurnerPrivateKey","createWorld","utils.Interface","mudConfig","networkConfig","clientOptions","transportObserver","burnerAccount","createBurnerAccount","burnerWalletClient","write$","createContract","write","latestBlock$","blockStorageOperations$","syncToRecs","faucet","requestDrip","systemCalls","Action","createBrowserLocation","globalHistory","pathname","createBrowserHref","cond","parsedPath","hashIndex","searchIndex","getLocation","createHref","validateLocation","v5Compat","getIndex","handlePop","history","historyState","replace","createURL","ResultType","routes","locationArg","basename","parentsMeta","parentPath","flattenRoute","route","relativePath","routesMeta","_route$path","exploded","segments","required","restExploded","initialScore","score","branch","matchedParams","matchedPathname","remainingPathname","matcher","paramNames","pathnameBase","captureGroups","memo","paramName","splatValue","caseSensitive","regexpSource","startIndex","fromPathname","toPathname","toArg","routePathnames","locationPathname","isPathRelative","isEmptyPath","routePathnameIndex","toSegments","hasExplicitTrailingSlash","hasCurrentTrailingSlash","UNSAFE_invariant","isDataRoute","dataRouterContext","navigator","routePathnamesJson","UNSAFE_getPathContributingMatches","dataRouterState","parentMatches","routeMatch","parentParams","parentPathnameBase","locationFromContext","_parsedLocationArg$pa","parsedLocationArg","renderedMatches","preStyles","devInfo","errorInfo","routeContext","_dataRouterState2","_dataRouterState","errorIndex","outlet","errorElement","getChildren","DataRouterHook","DataRouterStateHook","hookName","thisRoute","_state$errors","routeId","router","basenameProp","locationProp","navigationType","staticProp","navigationContext","locationContext","trailingPathname","React.Children","treePath","future","historyRef","setStateImpl","v7_startTransition","setState","newState","pe","equal","isLeftCritical","isRightCritical","isTopCritical","isBottomCritical","topMovable","bottomMovable","leftMovable","rightMovable","topLeftMovable","topRightMovable","bottomLeftMovable","bottomRightMovable","movableConfig","wallIndexArr","transforms","productIndex","coordinate","cellClass","mapData","dirs","newPaths","dX","dY","nextX","nextY","before","vertexCoordinate","xDegree","yDegree","limitExceeded","lessBoundary","jsx","Appearance","handheld","clothes","toward","jsxs","username","equip","gem","waiting","curAddr","openingBox","opening","cellClassCache","treasureChest","players","onMoveTo","onExeAction","prevActionCoordinate","menuVisible","setMenuVisible","activePlayerId","setActivePlayerId","openTreasureChest","setStartBattle","showUserInfo","previewPath","renderPreviewPaths","AllPlayers","isDelivery","movable","classList","onContextMenu","curPlayer","exeAction","activePlayer","renderPreviewPath","transformStyle","createElement","player","validLen","placeHoldersLen","lens","curByte","uint8","maxChunkLength","mLen","nBytes","eLen","eMax","eBias","nBits","rt","ieee754","customInspectSymbol","SlowBuffer","K_MAX_LENGTH","typedArraySupport","createBuffer","encodingOrOffset","allocUnsafe","fromString","fromArrayView","isInstance","fromArrayBuffer","valueOf","fromObject","assertSize","fill","checked","actual","fromArrayLike","arrayView","numberIsNaN","mustMatch","loweredCase","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","thisStart","thisEnd","thisCopy","targetCopy","bidirectionalIndexOf","arrayIndexOf","indexSize","valLength","foundIndex","hexWrite","remaining","strLen","utf8Write","blitBuffer","asciiWrite","asciiToBytes","base64Write","ucs2Write","utf16leToBytes","firstByte","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","decodeCodePointsArray","MAX_ARGUMENTS_LENGTH","hexSliceLookupTable","newBuf","checkOffset","ext","noAssert","defineBigIntMethod","validateNumber","boundsError","maxBytes","wrtBigUInt64LE","checkIntBI","wrtBigUInt64BE","checkIEEE754","writeFloat","littleEndian","writeDouble","sym","getMessage","Base","received","addNumericalSeparator","checkBounds","INVALID_BASE64_RE","base64clean","units","leadSurrogate","byteArray","i16","BufferBigIntNotDefined","reverse","CryptoJS","Math","undefined","C_lib","propertyName","WordArray","sigBytes","wordArray","thisWords","thatWords","thisSigBytes","thatSigBytes","thatByte","m_w","m_z","rcache","_r","C_enc","hexChars","bite","hexStr","hexStrLength","Latin1","latin1Chars","latin1Str","latin1StrLength","Utf8","utf8Str","BufferedBlockAlgorithm","doFlush","dataWords","dataSigBytes","blockSize","blockSizeBytes","nBlocksReady","nWordsReady","nBytesReady","processedWords","cfg","messageUpdate","hasher","C_algo","Hasher","isPrime","sqrtN","getFractionalBits","nPrime","gamma0x","gamma0","gamma1x","gamma1","maj","sigma0","nBitsTotal","nBitsLeft","makePrefix","filterKeys","hideFunctions","growBranch","lastStates","showValues","lastStatesCopy","lastState","Treeify","lineCallback","hideFunctionsArg","X32WordArray","C_x64","x64Words","x64WordsLength","x32Words","x64Word","wordsLength","superInit","subInit","typedArray","typedArrayByteLength","utf16Chars","utf16Str","utf16StrLength","swapEndian","base64Chars","byte1","byte2","byte3","triplet","paddingChar","base64Str","base64StrLength","reverseMap","paddingIndex","parseLoop","bits1","bits2","MD5","offset_i","M_offset_i","M_offset_0","M_offset_1","M_offset_2","M_offset_3","M_offset_4","M_offset_5","M_offset_6","M_offset_7","M_offset_8","M_offset_9","M_offset_10","M_offset_11","M_offset_12","M_offset_13","M_offset_14","M_offset_15","FF","GG","HH","II","nBitsTotalH","nBitsTotalL","H_i","SHA1","undef","X64Word","X64WordArray","X64Word_create","H0","H1","H2","H3","H4","H5","H6","H7","H0h","H0l","H1h","H1l","H2h","H2l","H3h","H3l","H4h","H4l","H5h","H5l","H6h","H6l","H7h","H7l","Wi","Wih","Wil","gamma0xh","gamma0xl","gamma0h","gamma0l","gamma1xh","gamma1xl","gamma1h","gamma1l","Wi7","Wi7h","Wi7l","Wi16","Wi16h","Wi16l","chh","chl","majh","majl","sigma0h","sigma0l","sigma1h","sigma1l","Kih","Kil","t1l","t1h","t2l","t2h","SHA384","RHO_OFFSETS","PI_INDEXES","ROUND_CONSTANTS","newX","newY","LFSR","roundConstantMsw","roundConstantLsw","bitPosition","SHA3","nBlockSizeLanes","M2i","M2i1","lane","tMsw","tLsw","Tx","Tx4","Tx1","Tx1Msw","Tx1Lsw","laneIndex","laneMsw","laneLsw","rhoOffset","TPiLane","T0","state0","TLane","Tx1Lane","Tx2Lane","roundConstant","blockSizeBits","outputLengthBytes","outputLengthLanes","hashWords","_zl","_zr","_sl","_sr","_hl","_hr","RIPEMD160","hr","zr","sr","br","cr","dr","er","f1","f2","f3","f4","f5","rotl","hasherBlockSize","hasherBlockSizeBytes","oKey","iKey","oKeyWords","iKeyWords","innerHash","HMAC","PBKDF2","blockIndex","derivedKeyWords","blockIndexWords","keySize","blockWords","blockWordsLength","intermediate","intermediateWords","EvpKDF","Base64","Cipher","xformMode","dataUpdate","finalProcessedData","selectCipherStrategy","PasswordBasedCipher","SerializableCipher","cipher","finalProcessedBlocks","C_mode","BlockCipherMode","CBC","xorBlock","thisBlock","C_pad","Pkcs7","nPaddingBytes","paddingWord","paddingWords","modeCreator","CipherParams","cipherParams","C_format","OpenSSLFormatter","openSSLStr","ciphertextWords","encryptor","cipherCfg","C_kdf","OpenSSLKdf","ivSize","derivedParams","CFB","generateKeystreamAndEncrypt","keystream","CTR","Encryptor","CTRGladman","incWord","incCounter","OFB","ECB","lastBytePos","BlockCipher","SBOX","INV_SBOX","SUB_MIX_0","SUB_MIX_1","SUB_MIX_2","SUB_MIX_3","INV_SUB_MIX_0","INV_SUB_MIX_1","INV_SUB_MIX_2","INV_SUB_MIX_3","xi","sx","x4","x8","RCON","keyWords","nRounds","ksRows","keySchedule","ksRow","invKeySchedule","invKsRow","s3","PC1","PC2","BIT_SHIFTS","SBOX_P","SBOX_MASK","DES","keyBits","keyBitPos","subKeys","nSubKey","subKey","bitShift","invSubKeys","exchangeLR","exchangeRL","lBlock","rBlock","TripleDES","StreamCipher","RC4","keySigBytes","keyByteIndex","keyByte","generateKeystreamWord","keystreamWord","RC4Drop","C_","Rabbit","nextState","IV","IV_0","IV_1","i3","gx","ga","gb","RabbitLegacy","require$$11","require$$12","require$$13","require$$14","require$$15","require$$16","require$$17","require$$18","require$$19","require$$20","require$$21","require$$22","require$$23","require$$24","require$$25","require$$26","require$$27","require$$28","require$$29","require$$30","require$$31","require$$32","__importDefault","Base_1","buffer_1","isSorted","eqChecker","buffer1","buffer2","compareFunction","ordering","withPrefix","MerkleTree_1","sha256_1","treeify_1","leaves","hashFn","nodes","layerIndex","layerLimit","leaf","shouldHash","jsonStr","layers","proof","isRightNode","pairIndex","proofs","currentLayer","pushed","leftchildIndex","rightchildIndex","treeIndices","leafCount","maximalIndices","redundantIndices","sortedLeafIndices","leavesCount","unevenLayers","proofIndices","layerNodes","proofNodeIndices","unevenLayer","els","ids","nextIds","pairElement","proofHashes","currentLayerIndices","treeLayer","uniqueIndices","_proofs","tested","proofUsed","isLeftNode","buffers","proofLeaves","proofitem","indexqueue","proofFlag","leavesLen","totalHashes","leafPos","hashPos","proofPos","bufA","bufB","computedRoot","akey","pairIdx","treeLayers","leafIndices","leafHashes","totalLeavesCount","leafTuples","indexA","indexB","leafTupleIndices","nextSliceStart","proofTuplesByLayers","sliceStart","parentIndices","parentLayer","parentNodeTreeIndex","MerkleMountainRange_1","hashLeafFn","peakBaggingFn","hashBranchFn","dataHash","dataHashHex","peakIndexes","peaks","numPeaks","reducedIndex","peakIndex","peakBagging","cursor","targetPeak","peakMap","bitIndex","peakRef","prevPeakMap","itemHash","nextPeakMap","newWidth","cursorIndex","cursorNode","prevPeakExist","nextPeakExist","obtained","itemHashes","tmpWidth","tmpPeakMap","leftIndex","rightIndex","leftHash","rightHash","IncrementalMerkleTree_1","zeroValue","levelStartIndex","levelEndIndex","newLeaf","pathIndices","leafIndex","MerkleSumTree_1","rng","buckets","newBuckets","convertToLeafs","leafs","merkel","getProof","generateLeaf","solidityKeccak256","formatMovePath","MerkleTree","Map","startX","startY","setPrevActionCoordinate","onPlayerMove","curId","staticData","simpleMapData","treasureChestData","playerData","speed","rowIndex","colIndex","enumerableOnly","CopyToClipboard","_React$PureComponent","onCopy","elem","addressTxt","hp","maxHp","ap","maxAp","roomId","boxesCount","leaderboard","newStrs","tempStr","tacticsStep","setTacticsStep","confirmBattleData","setConfirmBattleData","battleData","setBattleData","battleState","setBattleState","player2LossData","setPlayer2LossData","player1LossData","setPlayer1LossData","showPlayer1Loss","setShowPlayer1Loss","showPlayer2Loss","setShowPlayer2Loss","confirmBattle","revealBattle","forceEnd","ethers.utils.formatBytes32String","initBattle","resultBattle","localConfirmBattleData","actionHex","battleTemp","useEntityQuery","Has","HasValue","decodeEntity","battle","battle1","battle2","defenderHP","attackerHP","setTacticsStepFun","setSelectTactic","tactic","confirmBattleFun","getProofHash","getDom","attackerUsername","attackerArg","setVisible","ModalComponent","Fragment","userUrl","lootUrl","lootHasLoaded","updateX","userContract","lootContract","navigate","PlayerAddon","GlobalConfig","PlayerLocationLock","PlayerSeason","openBox","revealBox","getCollections","battleInvitation","unlockUserLocation","submitGem","renderMapData","setRenderMapData","setVertexCoordinate","targetPlayer","setTargetPlayer","battleCurPlayer","setBattleCurPlayer","userInfoPlayer","setUserInfoPlayer","startBattleData","setStartBattleData","userInfoVisible","setUserInfoVisible","setBalance","setOpeningBox","setContent","mapDataRef","moveInterval","GlobalConfigData","ethers.providers.JsonRpcProvider","wallet","ethers.Wallet","userContractAddress","ethers.Contract","lootContractAddress","LootList1Data","loot","PlayerSeasonData","playerSeason","renderPlayers","setRenderPlayers","playersCache","renderPlayersArr","rPlayer","battles","targetAddr","getCollectionsFun","box","boxs","getBalance","walletBalance","ethers.utils.formatEther","csv","finishBattle","winner","attacker","defender","loser","loserData","movePlayer","merkelData","playerLock","txFinished","pathIndex","timeInterval","addon","atobUrl","submitGemFun","lastPreviewPath","boxIndex","boxData","setRenderPreviewPaths","Leaderboard","map_info","transfering","stepData","setStepData","setTransferData","battlesData","setBattlesData","setBoxData","setBoxId","revealNFTData","setRevealNFTData","nftListData","setNftListData","setWalletBalance","GameConfig","joinBattlefield","selectUserNft","CreateBox","getBattlePlayerHp","transferFun","PRIVATE_KEY","ethers.utils.parseEther","GameData","getNftList","nftList","mintFun","revealNFTFun","stepChange","boxIdChange","tokenIdChange","boxChange","transferChange","battleChange","confirmBattleChange","selectUserNftFun","transferPlayer","battleInvitationFun","tragePlayer","battlesDataTemp","battleItem","nonceHex","joinBattlefieldFun","revealBattleFun","bettleItem","CreateBoxFun","boxi","openBoxFun","revealBoxFun","messageApi","selectBothNFT","setInfo","initUserInfo","walletAddress","setWalletAddress","usernameRef","modalVisible","setModalVisible","minting","setMinting","setClothes","setHandheld","setHead","setUsername","setUserUrl","setLootUrl","setPlayer","pluginContractAddress","createWallet","toMint","mint","tokenIds","mintAndGo","lootData","play","initUserInfoFun","Header","appearance","setAppearance","heroAction","setHeroActions","mountDevTools"],"sources":["../../../../node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react.production.min.js","../../../../node_modules/.pnpm/react@18.2.0/node_modules/react/index.js","../../../../node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js","../../src/mud/createClientComponents.ts","../../../../node_modules/.pnpm/mobx@6.10.2/node_modules/mobx/dist/mobx.esm.js","../../../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/isFunction.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/Subscription.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/config.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/noop.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/errorContext.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/Subscriber.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/symbol/observable.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/identity.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/pipe.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/Observable.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/lift.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/Subject.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/observable/empty.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/args.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/isPromise.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/isIterable.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/observable/from.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/observable/of.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/map.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/util/createObject.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/observable/concat.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/observable/defer.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/observable/merge.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/filter.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/catchError.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/take.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/share.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js","../../../../node_modules/.pnpm/rxjs@7.5.5/node_modules/rxjs/dist/esm5/internal/operators/tap.js","../../__vite-browser-external","../../../../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js","../../../../node_modules/.pnpm/@ethersproject+logger@5.7.0/node_modules/@ethersproject/logger/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+logger@5.7.0/node_modules/@ethersproject/logger/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+bytes@5.7.0/node_modules/@ethersproject/bytes/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+bytes@5.7.0/node_modules/@ethersproject/bytes/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+bignumber@5.7.0/node_modules/@ethersproject/bignumber/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+bignumber@5.7.0/node_modules/@ethersproject/bignumber/lib.esm/bignumber.js","../../../../node_modules/.pnpm/@ethersproject+bignumber@5.7.0/node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js","../../../../node_modules/.pnpm/@ethersproject+properties@5.7.0/node_modules/@ethersproject/properties/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+properties@5.7.0/node_modules/@ethersproject/properties/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/fragments.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js","../../../../node_modules/.pnpm/js-sha3@0.8.0/node_modules/js-sha3/src/sha3.js","../../../../node_modules/.pnpm/@ethersproject+keccak256@5.7.0/node_modules/@ethersproject/keccak256/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+rlp@5.7.0/node_modules/@ethersproject/rlp/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+rlp@5.7.0/node_modules/@ethersproject/rlp/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+address@5.7.0/node_modules/@ethersproject/address/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+address@5.7.0/node_modules/@ethersproject/address/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/coders/address.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/coders/anonymous.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/coders/array.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/coders/boolean.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/coders/bytes.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/coders/fixed-bytes.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/coders/null.js","../../../../node_modules/.pnpm/@ethersproject+constants@5.7.0/node_modules/@ethersproject/constants/lib.esm/addresses.js","../../../../node_modules/.pnpm/@ethersproject+constants@5.7.0/node_modules/@ethersproject/constants/lib.esm/bignumbers.js","../../../../node_modules/.pnpm/@ethersproject+constants@5.7.0/node_modules/@ethersproject/constants/lib.esm/hashes.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/coders/number.js","../../../../node_modules/.pnpm/@ethersproject+strings@5.7.0/node_modules/@ethersproject/strings/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+strings@5.7.0/node_modules/@ethersproject/strings/lib.esm/utf8.js","../../../../node_modules/.pnpm/@ethersproject+strings@5.7.0/node_modules/@ethersproject/strings/lib.esm/bytes32.js","../../../../node_modules/.pnpm/@ethersproject+strings@5.7.0/node_modules/@ethersproject/strings/lib.esm/idna.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/coders/string.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/coders/tuple.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/abi-coder.js","../../../../node_modules/.pnpm/@ethersproject+hash@5.7.0/node_modules/@ethersproject/hash/lib.esm/id.js","../../../../node_modules/.pnpm/@ethersproject+hash@5.7.0/node_modules/@ethersproject/hash/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+base64@5.7.0/node_modules/@ethersproject/base64/lib.esm/base64.js","../../../../node_modules/.pnpm/@ethersproject+hash@5.7.0/node_modules/@ethersproject/hash/lib.esm/ens-normalize/decoder.js","../../../../node_modules/.pnpm/@ethersproject+hash@5.7.0/node_modules/@ethersproject/hash/lib.esm/ens-normalize/include.js","../../../../node_modules/.pnpm/@ethersproject+hash@5.7.0/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.js","../../../../node_modules/.pnpm/@ethersproject+hash@5.7.0/node_modules/@ethersproject/hash/lib.esm/namehash.js","../../../../node_modules/.pnpm/@ethersproject+hash@5.7.0/node_modules/@ethersproject/hash/lib.esm/message.js","../../../../node_modules/.pnpm/@ethersproject+hash@5.7.0/node_modules/@ethersproject/hash/lib.esm/typed-data.js","../../../../node_modules/.pnpm/@ethersproject+abi@5.7.0/node_modules/@ethersproject/abi/lib.esm/interface.js","../../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.7.0/node_modules/@ethersproject/abstract-provider/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+abstract-provider@5.7.0/node_modules/@ethersproject/abstract-provider/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.7.0/node_modules/@ethersproject/abstract-signer/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+abstract-signer@5.7.0/node_modules/@ethersproject/abstract-signer/lib.esm/index.js","../../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js","../../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js","../../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js","../../../../node_modules/.pnpm/@ethersproject+signing-key@5.7.0/node_modules/@ethersproject/signing-key/lib.esm/elliptic.js","../../../../node_modules/.pnpm/@ethersproject+signing-key@5.7.0/node_modules/@ethersproject/signing-key/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+signing-key@5.7.0/node_modules/@ethersproject/signing-key/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+transactions@5.7.0/node_modules/@ethersproject/transactions/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+transactions@5.7.0/node_modules/@ethersproject/transactions/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+contracts@5.7.0/node_modules/@ethersproject/contracts/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+contracts@5.7.0/node_modules/@ethersproject/contracts/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+basex@5.7.0/node_modules/@ethersproject/basex/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+sha2@5.7.0/node_modules/@ethersproject/sha2/lib.esm/types.js","../../../../node_modules/.pnpm/@ethersproject+sha2@5.7.0/node_modules/@ethersproject/sha2/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+sha2@5.7.0/node_modules/@ethersproject/sha2/lib.esm/sha2.js","../../../../node_modules/.pnpm/@ethersproject+pbkdf2@5.7.0/node_modules/@ethersproject/pbkdf2/lib.esm/pbkdf2.js","../../../../node_modules/.pnpm/@ethersproject+wordlists@5.7.0/node_modules/@ethersproject/wordlists/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+wordlists@5.7.0/node_modules/@ethersproject/wordlists/lib.esm/wordlist.js","../../../../node_modules/.pnpm/@ethersproject+wordlists@5.7.0/node_modules/@ethersproject/wordlists/lib.esm/lang-en.js","../../../../node_modules/.pnpm/@ethersproject+wordlists@5.7.0/node_modules/@ethersproject/wordlists/lib.esm/wordlists.js","../../../../node_modules/.pnpm/@ethersproject+hdnode@5.7.0/node_modules/@ethersproject/hdnode/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+hdnode@5.7.0/node_modules/@ethersproject/hdnode/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+random@5.7.0/node_modules/@ethersproject/random/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+random@5.7.0/node_modules/@ethersproject/random/lib.esm/random.js","../../../../node_modules/.pnpm/@ethersproject+random@5.7.0/node_modules/@ethersproject/random/lib.esm/shuffle.js","../../../../node_modules/.pnpm/aes-js@3.0.0/node_modules/aes-js/index.js","../../../../node_modules/.pnpm/@ethersproject+json-wallets@5.7.0/node_modules/@ethersproject/json-wallets/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+json-wallets@5.7.0/node_modules/@ethersproject/json-wallets/lib.esm/utils.js","../../../../node_modules/.pnpm/@ethersproject+json-wallets@5.7.0/node_modules/@ethersproject/json-wallets/lib.esm/crowdsale.js","../../../../node_modules/.pnpm/@ethersproject+json-wallets@5.7.0/node_modules/@ethersproject/json-wallets/lib.esm/inspect.js","../../../../node_modules/.pnpm/scrypt-js@3.0.1/node_modules/scrypt-js/scrypt.js","../../../../node_modules/.pnpm/@ethersproject+json-wallets@5.7.0/node_modules/@ethersproject/json-wallets/lib.esm/keystore.js","../../../../node_modules/.pnpm/@ethersproject+json-wallets@5.7.0/node_modules/@ethersproject/json-wallets/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+wallet@5.7.0/node_modules/@ethersproject/wallet/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+wallet@5.7.0/node_modules/@ethersproject/wallet/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+networks@5.7.1/node_modules/@ethersproject/networks/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+networks@5.7.1/node_modules/@ethersproject/networks/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+web@5.7.1/node_modules/@ethersproject/web/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+web@5.7.1/node_modules/@ethersproject/web/lib.esm/geturl.js","../../../../node_modules/.pnpm/@ethersproject+web@5.7.1/node_modules/@ethersproject/web/lib.esm/index.js","../../../../node_modules/.pnpm/bech32@1.1.4/node_modules/bech32/index.js","../../../../node_modules/.pnpm/@ethersproject+providers@5.7.2/node_modules/@ethersproject/providers/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+providers@5.7.2/node_modules/@ethersproject/providers/lib.esm/formatter.js","../../../../node_modules/.pnpm/@ethersproject+providers@5.7.2/node_modules/@ethersproject/providers/lib.esm/base-provider.js","../../../../node_modules/.pnpm/@ethersproject+providers@5.7.2/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js","../../../../node_modules/.pnpm/@ethersproject+solidity@5.7.0/node_modules/@ethersproject/solidity/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+solidity@5.7.0/node_modules/@ethersproject/solidity/lib.esm/index.js","../../../../node_modules/.pnpm/@ethersproject+units@5.7.0/node_modules/@ethersproject/units/lib.esm/_version.js","../../../../node_modules/.pnpm/@ethersproject+units@5.7.0/node_modules/@ethersproject/units/lib.esm/index.js","../../../../node_modules/.pnpm/ethers@5.7.2/node_modules/ethers/lib/utils.js","../../../../node_modules/.pnpm/@latticexyz+utils@2.0.0-next.4/node_modules/@latticexyz/utils/dist/index.js","../../../../node_modules/.pnpm/@latticexyz+recs@2.0.0-next.4_typescript@5.1.6_zod@3.22.4/node_modules/@latticexyz/recs/dist/chunk-EL5Z72NP.js","../../../../node_modules/.pnpm/@latticexyz+recs@2.0.0-next.4_typescript@5.1.6_zod@3.22.4/node_modules/@latticexyz/recs/dist/index.js","../../../../node_modules/.pnpm/@latticexyz+schema-type@2.0.0-next.4_typescript@5.1.6_zod@3.22.4/node_modules/@latticexyz/schema-type/dist/typescript/index.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/version.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/errors.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/regex.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/human-readable/errors/signature.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/human-readable/errors/struct.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/human-readable/runtime/cache.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/human-readable/runtime/utils.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/human-readable/runtime/structs.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/human-readable/parseAbi.js","../../../../node_modules/.pnpm/abitype@0.9.3_typescript@5.1.6_zod@3.22.4/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/abi/formatAbiItem.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/data/isHex.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/data/size.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/version.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/utils.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/base.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/abi.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/log.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/data.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/data/pad.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/encoding.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/data/trim.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/encoding/fromHex.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/encoding/toHex.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/encoding/toBytes.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/contract/extractFunctionParts.js","../../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_assert.js","../../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/_u64.js","../../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/utils.js","../../../../node_modules/.pnpm/@noble+hashes@1.3.0/node_modules/@noble/hashes/esm/sha3.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/hash/keccak256.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/hash/hashFunction.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/hash/getEventSelector.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/address.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/address/isAddress.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/data/concat.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/data/slice.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/abi/encodeAbiParameters.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/abi/getAbiItem.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/abi/encodeEventTopics.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/filters/createFilterRequestScope.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/createContractEventFilter.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/accounts/utils/parseAccount.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/hash/getFunctionSelector.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/abi/encodeFunctionData.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/constants/solidity.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/address/getAddress.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/abi/decodeAbiParameters.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/abi/decodeErrorResult.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/stringify.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/abi/formatAbiItemWithArgs.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/constants/unit.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/unit/formatUnits.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/unit/formatEther.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/unit/formatGwei.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/transaction.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/contract.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/errors/getContractError.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/account.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/estimateGas.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/node.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/request.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/rpc.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/errors/getNodeError.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/errors/getEstimateGasError.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/formatters/extract.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/formatters/transactionRequest.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/transaction/assertRequest.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/block.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/formatters/transaction.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/formatters/block.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getBlock.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getGasPrice.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getTransactionCount.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/transaction/prepareRequest.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/estimateGas.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/estimateContractGas.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/abi/decodeFunctionResult.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/constants/abis.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/constants/contract.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/chain.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/chain.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/errors/getCallError.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/promise/createBatchScheduler.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/call.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/readContract.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/simulateContract.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/observe.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/wait.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/poll.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/promise/withCache.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getBlockNumber.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/abi/decodeEventLog.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/formatters/log.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getFilterChanges.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getLogs.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/uninstallFilter.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/watchContractEvent.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/errors/getTransactionError.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getChainId.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/wallet/sendTransaction.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/wallet/writeContract.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/getContract.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/wallet/addChain.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/accounts/utils/publicKeyToAddress.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/uid.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/clients/createClient.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/promise/withRetry.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/buildRequest.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/clients/transports/createTransport.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/clients/transports/fallback.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/transport.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/promise/withTimeout.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/rpc.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/clients/transports/http.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/ens/errors.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/regex.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/typedData.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/abi/encodeDeployData.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/encoding/toRlp.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/formatters/transactionReceipt.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/signature/hashTypedData.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/signature/hashMessage.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/transaction/getTransactionType.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/transaction/assertTransaction.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/transaction/serializeAccessList.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/transaction/serializeTransaction.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/unit/parseUnits.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/unit/parseEther.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/ens/encodedLabelToLabelhash.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/ens/namehash.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/ens/encodeLabelhash.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/ens/labelhash.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/ens/packetToBytes.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/ens/getEnsAddress.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/errors/ens.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/ens/avatar/utils.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/ens/avatar/parseAvatarRecord.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/ens/getEnsText.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/ens/getEnsAvatar.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/ens/getEnsName.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/ens/getEnsResolver.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/createBlockFilter.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/createEventFilter.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/createPendingTransactionFilter.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getBalance.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getBlockTransactionCount.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getBytecode.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/formatters/feeHistory.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getFeeHistory.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getFilterLogs.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getStorageAt.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getTransaction.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getTransactionConfirmations.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/getTransactionReceipt.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/multicall.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/constants/contracts.js","../../../../node_modules/.pnpm/@noble+curves@1.1.0/node_modules/@noble/curves/esm/abstract/utils.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/data/isBytesEqual.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/verifyHash.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/verifyMessage.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/verifyTypedData.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/watchBlockNumber.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/waitForTransactionReceipt.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/watchBlocks.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/watchEvent.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/public/watchPendingTransactions.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/clients/decorators/public.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/clients/createPublicClient.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/wallet/deployContract.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/wallet/getAddresses.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/wallet/getPermissions.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/wallet/requestAddresses.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/wallet/requestPermissions.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/wallet/signMessage.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/wallet/signTypedData.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/wallet/switchChain.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/actions/wallet/watchAsset.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/clients/decorators/wallet.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/clients/createWalletClient.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/clients/transports/webSocket.js","../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_assert.js","../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/crypto.js","../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/utils.js","../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/_sha2.js","../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/sha256.js","../../../../node_modules/.pnpm/@noble+curves@1.1.0/node_modules/@noble/curves/esm/abstract/modular.js","../../../../node_modules/.pnpm/@noble+curves@1.1.0/node_modules/@noble/curves/esm/abstract/curve.js","../../../../node_modules/.pnpm/@noble+curves@1.1.0/node_modules/@noble/curves/esm/abstract/weierstrass.js","../../../../node_modules/.pnpm/@noble+hashes@1.3.1/node_modules/@noble/hashes/esm/hmac.js","../../../../node_modules/.pnpm/@noble+curves@1.1.0/node_modules/@noble/curves/esm/_shortw_utils.js","../../../../node_modules/.pnpm/@noble+curves@1.1.0/node_modules/@noble/curves/esm/secp256k1.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/utils/signature/signatureToHex.js","../../../../node_modules/.pnpm/@latticexyz+common@2.0.0-next.4_typescript@5.1.6_zod@3.22.4/node_modules/@latticexyz/common/dist/utils.js","../../../../node_modules/.pnpm/@latticexyz+common@2.0.0-next.4_typescript@5.1.6_zod@3.22.4/node_modules/@latticexyz/common/dist/chunk-UPQEB2HW.js","../../../../node_modules/.pnpm/@latticexyz+protocol-parser@2.0.0-next.4_typescript@5.1.6_zod@3.22.4/node_modules/@latticexyz/protocol-parser/dist/index.js","../../../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js","../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/common.js","../../../../node_modules/.pnpm/debug@4.3.4_supports-color@8.1.1/node_modules/debug/src/browser.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/accounts/generatePrivateKey.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/accounts/toAccount.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/accounts/utils/sign.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/accounts/utils/signMessage.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/accounts/utils/signTransaction.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/accounts/utils/signTypedData.js","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/accounts/privateKeyToAccount.js","../../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js","../../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js","../../../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js","../../../../node_modules/.pnpm/p-retry@5.1.2/node_modules/p-retry/index.js","../../../../node_modules/.pnpm/@latticexyz+common@2.0.0-next.4_typescript@5.1.6_zod@3.22.4/node_modules/@latticexyz/common/dist/index.js","../../../../node_modules/.pnpm/@latticexyz+schema-type@2.0.0-next.4_typescript@5.1.6_zod@3.22.4/node_modules/@latticexyz/schema-type/dist/typescript/deprecated/index.js","../../../../node_modules/.pnpm/zod@3.22.4/node_modules/zod/lib/index.mjs","../../../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js","../../../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/browser.js","../../../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js","../../../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js","../../../../node_modules/.pnpm/zod-validation-error@1.4.0_zod@3.22.4/node_modules/zod-validation-error/dist/esm/utils/joinPath.js","../../../../node_modules/.pnpm/zod-validation-error@1.4.0_zod@3.22.4/node_modules/zod-validation-error/dist/esm/utils/NonEmptyArray.js","../../../../node_modules/.pnpm/zod-validation-error@1.4.0_zod@3.22.4/node_modules/zod-validation-error/dist/esm/ValidationError.js","../../../../node_modules/.pnpm/@latticexyz+config@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/config/dist/chunk-AXXYPYMM.js","../../../../node_modules/.pnpm/@latticexyz+config@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/config/dist/chunk-4G6ZGMDP.js","../../../../node_modules/.pnpm/@latticexyz+store@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/store/dist/chunk-5AKM5HGJ.js","../../../../node_modules/.pnpm/@latticexyz+config@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/config/dist/register/index.js","../../../../node_modules/.pnpm/@latticexyz+store@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/store/dist/chunk-6QMWGFYG.js","../../../../node_modules/.pnpm/@latticexyz+store@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/store/dist/mud.config.js","../../../../node_modules/.pnpm/@latticexyz+store-sync@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/store-sync/dist/chunk-SNWOSPCV.js","../../../../node_modules/.pnpm/@trpc+server@10.34.0/node_modules/@trpc/server/dist/codes-24aa1ce1.mjs","../../../../node_modules/.pnpm/@trpc+server@10.34.0/node_modules/@trpc/server/dist/index-044a193b.mjs","../../../../node_modules/.pnpm/@trpc+server@10.34.0/node_modules/@trpc/server/dist/config-7eddc5bb.mjs","../../../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/double-indexed-kv.js","../../../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/registry.js","../../../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/class-registry.js","../../../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/util.js","../../../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/custom-transformer-registry.js","../../../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/is.js","../../../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/pathstringifier.js","../../../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/transformer.js","../../../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/accessDeep.js","../../../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/plainer.js","../../../../node_modules/.pnpm/is-what@4.1.15/node_modules/is-what/dist/index.js","../../../../node_modules/.pnpm/copy-anything@3.0.5/node_modules/copy-anything/dist/index.js","../../../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/index.js","../../../../node_modules/.pnpm/@trpc+server@10.34.0/node_modules/@trpc/server/dist/observable-ade1bad8.mjs","../../../../node_modules/.pnpm/@trpc+server@10.34.0/node_modules/@trpc/server/dist/observable/index.mjs","../../../../node_modules/.pnpm/@trpc+client@10.34.0_@trpc+server@10.34.0/node_modules/@trpc/client/dist/splitLink-4c75f7be.mjs","../../../../node_modules/.pnpm/@trpc+client@10.34.0_@trpc+server@10.34.0/node_modules/@trpc/client/dist/TRPCClientError-fef6cf44.mjs","../../../../node_modules/.pnpm/@trpc+client@10.34.0_@trpc+server@10.34.0/node_modules/@trpc/client/dist/httpUtils-1efcb902.mjs","../../../../node_modules/.pnpm/@trpc+client@10.34.0_@trpc+server@10.34.0/node_modules/@trpc/client/dist/transformResult-7ab522e6.mjs","../../../../node_modules/.pnpm/@trpc+client@10.34.0_@trpc+server@10.34.0/node_modules/@trpc/client/dist/httpBatchLink-fbd7b43c.mjs","../../../../node_modules/.pnpm/@trpc+client@10.34.0_@trpc+server@10.34.0/node_modules/@trpc/client/dist/index.mjs","../../../../node_modules/.pnpm/@latticexyz+store-sync@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/store-sync/dist/chunk-A2BQSIM3.js","../../../../node_modules/.pnpm/@latticexyz+store@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/store/dist/ts/index.js","../../../../node_modules/.pnpm/@latticexyz+block-logs-stream@2.0.0-next.4_typescript@5.1.6_zod@3.22.4/node_modules/@latticexyz/block-logs-stream/dist/index.js","../../../../node_modules/.pnpm/@latticexyz+store-sync@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/store-sync/dist/chunk-IH5UMM4B.js","../../../../node_modules/.pnpm/@latticexyz+world@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/world/dist/chunk-JOQBBVRS.js","../../../../node_modules/.pnpm/@latticexyz+world@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/world/dist/chunk-24XAL2ND.js","../../../../node_modules/.pnpm/@latticexyz+world@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/world/dist/mud.config.js","../../../../node_modules/.pnpm/@latticexyz+store-sync@2.0.0-next.4_typescript@5.1.6/node_modules/@latticexyz/store-sync/dist/recs/index.js","../../../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/extends.js","../../../../node_modules/.pnpm/react-is@18.2.0/node_modules/react-is/cjs/react-is.production.min.js","../../../../node_modules/.pnpm/react-is@18.2.0/node_modules/react-is/index.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/Children/toArray.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/warning.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/typeof.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/hooks/useMemo.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/ref.js","../../../../node_modules/.pnpm/scheduler@0.23.0/node_modules/scheduler/cjs/scheduler.production.min.js","../../../../node_modules/.pnpm/scheduler@0.23.0/node_modules/scheduler/index.js","../../../../node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/cjs/react-dom.production.min.js","../../../../node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/index.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/Dom/findDOMNode.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/createClass.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/inherits.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/createSuper.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/omit.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/raf.js","../../../../node_modules/.pnpm/@emotion+hash@0.8.0/node_modules/@emotion/hash/dist/hash.browser.esm.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/isEqual.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/Cache.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/StyleContext.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/Dom/canUseDom.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/Dom/contains.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/Dom/dynamicCSS.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/theme/ThemeCache.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/theme/Theme.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/theme/createTheme.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/util.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/hooks/useLayoutEffect.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/hooks/useGlobalCache.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.js","../../../../node_modules/.pnpm/@emotion+unitless@0.7.5/node_modules/@emotion/unitless/dist/unitless.browser.esm.js","../../../../node_modules/.pnpm/stylis@4.3.0/node_modules/stylis/src/Enum.js","../../../../node_modules/.pnpm/stylis@4.3.0/node_modules/stylis/src/Utility.js","../../../../node_modules/.pnpm/stylis@4.3.0/node_modules/stylis/src/Tokenizer.js","../../../../node_modules/.pnpm/stylis@4.3.0/node_modules/stylis/src/Parser.js","../../../../node_modules/.pnpm/stylis@4.3.0/node_modules/stylis/src/Serializer.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister/cacheMapUtil.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister/index.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/Keyframes.js","../../../../node_modules/.pnpm/@ant-design+cssinjs@1.17.2_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/cssinjs/es/transformers/legacyLogicalProperties.js","../../../../node_modules/.pnpm/@ant-design+icons@5.2.6_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/icons/es/components/Context.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/toArray.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/utils/get.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/utils/set.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/warning.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/form/validateMessagesContext.js","../../../../node_modules/.pnpm/rc-pagination@3.6.1_react-dom@18.2.0_react@18.2.0/node_modules/rc-pagination/es/locale/en_US.js","../../../../node_modules/.pnpm/rc-picker@3.14.5_dayjs@1.11.10_react-dom@18.2.0_react@18.2.0/node_modules/rc-picker/es/locale/en_US.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/time-picker/locale/en_US.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/date-picker/locale/en_US.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/locale/en_US.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/locale.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/locale/context.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/locale/useLocale.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/locale/index.js","../../../../node_modules/.pnpm/@ctrl+tinycolor@3.6.1/node_modules/@ctrl/tinycolor/dist/module/util.js","../../../../node_modules/.pnpm/@ctrl+tinycolor@3.6.1/node_modules/@ctrl/tinycolor/dist/module/conversion.js","../../../../node_modules/.pnpm/@ctrl+tinycolor@3.6.1/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js","../../../../node_modules/.pnpm/@ctrl+tinycolor@3.6.1/node_modules/@ctrl/tinycolor/dist/module/format-input.js","../../../../node_modules/.pnpm/@ctrl+tinycolor@3.6.1/node_modules/@ctrl/tinycolor/dist/module/index.js","../../../../node_modules/.pnpm/@ant-design+colors@7.0.0/node_modules/@ant-design/colors/es/generate.js","../../../../node_modules/.pnpm/@ant-design+colors@7.0.0/node_modules/@ant-design/colors/es/index.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/themes/shared/genControlHeight.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/themes/shared/genSizeMapToken.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/themes/seed.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/themes/shared/genColorMapToken.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/themes/shared/genRadius.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/themes/shared/genCommonMapToken.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/themes/default/colorAlgorithm.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/themes/default/colors.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/themes/shared/genFontSizes.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/themes/shared/genFontMapToken.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/themes/default/index.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/context.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/config-provider/context.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/config-provider/cssVariables.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/config-provider/DisabledContext.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/config-provider/SizeContext.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/config-provider/hooks/useConfig.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/version/version.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/util/getAlphaColor.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/util/alias.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/useToken.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/hooks/useEvent.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/hooks/useState.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/style/index.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/util/statistic.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/util/useResetIconStyle.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/theme/util/genComponentStyleHook.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/config-provider/hooks/useTheme.js","../../../../node_modules/.pnpm/rc-motion@2.9.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-motion/es/context.js","../../../../node_modules/.pnpm/rc-motion@2.9.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-motion/es/DomWrapper.js","../../../../node_modules/.pnpm/rc-motion@2.9.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-motion/es/interface.js","../../../../node_modules/.pnpm/rc-motion@2.9.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-motion/es/util/motion.js","../../../../node_modules/.pnpm/rc-motion@2.9.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-motion/es/hooks/useDomMotionEvents.js","../../../../node_modules/.pnpm/rc-motion@2.9.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-motion/es/hooks/useIsomorphicLayoutEffect.js","../../../../node_modules/.pnpm/rc-motion@2.9.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-motion/es/hooks/useNextFrame.js","../../../../node_modules/.pnpm/rc-motion@2.9.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-motion/es/hooks/useStepQueue.js","../../../../node_modules/.pnpm/rc-motion@2.9.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-motion/es/hooks/useStatus.js","../../../../node_modules/.pnpm/rc-motion@2.9.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-motion/es/CSSMotion.js","../../../../node_modules/.pnpm/rc-motion@2.9.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-motion/es/util/diff.js","../../../../node_modules/.pnpm/rc-motion@2.9.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-motion/es/CSSMotionList.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/config-provider/MotionWrapper.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/config-provider/PropWarning.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/config-provider/index.js","../../../../node_modules/.pnpm/@ant-design+icons-svg@4.3.1/node_modules/@ant-design/icons-svg/es/asn/CheckCircleFilled.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/Dom/shadow.js","../../../../node_modules/.pnpm/@ant-design+icons@5.2.6_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/icons/es/utils.js","../../../../node_modules/.pnpm/@ant-design+icons@5.2.6_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/icons/es/components/IconBase.js","../../../../node_modules/.pnpm/@ant-design+icons@5.2.6_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js","../../../../node_modules/.pnpm/@ant-design+icons@5.2.6_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/icons/es/components/AntdIcon.js","../../../../node_modules/.pnpm/@ant-design+icons@5.2.6_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/icons/es/icons/CheckCircleFilled.js","../../../../node_modules/.pnpm/@ant-design+icons-svg@4.3.1/node_modules/@ant-design/icons-svg/es/asn/CloseCircleFilled.js","../../../../node_modules/.pnpm/@ant-design+icons@5.2.6_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js","../../../../node_modules/.pnpm/@ant-design+icons-svg@4.3.1/node_modules/@ant-design/icons-svg/es/asn/CloseOutlined.js","../../../../node_modules/.pnpm/@ant-design+icons@5.2.6_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/icons/es/icons/CloseOutlined.js","../../../../node_modules/.pnpm/@ant-design+icons-svg@4.3.1/node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleFilled.js","../../../../node_modules/.pnpm/@ant-design+icons@5.2.6_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/icons/es/icons/ExclamationCircleFilled.js","../../../../node_modules/.pnpm/@ant-design+icons-svg@4.3.1/node_modules/@ant-design/icons-svg/es/asn/InfoCircleFilled.js","../../../../node_modules/.pnpm/@ant-design+icons@5.2.6_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/icons/es/icons/InfoCircleFilled.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/pickAttrs.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/reactNode.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/KeyCode.js","../../../../node_modules/.pnpm/rc-notification@5.2.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-notification/es/Notice.js","../../../../node_modules/.pnpm/rc-notification@5.2.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-notification/es/NotificationProvider.js","../../../../node_modules/.pnpm/rc-notification@5.2.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-notification/es/hooks/useStack.js","../../../../node_modules/.pnpm/rc-notification@5.2.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-notification/es/NoticeList.js","../../../../node_modules/.pnpm/rc-notification@5.2.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-notification/es/Notifications.js","../../../../node_modules/.pnpm/rc-notification@5.2.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-notification/es/hooks/useNotification.js","../../../../node_modules/.pnpm/@ant-design+icons-svg@4.3.1/node_modules/@ant-design/icons-svg/es/asn/LoadingOutlined.js","../../../../node_modules/.pnpm/@ant-design+icons@5.2.6_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/icons/es/icons/LoadingOutlined.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/message/style/index.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/message/PurePanel.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/message/util.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/message/useMessage.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/hooks/usePatchElement.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js","../../../../node_modules/.pnpm/@babel+runtime@7.23.2/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/React/render.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/motion.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/Dom/isVisible.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/wave/style.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/wave/util.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/wave/interface.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/wave/WaveEffect.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/wave/useWave.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/wave/index.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/config-provider/hooks/useSize.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/space/Compact.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/button/button-group.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/button/buttonHelpers.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/button/IconWrapper.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/button/LoadingIcon.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/button/style/group.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/button/style/index.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/style/compact-item.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/style/compact-item-vertical.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/button/style/compactCmp.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/button/button.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/ActionButton.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/context.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/components/ConfirmCancelBtn.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/components/ConfirmOkBtn.js","../../../../node_modules/.pnpm/@rc-component+portal@1.1.2_react-dom@18.2.0_react@18.2.0/node_modules/@rc-component/portal/es/Context.js","../../../../node_modules/.pnpm/@rc-component+portal@1.1.2_react-dom@18.2.0_react@18.2.0/node_modules/@rc-component/portal/es/useDom.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/getScrollBarSize.js","../../../../node_modules/.pnpm/@rc-component+portal@1.1.2_react-dom@18.2.0_react@18.2.0/node_modules/@rc-component/portal/es/util.js","../../../../node_modules/.pnpm/@rc-component+portal@1.1.2_react-dom@18.2.0_react@18.2.0/node_modules/@rc-component/portal/es/useScrollLocker.js","../../../../node_modules/.pnpm/@rc-component+portal@1.1.2_react-dom@18.2.0_react@18.2.0/node_modules/@rc-component/portal/es/mock.js","../../../../node_modules/.pnpm/@rc-component+portal@1.1.2_react-dom@18.2.0_react@18.2.0/node_modules/@rc-component/portal/es/Portal.js","../../../../node_modules/.pnpm/rc-dialog@9.3.3_react-dom@18.2.0_react@18.2.0/node_modules/rc-dialog/es/context.js","../../../../node_modules/.pnpm/rc-util@5.38.0_react-dom@18.2.0_react@18.2.0/node_modules/rc-util/es/hooks/useId.js","../../../../node_modules/.pnpm/rc-dialog@9.3.3_react-dom@18.2.0_react@18.2.0/node_modules/rc-dialog/es/util.js","../../../../node_modules/.pnpm/rc-dialog@9.3.3_react-dom@18.2.0_react@18.2.0/node_modules/rc-dialog/es/Dialog/Content/MemoChildren.js","../../../../node_modules/.pnpm/rc-dialog@9.3.3_react-dom@18.2.0_react@18.2.0/node_modules/rc-dialog/es/Dialog/Content/Panel.js","../../../../node_modules/.pnpm/rc-dialog@9.3.3_react-dom@18.2.0_react@18.2.0/node_modules/rc-dialog/es/Dialog/Content/index.js","../../../../node_modules/.pnpm/rc-dialog@9.3.3_react-dom@18.2.0_react@18.2.0/node_modules/rc-dialog/es/Dialog/Mask.js","../../../../node_modules/.pnpm/rc-dialog@9.3.3_react-dom@18.2.0_react@18.2.0/node_modules/rc-dialog/es/Dialog/index.js","../../../../node_modules/.pnpm/rc-dialog@9.3.3_react-dom@18.2.0_react@18.2.0/node_modules/rc-dialog/es/DialogWrap.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/hooks/useClosable.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/styleChecker.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/FieldContext.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/ListContext.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/utils/typeUtil.js","../../../../node_modules/.pnpm/async-validator@4.2.5/node_modules/async-validator/dist-web/index.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/utils/messages.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/utils/validateUtil.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/utils/valueUtil.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/Field.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/List.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/utils/asyncUtil.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/utils/NameMap.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/useForm.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/FormContext.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/Form.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/useWatch.js","../../../../node_modules/.pnpm/rc-field-form@1.38.2_react-dom@18.2.0_react@18.2.0/node_modules/rc-field-form/es/index.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/form/context.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/watermark/context.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/components/NormalCancelBtn.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/components/NormalOkBtn.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/shared.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/style/motion/motion.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/style/motion/fade.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/style/motion/zoom.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/style/index.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/Modal.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/style/confirmCmp.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/ConfirmDialog.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/destroyFns.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/confirm.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/useModal/HookModal.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/useModal/index.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/_util/PurePanel.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/message/index.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/PurePanel.js","../../../../node_modules/.pnpm/antd@5.10.0_react-dom@18.2.0_react@18.2.0/node_modules/antd/es/modal/index.js","../../../../node_modules/.pnpm/toggle-selection@1.0.6/node_modules/toggle-selection/index.js","../../../../node_modules/.pnpm/copy-to-clipboard@3.3.3/node_modules/copy-to-clipboard/index.js","../../src/mud/createSystemCalls.ts","../../../../node_modules/.pnpm/long@5.2.3/node_modules/long/index.js","../../../../node_modules/.pnpm/@protobufjs+aspromise@1.1.2/node_modules/@protobufjs/aspromise/index.js","../../../../node_modules/.pnpm/@protobufjs+base64@1.1.2/node_modules/@protobufjs/base64/index.js","../../../../node_modules/.pnpm/@protobufjs+eventemitter@1.1.0/node_modules/@protobufjs/eventemitter/index.js","../../../../node_modules/.pnpm/@protobufjs+float@1.0.2/node_modules/@protobufjs/float/index.js","../../../../node_modules/.pnpm/@protobufjs+inquire@1.1.0/node_modules/@protobufjs/inquire/index.js","../../../../node_modules/.pnpm/@protobufjs+utf8@1.1.0/node_modules/@protobufjs/utf8/index.js","../../../../node_modules/.pnpm/@protobufjs+pool@1.1.0/node_modules/@protobufjs/pool/index.js","../../../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/util/longbits.js","../../../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/util/minimal.js","../../../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/writer.js","../../../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/writer_buffer.js","../../../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/reader.js","../../../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/reader_buffer.js","../../../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/rpc/service.js","../../../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/rpc.js","../../../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/roots.js","../../../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/src/index-minimal.js","../../../../node_modules/.pnpm/protobufjs@7.2.5/node_modules/protobufjs/minimal.js","../../../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/Metadata.js","../../../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/Status.js","../../../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/MethodDescriptor.js","../../../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/client/CallOptions.js","../../../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/client/ClientMiddleware.js","../../../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/client/composeClientMiddleware.js","../../../../node_modules/.pnpm/ts-error@1.0.6/node_modules/ts-error/lib/helpers.js","../../../../node_modules/.pnpm/ts-error@1.0.6/node_modules/ts-error/lib/cjs.js","../../../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/client/ClientError.js","../../../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/server/CallContext.js","../../../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/server/ServerMiddleware.js","../../../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/server/composeServerMiddleware.js","../../../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/server/ServerError.js","../../../../node_modules/.pnpm/nice-grpc-common@2.0.2/node_modules/nice-grpc-common/lib/index.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/service-definitions/grpc-web.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/service-definitions/ts-proto.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/service-definitions/index.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/client/channel.js","../../../../node_modules/.pnpm/@improbable-eng+grpc-web@0.15.0_google-protobuf@3.21.2/node_modules/@improbable-eng/grpc-web/dist/grpc-web-client.umd.js","../../../../node_modules/.pnpm/abort-controller-x@0.4.3/node_modules/abort-controller-x/es/AbortError.js","../../../../node_modules/.pnpm/abort-controller-x@0.4.3/node_modules/abort-controller-x/es/execute.js","../../../../node_modules/.pnpm/abort-controller-x@0.4.3/node_modules/abort-controller-x/es/abortable.js","../../../../node_modules/.pnpm/abort-controller-x@0.4.3/node_modules/abort-controller-x/es/delay.js","../../../../node_modules/.pnpm/abort-controller-x@0.4.3/node_modules/abort-controller-x/es/forever.js","../../../../node_modules/.pnpm/abort-controller-x@0.4.3/node_modules/abort-controller-x/es/waitForEvent.js","../../../../node_modules/.pnpm/abort-controller-x@0.4.3/node_modules/abort-controller-x/es/all.js","../../../../node_modules/.pnpm/abort-controller-x@0.4.3/node_modules/abort-controller-x/es/race.js","../../../../node_modules/.pnpm/abort-controller-x@0.4.3/node_modules/abort-controller-x/es/retry.js","../../../../node_modules/.pnpm/abort-controller-x@0.4.3/node_modules/abort-controller-x/es/spawn.js","../../../../node_modules/.pnpm/abort-controller-x@0.4.3/node_modules/abort-controller-x/es/run.js","../../../../node_modules/.pnpm/abort-controller-x@0.4.3/node_modules/abort-controller-x/es/proactiveRetry.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/utils/AsyncSink.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/utils/isAsyncIterable.js","../../../../node_modules/.pnpm/js-base64@3.7.5/node_modules/js-base64/base64.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/utils/convertMetadata.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/client/createBidiStreamingMethod.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/client/createClientStreamingMethod.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/client/createServerStreamingMethod.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/client/createUnaryMethod.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/client/ClientFactory.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/client/Client.js","../../../../node_modules/.pnpm/nice-grpc-web@2.0.2_google-protobuf@3.21.2/node_modules/nice-grpc-web/lib/index.js","../../../../node_modules/.pnpm/@latticexyz+services@2.0.0-next.4_google-protobuf@3.21.2/node_modules/@latticexyz/services/dist/faucet.js","../../../../node_modules/.pnpm/@wagmi+chains@1.6.0_typescript@5.1.6/node_modules/@wagmi/chains/dist/index.mjs","../../../../node_modules/.pnpm/viem@1.6.0_typescript@5.1.6_zod@3.22.4/node_modules/viem/dist/esm/chains/index.js","../../../../node_modules/.pnpm/@latticexyz+common@2.0.0-next.4_typescript@5.1.6_zod@3.22.4/node_modules/@latticexyz/common/dist/chains.js","../../src/mud/supportedChains.ts","../../src/mud/getNetworkConfig.ts","../../src/mud/world.ts","../../../contracts/types/ethers-contracts/factories/IWorld__factory.ts","../../../contracts/mud.config.ts","../../src/mud/setupNetwork.ts","../../src/mud/setup.ts","../../../../node_modules/.pnpm/react-dom@18.2.0_react@18.2.0/node_modules/react-dom/client.js","../../../../node_modules/.pnpm/@remix-run+router@1.9.0/node_modules/@remix-run/router/dist/router.js","../../../../node_modules/.pnpm/react-router@6.16.0_react@18.2.0/node_modules/react-router/dist/index.js","../../../../node_modules/.pnpm/react-router-dom@6.16.0_react-dom@18.2.0_react@18.2.0/node_modules/react-router-dom/dist/index.js","../../../../node_modules/.pnpm/@latticexyz+utils@2.0.0-alpha.1.177/node_modules/@latticexyz/utils/dist/index.js","../../../../node_modules/.pnpm/@latticexyz+recs@2.0.0-alpha.1.177_typescript@5.1.6_zod@3.22.4/node_modules/@latticexyz/recs/dist/index.js","../../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js","../../../../node_modules/.pnpm/@latticexyz+react@2.0.0-alpha.1.177_typescript@5.1.6_zod@3.22.4/node_modules/@latticexyz/react/dist/index.js","../../src/config/index.ts","../../src/constants/index.ts","../../src/config/map.ts","../../src/utils/map.ts","../../src/utils/delay.ts","../../src/components/Fog/index.tsx","../../src/components/Appearance/index.tsx","../../src/mock/data.ts","../../src/context/index.tsx","../../src/components/Player/index.tsx","../../src/components/TreasureChest/index.tsx","../../src/components/MapCell/index.tsx","../../../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js","../../../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js","../../../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js","../../../../node_modules/.pnpm/buffer-reverse@1.0.1/node_modules/buffer-reverse/index.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/core.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/sha256.js","../../../../node_modules/.pnpm/treeify@1.1.0/node_modules/treeify/treeify.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/x64-core.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/lib-typedarrays.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/enc-utf16.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/enc-base64.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/md5.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/sha1.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/sha224.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/sha512.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/sha384.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/sha3.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/ripemd160.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/hmac.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/pbkdf2.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/evpkdf.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/cipher-core.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/mode-cfb.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/mode-ctr.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/mode-ctr-gladman.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/mode-ofb.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/mode-ecb.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/pad-ansix923.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/pad-iso10126.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/pad-iso97971.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/pad-zeropadding.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/pad-nopadding.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/format-hex.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/aes.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/tripledes.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/rc4.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/rabbit.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/rabbit-legacy.js","../../../../node_modules/.pnpm/crypto-js@3.3.0/node_modules/crypto-js/index.js","../../../../node_modules/.pnpm/merkletreejs@0.3.10/node_modules/merkletreejs/dist/Base.js","../../../../node_modules/.pnpm/merkletreejs@0.3.10/node_modules/merkletreejs/dist/MerkleTree.js","../../../../node_modules/.pnpm/merkletreejs@0.3.10/node_modules/merkletreejs/dist/MerkleMountainRange.js","../../../../node_modules/.pnpm/merkletreejs@0.3.10/node_modules/merkletreejs/dist/IncrementalMerkleTree.js","../../../../node_modules/.pnpm/merkletreejs@0.3.10/node_modules/merkletreejs/dist/MerkleSumTree.js","../../../../node_modules/.pnpm/merkletreejs@0.3.10/node_modules/merkletreejs/dist/index.js","../../src/hooks/useMerkel.tsx","../../src/components/Map/index.tsx","../../../../node_modules/.pnpm/react-copy-to-clipboard@5.1.0_react@18.2.0/node_modules/react-copy-to-clipboard/lib/Component.js","../../../../node_modules/.pnpm/react-copy-to-clipboard@5.1.0_react@18.2.0/node_modules/react-copy-to-clipboard/lib/index.js","../../src/components/UserAddress/index.tsx","../../src/components/UserAvatar/index.tsx","../../src/components/Leaderboard/index.jsx","../../src/mud/MUDContext.tsx","../../src/utils/utils.js","../../src/components/Battle/index.tsx","../../src/hooks/useModal.tsx","../../src/assets/img/gem.png","../../src/components/UserPackage/index.tsx","../../src/components/UserInfo/index.tsx","../../src/components/UserInfoDialog/index.tsx","../../src/utils/player.ts","../../src/pages/game/index.tsx","../../src/utils/createMerkelTree.js","../../src/pages/test/index.jsx","../../src/assets/img/logo.png","../../src/assets/img/icon_t.png","../../src/assets/img/icon_tw.png","../../src/assets/img/icon_d.png","../../src/pages/home/header/index.tsx","../../src/assets/img/duck_index.svg","../../src/pages/home/index.tsx","../../src/config/hero.ts","../../src/pages/heroEdit/index.tsx","../../src/App.tsx","../../src/index.tsx"],"sourcesContent":["/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1;\n\nexport function createClientComponents({ components }: SetupNetworkResult) {\n return {\n ...components,\n // add your client components or overrides here\n };\n}\n","var niceErrors = {\n 0: \"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'\",\n 1: function _(annotationType, key) {\n return \"Cannot apply '\" + annotationType + \"' to '\" + key.toString() + \"': Field not found.\";\n },\n /*\r\n 2(prop) {\r\n return `invalid decorator for '${prop.toString()}'`\r\n },\r\n 3(prop) {\r\n return `Cannot decorate '${prop.toString()}': action can only be used on properties with a function value.`\r\n },\r\n 4(prop) {\r\n return `Cannot decorate '${prop.toString()}': computed can only be used on getter properties.`\r\n },\r\n */\n 5: \"'keys()' can only be used on observable objects, arrays, sets and maps\",\n 6: \"'values()' can only be used on observable objects, arrays, sets and maps\",\n 7: \"'entries()' can only be used on observable objects, arrays and maps\",\n 8: \"'set()' can only be used on observable objects, arrays and maps\",\n 9: \"'remove()' can only be used on observable objects, arrays and maps\",\n 10: \"'has()' can only be used on observable objects, arrays and maps\",\n 11: \"'get()' can only be used on observable objects, arrays and maps\",\n 12: \"Invalid annotation\",\n 13: \"Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)\",\n 14: \"Intercept handlers should return nothing or a change object\",\n 15: \"Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)\",\n 16: \"Modification exception: the internal structure of an observable array was changed.\",\n 17: function _(index, length) {\n return \"[mobx.array] Index out of bounds, \" + index + \" is larger than \" + length;\n },\n 18: \"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js\",\n 19: function _(other) {\n return \"Cannot initialize from classes that inherit from Map: \" + other.constructor.name;\n },\n 20: function _(other) {\n return \"Cannot initialize map from \" + other;\n },\n 21: function _(dataStructure) {\n return \"Cannot convert to map from '\" + dataStructure + \"'\";\n },\n 22: \"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js\",\n 23: \"It is not possible to get index atoms from arrays\",\n 24: function _(thing) {\n return \"Cannot obtain administration from \" + thing;\n },\n 25: function _(property, name) {\n return \"the entry '\" + property + \"' does not exist in the observable map '\" + name + \"'\";\n },\n 26: \"please specify a property\",\n 27: function _(property, name) {\n return \"no observable property '\" + property.toString() + \"' found on the observable object '\" + name + \"'\";\n },\n 28: function _(thing) {\n return \"Cannot obtain atom from \" + thing;\n },\n 29: \"Expecting some object\",\n 30: \"invalid action stack. did you forget to finish an action?\",\n 31: \"missing option for computed: get\",\n 32: function _(name, derivation) {\n return \"Cycle detected in computation \" + name + \": \" + derivation;\n },\n 33: function _(name) {\n return \"The setter of computed value '\" + name + \"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?\";\n },\n 34: function _(name) {\n return \"[ComputedValue '\" + name + \"'] It is not possible to assign a new value to a computed value.\";\n },\n 35: \"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`\",\n 36: \"isolateGlobalState should be called before MobX is running any reactions\",\n 37: function _(method) {\n return \"[mobx] `observableArray.\" + method + \"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice().\" + method + \"()` instead\";\n },\n 38: \"'ownKeys()' can only be used on observable objects\",\n 39: \"'defineProperty()' can only be used on observable objects\"\n};\nvar errors = process.env.NODE_ENV !== \"production\" ? niceErrors : {};\nfunction die(error) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n if (process.env.NODE_ENV !== \"production\") {\n var e = typeof error === \"string\" ? error : errors[error];\n if (typeof e === \"function\") e = e.apply(null, args);\n throw new Error(\"[MobX] \" + e);\n }\n throw new Error(typeof error === \"number\" ? \"[MobX] minified error nr: \" + error + (args.length ? \" \" + args.map(String).join(\",\") : \"\") + \". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts\" : \"[MobX] \" + error);\n}\n\nvar mockGlobal = {};\nfunction getGlobal() {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n if (typeof self !== \"undefined\") {\n return self;\n }\n return mockGlobal;\n}\n\n// We shorten anything used > 5 times\nvar assign = Object.assign;\nvar getDescriptor = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar objectPrototype = Object.prototype;\nvar EMPTY_ARRAY = [];\nObject.freeze(EMPTY_ARRAY);\nvar EMPTY_OBJECT = {};\nObject.freeze(EMPTY_OBJECT);\nvar hasProxy = typeof Proxy !== \"undefined\";\nvar plainObjectString = /*#__PURE__*/Object.toString();\nfunction assertProxies() {\n if (!hasProxy) {\n die(process.env.NODE_ENV !== \"production\" ? \"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`\" : \"Proxy not available\");\n }\n}\nfunction warnAboutProxyRequirement(msg) {\n if (process.env.NODE_ENV !== \"production\" && globalState.verifyProxies) {\n die(\"MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to \" + msg);\n }\n}\nfunction getNextId() {\n return ++globalState.mobxGuid;\n}\n/**\r\n * Makes sure that the provided function is invoked at most once.\r\n */\nfunction once(func) {\n var invoked = false;\n return function () {\n if (invoked) {\n return;\n }\n invoked = true;\n return func.apply(this, arguments);\n };\n}\nvar noop = function noop() {};\nfunction isFunction(fn) {\n return typeof fn === \"function\";\n}\nfunction isStringish(value) {\n var t = typeof value;\n switch (t) {\n case \"string\":\n case \"symbol\":\n case \"number\":\n return true;\n }\n return false;\n}\nfunction isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nfunction isPlainObject(value) {\n if (!isObject(value)) {\n return false;\n }\n var proto = Object.getPrototypeOf(value);\n if (proto == null) {\n return true;\n }\n var protoConstructor = Object.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof protoConstructor === \"function\" && protoConstructor.toString() === plainObjectString;\n}\n// https://stackoverflow.com/a/37865170\nfunction isGenerator(obj) {\n var constructor = obj == null ? void 0 : obj.constructor;\n if (!constructor) {\n return false;\n }\n if (\"GeneratorFunction\" === constructor.name || \"GeneratorFunction\" === constructor.displayName) {\n return true;\n }\n return false;\n}\nfunction addHiddenProp(object, propName, value) {\n defineProperty(object, propName, {\n enumerable: false,\n writable: true,\n configurable: true,\n value: value\n });\n}\nfunction addHiddenFinalProp(object, propName, value) {\n defineProperty(object, propName, {\n enumerable: false,\n writable: false,\n configurable: true,\n value: value\n });\n}\nfunction createInstanceofPredicate(name, theClass) {\n var propName = \"isMobX\" + name;\n theClass.prototype[propName] = true;\n return function (x) {\n return isObject(x) && x[propName] === true;\n };\n}\nfunction isES6Map(thing) {\n return thing instanceof Map;\n}\nfunction isES6Set(thing) {\n return thing instanceof Set;\n}\nvar hasGetOwnPropertySymbols = typeof Object.getOwnPropertySymbols !== \"undefined\";\n/**\r\n * Returns the following: own enumerable keys and symbols.\r\n */\nfunction getPlainObjectKeys(object) {\n var keys = Object.keys(object);\n // Not supported in IE, so there are not going to be symbol props anyway...\n if (!hasGetOwnPropertySymbols) {\n return keys;\n }\n var symbols = Object.getOwnPropertySymbols(object);\n if (!symbols.length) {\n return keys;\n }\n return [].concat(keys, symbols.filter(function (s) {\n return objectPrototype.propertyIsEnumerable.call(object, s);\n }));\n}\n// From Immer utils\n// Returns all own keys, including non-enumerable and symbolic\nvar ownKeys = typeof Reflect !== \"undefined\" && Reflect.ownKeys ? Reflect.ownKeys : hasGetOwnPropertySymbols ? function (obj) {\n return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj));\n} : /* istanbul ignore next */Object.getOwnPropertyNames;\nfunction stringifyKey(key) {\n if (typeof key === \"string\") {\n return key;\n }\n if (typeof key === \"symbol\") {\n return key.toString();\n }\n return new String(key).toString();\n}\nfunction toPrimitive(value) {\n return value === null ? null : typeof value === \"object\" ? \"\" + value : value;\n}\nfunction hasProp(target, prop) {\n return objectPrototype.hasOwnProperty.call(target, prop);\n}\n// From Immer utils\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors(target) {\n // Polyfill needed for Hermes and IE, see https://github.com/facebook/hermes/issues/274\n var res = {};\n // Note: without polyfill for ownKeys, symbols won't be picked up\n ownKeys(target).forEach(function (key) {\n res[key] = getDescriptor(target, key);\n });\n return res;\n};\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (it) return (it = it.call(o)).next.bind(it);\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nvar storedAnnotationsSymbol = /*#__PURE__*/Symbol(\"mobx-stored-annotations\");\n/**\r\n * Creates a function that acts as\r\n * - decorator\r\n * - annotation object\r\n */\nfunction createDecoratorAnnotation(annotation) {\n function decorator(target, property) {\n storeAnnotation(target, property, annotation);\n }\n return Object.assign(decorator, annotation);\n}\n/**\r\n * Stores annotation to prototype,\r\n * so it can be inspected later by `makeObservable` called from constructor\r\n */\nfunction storeAnnotation(prototype, key, annotation) {\n if (!hasProp(prototype, storedAnnotationsSymbol)) {\n addHiddenProp(prototype, storedAnnotationsSymbol, _extends({}, prototype[storedAnnotationsSymbol]));\n }\n // @override must override something\n if (process.env.NODE_ENV !== \"production\" && isOverride(annotation) && !hasProp(prototype[storedAnnotationsSymbol], key)) {\n var fieldName = prototype.constructor.name + \".prototype.\" + key.toString();\n die(\"'\" + fieldName + \"' is decorated with 'override', \" + \"but no such decorated member was found on prototype.\");\n }\n // Cannot re-decorate\n assertNotDecorated(prototype, annotation, key);\n // Ignore override\n if (!isOverride(annotation)) {\n prototype[storedAnnotationsSymbol][key] = annotation;\n }\n}\nfunction assertNotDecorated(prototype, annotation, key) {\n if (process.env.NODE_ENV !== \"production\" && !isOverride(annotation) && hasProp(prototype[storedAnnotationsSymbol], key)) {\n var fieldName = prototype.constructor.name + \".prototype.\" + key.toString();\n var currentAnnotationType = prototype[storedAnnotationsSymbol][key].annotationType_;\n var requestedAnnotationType = annotation.annotationType_;\n die(\"Cannot apply '@\" + requestedAnnotationType + \"' to '\" + fieldName + \"':\" + (\"\\nThe field is already decorated with '@\" + currentAnnotationType + \"'.\") + \"\\nRe-decorating fields is not allowed.\" + \"\\nUse '@override' decorator for methods overridden by subclass.\");\n }\n}\n/**\r\n * Collects annotations from prototypes and stores them on target (instance)\r\n */\nfunction collectStoredAnnotations(target) {\n if (!hasProp(target, storedAnnotationsSymbol)) {\n if (process.env.NODE_ENV !== \"production\" && !target[storedAnnotationsSymbol]) {\n die(\"No annotations were passed to makeObservable, but no decorated members have been found either\");\n }\n // We need a copy as we will remove annotation from the list once it's applied.\n addHiddenProp(target, storedAnnotationsSymbol, _extends({}, target[storedAnnotationsSymbol]));\n }\n return target[storedAnnotationsSymbol];\n}\n\nvar $mobx = /*#__PURE__*/Symbol(\"mobx administration\");\nvar Atom = /*#__PURE__*/function () {\n // for effective unobserving. BaseAtom has true, for extra optimization, so its onBecomeUnobserved never gets called, because it's not needed\n\n /**\r\n * Create a new atom. For debugging purposes it is recommended to give it a name.\r\n * The onBecomeObserved and onBecomeUnobserved callbacks can be used for resource management.\r\n */\n function Atom(name_) {\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"Atom@\" + getNextId() : \"Atom\";\n }\n this.name_ = void 0;\n this.isPendingUnobservation_ = false;\n this.isBeingObserved_ = false;\n this.observers_ = new Set();\n this.batchId_ = void 0;\n this.diffValue_ = 0;\n this.lastAccessedBy_ = 0;\n this.lowestObserverState_ = IDerivationState_.NOT_TRACKING_;\n this.onBOL = void 0;\n this.onBUOL = void 0;\n this.name_ = name_;\n this.batchId_ = globalState.inBatch ? globalState.batchId : NaN;\n }\n // onBecomeObservedListeners\n var _proto = Atom.prototype;\n _proto.onBO = function onBO() {\n if (this.onBOL) {\n this.onBOL.forEach(function (listener) {\n return listener();\n });\n }\n };\n _proto.onBUO = function onBUO() {\n if (this.onBUOL) {\n this.onBUOL.forEach(function (listener) {\n return listener();\n });\n }\n }\n /**\r\n * Invoke this method to notify mobx that your atom has been used somehow.\r\n * Returns true if there is currently a reactive context.\r\n */;\n _proto.reportObserved = function reportObserved$1() {\n return reportObserved(this);\n }\n /**\r\n * Invoke this method _after_ this method has changed to signal mobx that all its observers should invalidate.\r\n */;\n _proto.reportChanged = function reportChanged() {\n if (!globalState.inBatch || this.batchId_ !== globalState.batchId) {\n // We could update state version only at the end of batch,\n // but we would still have to switch some global flag here to signal a change.\n globalState.stateVersion = globalState.stateVersion < Number.MAX_SAFE_INTEGER ? globalState.stateVersion + 1 : Number.MIN_SAFE_INTEGER;\n // Avoids the possibility of hitting the same globalState.batchId when it cycled through all integers (necessary?)\n this.batchId_ = NaN;\n }\n startBatch();\n propagateChanged(this);\n endBatch();\n };\n _proto.toString = function toString() {\n return this.name_;\n };\n return Atom;\n}();\nvar isAtom = /*#__PURE__*/createInstanceofPredicate(\"Atom\", Atom);\nfunction createAtom(name, onBecomeObservedHandler, onBecomeUnobservedHandler) {\n if (onBecomeObservedHandler === void 0) {\n onBecomeObservedHandler = noop;\n }\n if (onBecomeUnobservedHandler === void 0) {\n onBecomeUnobservedHandler = noop;\n }\n var atom = new Atom(name);\n // default `noop` listener will not initialize the hook Set\n if (onBecomeObservedHandler !== noop) {\n onBecomeObserved(atom, onBecomeObservedHandler);\n }\n if (onBecomeUnobservedHandler !== noop) {\n onBecomeUnobserved(atom, onBecomeUnobservedHandler);\n }\n return atom;\n}\n\nfunction identityComparer(a, b) {\n return a === b;\n}\nfunction structuralComparer(a, b) {\n return deepEqual(a, b);\n}\nfunction shallowComparer(a, b) {\n return deepEqual(a, b, 1);\n}\nfunction defaultComparer(a, b) {\n if (Object.is) {\n return Object.is(a, b);\n }\n return a === b ? a !== 0 || 1 / a === 1 / b : a !== a && b !== b;\n}\nvar comparer = {\n identity: identityComparer,\n structural: structuralComparer,\n \"default\": defaultComparer,\n shallow: shallowComparer\n};\n\nfunction deepEnhancer(v, _, name) {\n // it is an observable already, done\n if (isObservable(v)) {\n return v;\n }\n // something that can be converted and mutated?\n if (Array.isArray(v)) {\n return observable.array(v, {\n name: name\n });\n }\n if (isPlainObject(v)) {\n return observable.object(v, undefined, {\n name: name\n });\n }\n if (isES6Map(v)) {\n return observable.map(v, {\n name: name\n });\n }\n if (isES6Set(v)) {\n return observable.set(v, {\n name: name\n });\n }\n if (typeof v === \"function\" && !isAction(v) && !isFlow(v)) {\n if (isGenerator(v)) {\n return flow(v);\n } else {\n return autoAction(name, v);\n }\n }\n return v;\n}\nfunction shallowEnhancer(v, _, name) {\n if (v === undefined || v === null) {\n return v;\n }\n if (isObservableObject(v) || isObservableArray(v) || isObservableMap(v) || isObservableSet(v)) {\n return v;\n }\n if (Array.isArray(v)) {\n return observable.array(v, {\n name: name,\n deep: false\n });\n }\n if (isPlainObject(v)) {\n return observable.object(v, undefined, {\n name: name,\n deep: false\n });\n }\n if (isES6Map(v)) {\n return observable.map(v, {\n name: name,\n deep: false\n });\n }\n if (isES6Set(v)) {\n return observable.set(v, {\n name: name,\n deep: false\n });\n }\n if (process.env.NODE_ENV !== \"production\") {\n die(\"The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets\");\n }\n}\nfunction referenceEnhancer(newValue) {\n // never turn into an observable\n return newValue;\n}\nfunction refStructEnhancer(v, oldValue) {\n if (process.env.NODE_ENV !== \"production\" && isObservable(v)) {\n die(\"observable.struct should not be used with observable values\");\n }\n if (deepEqual(v, oldValue)) {\n return oldValue;\n }\n return v;\n}\n\nvar OVERRIDE = \"override\";\nvar override = /*#__PURE__*/createDecoratorAnnotation({\n annotationType_: OVERRIDE,\n make_: make_,\n extend_: extend_\n});\nfunction isOverride(annotation) {\n return annotation.annotationType_ === OVERRIDE;\n}\nfunction make_(adm, key) {\n // Must not be plain object\n if (process.env.NODE_ENV !== \"production\" && adm.isPlainObject_) {\n die(\"Cannot apply '\" + this.annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + this.annotationType_ + \"' cannot be used on plain objects.\"));\n }\n // Must override something\n if (process.env.NODE_ENV !== \"production\" && !hasProp(adm.appliedAnnotations_, key)) {\n die(\"'\" + adm.name_ + \".\" + key.toString() + \"' is annotated with '\" + this.annotationType_ + \"', \" + \"but no such annotated member was found on prototype.\");\n }\n return 0 /* Cancel */;\n}\n\nfunction extend_(adm, key, descriptor, proxyTrap) {\n die(\"'\" + this.annotationType_ + \"' can only be used with 'makeObservable'\");\n}\n\nfunction createActionAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$1,\n extend_: extend_$1\n };\n}\nfunction make_$1(adm, key, descriptor, source) {\n var _this$options_;\n // bound\n if ((_this$options_ = this.options_) != null && _this$options_.bound) {\n return this.extend_(adm, key, descriptor, false) === null ? 0 /* Cancel */ : 1 /* Break */;\n }\n // own\n if (source === adm.target_) {\n return this.extend_(adm, key, descriptor, false) === null ? 0 /* Cancel */ : 2 /* Continue */;\n }\n // prototype\n if (isAction(descriptor.value)) {\n // A prototype could have been annotated already by other constructor,\n // rest of the proto chain must be annotated already\n return 1 /* Break */;\n }\n\n var actionDescriptor = createActionDescriptor(adm, this, key, descriptor, false);\n defineProperty(source, key, actionDescriptor);\n return 2 /* Continue */;\n}\n\nfunction extend_$1(adm, key, descriptor, proxyTrap) {\n var actionDescriptor = createActionDescriptor(adm, this, key, descriptor);\n return adm.defineProperty_(key, actionDescriptor, proxyTrap);\n}\nfunction assertActionDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var value = _ref2.value;\n if (process.env.NODE_ENV !== \"production\" && !isFunction(value)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on properties with a function value.\"));\n }\n}\nfunction createActionDescriptor(adm, annotation, key, descriptor,\n// provides ability to disable safeDescriptors for prototypes\nsafeDescriptors) {\n var _annotation$options_, _annotation$options_$, _annotation$options_2, _annotation$options_$2, _annotation$options_3, _annotation$options_4, _adm$proxy_2;\n if (safeDescriptors === void 0) {\n safeDescriptors = globalState.safeDescriptors;\n }\n assertActionDescriptor(adm, annotation, key, descriptor);\n var value = descriptor.value;\n if ((_annotation$options_ = annotation.options_) != null && _annotation$options_.bound) {\n var _adm$proxy_;\n value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);\n }\n return {\n value: createAction((_annotation$options_$ = (_annotation$options_2 = annotation.options_) == null ? void 0 : _annotation$options_2.name) != null ? _annotation$options_$ : key.toString(), value, (_annotation$options_$2 = (_annotation$options_3 = annotation.options_) == null ? void 0 : _annotation$options_3.autoAction) != null ? _annotation$options_$2 : false,\n // https://github.com/mobxjs/mobx/discussions/3140\n (_annotation$options_4 = annotation.options_) != null && _annotation$options_4.bound ? (_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_ : undefined),\n // Non-configurable for classes\n // prevents accidental field redefinition in subclass\n configurable: safeDescriptors ? adm.isPlainObject_ : true,\n // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n enumerable: false,\n // Non-obsevable, therefore non-writable\n // Also prevents rewriting in subclass constructor\n writable: safeDescriptors ? false : true\n };\n}\n\nfunction createFlowAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$2,\n extend_: extend_$2\n };\n}\nfunction make_$2(adm, key, descriptor, source) {\n var _this$options_;\n // own\n if (source === adm.target_) {\n return this.extend_(adm, key, descriptor, false) === null ? 0 /* Cancel */ : 2 /* Continue */;\n }\n // prototype\n // bound - must annotate protos to support super.flow()\n if ((_this$options_ = this.options_) != null && _this$options_.bound && (!hasProp(adm.target_, key) || !isFlow(adm.target_[key]))) {\n if (this.extend_(adm, key, descriptor, false) === null) {\n return 0 /* Cancel */;\n }\n }\n\n if (isFlow(descriptor.value)) {\n // A prototype could have been annotated already by other constructor,\n // rest of the proto chain must be annotated already\n return 1 /* Break */;\n }\n\n var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor, false, false);\n defineProperty(source, key, flowDescriptor);\n return 2 /* Continue */;\n}\n\nfunction extend_$2(adm, key, descriptor, proxyTrap) {\n var _this$options_2;\n var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor, (_this$options_2 = this.options_) == null ? void 0 : _this$options_2.bound);\n return adm.defineProperty_(key, flowDescriptor, proxyTrap);\n}\nfunction assertFlowDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var value = _ref2.value;\n if (process.env.NODE_ENV !== \"production\" && !isFunction(value)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on properties with a generator function value.\"));\n }\n}\nfunction createFlowDescriptor(adm, annotation, key, descriptor, bound,\n// provides ability to disable safeDescriptors for prototypes\nsafeDescriptors) {\n if (safeDescriptors === void 0) {\n safeDescriptors = globalState.safeDescriptors;\n }\n assertFlowDescriptor(adm, annotation, key, descriptor);\n var value = descriptor.value;\n // In case of flow.bound, the descriptor can be from already annotated prototype\n if (!isFlow(value)) {\n value = flow(value);\n }\n if (bound) {\n var _adm$proxy_;\n // We do not keep original function around, so we bind the existing flow\n value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);\n // This is normally set by `flow`, but `bind` returns new function...\n value.isMobXFlow = true;\n }\n return {\n value: value,\n // Non-configurable for classes\n // prevents accidental field redefinition in subclass\n configurable: safeDescriptors ? adm.isPlainObject_ : true,\n // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n enumerable: false,\n // Non-obsevable, therefore non-writable\n // Also prevents rewriting in subclass constructor\n writable: safeDescriptors ? false : true\n };\n}\n\nfunction createComputedAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$3,\n extend_: extend_$3\n };\n}\nfunction make_$3(adm, key, descriptor) {\n return this.extend_(adm, key, descriptor, false) === null ? 0 /* Cancel */ : 1 /* Break */;\n}\n\nfunction extend_$3(adm, key, descriptor, proxyTrap) {\n assertComputedDescriptor(adm, this, key, descriptor);\n return adm.defineComputedProperty_(key, _extends({}, this.options_, {\n get: descriptor.get,\n set: descriptor.set\n }), proxyTrap);\n}\nfunction assertComputedDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var get = _ref2.get;\n if (process.env.NODE_ENV !== \"production\" && !get) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on getter(+setter) properties.\"));\n }\n}\n\nfunction createObservableAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$4,\n extend_: extend_$4\n };\n}\nfunction make_$4(adm, key, descriptor) {\n return this.extend_(adm, key, descriptor, false) === null ? 0 /* Cancel */ : 1 /* Break */;\n}\n\nfunction extend_$4(adm, key, descriptor, proxyTrap) {\n var _this$options_$enhanc, _this$options_;\n assertObservableDescriptor(adm, this, key, descriptor);\n return adm.defineObservableProperty_(key, descriptor.value, (_this$options_$enhanc = (_this$options_ = this.options_) == null ? void 0 : _this$options_.enhancer) != null ? _this$options_$enhanc : deepEnhancer, proxyTrap);\n}\nfunction assertObservableDescriptor(adm, _ref, key, descriptor) {\n var annotationType_ = _ref.annotationType_;\n if (process.env.NODE_ENV !== \"production\" && !(\"value\" in descriptor)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' cannot be used on getter/setter properties\"));\n }\n}\n\nvar AUTO = \"true\";\nvar autoAnnotation = /*#__PURE__*/createAutoAnnotation();\nfunction createAutoAnnotation(options) {\n return {\n annotationType_: AUTO,\n options_: options,\n make_: make_$5,\n extend_: extend_$5\n };\n}\nfunction make_$5(adm, key, descriptor, source) {\n var _this$options_3, _this$options_4;\n // getter -> computed\n if (descriptor.get) {\n return computed.make_(adm, key, descriptor, source);\n }\n // lone setter -> action setter\n if (descriptor.set) {\n // TODO make action applicable to setter and delegate to action.make_\n var set = createAction(key.toString(), descriptor.set);\n // own\n if (source === adm.target_) {\n return adm.defineProperty_(key, {\n configurable: globalState.safeDescriptors ? adm.isPlainObject_ : true,\n set: set\n }) === null ? 0 /* Cancel */ : 2 /* Continue */;\n }\n // proto\n defineProperty(source, key, {\n configurable: true,\n set: set\n });\n return 2 /* Continue */;\n }\n // function on proto -> autoAction/flow\n if (source !== adm.target_ && typeof descriptor.value === \"function\") {\n var _this$options_2;\n if (isGenerator(descriptor.value)) {\n var _this$options_;\n var flowAnnotation = (_this$options_ = this.options_) != null && _this$options_.autoBind ? flow.bound : flow;\n return flowAnnotation.make_(adm, key, descriptor, source);\n }\n var actionAnnotation = (_this$options_2 = this.options_) != null && _this$options_2.autoBind ? autoAction.bound : autoAction;\n return actionAnnotation.make_(adm, key, descriptor, source);\n }\n // other -> observable\n // Copy props from proto as well, see test:\n // \"decorate should work with Object.create\"\n var observableAnnotation = ((_this$options_3 = this.options_) == null ? void 0 : _this$options_3.deep) === false ? observable.ref : observable;\n // if function respect autoBind option\n if (typeof descriptor.value === \"function\" && (_this$options_4 = this.options_) != null && _this$options_4.autoBind) {\n var _adm$proxy_;\n descriptor.value = descriptor.value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);\n }\n return observableAnnotation.make_(adm, key, descriptor, source);\n}\nfunction extend_$5(adm, key, descriptor, proxyTrap) {\n var _this$options_5, _this$options_6;\n // getter -> computed\n if (descriptor.get) {\n return computed.extend_(adm, key, descriptor, proxyTrap);\n }\n // lone setter -> action setter\n if (descriptor.set) {\n // TODO make action applicable to setter and delegate to action.extend_\n return adm.defineProperty_(key, {\n configurable: globalState.safeDescriptors ? adm.isPlainObject_ : true,\n set: createAction(key.toString(), descriptor.set)\n }, proxyTrap);\n }\n // other -> observable\n // if function respect autoBind option\n if (typeof descriptor.value === \"function\" && (_this$options_5 = this.options_) != null && _this$options_5.autoBind) {\n var _adm$proxy_2;\n descriptor.value = descriptor.value.bind((_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_);\n }\n var observableAnnotation = ((_this$options_6 = this.options_) == null ? void 0 : _this$options_6.deep) === false ? observable.ref : observable;\n return observableAnnotation.extend_(adm, key, descriptor, proxyTrap);\n}\n\nvar OBSERVABLE = \"observable\";\nvar OBSERVABLE_REF = \"observable.ref\";\nvar OBSERVABLE_SHALLOW = \"observable.shallow\";\nvar OBSERVABLE_STRUCT = \"observable.struct\";\n// Predefined bags of create observable options, to avoid allocating temporarily option objects\n// in the majority of cases\nvar defaultCreateObservableOptions = {\n deep: true,\n name: undefined,\n defaultDecorator: undefined,\n proxy: true\n};\nObject.freeze(defaultCreateObservableOptions);\nfunction asCreateObservableOptions(thing) {\n return thing || defaultCreateObservableOptions;\n}\nvar observableAnnotation = /*#__PURE__*/createObservableAnnotation(OBSERVABLE);\nvar observableRefAnnotation = /*#__PURE__*/createObservableAnnotation(OBSERVABLE_REF, {\n enhancer: referenceEnhancer\n});\nvar observableShallowAnnotation = /*#__PURE__*/createObservableAnnotation(OBSERVABLE_SHALLOW, {\n enhancer: shallowEnhancer\n});\nvar observableStructAnnotation = /*#__PURE__*/createObservableAnnotation(OBSERVABLE_STRUCT, {\n enhancer: refStructEnhancer\n});\nvar observableDecoratorAnnotation = /*#__PURE__*/createDecoratorAnnotation(observableAnnotation);\nfunction getEnhancerFromOptions(options) {\n return options.deep === true ? deepEnhancer : options.deep === false ? referenceEnhancer : getEnhancerFromAnnotation(options.defaultDecorator);\n}\nfunction getAnnotationFromOptions(options) {\n var _options$defaultDecor;\n return options ? (_options$defaultDecor = options.defaultDecorator) != null ? _options$defaultDecor : createAutoAnnotation(options) : undefined;\n}\nfunction getEnhancerFromAnnotation(annotation) {\n var _annotation$options_$, _annotation$options_;\n return !annotation ? deepEnhancer : (_annotation$options_$ = (_annotation$options_ = annotation.options_) == null ? void 0 : _annotation$options_.enhancer) != null ? _annotation$options_$ : deepEnhancer;\n}\n/**\r\n * Turns an object, array or function into a reactive structure.\r\n * @param v the value which should become observable.\r\n */\nfunction createObservable(v, arg2, arg3) {\n // @observable someProp;\n if (isStringish(arg2)) {\n storeAnnotation(v, arg2, observableAnnotation);\n return;\n }\n // already observable - ignore\n if (isObservable(v)) {\n return v;\n }\n // plain object\n if (isPlainObject(v)) {\n return observable.object(v, arg2, arg3);\n }\n // Array\n if (Array.isArray(v)) {\n return observable.array(v, arg2);\n }\n // Map\n if (isES6Map(v)) {\n return observable.map(v, arg2);\n }\n // Set\n if (isES6Set(v)) {\n return observable.set(v, arg2);\n }\n // other object - ignore\n if (typeof v === \"object\" && v !== null) {\n return v;\n }\n // anything else\n return observable.box(v, arg2);\n}\nassign(createObservable, observableDecoratorAnnotation);\nvar observableFactories = {\n box: function box(value, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableValue(value, getEnhancerFromOptions(o), o.name, true, o.equals);\n },\n array: function array(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return (globalState.useProxies === false || o.proxy === false ? createLegacyArray : createObservableArray)(initialValues, getEnhancerFromOptions(o), o.name);\n },\n map: function map(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableMap(initialValues, getEnhancerFromOptions(o), o.name);\n },\n set: function set(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableSet(initialValues, getEnhancerFromOptions(o), o.name);\n },\n object: function object(props, decorators, options) {\n return initObservable(function () {\n return extendObservable(globalState.useProxies === false || (options == null ? void 0 : options.proxy) === false ? asObservableObject({}, options) : asDynamicObservableObject({}, options), props, decorators);\n });\n },\n ref: /*#__PURE__*/createDecoratorAnnotation(observableRefAnnotation),\n shallow: /*#__PURE__*/createDecoratorAnnotation(observableShallowAnnotation),\n deep: observableDecoratorAnnotation,\n struct: /*#__PURE__*/createDecoratorAnnotation(observableStructAnnotation)\n};\n// eslint-disable-next-line\nvar observable = /*#__PURE__*/assign(createObservable, observableFactories);\n\nvar COMPUTED = \"computed\";\nvar COMPUTED_STRUCT = \"computed.struct\";\nvar computedAnnotation = /*#__PURE__*/createComputedAnnotation(COMPUTED);\nvar computedStructAnnotation = /*#__PURE__*/createComputedAnnotation(COMPUTED_STRUCT, {\n equals: comparer.structural\n});\n/**\r\n * Decorator for class properties: @computed get value() { return expr; }.\r\n * For legacy purposes also invokable as ES5 observable created: `computed(() => expr)`;\r\n */\nvar computed = function computed(arg1, arg2) {\n if (isStringish(arg2)) {\n // @computed\n return storeAnnotation(arg1, arg2, computedAnnotation);\n }\n if (isPlainObject(arg1)) {\n // @computed({ options })\n return createDecoratorAnnotation(createComputedAnnotation(COMPUTED, arg1));\n }\n // computed(expr, options?)\n if (process.env.NODE_ENV !== \"production\") {\n if (!isFunction(arg1)) {\n die(\"First argument to `computed` should be an expression.\");\n }\n if (isFunction(arg2)) {\n die(\"A setter as second argument is no longer supported, use `{ set: fn }` option instead\");\n }\n }\n var opts = isPlainObject(arg2) ? arg2 : {};\n opts.get = arg1;\n opts.name || (opts.name = arg1.name || \"\"); /* for generated name */\n return new ComputedValue(opts);\n};\nObject.assign(computed, computedAnnotation);\ncomputed.struct = /*#__PURE__*/createDecoratorAnnotation(computedStructAnnotation);\n\nvar _getDescriptor$config, _getDescriptor;\n// we don't use globalState for these in order to avoid possible issues with multiple\n// mobx versions\nvar currentActionId = 0;\nvar nextActionId = 1;\nvar isFunctionNameConfigurable = (_getDescriptor$config = (_getDescriptor = /*#__PURE__*/getDescriptor(function () {}, \"name\")) == null ? void 0 : _getDescriptor.configurable) != null ? _getDescriptor$config : false;\n// we can safely recycle this object\nvar tmpNameDescriptor = {\n value: \"action\",\n configurable: true,\n writable: false,\n enumerable: false\n};\nfunction createAction(actionName, fn, autoAction, ref) {\n if (autoAction === void 0) {\n autoAction = false;\n }\n if (process.env.NODE_ENV !== \"production\") {\n if (!isFunction(fn)) {\n die(\"`action` can only be invoked on functions\");\n }\n if (typeof actionName !== \"string\" || !actionName) {\n die(\"actions should have valid names, got: '\" + actionName + \"'\");\n }\n }\n function res() {\n return executeAction(actionName, autoAction, fn, ref || this, arguments);\n }\n res.isMobxAction = true;\n if (isFunctionNameConfigurable) {\n tmpNameDescriptor.value = actionName;\n defineProperty(res, \"name\", tmpNameDescriptor);\n }\n return res;\n}\nfunction executeAction(actionName, canRunAsDerivation, fn, scope, args) {\n var runInfo = _startAction(actionName, canRunAsDerivation, scope, args);\n try {\n return fn.apply(scope, args);\n } catch (err) {\n runInfo.error_ = err;\n throw err;\n } finally {\n _endAction(runInfo);\n }\n}\nfunction _startAction(actionName, canRunAsDerivation,\n// true for autoAction\nscope, args) {\n var notifySpy_ = process.env.NODE_ENV !== \"production\" && isSpyEnabled() && !!actionName;\n var startTime_ = 0;\n if (process.env.NODE_ENV !== \"production\" && notifySpy_) {\n startTime_ = Date.now();\n var flattenedArgs = args ? Array.from(args) : EMPTY_ARRAY;\n spyReportStart({\n type: ACTION,\n name: actionName,\n object: scope,\n arguments: flattenedArgs\n });\n }\n var prevDerivation_ = globalState.trackingDerivation;\n var runAsAction = !canRunAsDerivation || !prevDerivation_;\n startBatch();\n var prevAllowStateChanges_ = globalState.allowStateChanges; // by default preserve previous allow\n if (runAsAction) {\n untrackedStart();\n prevAllowStateChanges_ = allowStateChangesStart(true);\n }\n var prevAllowStateReads_ = allowStateReadsStart(true);\n var runInfo = {\n runAsAction_: runAsAction,\n prevDerivation_: prevDerivation_,\n prevAllowStateChanges_: prevAllowStateChanges_,\n prevAllowStateReads_: prevAllowStateReads_,\n notifySpy_: notifySpy_,\n startTime_: startTime_,\n actionId_: nextActionId++,\n parentActionId_: currentActionId\n };\n currentActionId = runInfo.actionId_;\n return runInfo;\n}\nfunction _endAction(runInfo) {\n if (currentActionId !== runInfo.actionId_) {\n die(30);\n }\n currentActionId = runInfo.parentActionId_;\n if (runInfo.error_ !== undefined) {\n globalState.suppressReactionErrors = true;\n }\n allowStateChangesEnd(runInfo.prevAllowStateChanges_);\n allowStateReadsEnd(runInfo.prevAllowStateReads_);\n endBatch();\n if (runInfo.runAsAction_) {\n untrackedEnd(runInfo.prevDerivation_);\n }\n if (process.env.NODE_ENV !== \"production\" && runInfo.notifySpy_) {\n spyReportEnd({\n time: Date.now() - runInfo.startTime_\n });\n }\n globalState.suppressReactionErrors = false;\n}\nfunction allowStateChanges(allowStateChanges, func) {\n var prev = allowStateChangesStart(allowStateChanges);\n try {\n return func();\n } finally {\n allowStateChangesEnd(prev);\n }\n}\nfunction allowStateChangesStart(allowStateChanges) {\n var prev = globalState.allowStateChanges;\n globalState.allowStateChanges = allowStateChanges;\n return prev;\n}\nfunction allowStateChangesEnd(prev) {\n globalState.allowStateChanges = prev;\n}\n\nvar _Symbol$toPrimitive;\nvar CREATE = \"create\";\n_Symbol$toPrimitive = Symbol.toPrimitive;\nvar ObservableValue = /*#__PURE__*/function (_Atom) {\n _inheritsLoose(ObservableValue, _Atom);\n function ObservableValue(value, enhancer, name_, notifySpy, equals) {\n var _this;\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"ObservableValue@\" + getNextId() : \"ObservableValue\";\n }\n if (notifySpy === void 0) {\n notifySpy = true;\n }\n if (equals === void 0) {\n equals = comparer[\"default\"];\n }\n _this = _Atom.call(this, name_) || this;\n _this.enhancer = void 0;\n _this.name_ = void 0;\n _this.equals = void 0;\n _this.hasUnreportedChange_ = false;\n _this.interceptors_ = void 0;\n _this.changeListeners_ = void 0;\n _this.value_ = void 0;\n _this.dehancer = void 0;\n _this.enhancer = enhancer;\n _this.name_ = name_;\n _this.equals = equals;\n _this.value_ = enhancer(value, undefined, name_);\n if (process.env.NODE_ENV !== \"production\" && notifySpy && isSpyEnabled()) {\n // only notify spy if this is a stand-alone observable\n spyReport({\n type: CREATE,\n object: _assertThisInitialized(_this),\n observableKind: \"value\",\n debugObjectName: _this.name_,\n newValue: \"\" + _this.value_\n });\n }\n return _this;\n }\n var _proto = ObservableValue.prototype;\n _proto.dehanceValue = function dehanceValue(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n return value;\n };\n _proto.set = function set(newValue) {\n var oldValue = this.value_;\n newValue = this.prepareNewValue_(newValue);\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportStart({\n type: UPDATE,\n object: this,\n observableKind: \"value\",\n debugObjectName: this.name_,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n this.setNewValue_(newValue);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportEnd();\n }\n }\n };\n _proto.prepareNewValue_ = function prepareNewValue_(newValue) {\n checkIfStateModificationsAreAllowed(this);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this,\n type: UPDATE,\n newValue: newValue\n });\n if (!change) {\n return globalState.UNCHANGED;\n }\n newValue = change.newValue;\n }\n // apply modifier\n newValue = this.enhancer(newValue, this.value_, this.name_);\n return this.equals(this.value_, newValue) ? globalState.UNCHANGED : newValue;\n };\n _proto.setNewValue_ = function setNewValue_(newValue) {\n var oldValue = this.value_;\n this.value_ = newValue;\n this.reportChanged();\n if (hasListeners(this)) {\n notifyListeners(this, {\n type: UPDATE,\n object: this,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n };\n _proto.get = function get() {\n this.reportObserved();\n return this.dehanceValue(this.value_);\n };\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (fireImmediately) {\n listener({\n observableKind: \"value\",\n debugObjectName: this.name_,\n object: this,\n type: UPDATE,\n newValue: this.value_,\n oldValue: undefined\n });\n }\n return registerListener(this, listener);\n };\n _proto.raw = function raw() {\n // used by MST ot get undehanced value\n return this.value_;\n };\n _proto.toJSON = function toJSON() {\n return this.get();\n };\n _proto.toString = function toString() {\n return this.name_ + \"[\" + this.value_ + \"]\";\n };\n _proto.valueOf = function valueOf() {\n return toPrimitive(this.get());\n };\n _proto[_Symbol$toPrimitive] = function () {\n return this.valueOf();\n };\n return ObservableValue;\n}(Atom);\nvar isObservableValue = /*#__PURE__*/createInstanceofPredicate(\"ObservableValue\", ObservableValue);\n\nvar _Symbol$toPrimitive$1;\n/**\r\n * A node in the state dependency root that observes other nodes, and can be observed itself.\r\n *\r\n * ComputedValue will remember the result of the computation for the duration of the batch, or\r\n * while being observed.\r\n *\r\n * During this time it will recompute only when one of its direct dependencies changed,\r\n * but only when it is being accessed with `ComputedValue.get()`.\r\n *\r\n * Implementation description:\r\n * 1. First time it's being accessed it will compute and remember result\r\n * give back remembered result until 2. happens\r\n * 2. First time any deep dependency change, propagate POSSIBLY_STALE to all observers, wait for 3.\r\n * 3. When it's being accessed, recompute if any shallow dependency changed.\r\n * if result changed: propagate STALE to all observers, that were POSSIBLY_STALE from the last step.\r\n * go to step 2. either way\r\n *\r\n * If at any point it's outside batch and it isn't observed: reset everything and go to 1.\r\n */\n_Symbol$toPrimitive$1 = Symbol.toPrimitive;\nvar ComputedValue = /*#__PURE__*/function () {\n // nodes we are looking at. Our value depends on these nodes\n // during tracking it's an array with new observed observers\n\n // to check for cycles\n\n // N.B: unminified as it is used by MST\n\n /**\r\n * Create a new computed value based on a function expression.\r\n *\r\n * The `name` property is for debug purposes only.\r\n *\r\n * The `equals` property specifies the comparer function to use to determine if a newly produced\r\n * value differs from the previous value. Two comparers are provided in the library; `defaultComparer`\r\n * compares based on identity comparison (===), and `structuralComparer` deeply compares the structure.\r\n * Structural comparison can be convenient if you always produce a new aggregated object and\r\n * don't want to notify observers if it is structurally the same.\r\n * This is useful for working with vectors, mouse coordinates etc.\r\n */\n function ComputedValue(options) {\n this.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n this.observing_ = [];\n this.newObserving_ = null;\n this.isBeingObserved_ = false;\n this.isPendingUnobservation_ = false;\n this.observers_ = new Set();\n this.diffValue_ = 0;\n this.runId_ = 0;\n this.lastAccessedBy_ = 0;\n this.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n this.unboundDepsCount_ = 0;\n this.value_ = new CaughtException(null);\n this.name_ = void 0;\n this.triggeredBy_ = void 0;\n this.isComputing_ = false;\n this.isRunningSetter_ = false;\n this.derivation = void 0;\n this.setter_ = void 0;\n this.isTracing_ = TraceMode.NONE;\n this.scope_ = void 0;\n this.equals_ = void 0;\n this.requiresReaction_ = void 0;\n this.keepAlive_ = void 0;\n this.onBOL = void 0;\n this.onBUOL = void 0;\n if (!options.get) {\n die(31);\n }\n this.derivation = options.get;\n this.name_ = options.name || (process.env.NODE_ENV !== \"production\" ? \"ComputedValue@\" + getNextId() : \"ComputedValue\");\n if (options.set) {\n this.setter_ = createAction(process.env.NODE_ENV !== \"production\" ? this.name_ + \"-setter\" : \"ComputedValue-setter\", options.set);\n }\n this.equals_ = options.equals || (options.compareStructural || options.struct ? comparer.structural : comparer[\"default\"]);\n this.scope_ = options.context;\n this.requiresReaction_ = options.requiresReaction;\n this.keepAlive_ = !!options.keepAlive;\n }\n var _proto = ComputedValue.prototype;\n _proto.onBecomeStale_ = function onBecomeStale_() {\n propagateMaybeChanged(this);\n };\n _proto.onBO = function onBO() {\n if (this.onBOL) {\n this.onBOL.forEach(function (listener) {\n return listener();\n });\n }\n };\n _proto.onBUO = function onBUO() {\n if (this.onBUOL) {\n this.onBUOL.forEach(function (listener) {\n return listener();\n });\n }\n }\n /**\r\n * Returns the current value of this computed value.\r\n * Will evaluate its computation first if needed.\r\n */;\n _proto.get = function get() {\n if (this.isComputing_) {\n die(32, this.name_, this.derivation);\n }\n if (globalState.inBatch === 0 &&\n // !globalState.trackingDerivatpion &&\n this.observers_.size === 0 && !this.keepAlive_) {\n if (shouldCompute(this)) {\n this.warnAboutUntrackedRead_();\n startBatch(); // See perf test 'computed memoization'\n this.value_ = this.computeValue_(false);\n endBatch();\n }\n } else {\n reportObserved(this);\n if (shouldCompute(this)) {\n var prevTrackingContext = globalState.trackingContext;\n if (this.keepAlive_ && !prevTrackingContext) {\n globalState.trackingContext = this;\n }\n if (this.trackAndCompute()) {\n propagateChangeConfirmed(this);\n }\n globalState.trackingContext = prevTrackingContext;\n }\n }\n var result = this.value_;\n if (isCaughtException(result)) {\n throw result.cause;\n }\n return result;\n };\n _proto.set = function set(value) {\n if (this.setter_) {\n if (this.isRunningSetter_) {\n die(33, this.name_);\n }\n this.isRunningSetter_ = true;\n try {\n this.setter_.call(this.scope_, value);\n } finally {\n this.isRunningSetter_ = false;\n }\n } else {\n die(34, this.name_);\n }\n };\n _proto.trackAndCompute = function trackAndCompute() {\n // N.B: unminified as it is used by MST\n var oldValue = this.value_;\n var wasSuspended = /* see #1208 */this.dependenciesState_ === IDerivationState_.NOT_TRACKING_;\n var newValue = this.computeValue_(true);\n var changed = wasSuspended || isCaughtException(oldValue) || isCaughtException(newValue) || !this.equals_(oldValue, newValue);\n if (changed) {\n this.value_ = newValue;\n if (process.env.NODE_ENV !== \"production\" && isSpyEnabled()) {\n spyReport({\n observableKind: \"computed\",\n debugObjectName: this.name_,\n object: this.scope_,\n type: \"update\",\n oldValue: oldValue,\n newValue: newValue\n });\n }\n }\n return changed;\n };\n _proto.computeValue_ = function computeValue_(track) {\n this.isComputing_ = true;\n // don't allow state changes during computation\n var prev = allowStateChangesStart(false);\n var res;\n if (track) {\n res = trackDerivedFunction(this, this.derivation, this.scope_);\n } else {\n if (globalState.disableErrorBoundaries === true) {\n res = this.derivation.call(this.scope_);\n } else {\n try {\n res = this.derivation.call(this.scope_);\n } catch (e) {\n res = new CaughtException(e);\n }\n }\n }\n allowStateChangesEnd(prev);\n this.isComputing_ = false;\n return res;\n };\n _proto.suspend_ = function suspend_() {\n if (!this.keepAlive_) {\n clearObserving(this);\n this.value_ = undefined; // don't hold on to computed value!\n if (process.env.NODE_ENV !== \"production\" && this.isTracing_ !== TraceMode.NONE) {\n console.log(\"[mobx.trace] Computed value '\" + this.name_ + \"' was suspended and it will recompute on the next access.\");\n }\n }\n };\n _proto.observe_ = function observe_(listener, fireImmediately) {\n var _this = this;\n var firstTime = true;\n var prevValue = undefined;\n return autorun(function () {\n // TODO: why is this in a different place than the spyReport() function? in all other observables it's called in the same place\n var newValue = _this.get();\n if (!firstTime || fireImmediately) {\n var prevU = untrackedStart();\n listener({\n observableKind: \"computed\",\n debugObjectName: _this.name_,\n type: UPDATE,\n object: _this,\n newValue: newValue,\n oldValue: prevValue\n });\n untrackedEnd(prevU);\n }\n firstTime = false;\n prevValue = newValue;\n });\n };\n _proto.warnAboutUntrackedRead_ = function warnAboutUntrackedRead_() {\n if (!(process.env.NODE_ENV !== \"production\")) {\n return;\n }\n if (this.isTracing_ !== TraceMode.NONE) {\n console.log(\"[mobx.trace] Computed value '\" + this.name_ + \"' is being read outside a reactive context. Doing a full recompute.\");\n }\n if (typeof this.requiresReaction_ === \"boolean\" ? this.requiresReaction_ : globalState.computedRequiresReaction) {\n console.warn(\"[mobx] Computed value '\" + this.name_ + \"' is being read outside a reactive context. Doing a full recompute.\");\n }\n };\n _proto.toString = function toString() {\n return this.name_ + \"[\" + this.derivation.toString() + \"]\";\n };\n _proto.valueOf = function valueOf() {\n return toPrimitive(this.get());\n };\n _proto[_Symbol$toPrimitive$1] = function () {\n return this.valueOf();\n };\n return ComputedValue;\n}();\nvar isComputedValue = /*#__PURE__*/createInstanceofPredicate(\"ComputedValue\", ComputedValue);\n\nvar IDerivationState_;\n(function (IDerivationState_) {\n // before being run or (outside batch and not being observed)\n // at this point derivation is not holding any data about dependency tree\n IDerivationState_[IDerivationState_[\"NOT_TRACKING_\"] = -1] = \"NOT_TRACKING_\";\n // no shallow dependency changed since last computation\n // won't recalculate derivation\n // this is what makes mobx fast\n IDerivationState_[IDerivationState_[\"UP_TO_DATE_\"] = 0] = \"UP_TO_DATE_\";\n // some deep dependency changed, but don't know if shallow dependency changed\n // will require to check first if UP_TO_DATE or POSSIBLY_STALE\n // currently only ComputedValue will propagate POSSIBLY_STALE\n //\n // having this state is second big optimization:\n // don't have to recompute on every dependency change, but only when it's needed\n IDerivationState_[IDerivationState_[\"POSSIBLY_STALE_\"] = 1] = \"POSSIBLY_STALE_\";\n // A shallow dependency has changed since last computation and the derivation\n // will need to recompute when it's needed next.\n IDerivationState_[IDerivationState_[\"STALE_\"] = 2] = \"STALE_\";\n})(IDerivationState_ || (IDerivationState_ = {}));\nvar TraceMode;\n(function (TraceMode) {\n TraceMode[TraceMode[\"NONE\"] = 0] = \"NONE\";\n TraceMode[TraceMode[\"LOG\"] = 1] = \"LOG\";\n TraceMode[TraceMode[\"BREAK\"] = 2] = \"BREAK\";\n})(TraceMode || (TraceMode = {}));\nvar CaughtException = function CaughtException(cause) {\n this.cause = void 0;\n this.cause = cause;\n // Empty\n};\n\nfunction isCaughtException(e) {\n return e instanceof CaughtException;\n}\n/**\r\n * Finds out whether any dependency of the derivation has actually changed.\r\n * If dependenciesState is 1 then it will recalculate dependencies,\r\n * if any dependency changed it will propagate it by changing dependenciesState to 2.\r\n *\r\n * By iterating over the dependencies in the same order that they were reported and\r\n * stopping on the first change, all the recalculations are only called for ComputedValues\r\n * that will be tracked by derivation. That is because we assume that if the first x\r\n * dependencies of the derivation doesn't change then the derivation should run the same way\r\n * up until accessing x-th dependency.\r\n */\nfunction shouldCompute(derivation) {\n switch (derivation.dependenciesState_) {\n case IDerivationState_.UP_TO_DATE_:\n return false;\n case IDerivationState_.NOT_TRACKING_:\n case IDerivationState_.STALE_:\n return true;\n case IDerivationState_.POSSIBLY_STALE_:\n {\n // state propagation can occur outside of action/reactive context #2195\n var prevAllowStateReads = allowStateReadsStart(true);\n var prevUntracked = untrackedStart(); // no need for those computeds to be reported, they will be picked up in trackDerivedFunction.\n var obs = derivation.observing_,\n l = obs.length;\n for (var i = 0; i < l; i++) {\n var obj = obs[i];\n if (isComputedValue(obj)) {\n if (globalState.disableErrorBoundaries) {\n obj.get();\n } else {\n try {\n obj.get();\n } catch (e) {\n // we are not interested in the value *or* exception at this moment, but if there is one, notify all\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n }\n // if ComputedValue `obj` actually changed it will be computed and propagated to its observers.\n // and `derivation` is an observer of `obj`\n // invariantShouldCompute(derivation)\n if (derivation.dependenciesState_ === IDerivationState_.STALE_) {\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n }\n }\n changeDependenciesStateTo0(derivation);\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return false;\n }\n }\n}\nfunction isComputingDerivation() {\n return globalState.trackingDerivation !== null; // filter out actions inside computations\n}\n\nfunction checkIfStateModificationsAreAllowed(atom) {\n if (!(process.env.NODE_ENV !== \"production\")) {\n return;\n }\n var hasObservers = atom.observers_.size > 0;\n // Should not be possible to change observed state outside strict mode, except during initialization, see #563\n if (!globalState.allowStateChanges && (hasObservers || globalState.enforceActions === \"always\")) {\n console.warn(\"[MobX] \" + (globalState.enforceActions ? \"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: \" : \"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: \") + atom.name_);\n }\n}\nfunction checkIfStateReadsAreAllowed(observable) {\n if (process.env.NODE_ENV !== \"production\" && !globalState.allowStateReads && globalState.observableRequiresReaction) {\n console.warn(\"[mobx] Observable '\" + observable.name_ + \"' being read outside a reactive context.\");\n }\n}\n/**\r\n * Executes the provided function `f` and tracks which observables are being accessed.\r\n * The tracking information is stored on the `derivation` object and the derivation is registered\r\n * as observer of any of the accessed observables.\r\n */\nfunction trackDerivedFunction(derivation, f, context) {\n var prevAllowStateReads = allowStateReadsStart(true);\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving_ = new Array(derivation.observing_.length + 100);\n derivation.unboundDepsCount_ = 0;\n derivation.runId_ = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n globalState.inBatch++;\n var result;\n if (globalState.disableErrorBoundaries === true) {\n result = f.call(context);\n } else {\n try {\n result = f.call(context);\n } catch (e) {\n result = new CaughtException(e);\n }\n }\n globalState.inBatch--;\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n warnAboutDerivationWithoutDependencies(derivation);\n allowStateReadsEnd(prevAllowStateReads);\n return result;\n}\nfunction warnAboutDerivationWithoutDependencies(derivation) {\n if (!(process.env.NODE_ENV !== \"production\")) {\n return;\n }\n if (derivation.observing_.length !== 0) {\n return;\n }\n if (typeof derivation.requiresObservable_ === \"boolean\" ? derivation.requiresObservable_ : globalState.reactionRequiresObservable) {\n console.warn(\"[mobx] Derivation '\" + derivation.name_ + \"' is created/updated without reading any observable value.\");\n }\n}\n/**\r\n * diffs newObserving with observing.\r\n * update observing to be newObserving with unique observables\r\n * notify observers that become observed/unobserved\r\n */\nfunction bindDependencies(derivation) {\n // invariant(derivation.dependenciesState !== IDerivationState.NOT_TRACKING, \"INTERNAL ERROR bindDependencies expects derivation.dependenciesState !== -1\");\n var prevObserving = derivation.observing_;\n var observing = derivation.observing_ = derivation.newObserving_;\n var lowestNewObservingDerivationState = IDerivationState_.UP_TO_DATE_;\n // Go through all new observables and check diffValue: (this list can contain duplicates):\n // 0: first occurrence, change to 1 and keep it\n // 1: extra occurrence, drop it\n var i0 = 0,\n l = derivation.unboundDepsCount_;\n for (var i = 0; i < l; i++) {\n var dep = observing[i];\n if (dep.diffValue_ === 0) {\n dep.diffValue_ = 1;\n if (i0 !== i) {\n observing[i0] = dep;\n }\n i0++;\n }\n // Upcast is 'safe' here, because if dep is IObservable, `dependenciesState` will be undefined,\n // not hitting the condition\n if (dep.dependenciesState_ > lowestNewObservingDerivationState) {\n lowestNewObservingDerivationState = dep.dependenciesState_;\n }\n }\n observing.length = i0;\n derivation.newObserving_ = null; // newObserving shouldn't be needed outside tracking (statement moved down to work around FF bug, see #614)\n // Go through all old observables and check diffValue: (it is unique after last bindDependencies)\n // 0: it's not in new observables, unobserve it\n // 1: it keeps being observed, don't want to notify it. change to 0\n l = prevObserving.length;\n while (l--) {\n var _dep = prevObserving[l];\n if (_dep.diffValue_ === 0) {\n removeObserver(_dep, derivation);\n }\n _dep.diffValue_ = 0;\n }\n // Go through all new observables and check diffValue: (now it should be unique)\n // 0: it was set to 0 in last loop. don't need to do anything.\n // 1: it wasn't observed, let's observe it. set back to 0\n while (i0--) {\n var _dep2 = observing[i0];\n if (_dep2.diffValue_ === 1) {\n _dep2.diffValue_ = 0;\n addObserver(_dep2, derivation);\n }\n }\n // Some new observed derivations may become stale during this derivation computation\n // so they have had no chance to propagate staleness (#916)\n if (lowestNewObservingDerivationState !== IDerivationState_.UP_TO_DATE_) {\n derivation.dependenciesState_ = lowestNewObservingDerivationState;\n derivation.onBecomeStale_();\n }\n}\nfunction clearObserving(derivation) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR clearObserving should be called only inside batch\");\n var obs = derivation.observing_;\n derivation.observing_ = [];\n var i = obs.length;\n while (i--) {\n removeObserver(obs[i], derivation);\n }\n derivation.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n}\nfunction untracked(action) {\n var prev = untrackedStart();\n try {\n return action();\n } finally {\n untrackedEnd(prev);\n }\n}\nfunction untrackedStart() {\n var prev = globalState.trackingDerivation;\n globalState.trackingDerivation = null;\n return prev;\n}\nfunction untrackedEnd(prev) {\n globalState.trackingDerivation = prev;\n}\nfunction allowStateReadsStart(allowStateReads) {\n var prev = globalState.allowStateReads;\n globalState.allowStateReads = allowStateReads;\n return prev;\n}\nfunction allowStateReadsEnd(prev) {\n globalState.allowStateReads = prev;\n}\n/**\r\n * needed to keep `lowestObserverState` correct. when changing from (2 or 1) to 0\r\n *\r\n */\nfunction changeDependenciesStateTo0(derivation) {\n if (derivation.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n return;\n }\n derivation.dependenciesState_ = IDerivationState_.UP_TO_DATE_;\n var obs = derivation.observing_;\n var i = obs.length;\n while (i--) {\n obs[i].lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n }\n}\n\n/**\r\n * These values will persist if global state is reset\r\n */\nvar persistentKeys = [\"mobxGuid\", \"spyListeners\", \"enforceActions\", \"computedRequiresReaction\", \"reactionRequiresObservable\", \"observableRequiresReaction\", \"allowStateReads\", \"disableErrorBoundaries\", \"runId\", \"UNCHANGED\", \"useProxies\"];\nvar MobXGlobals = function MobXGlobals() {\n this.version = 6;\n this.UNCHANGED = {};\n this.trackingDerivation = null;\n this.trackingContext = null;\n this.runId = 0;\n this.mobxGuid = 0;\n this.inBatch = 0;\n this.batchId = Number.MIN_SAFE_INTEGER;\n this.pendingUnobservations = [];\n this.pendingReactions = [];\n this.isRunningReactions = false;\n this.allowStateChanges = false;\n this.allowStateReads = true;\n this.enforceActions = true;\n this.spyListeners = [];\n this.globalReactionErrorHandlers = [];\n this.computedRequiresReaction = false;\n this.reactionRequiresObservable = false;\n this.observableRequiresReaction = false;\n this.disableErrorBoundaries = false;\n this.suppressReactionErrors = false;\n this.useProxies = true;\n this.verifyProxies = false;\n this.safeDescriptors = true;\n this.stateVersion = Number.MIN_SAFE_INTEGER;\n};\nvar canMergeGlobalState = true;\nvar isolateCalled = false;\nvar globalState = /*#__PURE__*/function () {\n var global = /*#__PURE__*/getGlobal();\n if (global.__mobxInstanceCount > 0 && !global.__mobxGlobals) {\n canMergeGlobalState = false;\n }\n if (global.__mobxGlobals && global.__mobxGlobals.version !== new MobXGlobals().version) {\n canMergeGlobalState = false;\n }\n if (!canMergeGlobalState) {\n // Because this is a IIFE we need to let isolateCalled a chance to change\n // so we run it after the event loop completed at least 1 iteration\n setTimeout(function () {\n if (!isolateCalled) {\n die(35);\n }\n }, 1);\n return new MobXGlobals();\n } else if (global.__mobxGlobals) {\n global.__mobxInstanceCount += 1;\n if (!global.__mobxGlobals.UNCHANGED) {\n global.__mobxGlobals.UNCHANGED = {};\n } // make merge backward compatible\n return global.__mobxGlobals;\n } else {\n global.__mobxInstanceCount = 1;\n return global.__mobxGlobals = /*#__PURE__*/new MobXGlobals();\n }\n}();\nfunction isolateGlobalState() {\n if (globalState.pendingReactions.length || globalState.inBatch || globalState.isRunningReactions) {\n die(36);\n }\n isolateCalled = true;\n if (canMergeGlobalState) {\n var global = getGlobal();\n if (--global.__mobxInstanceCount === 0) {\n global.__mobxGlobals = undefined;\n }\n globalState = new MobXGlobals();\n }\n}\nfunction getGlobalState() {\n return globalState;\n}\n/**\r\n * For testing purposes only; this will break the internal state of existing observables,\r\n * but can be used to get back at a stable state after throwing errors\r\n */\nfunction resetGlobalState() {\n var defaultGlobals = new MobXGlobals();\n for (var key in defaultGlobals) {\n if (persistentKeys.indexOf(key) === -1) {\n globalState[key] = defaultGlobals[key];\n }\n }\n globalState.allowStateChanges = !globalState.enforceActions;\n}\n\nfunction hasObservers(observable) {\n return observable.observers_ && observable.observers_.size > 0;\n}\nfunction getObservers(observable) {\n return observable.observers_;\n}\n// function invariantObservers(observable: IObservable) {\n// const list = observable.observers\n// const map = observable.observersIndexes\n// const l = list.length\n// for (let i = 0; i < l; i++) {\n// const id = list[i].__mapid\n// if (i) {\n// invariant(map[id] === i, \"INTERNAL ERROR maps derivation.__mapid to index in list\") // for performance\n// } else {\n// invariant(!(id in map), \"INTERNAL ERROR observer on index 0 shouldn't be held in map.\") // for performance\n// }\n// }\n// invariant(\n// list.length === 0 || Object.keys(map).length === list.length - 1,\n// \"INTERNAL ERROR there is no junk in map\"\n// )\n// }\nfunction addObserver(observable, node) {\n // invariant(node.dependenciesState !== -1, \"INTERNAL ERROR, can add only dependenciesState !== -1\");\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR add already added node\");\n // invariantObservers(observable);\n observable.observers_.add(node);\n if (observable.lowestObserverState_ > node.dependenciesState_) {\n observable.lowestObserverState_ = node.dependenciesState_;\n }\n // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR didn't add node\");\n}\n\nfunction removeObserver(observable, node) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR, remove should be called only inside batch\");\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR remove already removed node\");\n // invariantObservers(observable);\n observable.observers_[\"delete\"](node);\n if (observable.observers_.size === 0) {\n // deleting last observer\n queueForUnobservation(observable);\n }\n // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR remove already removed node2\");\n}\n\nfunction queueForUnobservation(observable) {\n if (observable.isPendingUnobservation_ === false) {\n // invariant(observable._observers.length === 0, \"INTERNAL ERROR, should only queue for unobservation unobserved observables\");\n observable.isPendingUnobservation_ = true;\n globalState.pendingUnobservations.push(observable);\n }\n}\n/**\r\n * Batch starts a transaction, at least for purposes of memoizing ComputedValues when nothing else does.\r\n * During a batch `onBecomeUnobserved` will be called at most once per observable.\r\n * Avoids unnecessary recalculations.\r\n */\nfunction startBatch() {\n if (globalState.inBatch === 0) {\n globalState.batchId = globalState.batchId < Number.MAX_SAFE_INTEGER ? globalState.batchId + 1 : Number.MIN_SAFE_INTEGER;\n }\n globalState.inBatch++;\n}\nfunction endBatch() {\n if (--globalState.inBatch === 0) {\n runReactions();\n // the batch is actually about to finish, all unobserving should happen here.\n var list = globalState.pendingUnobservations;\n for (var i = 0; i < list.length; i++) {\n var observable = list[i];\n observable.isPendingUnobservation_ = false;\n if (observable.observers_.size === 0) {\n if (observable.isBeingObserved_) {\n // if this observable had reactive observers, trigger the hooks\n observable.isBeingObserved_ = false;\n observable.onBUO();\n }\n if (observable instanceof ComputedValue) {\n // computed values are automatically teared down when the last observer leaves\n // this process happens recursively, this computed might be the last observabe of another, etc..\n observable.suspend_();\n }\n }\n }\n globalState.pendingUnobservations = [];\n }\n}\nfunction reportObserved(observable) {\n checkIfStateReadsAreAllowed(observable);\n var derivation = globalState.trackingDerivation;\n if (derivation !== null) {\n /**\r\n * Simple optimization, give each derivation run an unique id (runId)\r\n * Check if last time this observable was accessed the same runId is used\r\n * if this is the case, the relation is already known\r\n */\n if (derivation.runId_ !== observable.lastAccessedBy_) {\n observable.lastAccessedBy_ = derivation.runId_;\n // Tried storing newObserving, or observing, or both as Set, but performance didn't come close...\n derivation.newObserving_[derivation.unboundDepsCount_++] = observable;\n if (!observable.isBeingObserved_ && globalState.trackingContext) {\n observable.isBeingObserved_ = true;\n observable.onBO();\n }\n }\n return observable.isBeingObserved_;\n } else if (observable.observers_.size === 0 && globalState.inBatch > 0) {\n queueForUnobservation(observable);\n }\n return false;\n}\n// function invariantLOS(observable: IObservable, msg: string) {\n// // it's expensive so better not run it in produciton. but temporarily helpful for testing\n// const min = getObservers(observable).reduce((a, b) => Math.min(a, b.dependenciesState), 2)\n// if (min >= observable.lowestObserverState) return // <- the only assumption about `lowestObserverState`\n// throw new Error(\n// \"lowestObserverState is wrong for \" +\n// msg +\n// \" because \" +\n// min +\n// \" < \" +\n// observable.lowestObserverState\n// )\n// }\n/**\r\n * NOTE: current propagation mechanism will in case of self reruning autoruns behave unexpectedly\r\n * It will propagate changes to observers from previous run\r\n * It's hard or maybe impossible (with reasonable perf) to get it right with current approach\r\n * Hopefully self reruning autoruns aren't a feature people should depend on\r\n * Also most basic use cases should be ok\r\n */\n// Called by Atom when its value changes\nfunction propagateChanged(observable) {\n // invariantLOS(observable, \"changed start\");\n if (observable.lowestObserverState_ === IDerivationState_.STALE_) {\n return;\n }\n observable.lowestObserverState_ = IDerivationState_.STALE_;\n // Ideally we use for..of here, but the downcompiled version is really slow...\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n if (process.env.NODE_ENV !== \"production\" && d.isTracing_ !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n d.onBecomeStale_();\n }\n d.dependenciesState_ = IDerivationState_.STALE_;\n });\n // invariantLOS(observable, \"changed end\");\n}\n// Called by ComputedValue when it recalculate and its value changed\nfunction propagateChangeConfirmed(observable) {\n // invariantLOS(observable, \"confirmed start\");\n if (observable.lowestObserverState_ === IDerivationState_.STALE_) {\n return;\n }\n observable.lowestObserverState_ = IDerivationState_.STALE_;\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.POSSIBLY_STALE_) {\n d.dependenciesState_ = IDerivationState_.STALE_;\n if (process.env.NODE_ENV !== \"production\" && d.isTracing_ !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n } else if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_ // this happens during computing of `d`, just keep lowestObserverState up to date.\n ) {\n observable.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n }\n });\n // invariantLOS(observable, \"confirmed end\");\n}\n// Used by computed when its dependency changed, but we don't wan't to immediately recompute.\nfunction propagateMaybeChanged(observable) {\n // invariantLOS(observable, \"maybe start\");\n if (observable.lowestObserverState_ !== IDerivationState_.UP_TO_DATE_) {\n return;\n }\n observable.lowestObserverState_ = IDerivationState_.POSSIBLY_STALE_;\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n d.dependenciesState_ = IDerivationState_.POSSIBLY_STALE_;\n d.onBecomeStale_();\n }\n });\n // invariantLOS(observable, \"maybe end\");\n}\n\nfunction logTraceInfo(derivation, observable) {\n console.log(\"[mobx.trace] '\" + derivation.name_ + \"' is invalidated due to a change in: '\" + observable.name_ + \"'\");\n if (derivation.isTracing_ === TraceMode.BREAK) {\n var lines = [];\n printDepTree(getDependencyTree(derivation), lines, 1);\n // prettier-ignore\n new Function(\"debugger;\\n/*\\nTracing '\" + derivation.name_ + \"'\\n\\nYou are entering this break point because derivation '\" + derivation.name_ + \"' is being traced and '\" + observable.name_ + \"' is now forcing it to update.\\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\\n\\n\" + (derivation instanceof ComputedValue ? derivation.derivation.toString().replace(/[*]\\//g, \"/\") : \"\") + \"\\n\\nThe dependencies for this derivation are:\\n\\n\" + lines.join(\"\\n\") + \"\\n*/\\n \")();\n }\n}\nfunction printDepTree(tree, lines, depth) {\n if (lines.length >= 1000) {\n lines.push(\"(and many more)\");\n return;\n }\n lines.push(\"\" + \"\\t\".repeat(depth - 1) + tree.name);\n if (tree.dependencies) {\n tree.dependencies.forEach(function (child) {\n return printDepTree(child, lines, depth + 1);\n });\n }\n}\n\nvar Reaction = /*#__PURE__*/function () {\n // nodes we are looking at. Our value depends on these nodes\n\n function Reaction(name_, onInvalidate_, errorHandler_, requiresObservable_) {\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"Reaction@\" + getNextId() : \"Reaction\";\n }\n this.name_ = void 0;\n this.onInvalidate_ = void 0;\n this.errorHandler_ = void 0;\n this.requiresObservable_ = void 0;\n this.observing_ = [];\n this.newObserving_ = [];\n this.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n this.diffValue_ = 0;\n this.runId_ = 0;\n this.unboundDepsCount_ = 0;\n this.isDisposed_ = false;\n this.isScheduled_ = false;\n this.isTrackPending_ = false;\n this.isRunning_ = false;\n this.isTracing_ = TraceMode.NONE;\n this.name_ = name_;\n this.onInvalidate_ = onInvalidate_;\n this.errorHandler_ = errorHandler_;\n this.requiresObservable_ = requiresObservable_;\n }\n var _proto = Reaction.prototype;\n _proto.onBecomeStale_ = function onBecomeStale_() {\n this.schedule_();\n };\n _proto.schedule_ = function schedule_() {\n if (!this.isScheduled_) {\n this.isScheduled_ = true;\n globalState.pendingReactions.push(this);\n runReactions();\n }\n };\n _proto.isScheduled = function isScheduled() {\n return this.isScheduled_;\n }\n /**\r\n * internal, use schedule() if you intend to kick off a reaction\r\n */;\n _proto.runReaction_ = function runReaction_() {\n if (!this.isDisposed_) {\n startBatch();\n this.isScheduled_ = false;\n var prev = globalState.trackingContext;\n globalState.trackingContext = this;\n if (shouldCompute(this)) {\n this.isTrackPending_ = true;\n try {\n this.onInvalidate_();\n if (process.env.NODE_ENV !== \"production\" && this.isTrackPending_ && isSpyEnabled()) {\n // onInvalidate didn't trigger track right away..\n spyReport({\n name: this.name_,\n type: \"scheduled-reaction\"\n });\n }\n } catch (e) {\n this.reportExceptionInDerivation_(e);\n }\n }\n globalState.trackingContext = prev;\n endBatch();\n }\n };\n _proto.track = function track(fn) {\n if (this.isDisposed_) {\n return;\n // console.warn(\"Reaction already disposed\") // Note: Not a warning / error in mobx 4 either\n }\n\n startBatch();\n var notify = isSpyEnabled();\n var startTime;\n if (process.env.NODE_ENV !== \"production\" && notify) {\n startTime = Date.now();\n spyReportStart({\n name: this.name_,\n type: \"reaction\"\n });\n }\n this.isRunning_ = true;\n var prevReaction = globalState.trackingContext; // reactions could create reactions...\n globalState.trackingContext = this;\n var result = trackDerivedFunction(this, fn, undefined);\n globalState.trackingContext = prevReaction;\n this.isRunning_ = false;\n this.isTrackPending_ = false;\n if (this.isDisposed_) {\n // disposed during last run. Clean up everything that was bound after the dispose call.\n clearObserving(this);\n }\n if (isCaughtException(result)) {\n this.reportExceptionInDerivation_(result.cause);\n }\n if (process.env.NODE_ENV !== \"production\" && notify) {\n spyReportEnd({\n time: Date.now() - startTime\n });\n }\n endBatch();\n };\n _proto.reportExceptionInDerivation_ = function reportExceptionInDerivation_(error) {\n var _this = this;\n if (this.errorHandler_) {\n this.errorHandler_(error, this);\n return;\n }\n if (globalState.disableErrorBoundaries) {\n throw error;\n }\n var message = process.env.NODE_ENV !== \"production\" ? \"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '\" + this + \"'\" : \"[mobx] uncaught error in '\" + this + \"'\";\n if (!globalState.suppressReactionErrors) {\n console.error(message, error);\n /** If debugging brought you here, please, read the above message :-). Tnx! */\n } else if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"[mobx] (error in reaction '\" + this.name_ + \"' suppressed, fix error of causing action below)\");\n } // prettier-ignore\n if (process.env.NODE_ENV !== \"production\" && isSpyEnabled()) {\n spyReport({\n type: \"error\",\n name: this.name_,\n message: message,\n error: \"\" + error\n });\n }\n globalState.globalReactionErrorHandlers.forEach(function (f) {\n return f(error, _this);\n });\n };\n _proto.dispose = function dispose() {\n if (!this.isDisposed_) {\n this.isDisposed_ = true;\n if (!this.isRunning_) {\n // if disposed while running, clean up later. Maybe not optimal, but rare case\n startBatch();\n clearObserving(this);\n endBatch();\n }\n }\n };\n _proto.getDisposer_ = function getDisposer_(abortSignal) {\n var _this2 = this;\n var dispose = function dispose() {\n _this2.dispose();\n abortSignal == null ? void 0 : abortSignal.removeEventListener == null ? void 0 : abortSignal.removeEventListener(\"abort\", dispose);\n };\n abortSignal == null ? void 0 : abortSignal.addEventListener == null ? void 0 : abortSignal.addEventListener(\"abort\", dispose);\n dispose[$mobx] = this;\n return dispose;\n };\n _proto.toString = function toString() {\n return \"Reaction[\" + this.name_ + \"]\";\n };\n _proto.trace = function trace$1(enterBreakPoint) {\n if (enterBreakPoint === void 0) {\n enterBreakPoint = false;\n }\n trace(this, enterBreakPoint);\n };\n return Reaction;\n}();\nfunction onReactionError(handler) {\n globalState.globalReactionErrorHandlers.push(handler);\n return function () {\n var idx = globalState.globalReactionErrorHandlers.indexOf(handler);\n if (idx >= 0) {\n globalState.globalReactionErrorHandlers.splice(idx, 1);\n }\n };\n}\n/**\r\n * Magic number alert!\r\n * Defines within how many times a reaction is allowed to re-trigger itself\r\n * until it is assumed that this is gonna be a never ending loop...\r\n */\nvar MAX_REACTION_ITERATIONS = 100;\nvar reactionScheduler = function reactionScheduler(f) {\n return f();\n};\nfunction runReactions() {\n // Trampolining, if runReactions are already running, new reactions will be picked up\n if (globalState.inBatch > 0 || globalState.isRunningReactions) {\n return;\n }\n reactionScheduler(runReactionsHelper);\n}\nfunction runReactionsHelper() {\n globalState.isRunningReactions = true;\n var allReactions = globalState.pendingReactions;\n var iterations = 0;\n // While running reactions, new reactions might be triggered.\n // Hence we work with two variables and check whether\n // we converge to no remaining reactions after a while.\n while (allReactions.length > 0) {\n if (++iterations === MAX_REACTION_ITERATIONS) {\n console.error(process.env.NODE_ENV !== \"production\" ? \"Reaction doesn't converge to a stable state after \" + MAX_REACTION_ITERATIONS + \" iterations.\" + (\" Probably there is a cycle in the reactive function: \" + allReactions[0]) : \"[mobx] cycle in reaction: \" + allReactions[0]);\n allReactions.splice(0); // clear reactions\n }\n\n var remainingReactions = allReactions.splice(0);\n for (var i = 0, l = remainingReactions.length; i < l; i++) {\n remainingReactions[i].runReaction_();\n }\n }\n globalState.isRunningReactions = false;\n}\nvar isReaction = /*#__PURE__*/createInstanceofPredicate(\"Reaction\", Reaction);\nfunction setReactionScheduler(fn) {\n var baseScheduler = reactionScheduler;\n reactionScheduler = function reactionScheduler(f) {\n return fn(function () {\n return baseScheduler(f);\n });\n };\n}\n\nfunction isSpyEnabled() {\n return process.env.NODE_ENV !== \"production\" && !!globalState.spyListeners.length;\n}\nfunction spyReport(event) {\n if (!(process.env.NODE_ENV !== \"production\")) {\n return;\n } // dead code elimination can do the rest\n if (!globalState.spyListeners.length) {\n return;\n }\n var listeners = globalState.spyListeners;\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](event);\n }\n}\nfunction spyReportStart(event) {\n if (!(process.env.NODE_ENV !== \"production\")) {\n return;\n }\n var change = _extends({}, event, {\n spyReportStart: true\n });\n spyReport(change);\n}\nvar END_EVENT = {\n type: \"report-end\",\n spyReportEnd: true\n};\nfunction spyReportEnd(change) {\n if (!(process.env.NODE_ENV !== \"production\")) {\n return;\n }\n if (change) {\n spyReport(_extends({}, change, {\n type: \"report-end\",\n spyReportEnd: true\n }));\n } else {\n spyReport(END_EVENT);\n }\n}\nfunction spy(listener) {\n if (!(process.env.NODE_ENV !== \"production\")) {\n console.warn(\"[mobx.spy] Is a no-op in production builds\");\n return function () {};\n } else {\n globalState.spyListeners.push(listener);\n return once(function () {\n globalState.spyListeners = globalState.spyListeners.filter(function (l) {\n return l !== listener;\n });\n });\n }\n}\n\nvar ACTION = \"action\";\nvar ACTION_BOUND = \"action.bound\";\nvar AUTOACTION = \"autoAction\";\nvar AUTOACTION_BOUND = \"autoAction.bound\";\nvar DEFAULT_ACTION_NAME = \"\";\nvar actionAnnotation = /*#__PURE__*/createActionAnnotation(ACTION);\nvar actionBoundAnnotation = /*#__PURE__*/createActionAnnotation(ACTION_BOUND, {\n bound: true\n});\nvar autoActionAnnotation = /*#__PURE__*/createActionAnnotation(AUTOACTION, {\n autoAction: true\n});\nvar autoActionBoundAnnotation = /*#__PURE__*/createActionAnnotation(AUTOACTION_BOUND, {\n autoAction: true,\n bound: true\n});\nfunction createActionFactory(autoAction) {\n var res = function action(arg1, arg2) {\n // action(fn() {})\n if (isFunction(arg1)) {\n return createAction(arg1.name || DEFAULT_ACTION_NAME, arg1, autoAction);\n }\n // action(\"name\", fn() {})\n if (isFunction(arg2)) {\n return createAction(arg1, arg2, autoAction);\n }\n // @action\n if (isStringish(arg2)) {\n return storeAnnotation(arg1, arg2, autoAction ? autoActionAnnotation : actionAnnotation);\n }\n // action(\"name\") & @action(\"name\")\n if (isStringish(arg1)) {\n return createDecoratorAnnotation(createActionAnnotation(autoAction ? AUTOACTION : ACTION, {\n name: arg1,\n autoAction: autoAction\n }));\n }\n if (process.env.NODE_ENV !== \"production\") {\n die(\"Invalid arguments for `action`\");\n }\n };\n return res;\n}\nvar action = /*#__PURE__*/createActionFactory(false);\nObject.assign(action, actionAnnotation);\nvar autoAction = /*#__PURE__*/createActionFactory(true);\nObject.assign(autoAction, autoActionAnnotation);\naction.bound = /*#__PURE__*/createDecoratorAnnotation(actionBoundAnnotation);\nautoAction.bound = /*#__PURE__*/createDecoratorAnnotation(autoActionBoundAnnotation);\nfunction runInAction(fn) {\n return executeAction(fn.name || DEFAULT_ACTION_NAME, false, fn, this, undefined);\n}\nfunction isAction(thing) {\n return isFunction(thing) && thing.isMobxAction === true;\n}\n\n/**\r\n * Creates a named reactive view and keeps it alive, so that the view is always\r\n * updated if one of the dependencies changes, even when the view is not further used by something else.\r\n * @param view The reactive view\r\n * @returns disposer function, which can be used to stop the view from being updated in the future.\r\n */\nfunction autorun(view, opts) {\n var _opts$name, _opts, _opts2, _opts2$signal, _opts3;\n if (opts === void 0) {\n opts = EMPTY_OBJECT;\n }\n if (process.env.NODE_ENV !== \"production\") {\n if (!isFunction(view)) {\n die(\"Autorun expects a function as first argument\");\n }\n if (isAction(view)) {\n die(\"Autorun does not accept actions since actions are untrackable\");\n }\n }\n var name = (_opts$name = (_opts = opts) == null ? void 0 : _opts.name) != null ? _opts$name : process.env.NODE_ENV !== \"production\" ? view.name || \"Autorun@\" + getNextId() : \"Autorun\";\n var runSync = !opts.scheduler && !opts.delay;\n var reaction;\n if (runSync) {\n // normal autorun\n reaction = new Reaction(name, function () {\n this.track(reactionRunner);\n }, opts.onError, opts.requiresObservable);\n } else {\n var scheduler = createSchedulerFromOptions(opts);\n // debounced autorun\n var isScheduled = false;\n reaction = new Reaction(name, function () {\n if (!isScheduled) {\n isScheduled = true;\n scheduler(function () {\n isScheduled = false;\n if (!reaction.isDisposed_) {\n reaction.track(reactionRunner);\n }\n });\n }\n }, opts.onError, opts.requiresObservable);\n }\n function reactionRunner() {\n view(reaction);\n }\n if (!((_opts2 = opts) != null && (_opts2$signal = _opts2.signal) != null && _opts2$signal.aborted)) {\n reaction.schedule_();\n }\n return reaction.getDisposer_((_opts3 = opts) == null ? void 0 : _opts3.signal);\n}\nvar run = function run(f) {\n return f();\n};\nfunction createSchedulerFromOptions(opts) {\n return opts.scheduler ? opts.scheduler : opts.delay ? function (f) {\n return setTimeout(f, opts.delay);\n } : run;\n}\nfunction reaction(expression, effect, opts) {\n var _opts$name2, _opts4, _opts4$signal, _opts5;\n if (opts === void 0) {\n opts = EMPTY_OBJECT;\n }\n if (process.env.NODE_ENV !== \"production\") {\n if (!isFunction(expression) || !isFunction(effect)) {\n die(\"First and second argument to reaction should be functions\");\n }\n if (!isPlainObject(opts)) {\n die(\"Third argument of reactions should be an object\");\n }\n }\n var name = (_opts$name2 = opts.name) != null ? _opts$name2 : process.env.NODE_ENV !== \"production\" ? \"Reaction@\" + getNextId() : \"Reaction\";\n var effectAction = action(name, opts.onError ? wrapErrorHandler(opts.onError, effect) : effect);\n var runSync = !opts.scheduler && !opts.delay;\n var scheduler = createSchedulerFromOptions(opts);\n var firstTime = true;\n var isScheduled = false;\n var value;\n var oldValue;\n var equals = opts.compareStructural ? comparer.structural : opts.equals || comparer[\"default\"];\n var r = new Reaction(name, function () {\n if (firstTime || runSync) {\n reactionRunner();\n } else if (!isScheduled) {\n isScheduled = true;\n scheduler(reactionRunner);\n }\n }, opts.onError, opts.requiresObservable);\n function reactionRunner() {\n isScheduled = false;\n if (r.isDisposed_) {\n return;\n }\n var changed = false;\n r.track(function () {\n var nextValue = allowStateChanges(false, function () {\n return expression(r);\n });\n changed = firstTime || !equals(value, nextValue);\n oldValue = value;\n value = nextValue;\n });\n if (firstTime && opts.fireImmediately) {\n effectAction(value, oldValue, r);\n } else if (!firstTime && changed) {\n effectAction(value, oldValue, r);\n }\n firstTime = false;\n }\n if (!((_opts4 = opts) != null && (_opts4$signal = _opts4.signal) != null && _opts4$signal.aborted)) {\n r.schedule_();\n }\n return r.getDisposer_((_opts5 = opts) == null ? void 0 : _opts5.signal);\n}\nfunction wrapErrorHandler(errorHandler, baseFn) {\n return function () {\n try {\n return baseFn.apply(this, arguments);\n } catch (e) {\n errorHandler.call(this, e);\n }\n };\n}\n\nvar ON_BECOME_OBSERVED = \"onBO\";\nvar ON_BECOME_UNOBSERVED = \"onBUO\";\nfunction onBecomeObserved(thing, arg2, arg3) {\n return interceptHook(ON_BECOME_OBSERVED, thing, arg2, arg3);\n}\nfunction onBecomeUnobserved(thing, arg2, arg3) {\n return interceptHook(ON_BECOME_UNOBSERVED, thing, arg2, arg3);\n}\nfunction interceptHook(hook, thing, arg2, arg3) {\n var atom = typeof arg3 === \"function\" ? getAtom(thing, arg2) : getAtom(thing);\n var cb = isFunction(arg3) ? arg3 : arg2;\n var listenersKey = hook + \"L\";\n if (atom[listenersKey]) {\n atom[listenersKey].add(cb);\n } else {\n atom[listenersKey] = new Set([cb]);\n }\n return function () {\n var hookListeners = atom[listenersKey];\n if (hookListeners) {\n hookListeners[\"delete\"](cb);\n if (hookListeners.size === 0) {\n delete atom[listenersKey];\n }\n }\n };\n}\n\nvar NEVER = \"never\";\nvar ALWAYS = \"always\";\nvar OBSERVED = \"observed\";\n// const IF_AVAILABLE = \"ifavailable\"\nfunction configure(options) {\n if (options.isolateGlobalState === true) {\n isolateGlobalState();\n }\n var useProxies = options.useProxies,\n enforceActions = options.enforceActions;\n if (useProxies !== undefined) {\n globalState.useProxies = useProxies === ALWAYS ? true : useProxies === NEVER ? false : typeof Proxy !== \"undefined\";\n }\n if (useProxies === \"ifavailable\") {\n globalState.verifyProxies = true;\n }\n if (enforceActions !== undefined) {\n var ea = enforceActions === ALWAYS ? ALWAYS : enforceActions === OBSERVED;\n globalState.enforceActions = ea;\n globalState.allowStateChanges = ea === true || ea === ALWAYS ? false : true;\n }\n [\"computedRequiresReaction\", \"reactionRequiresObservable\", \"observableRequiresReaction\", \"disableErrorBoundaries\", \"safeDescriptors\"].forEach(function (key) {\n if (key in options) {\n globalState[key] = !!options[key];\n }\n });\n globalState.allowStateReads = !globalState.observableRequiresReaction;\n if (process.env.NODE_ENV !== \"production\" && globalState.disableErrorBoundaries === true) {\n console.warn(\"WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled.\");\n }\n if (options.reactionScheduler) {\n setReactionScheduler(options.reactionScheduler);\n }\n}\n\nfunction extendObservable(target, properties, annotations, options) {\n if (process.env.NODE_ENV !== \"production\") {\n if (arguments.length > 4) {\n die(\"'extendObservable' expected 2-4 arguments\");\n }\n if (typeof target !== \"object\") {\n die(\"'extendObservable' expects an object as first argument\");\n }\n if (isObservableMap(target)) {\n die(\"'extendObservable' should not be used on maps, use map.merge instead\");\n }\n if (!isPlainObject(properties)) {\n die(\"'extendObservable' only accepts plain objects as second argument\");\n }\n if (isObservable(properties) || isObservable(annotations)) {\n die(\"Extending an object with another observable (object) is not supported\");\n }\n }\n // Pull descriptors first, so we don't have to deal with props added by administration ($mobx)\n var descriptors = getOwnPropertyDescriptors(properties);\n initObservable(function () {\n var adm = asObservableObject(target, options)[$mobx];\n ownKeys(descriptors).forEach(function (key) {\n adm.extend_(key, descriptors[key],\n // must pass \"undefined\" for { key: undefined }\n !annotations ? true : key in annotations ? annotations[key] : true);\n });\n });\n return target;\n}\n\nfunction getDependencyTree(thing, property) {\n return nodeToDependencyTree(getAtom(thing, property));\n}\nfunction nodeToDependencyTree(node) {\n var result = {\n name: node.name_\n };\n if (node.observing_ && node.observing_.length > 0) {\n result.dependencies = unique(node.observing_).map(nodeToDependencyTree);\n }\n return result;\n}\nfunction getObserverTree(thing, property) {\n return nodeToObserverTree(getAtom(thing, property));\n}\nfunction nodeToObserverTree(node) {\n var result = {\n name: node.name_\n };\n if (hasObservers(node)) {\n result.observers = Array.from(getObservers(node)).map(nodeToObserverTree);\n }\n return result;\n}\nfunction unique(list) {\n return Array.from(new Set(list));\n}\n\nvar generatorId = 0;\nfunction FlowCancellationError() {\n this.message = \"FLOW_CANCELLED\";\n}\nFlowCancellationError.prototype = /*#__PURE__*/Object.create(Error.prototype);\nfunction isFlowCancellationError(error) {\n return error instanceof FlowCancellationError;\n}\nvar flowAnnotation = /*#__PURE__*/createFlowAnnotation(\"flow\");\nvar flowBoundAnnotation = /*#__PURE__*/createFlowAnnotation(\"flow.bound\", {\n bound: true\n});\nvar flow = /*#__PURE__*/Object.assign(function flow(arg1, arg2) {\n // @flow\n if (isStringish(arg2)) {\n return storeAnnotation(arg1, arg2, flowAnnotation);\n }\n // flow(fn)\n if (process.env.NODE_ENV !== \"production\" && arguments.length !== 1) {\n die(\"Flow expects single argument with generator function\");\n }\n var generator = arg1;\n var name = generator.name || \"\";\n // Implementation based on https://github.com/tj/co/blob/master/index.js\n var res = function res() {\n var ctx = this;\n var args = arguments;\n var runId = ++generatorId;\n var gen = action(name + \" - runid: \" + runId + \" - init\", generator).apply(ctx, args);\n var rejector;\n var pendingPromise = undefined;\n var promise = new Promise(function (resolve, reject) {\n var stepId = 0;\n rejector = reject;\n function onFulfilled(res) {\n pendingPromise = undefined;\n var ret;\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen.next).call(gen, res);\n } catch (e) {\n return reject(e);\n }\n next(ret);\n }\n function onRejected(err) {\n pendingPromise = undefined;\n var ret;\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen[\"throw\"]).call(gen, err);\n } catch (e) {\n return reject(e);\n }\n next(ret);\n }\n function next(ret) {\n if (isFunction(ret == null ? void 0 : ret.then)) {\n // an async iterator\n ret.then(next, reject);\n return;\n }\n if (ret.done) {\n return resolve(ret.value);\n }\n pendingPromise = Promise.resolve(ret.value);\n return pendingPromise.then(onFulfilled, onRejected);\n }\n onFulfilled(undefined); // kick off the process\n });\n\n promise.cancel = action(name + \" - runid: \" + runId + \" - cancel\", function () {\n try {\n if (pendingPromise) {\n cancelPromise(pendingPromise);\n }\n // Finally block can return (or yield) stuff..\n var _res = gen[\"return\"](undefined);\n // eat anything that promise would do, it's cancelled!\n var yieldedPromise = Promise.resolve(_res.value);\n yieldedPromise.then(noop, noop);\n cancelPromise(yieldedPromise); // maybe it can be cancelled :)\n // reject our original promise\n rejector(new FlowCancellationError());\n } catch (e) {\n rejector(e); // there could be a throwing finally block\n }\n });\n\n return promise;\n };\n res.isMobXFlow = true;\n return res;\n}, flowAnnotation);\nflow.bound = /*#__PURE__*/createDecoratorAnnotation(flowBoundAnnotation);\nfunction cancelPromise(promise) {\n if (isFunction(promise.cancel)) {\n promise.cancel();\n }\n}\nfunction flowResult(result) {\n return result; // just tricking TypeScript :)\n}\n\nfunction isFlow(fn) {\n return (fn == null ? void 0 : fn.isMobXFlow) === true;\n}\n\nfunction interceptReads(thing, propOrHandler, handler) {\n var target;\n if (isObservableMap(thing) || isObservableArray(thing) || isObservableValue(thing)) {\n target = getAdministration(thing);\n } else if (isObservableObject(thing)) {\n if (process.env.NODE_ENV !== \"production\" && !isStringish(propOrHandler)) {\n return die(\"InterceptReads can only be used with a specific property, not with an object in general\");\n }\n target = getAdministration(thing, propOrHandler);\n } else if (process.env.NODE_ENV !== \"production\") {\n return die(\"Expected observable map, object or array as first array\");\n }\n if (process.env.NODE_ENV !== \"production\" && target.dehancer !== undefined) {\n return die(\"An intercept reader was already established\");\n }\n target.dehancer = typeof propOrHandler === \"function\" ? propOrHandler : handler;\n return function () {\n target.dehancer = undefined;\n };\n}\n\nfunction intercept(thing, propOrHandler, handler) {\n if (isFunction(handler)) {\n return interceptProperty(thing, propOrHandler, handler);\n } else {\n return interceptInterceptable(thing, propOrHandler);\n }\n}\nfunction interceptInterceptable(thing, handler) {\n return getAdministration(thing).intercept_(handler);\n}\nfunction interceptProperty(thing, property, handler) {\n return getAdministration(thing, property).intercept_(handler);\n}\n\nfunction _isComputed(value, property) {\n if (property === undefined) {\n return isComputedValue(value);\n }\n if (isObservableObject(value) === false) {\n return false;\n }\n if (!value[$mobx].values_.has(property)) {\n return false;\n }\n var atom = getAtom(value, property);\n return isComputedValue(atom);\n}\nfunction isComputed(value) {\n if (process.env.NODE_ENV !== \"production\" && arguments.length > 1) {\n return die(\"isComputed expects only 1 argument. Use isComputedProp to inspect the observability of a property\");\n }\n return _isComputed(value);\n}\nfunction isComputedProp(value, propName) {\n if (process.env.NODE_ENV !== \"production\" && !isStringish(propName)) {\n return die(\"isComputed expected a property name as second argument\");\n }\n return _isComputed(value, propName);\n}\n\nfunction _isObservable(value, property) {\n if (!value) {\n return false;\n }\n if (property !== undefined) {\n if (process.env.NODE_ENV !== \"production\" && (isObservableMap(value) || isObservableArray(value))) {\n return die(\"isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.\");\n }\n if (isObservableObject(value)) {\n return value[$mobx].values_.has(property);\n }\n return false;\n }\n // For first check, see #701\n return isObservableObject(value) || !!value[$mobx] || isAtom(value) || isReaction(value) || isComputedValue(value);\n}\nfunction isObservable(value) {\n if (process.env.NODE_ENV !== \"production\" && arguments.length !== 1) {\n die(\"isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property\");\n }\n return _isObservable(value);\n}\nfunction isObservableProp(value, propName) {\n if (process.env.NODE_ENV !== \"production\" && !isStringish(propName)) {\n return die(\"expected a property name as second argument\");\n }\n return _isObservable(value, propName);\n}\n\nfunction keys(obj) {\n if (isObservableObject(obj)) {\n return obj[$mobx].keys_();\n }\n if (isObservableMap(obj) || isObservableSet(obj)) {\n return Array.from(obj.keys());\n }\n if (isObservableArray(obj)) {\n return obj.map(function (_, index) {\n return index;\n });\n }\n die(5);\n}\nfunction values(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) {\n return obj[key];\n });\n }\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) {\n return obj.get(key);\n });\n }\n if (isObservableSet(obj)) {\n return Array.from(obj.values());\n }\n if (isObservableArray(obj)) {\n return obj.slice();\n }\n die(6);\n}\nfunction entries(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) {\n return [key, obj[key]];\n });\n }\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) {\n return [key, obj.get(key)];\n });\n }\n if (isObservableSet(obj)) {\n return Array.from(obj.entries());\n }\n if (isObservableArray(obj)) {\n return obj.map(function (key, index) {\n return [index, key];\n });\n }\n die(7);\n}\nfunction set(obj, key, value) {\n if (arguments.length === 2 && !isObservableSet(obj)) {\n startBatch();\n var _values = key;\n try {\n for (var _key in _values) {\n set(obj, _key, _values[_key]);\n }\n } finally {\n endBatch();\n }\n return;\n }\n if (isObservableObject(obj)) {\n obj[$mobx].set_(key, value);\n } else if (isObservableMap(obj)) {\n obj.set(key, value);\n } else if (isObservableSet(obj)) {\n obj.add(key);\n } else if (isObservableArray(obj)) {\n if (typeof key !== \"number\") {\n key = parseInt(key, 10);\n }\n if (key < 0) {\n die(\"Invalid index: '\" + key + \"'\");\n }\n startBatch();\n if (key >= obj.length) {\n obj.length = key + 1;\n }\n obj[key] = value;\n endBatch();\n } else {\n die(8);\n }\n}\nfunction remove(obj, key) {\n if (isObservableObject(obj)) {\n obj[$mobx].delete_(key);\n } else if (isObservableMap(obj)) {\n obj[\"delete\"](key);\n } else if (isObservableSet(obj)) {\n obj[\"delete\"](key);\n } else if (isObservableArray(obj)) {\n if (typeof key !== \"number\") {\n key = parseInt(key, 10);\n }\n obj.splice(key, 1);\n } else {\n die(9);\n }\n}\nfunction has(obj, key) {\n if (isObservableObject(obj)) {\n return obj[$mobx].has_(key);\n } else if (isObservableMap(obj)) {\n return obj.has(key);\n } else if (isObservableSet(obj)) {\n return obj.has(key);\n } else if (isObservableArray(obj)) {\n return key >= 0 && key < obj.length;\n }\n die(10);\n}\nfunction get(obj, key) {\n if (!has(obj, key)) {\n return undefined;\n }\n if (isObservableObject(obj)) {\n return obj[$mobx].get_(key);\n } else if (isObservableMap(obj)) {\n return obj.get(key);\n } else if (isObservableArray(obj)) {\n return obj[key];\n }\n die(11);\n}\nfunction apiDefineProperty(obj, key, descriptor) {\n if (isObservableObject(obj)) {\n return obj[$mobx].defineProperty_(key, descriptor);\n }\n die(39);\n}\nfunction apiOwnKeys(obj) {\n if (isObservableObject(obj)) {\n return obj[$mobx].ownKeys_();\n }\n die(38);\n}\n\nfunction observe(thing, propOrCb, cbOrFire, fireImmediately) {\n if (isFunction(cbOrFire)) {\n return observeObservableProperty(thing, propOrCb, cbOrFire, fireImmediately);\n } else {\n return observeObservable(thing, propOrCb, cbOrFire);\n }\n}\nfunction observeObservable(thing, listener, fireImmediately) {\n return getAdministration(thing).observe_(listener, fireImmediately);\n}\nfunction observeObservableProperty(thing, property, listener, fireImmediately) {\n return getAdministration(thing, property).observe_(listener, fireImmediately);\n}\n\nfunction cache(map, key, value) {\n map.set(key, value);\n return value;\n}\nfunction toJSHelper(source, __alreadySeen) {\n if (source == null || typeof source !== \"object\" || source instanceof Date || !isObservable(source)) {\n return source;\n }\n if (isObservableValue(source) || isComputedValue(source)) {\n return toJSHelper(source.get(), __alreadySeen);\n }\n if (__alreadySeen.has(source)) {\n return __alreadySeen.get(source);\n }\n if (isObservableArray(source)) {\n var res = cache(__alreadySeen, source, new Array(source.length));\n source.forEach(function (value, idx) {\n res[idx] = toJSHelper(value, __alreadySeen);\n });\n return res;\n }\n if (isObservableSet(source)) {\n var _res = cache(__alreadySeen, source, new Set());\n source.forEach(function (value) {\n _res.add(toJSHelper(value, __alreadySeen));\n });\n return _res;\n }\n if (isObservableMap(source)) {\n var _res2 = cache(__alreadySeen, source, new Map());\n source.forEach(function (value, key) {\n _res2.set(key, toJSHelper(value, __alreadySeen));\n });\n return _res2;\n } else {\n // must be observable object\n var _res3 = cache(__alreadySeen, source, {});\n apiOwnKeys(source).forEach(function (key) {\n if (objectPrototype.propertyIsEnumerable.call(source, key)) {\n _res3[key] = toJSHelper(source[key], __alreadySeen);\n }\n });\n return _res3;\n }\n}\n/**\r\n * Recursively converts an observable to it's non-observable native counterpart.\r\n * It does NOT recurse into non-observables, these are left as they are, even if they contain observables.\r\n * Computed and other non-enumerable properties are completely ignored.\r\n * Complex scenarios require custom solution, eg implementing `toJSON` or using `serializr` lib.\r\n */\nfunction toJS(source, options) {\n if (process.env.NODE_ENV !== \"production\" && options) {\n die(\"toJS no longer supports options\");\n }\n return toJSHelper(source, new Map());\n}\n\nfunction trace() {\n if (!(process.env.NODE_ENV !== \"production\")) {\n return;\n }\n var enterBreakPoint = false;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (typeof args[args.length - 1] === \"boolean\") {\n enterBreakPoint = args.pop();\n }\n var derivation = getAtomFromArgs(args);\n if (!derivation) {\n return die(\"'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly\");\n }\n if (derivation.isTracing_ === TraceMode.NONE) {\n console.log(\"[mobx.trace] '\" + derivation.name_ + \"' tracing enabled\");\n }\n derivation.isTracing_ = enterBreakPoint ? TraceMode.BREAK : TraceMode.LOG;\n}\nfunction getAtomFromArgs(args) {\n switch (args.length) {\n case 0:\n return globalState.trackingDerivation;\n case 1:\n return getAtom(args[0]);\n case 2:\n return getAtom(args[0], args[1]);\n }\n}\n\n/**\r\n * During a transaction no views are updated until the end of the transaction.\r\n * The transaction will be run synchronously nonetheless.\r\n *\r\n * @param action a function that updates some reactive state\r\n * @returns any value that was returned by the 'action' parameter.\r\n */\nfunction transaction(action, thisArg) {\n if (thisArg === void 0) {\n thisArg = undefined;\n }\n startBatch();\n try {\n return action.apply(thisArg);\n } finally {\n endBatch();\n }\n}\n\nfunction when(predicate, arg1, arg2) {\n if (arguments.length === 1 || arg1 && typeof arg1 === \"object\") {\n return whenPromise(predicate, arg1);\n }\n return _when(predicate, arg1, arg2 || {});\n}\nfunction _when(predicate, effect, opts) {\n var timeoutHandle;\n if (typeof opts.timeout === \"number\") {\n var error = new Error(\"WHEN_TIMEOUT\");\n timeoutHandle = setTimeout(function () {\n if (!disposer[$mobx].isDisposed_) {\n disposer();\n if (opts.onError) {\n opts.onError(error);\n } else {\n throw error;\n }\n }\n }, opts.timeout);\n }\n opts.name = process.env.NODE_ENV !== \"production\" ? opts.name || \"When@\" + getNextId() : \"When\";\n var effectAction = createAction(process.env.NODE_ENV !== \"production\" ? opts.name + \"-effect\" : \"When-effect\", effect);\n // eslint-disable-next-line\n var disposer = autorun(function (r) {\n // predicate should not change state\n var cond = allowStateChanges(false, predicate);\n if (cond) {\n r.dispose();\n if (timeoutHandle) {\n clearTimeout(timeoutHandle);\n }\n effectAction();\n }\n }, opts);\n return disposer;\n}\nfunction whenPromise(predicate, opts) {\n var _opts$signal;\n if (process.env.NODE_ENV !== \"production\" && opts && opts.onError) {\n return die(\"the options 'onError' and 'promise' cannot be combined\");\n }\n if (opts != null && (_opts$signal = opts.signal) != null && _opts$signal.aborted) {\n return Object.assign(Promise.reject(new Error(\"WHEN_ABORTED\")), {\n cancel: function cancel() {\n return null;\n }\n });\n }\n var cancel;\n var abort;\n var res = new Promise(function (resolve, reject) {\n var _opts$signal2;\n var disposer = _when(predicate, resolve, _extends({}, opts, {\n onError: reject\n }));\n cancel = function cancel() {\n disposer();\n reject(new Error(\"WHEN_CANCELLED\"));\n };\n abort = function abort() {\n disposer();\n reject(new Error(\"WHEN_ABORTED\"));\n };\n opts == null ? void 0 : (_opts$signal2 = opts.signal) == null ? void 0 : _opts$signal2.addEventListener == null ? void 0 : _opts$signal2.addEventListener(\"abort\", abort);\n })[\"finally\"](function () {\n var _opts$signal3;\n return opts == null ? void 0 : (_opts$signal3 = opts.signal) == null ? void 0 : _opts$signal3.removeEventListener == null ? void 0 : _opts$signal3.removeEventListener(\"abort\", abort);\n });\n res.cancel = cancel;\n return res;\n}\n\nfunction getAdm(target) {\n return target[$mobx];\n}\n// Optimization: we don't need the intermediate objects and could have a completely custom administration for DynamicObjects,\n// and skip either the internal values map, or the base object with its property descriptors!\nvar objectProxyTraps = {\n has: function has(target, name) {\n if (process.env.NODE_ENV !== \"production\" && globalState.trackingDerivation) {\n warnAboutProxyRequirement(\"detect new properties using the 'in' operator. Use 'has' from 'mobx' instead.\");\n }\n return getAdm(target).has_(name);\n },\n get: function get(target, name) {\n return getAdm(target).get_(name);\n },\n set: function set(target, name, value) {\n var _getAdm$set_;\n if (!isStringish(name)) {\n return false;\n }\n if (process.env.NODE_ENV !== \"production\" && !getAdm(target).values_.has(name)) {\n warnAboutProxyRequirement(\"add a new observable property through direct assignment. Use 'set' from 'mobx' instead.\");\n }\n // null (intercepted) -> true (success)\n return (_getAdm$set_ = getAdm(target).set_(name, value, true)) != null ? _getAdm$set_ : true;\n },\n deleteProperty: function deleteProperty(target, name) {\n var _getAdm$delete_;\n if (process.env.NODE_ENV !== \"production\") {\n warnAboutProxyRequirement(\"delete properties from an observable object. Use 'remove' from 'mobx' instead.\");\n }\n if (!isStringish(name)) {\n return false;\n }\n // null (intercepted) -> true (success)\n return (_getAdm$delete_ = getAdm(target).delete_(name, true)) != null ? _getAdm$delete_ : true;\n },\n defineProperty: function defineProperty(target, name, descriptor) {\n var _getAdm$definePropert;\n if (process.env.NODE_ENV !== \"production\") {\n warnAboutProxyRequirement(\"define property on an observable object. Use 'defineProperty' from 'mobx' instead.\");\n }\n // null (intercepted) -> true (success)\n return (_getAdm$definePropert = getAdm(target).defineProperty_(name, descriptor)) != null ? _getAdm$definePropert : true;\n },\n ownKeys: function ownKeys(target) {\n if (process.env.NODE_ENV !== \"production\" && globalState.trackingDerivation) {\n warnAboutProxyRequirement(\"iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead.\");\n }\n return getAdm(target).ownKeys_();\n },\n preventExtensions: function preventExtensions(target) {\n die(13);\n }\n};\nfunction asDynamicObservableObject(target, options) {\n var _target$$mobx, _target$$mobx$proxy_;\n assertProxies();\n target = asObservableObject(target, options);\n return (_target$$mobx$proxy_ = (_target$$mobx = target[$mobx]).proxy_) != null ? _target$$mobx$proxy_ : _target$$mobx.proxy_ = new Proxy(target, objectProxyTraps);\n}\n\nfunction hasInterceptors(interceptable) {\n return interceptable.interceptors_ !== undefined && interceptable.interceptors_.length > 0;\n}\nfunction registerInterceptor(interceptable, handler) {\n var interceptors = interceptable.interceptors_ || (interceptable.interceptors_ = []);\n interceptors.push(handler);\n return once(function () {\n var idx = interceptors.indexOf(handler);\n if (idx !== -1) {\n interceptors.splice(idx, 1);\n }\n });\n}\nfunction interceptChange(interceptable, change) {\n var prevU = untrackedStart();\n try {\n // Interceptor can modify the array, copy it to avoid concurrent modification, see #1950\n var interceptors = [].concat(interceptable.interceptors_ || []);\n for (var i = 0, l = interceptors.length; i < l; i++) {\n change = interceptors[i](change);\n if (change && !change.type) {\n die(14);\n }\n if (!change) {\n break;\n }\n }\n return change;\n } finally {\n untrackedEnd(prevU);\n }\n}\n\nfunction hasListeners(listenable) {\n return listenable.changeListeners_ !== undefined && listenable.changeListeners_.length > 0;\n}\nfunction registerListener(listenable, handler) {\n var listeners = listenable.changeListeners_ || (listenable.changeListeners_ = []);\n listeners.push(handler);\n return once(function () {\n var idx = listeners.indexOf(handler);\n if (idx !== -1) {\n listeners.splice(idx, 1);\n }\n });\n}\nfunction notifyListeners(listenable, change) {\n var prevU = untrackedStart();\n var listeners = listenable.changeListeners_;\n if (!listeners) {\n return;\n }\n listeners = listeners.slice();\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](change);\n }\n untrackedEnd(prevU);\n}\n\nfunction makeObservable(target, annotations, options) {\n initObservable(function () {\n var _annotations;\n var adm = asObservableObject(target, options)[$mobx];\n if (process.env.NODE_ENV !== \"production\" && annotations && target[storedAnnotationsSymbol]) {\n die(\"makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported.\");\n }\n // Default to decorators\n (_annotations = annotations) != null ? _annotations : annotations = collectStoredAnnotations(target);\n // Annotate\n ownKeys(annotations).forEach(function (key) {\n return adm.make_(key, annotations[key]);\n });\n });\n return target;\n}\n// proto[keysSymbol] = new Set()\nvar keysSymbol = /*#__PURE__*/Symbol(\"mobx-keys\");\nfunction makeAutoObservable(target, overrides, options) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!isPlainObject(target) && !isPlainObject(Object.getPrototypeOf(target))) {\n die(\"'makeAutoObservable' can only be used for classes that don't have a superclass\");\n }\n if (isObservableObject(target)) {\n die(\"makeAutoObservable can only be used on objects not already made observable\");\n }\n }\n // Optimization: avoid visiting protos\n // Assumes that annotation.make_/.extend_ works the same for plain objects\n if (isPlainObject(target)) {\n return extendObservable(target, target, overrides, options);\n }\n initObservable(function () {\n var adm = asObservableObject(target, options)[$mobx];\n // Optimization: cache keys on proto\n // Assumes makeAutoObservable can be called only once per object and can't be used in subclass\n if (!target[keysSymbol]) {\n var proto = Object.getPrototypeOf(target);\n var keys = new Set([].concat(ownKeys(target), ownKeys(proto)));\n keys[\"delete\"](\"constructor\");\n keys[\"delete\"]($mobx);\n addHiddenProp(proto, keysSymbol, keys);\n }\n target[keysSymbol].forEach(function (key) {\n return adm.make_(key,\n // must pass \"undefined\" for { key: undefined }\n !overrides ? true : key in overrides ? overrides[key] : true);\n });\n });\n return target;\n}\n\nvar SPLICE = \"splice\";\nvar UPDATE = \"update\";\nvar MAX_SPLICE_SIZE = 10000; // See e.g. https://github.com/mobxjs/mobx/issues/859\nvar arrayTraps = {\n get: function get(target, name) {\n var adm = target[$mobx];\n if (name === $mobx) {\n return adm;\n }\n if (name === \"length\") {\n return adm.getArrayLength_();\n }\n if (typeof name === \"string\" && !isNaN(name)) {\n return adm.get_(parseInt(name));\n }\n if (hasProp(arrayExtensions, name)) {\n return arrayExtensions[name];\n }\n return target[name];\n },\n set: function set(target, name, value) {\n var adm = target[$mobx];\n if (name === \"length\") {\n adm.setArrayLength_(value);\n }\n if (typeof name === \"symbol\" || isNaN(name)) {\n target[name] = value;\n } else {\n // numeric string\n adm.set_(parseInt(name), value);\n }\n return true;\n },\n preventExtensions: function preventExtensions() {\n die(15);\n }\n};\nvar ObservableArrayAdministration = /*#__PURE__*/function () {\n // this is the prop that gets proxied, so can't replace it!\n\n function ObservableArrayAdministration(name, enhancer, owned_, legacyMode_) {\n if (name === void 0) {\n name = process.env.NODE_ENV !== \"production\" ? \"ObservableArray@\" + getNextId() : \"ObservableArray\";\n }\n this.owned_ = void 0;\n this.legacyMode_ = void 0;\n this.atom_ = void 0;\n this.values_ = [];\n this.interceptors_ = void 0;\n this.changeListeners_ = void 0;\n this.enhancer_ = void 0;\n this.dehancer = void 0;\n this.proxy_ = void 0;\n this.lastKnownLength_ = 0;\n this.owned_ = owned_;\n this.legacyMode_ = legacyMode_;\n this.atom_ = new Atom(name);\n this.enhancer_ = function (newV, oldV) {\n return enhancer(newV, oldV, process.env.NODE_ENV !== \"production\" ? name + \"[..]\" : \"ObservableArray[..]\");\n };\n }\n var _proto = ObservableArrayAdministration.prototype;\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n return value;\n };\n _proto.dehanceValues_ = function dehanceValues_(values) {\n if (this.dehancer !== undefined && values.length > 0) {\n return values.map(this.dehancer);\n }\n return values;\n };\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (fireImmediately === void 0) {\n fireImmediately = false;\n }\n if (fireImmediately) {\n listener({\n observableKind: \"array\",\n object: this.proxy_,\n debugObjectName: this.atom_.name_,\n type: \"splice\",\n index: 0,\n added: this.values_.slice(),\n addedCount: this.values_.length,\n removed: [],\n removedCount: 0\n });\n }\n return registerListener(this, listener);\n };\n _proto.getArrayLength_ = function getArrayLength_() {\n this.atom_.reportObserved();\n return this.values_.length;\n };\n _proto.setArrayLength_ = function setArrayLength_(newLength) {\n if (typeof newLength !== \"number\" || isNaN(newLength) || newLength < 0) {\n die(\"Out of range: \" + newLength);\n }\n var currentLength = this.values_.length;\n if (newLength === currentLength) {\n return;\n } else if (newLength > currentLength) {\n var newItems = new Array(newLength - currentLength);\n for (var i = 0; i < newLength - currentLength; i++) {\n newItems[i] = undefined;\n } // No Array.fill everywhere...\n this.spliceWithArray_(currentLength, 0, newItems);\n } else {\n this.spliceWithArray_(newLength, currentLength - newLength);\n }\n };\n _proto.updateArrayLength_ = function updateArrayLength_(oldLength, delta) {\n if (oldLength !== this.lastKnownLength_) {\n die(16);\n }\n this.lastKnownLength_ += delta;\n if (this.legacyMode_ && delta > 0) {\n reserveArrayBuffer(oldLength + delta + 1);\n }\n };\n _proto.spliceWithArray_ = function spliceWithArray_(index, deleteCount, newItems) {\n var _this = this;\n checkIfStateModificationsAreAllowed(this.atom_);\n var length = this.values_.length;\n if (index === undefined) {\n index = 0;\n } else if (index > length) {\n index = length;\n } else if (index < 0) {\n index = Math.max(0, length + index);\n }\n if (arguments.length === 1) {\n deleteCount = length - index;\n } else if (deleteCount === undefined || deleteCount === null) {\n deleteCount = 0;\n } else {\n deleteCount = Math.max(0, Math.min(deleteCount, length - index));\n }\n if (newItems === undefined) {\n newItems = EMPTY_ARRAY;\n }\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_,\n type: SPLICE,\n index: index,\n removedCount: deleteCount,\n added: newItems\n });\n if (!change) {\n return EMPTY_ARRAY;\n }\n deleteCount = change.removedCount;\n newItems = change.added;\n }\n newItems = newItems.length === 0 ? newItems : newItems.map(function (v) {\n return _this.enhancer_(v, undefined);\n });\n if (this.legacyMode_ || process.env.NODE_ENV !== \"production\") {\n var lengthDelta = newItems.length - deleteCount;\n this.updateArrayLength_(length, lengthDelta); // checks if internal array wasn't modified\n }\n\n var res = this.spliceItemsIntoValues_(index, deleteCount, newItems);\n if (deleteCount !== 0 || newItems.length !== 0) {\n this.notifyArraySplice_(index, newItems, res);\n }\n return this.dehanceValues_(res);\n };\n _proto.spliceItemsIntoValues_ = function spliceItemsIntoValues_(index, deleteCount, newItems) {\n if (newItems.length < MAX_SPLICE_SIZE) {\n var _this$values_;\n return (_this$values_ = this.values_).splice.apply(_this$values_, [index, deleteCount].concat(newItems));\n } else {\n // The items removed by the splice\n var res = this.values_.slice(index, index + deleteCount);\n // The items that that should remain at the end of the array\n var oldItems = this.values_.slice(index + deleteCount);\n // New length is the previous length + addition count - deletion count\n this.values_.length += newItems.length - deleteCount;\n for (var i = 0; i < newItems.length; i++) {\n this.values_[index + i] = newItems[i];\n }\n for (var _i = 0; _i < oldItems.length; _i++) {\n this.values_[index + newItems.length + _i] = oldItems[_i];\n }\n return res;\n }\n };\n _proto.notifyArrayChildUpdate_ = function notifyArrayChildUpdate_(index, newValue, oldValue) {\n var notifySpy = !this.owned_ && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"array\",\n object: this.proxy_,\n type: UPDATE,\n debugObjectName: this.atom_.name_,\n index: index,\n newValue: newValue,\n oldValue: oldValue\n } : null;\n // The reason why this is on right hand side here (and not above), is this way the uglifier will drop it, but it won't\n // cause any runtime overhead in development mode without NODE_ENV set, unless spying is enabled\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportStart(change);\n }\n this.atom_.reportChanged();\n if (notify) {\n notifyListeners(this, change);\n }\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportEnd();\n }\n };\n _proto.notifyArraySplice_ = function notifyArraySplice_(index, added, removed) {\n var notifySpy = !this.owned_ && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"array\",\n object: this.proxy_,\n debugObjectName: this.atom_.name_,\n type: SPLICE,\n index: index,\n removed: removed,\n added: added,\n removedCount: removed.length,\n addedCount: added.length\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportStart(change);\n }\n this.atom_.reportChanged();\n // conform: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/observe\n if (notify) {\n notifyListeners(this, change);\n }\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportEnd();\n }\n };\n _proto.get_ = function get_(index) {\n if (this.legacyMode_ && index >= this.values_.length) {\n console.warn(process.env.NODE_ENV !== \"production\" ? \"[mobx.array] Attempt to read an array index (\" + index + \") that is out of bounds (\" + this.values_.length + \"). Please check length first. Out of bound indices will not be tracked by MobX\" : \"[mobx] Out of bounds read: \" + index);\n return undefined;\n }\n this.atom_.reportObserved();\n return this.dehanceValue_(this.values_[index]);\n };\n _proto.set_ = function set_(index, newValue) {\n var values = this.values_;\n if (this.legacyMode_ && index > values.length) {\n // out of bounds\n die(17, index, values.length);\n }\n if (index < values.length) {\n // update at index in range\n checkIfStateModificationsAreAllowed(this.atom_);\n var oldValue = values[index];\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: UPDATE,\n object: this.proxy_,\n index: index,\n newValue: newValue\n });\n if (!change) {\n return;\n }\n newValue = change.newValue;\n }\n newValue = this.enhancer_(newValue, oldValue);\n var changed = newValue !== oldValue;\n if (changed) {\n values[index] = newValue;\n this.notifyArrayChildUpdate_(index, newValue, oldValue);\n }\n } else {\n // For out of bound index, we don't create an actual sparse array,\n // but rather fill the holes with undefined (same as setArrayLength_).\n // This could be considered a bug.\n var newItems = new Array(index + 1 - values.length);\n for (var i = 0; i < newItems.length - 1; i++) {\n newItems[i] = undefined;\n } // No Array.fill everywhere...\n newItems[newItems.length - 1] = newValue;\n this.spliceWithArray_(values.length, 0, newItems);\n }\n };\n return ObservableArrayAdministration;\n}();\nfunction createObservableArray(initialValues, enhancer, name, owned) {\n if (name === void 0) {\n name = process.env.NODE_ENV !== \"production\" ? \"ObservableArray@\" + getNextId() : \"ObservableArray\";\n }\n if (owned === void 0) {\n owned = false;\n }\n assertProxies();\n return initObservable(function () {\n var adm = new ObservableArrayAdministration(name, enhancer, owned, false);\n addHiddenFinalProp(adm.values_, $mobx, adm);\n var proxy = new Proxy(adm.values_, arrayTraps);\n adm.proxy_ = proxy;\n if (initialValues && initialValues.length) {\n adm.spliceWithArray_(0, 0, initialValues);\n }\n return proxy;\n });\n}\n// eslint-disable-next-line\nvar arrayExtensions = {\n clear: function clear() {\n return this.splice(0);\n },\n replace: function replace(newItems) {\n var adm = this[$mobx];\n return adm.spliceWithArray_(0, adm.values_.length, newItems);\n },\n // Used by JSON.stringify\n toJSON: function toJSON() {\n return this.slice();\n },\n /*\r\n * functions that do alter the internal structure of the array, (based on lib.es6.d.ts)\r\n * since these functions alter the inner structure of the array, the have side effects.\r\n * Because the have side effects, they should not be used in computed function,\r\n * and for that reason the do not call dependencyState.notifyObserved\r\n */\n splice: function splice(index, deleteCount) {\n for (var _len = arguments.length, newItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n newItems[_key - 2] = arguments[_key];\n }\n var adm = this[$mobx];\n switch (arguments.length) {\n case 0:\n return [];\n case 1:\n return adm.spliceWithArray_(index);\n case 2:\n return adm.spliceWithArray_(index, deleteCount);\n }\n return adm.spliceWithArray_(index, deleteCount, newItems);\n },\n spliceWithArray: function spliceWithArray(index, deleteCount, newItems) {\n return this[$mobx].spliceWithArray_(index, deleteCount, newItems);\n },\n push: function push() {\n var adm = this[$mobx];\n for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n items[_key2] = arguments[_key2];\n }\n adm.spliceWithArray_(adm.values_.length, 0, items);\n return adm.values_.length;\n },\n pop: function pop() {\n return this.splice(Math.max(this[$mobx].values_.length - 1, 0), 1)[0];\n },\n shift: function shift() {\n return this.splice(0, 1)[0];\n },\n unshift: function unshift() {\n var adm = this[$mobx];\n for (var _len3 = arguments.length, items = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n items[_key3] = arguments[_key3];\n }\n adm.spliceWithArray_(0, 0, items);\n return adm.values_.length;\n },\n reverse: function reverse() {\n // reverse by default mutates in place before returning the result\n // which makes it both a 'derivation' and a 'mutation'.\n if (globalState.trackingDerivation) {\n die(37, \"reverse\");\n }\n this.replace(this.slice().reverse());\n return this;\n },\n sort: function sort() {\n // sort by default mutates in place before returning the result\n // which goes against all good practices. Let's not change the array in place!\n if (globalState.trackingDerivation) {\n die(37, \"sort\");\n }\n var copy = this.slice();\n copy.sort.apply(copy, arguments);\n this.replace(copy);\n return this;\n },\n remove: function remove(value) {\n var adm = this[$mobx];\n var idx = adm.dehanceValues_(adm.values_).indexOf(value);\n if (idx > -1) {\n this.splice(idx, 1);\n return true;\n }\n return false;\n }\n};\n/**\r\n * Wrap function from prototype\r\n * Without this, everything works as well, but this works\r\n * faster as everything works on unproxied values\r\n */\naddArrayExtension(\"concat\", simpleFunc);\naddArrayExtension(\"flat\", simpleFunc);\naddArrayExtension(\"includes\", simpleFunc);\naddArrayExtension(\"indexOf\", simpleFunc);\naddArrayExtension(\"join\", simpleFunc);\naddArrayExtension(\"lastIndexOf\", simpleFunc);\naddArrayExtension(\"slice\", simpleFunc);\naddArrayExtension(\"toString\", simpleFunc);\naddArrayExtension(\"toLocaleString\", simpleFunc);\n// map\naddArrayExtension(\"every\", mapLikeFunc);\naddArrayExtension(\"filter\", mapLikeFunc);\naddArrayExtension(\"find\", mapLikeFunc);\naddArrayExtension(\"findIndex\", mapLikeFunc);\naddArrayExtension(\"flatMap\", mapLikeFunc);\naddArrayExtension(\"forEach\", mapLikeFunc);\naddArrayExtension(\"map\", mapLikeFunc);\naddArrayExtension(\"some\", mapLikeFunc);\n// reduce\naddArrayExtension(\"reduce\", reduceLikeFunc);\naddArrayExtension(\"reduceRight\", reduceLikeFunc);\nfunction addArrayExtension(funcName, funcFactory) {\n if (typeof Array.prototype[funcName] === \"function\") {\n arrayExtensions[funcName] = funcFactory(funcName);\n }\n}\n// Report and delegate to dehanced array\nfunction simpleFunc(funcName) {\n return function () {\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_);\n return dehancedValues[funcName].apply(dehancedValues, arguments);\n };\n}\n// Make sure callbacks recieve correct array arg #2326\nfunction mapLikeFunc(funcName) {\n return function (callback, thisArg) {\n var _this2 = this;\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_);\n return dehancedValues[funcName](function (element, index) {\n return callback.call(thisArg, element, index, _this2);\n });\n };\n}\n// Make sure callbacks recieve correct array arg #2326\nfunction reduceLikeFunc(funcName) {\n return function () {\n var _this3 = this;\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_);\n // #2432 - reduce behavior depends on arguments.length\n var callback = arguments[0];\n arguments[0] = function (accumulator, currentValue, index) {\n return callback(accumulator, currentValue, index, _this3);\n };\n return dehancedValues[funcName].apply(dehancedValues, arguments);\n };\n}\nvar isObservableArrayAdministration = /*#__PURE__*/createInstanceofPredicate(\"ObservableArrayAdministration\", ObservableArrayAdministration);\nfunction isObservableArray(thing) {\n return isObject(thing) && isObservableArrayAdministration(thing[$mobx]);\n}\n\nvar _Symbol$iterator, _Symbol$toStringTag;\nvar ObservableMapMarker = {};\nvar ADD = \"add\";\nvar DELETE = \"delete\";\n// just extend Map? See also https://gist.github.com/nestharus/13b4d74f2ef4a2f4357dbd3fc23c1e54\n// But: https://github.com/mobxjs/mobx/issues/1556\n_Symbol$iterator = Symbol.iterator;\n_Symbol$toStringTag = Symbol.toStringTag;\nvar ObservableMap = /*#__PURE__*/function () {\n // hasMap, not hashMap >-).\n\n function ObservableMap(initialData, enhancer_, name_) {\n var _this = this;\n if (enhancer_ === void 0) {\n enhancer_ = deepEnhancer;\n }\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"ObservableMap@\" + getNextId() : \"ObservableMap\";\n }\n this.enhancer_ = void 0;\n this.name_ = void 0;\n this[$mobx] = ObservableMapMarker;\n this.data_ = void 0;\n this.hasMap_ = void 0;\n this.keysAtom_ = void 0;\n this.interceptors_ = void 0;\n this.changeListeners_ = void 0;\n this.dehancer = void 0;\n this.enhancer_ = enhancer_;\n this.name_ = name_;\n if (!isFunction(Map)) {\n die(18);\n }\n initObservable(function () {\n _this.keysAtom_ = createAtom(process.env.NODE_ENV !== \"production\" ? _this.name_ + \".keys()\" : \"ObservableMap.keys()\");\n _this.data_ = new Map();\n _this.hasMap_ = new Map();\n if (initialData) {\n _this.merge(initialData);\n }\n });\n }\n var _proto = ObservableMap.prototype;\n _proto.has_ = function has_(key) {\n return this.data_.has(key);\n };\n _proto.has = function has(key) {\n var _this2 = this;\n if (!globalState.trackingDerivation) {\n return this.has_(key);\n }\n var entry = this.hasMap_.get(key);\n if (!entry) {\n var newEntry = entry = new ObservableValue(this.has_(key), referenceEnhancer, process.env.NODE_ENV !== \"production\" ? this.name_ + \".\" + stringifyKey(key) + \"?\" : \"ObservableMap.key?\", false);\n this.hasMap_.set(key, newEntry);\n onBecomeUnobserved(newEntry, function () {\n return _this2.hasMap_[\"delete\"](key);\n });\n }\n return entry.get();\n };\n _proto.set = function set(key, value) {\n var hasKey = this.has_(key);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: hasKey ? UPDATE : ADD,\n object: this,\n newValue: value,\n name: key\n });\n if (!change) {\n return this;\n }\n value = change.newValue;\n }\n if (hasKey) {\n this.updateValue_(key, value);\n } else {\n this.addValue_(key, value);\n }\n return this;\n };\n _proto[\"delete\"] = function _delete(key) {\n var _this3 = this;\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: DELETE,\n object: this,\n name: key\n });\n if (!change) {\n return false;\n }\n }\n if (this.has_(key)) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var _change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: DELETE,\n object: this,\n oldValue: this.data_.get(key).value_,\n name: key\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportStart(_change);\n } // TODO fix type\n transaction(function () {\n var _this3$hasMap_$get;\n _this3.keysAtom_.reportChanged();\n (_this3$hasMap_$get = _this3.hasMap_.get(key)) == null ? void 0 : _this3$hasMap_$get.setNewValue_(false);\n var observable = _this3.data_.get(key);\n observable.setNewValue_(undefined);\n _this3.data_[\"delete\"](key);\n });\n if (notify) {\n notifyListeners(this, _change);\n }\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportEnd();\n }\n return true;\n }\n return false;\n };\n _proto.updateValue_ = function updateValue_(key, newValue) {\n var observable = this.data_.get(key);\n newValue = observable.prepareNewValue_(newValue);\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: UPDATE,\n object: this,\n oldValue: observable.value_,\n name: key,\n newValue: newValue\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportStart(change);\n } // TODO fix type\n observable.setNewValue_(newValue);\n if (notify) {\n notifyListeners(this, change);\n }\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportEnd();\n }\n }\n };\n _proto.addValue_ = function addValue_(key, newValue) {\n var _this4 = this;\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n transaction(function () {\n var _this4$hasMap_$get;\n var observable = new ObservableValue(newValue, _this4.enhancer_, process.env.NODE_ENV !== \"production\" ? _this4.name_ + \".\" + stringifyKey(key) : \"ObservableMap.key\", false);\n _this4.data_.set(key, observable);\n newValue = observable.value_; // value might have been changed\n (_this4$hasMap_$get = _this4.hasMap_.get(key)) == null ? void 0 : _this4$hasMap_$get.setNewValue_(true);\n _this4.keysAtom_.reportChanged();\n });\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: ADD,\n object: this,\n name: key,\n newValue: newValue\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportStart(change);\n } // TODO fix type\n if (notify) {\n notifyListeners(this, change);\n }\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportEnd();\n }\n };\n _proto.get = function get(key) {\n if (this.has(key)) {\n return this.dehanceValue_(this.data_.get(key).get());\n }\n return this.dehanceValue_(undefined);\n };\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n return value;\n };\n _proto.keys = function keys() {\n this.keysAtom_.reportObserved();\n return this.data_.keys();\n };\n _proto.values = function values() {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function next() {\n var _keys$next = keys.next(),\n done = _keys$next.done,\n value = _keys$next.value;\n return {\n done: done,\n value: done ? undefined : self.get(value)\n };\n }\n });\n };\n _proto.entries = function entries() {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function next() {\n var _keys$next2 = keys.next(),\n done = _keys$next2.done,\n value = _keys$next2.value;\n return {\n done: done,\n value: done ? undefined : [value, self.get(value)]\n };\n }\n });\n };\n _proto[_Symbol$iterator] = function () {\n return this.entries();\n };\n _proto.forEach = function forEach(callback, thisArg) {\n for (var _iterator = _createForOfIteratorHelperLoose(this), _step; !(_step = _iterator()).done;) {\n var _step$value = _step.value,\n key = _step$value[0],\n value = _step$value[1];\n callback.call(thisArg, value, key, this);\n }\n }\n /** Merge another object into this object, returns this. */;\n _proto.merge = function merge(other) {\n var _this5 = this;\n if (isObservableMap(other)) {\n other = new Map(other);\n }\n transaction(function () {\n if (isPlainObject(other)) {\n getPlainObjectKeys(other).forEach(function (key) {\n return _this5.set(key, other[key]);\n });\n } else if (Array.isArray(other)) {\n other.forEach(function (_ref) {\n var key = _ref[0],\n value = _ref[1];\n return _this5.set(key, value);\n });\n } else if (isES6Map(other)) {\n if (other.constructor !== Map) {\n die(19, other);\n }\n other.forEach(function (value, key) {\n return _this5.set(key, value);\n });\n } else if (other !== null && other !== undefined) {\n die(20, other);\n }\n });\n return this;\n };\n _proto.clear = function clear() {\n var _this6 = this;\n transaction(function () {\n untracked(function () {\n for (var _iterator2 = _createForOfIteratorHelperLoose(_this6.keys()), _step2; !(_step2 = _iterator2()).done;) {\n var key = _step2.value;\n _this6[\"delete\"](key);\n }\n });\n });\n };\n _proto.replace = function replace(values) {\n var _this7 = this;\n // Implementation requirements:\n // - respect ordering of replacement map\n // - allow interceptors to run and potentially prevent individual operations\n // - don't recreate observables that already exist in original map (so we don't destroy existing subscriptions)\n // - don't _keysAtom.reportChanged if the keys of resulting map are indentical (order matters!)\n // - note that result map may differ from replacement map due to the interceptors\n transaction(function () {\n // Convert to map so we can do quick key lookups\n var replacementMap = convertToMap(values);\n var orderedData = new Map();\n // Used for optimization\n var keysReportChangedCalled = false;\n // Delete keys that don't exist in replacement map\n // if the key deletion is prevented by interceptor\n // add entry at the beginning of the result map\n for (var _iterator3 = _createForOfIteratorHelperLoose(_this7.data_.keys()), _step3; !(_step3 = _iterator3()).done;) {\n var key = _step3.value;\n // Concurrently iterating/deleting keys\n // iterator should handle this correctly\n if (!replacementMap.has(key)) {\n var deleted = _this7[\"delete\"](key);\n // Was the key removed?\n if (deleted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n } else {\n // Delete prevented by interceptor\n var value = _this7.data_.get(key);\n orderedData.set(key, value);\n }\n }\n }\n // Merge entries\n for (var _iterator4 = _createForOfIteratorHelperLoose(replacementMap.entries()), _step4; !(_step4 = _iterator4()).done;) {\n var _step4$value = _step4.value,\n _key = _step4$value[0],\n _value = _step4$value[1];\n // We will want to know whether a new key is added\n var keyExisted = _this7.data_.has(_key);\n // Add or update value\n _this7.set(_key, _value);\n // The addition could have been prevent by interceptor\n if (_this7.data_.has(_key)) {\n // The update could have been prevented by interceptor\n // and also we want to preserve existing values\n // so use value from _data map (instead of replacement map)\n var _value2 = _this7.data_.get(_key);\n orderedData.set(_key, _value2);\n // Was a new key added?\n if (!keyExisted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n }\n }\n }\n // Check for possible key order change\n if (!keysReportChangedCalled) {\n if (_this7.data_.size !== orderedData.size) {\n // If size differs, keys are definitely modified\n _this7.keysAtom_.reportChanged();\n } else {\n var iter1 = _this7.data_.keys();\n var iter2 = orderedData.keys();\n var next1 = iter1.next();\n var next2 = iter2.next();\n while (!next1.done) {\n if (next1.value !== next2.value) {\n _this7.keysAtom_.reportChanged();\n break;\n }\n next1 = iter1.next();\n next2 = iter2.next();\n }\n }\n }\n // Use correctly ordered map\n _this7.data_ = orderedData;\n });\n return this;\n };\n _proto.toString = function toString() {\n return \"[object ObservableMap]\";\n };\n _proto.toJSON = function toJSON() {\n return Array.from(this);\n };\n /**\r\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\r\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\r\n * for callback details\r\n */\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (process.env.NODE_ENV !== \"production\" && fireImmediately === true) {\n die(\"`observe` doesn't support fireImmediately=true in combination with maps.\");\n }\n return registerListener(this, listener);\n };\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n _createClass(ObservableMap, [{\n key: \"size\",\n get: function get() {\n this.keysAtom_.reportObserved();\n return this.data_.size;\n }\n }, {\n key: _Symbol$toStringTag,\n get: function get() {\n return \"Map\";\n }\n }]);\n return ObservableMap;\n}();\n// eslint-disable-next-line\nvar isObservableMap = /*#__PURE__*/createInstanceofPredicate(\"ObservableMap\", ObservableMap);\nfunction convertToMap(dataStructure) {\n if (isES6Map(dataStructure) || isObservableMap(dataStructure)) {\n return dataStructure;\n } else if (Array.isArray(dataStructure)) {\n return new Map(dataStructure);\n } else if (isPlainObject(dataStructure)) {\n var map = new Map();\n for (var key in dataStructure) {\n map.set(key, dataStructure[key]);\n }\n return map;\n } else {\n return die(21, dataStructure);\n }\n}\n\nvar _Symbol$iterator$1, _Symbol$toStringTag$1;\nvar ObservableSetMarker = {};\n_Symbol$iterator$1 = Symbol.iterator;\n_Symbol$toStringTag$1 = Symbol.toStringTag;\nvar ObservableSet = /*#__PURE__*/function () {\n function ObservableSet(initialData, enhancer, name_) {\n var _this = this;\n if (enhancer === void 0) {\n enhancer = deepEnhancer;\n }\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"ObservableSet@\" + getNextId() : \"ObservableSet\";\n }\n this.name_ = void 0;\n this[$mobx] = ObservableSetMarker;\n this.data_ = new Set();\n this.atom_ = void 0;\n this.changeListeners_ = void 0;\n this.interceptors_ = void 0;\n this.dehancer = void 0;\n this.enhancer_ = void 0;\n this.name_ = name_;\n if (!isFunction(Set)) {\n die(22);\n }\n this.enhancer_ = function (newV, oldV) {\n return enhancer(newV, oldV, name_);\n };\n initObservable(function () {\n _this.atom_ = createAtom(_this.name_);\n if (initialData) {\n _this.replace(initialData);\n }\n });\n }\n var _proto = ObservableSet.prototype;\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n return value;\n };\n _proto.clear = function clear() {\n var _this2 = this;\n transaction(function () {\n untracked(function () {\n for (var _iterator = _createForOfIteratorHelperLoose(_this2.data_.values()), _step; !(_step = _iterator()).done;) {\n var value = _step.value;\n _this2[\"delete\"](value);\n }\n });\n });\n };\n _proto.forEach = function forEach(callbackFn, thisArg) {\n for (var _iterator2 = _createForOfIteratorHelperLoose(this), _step2; !(_step2 = _iterator2()).done;) {\n var value = _step2.value;\n callbackFn.call(thisArg, value, value, this);\n }\n };\n _proto.add = function add(value) {\n var _this3 = this;\n checkIfStateModificationsAreAllowed(this.atom_);\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: ADD,\n object: this,\n newValue: value\n });\n if (!change) {\n return this;\n }\n // ideally, value = change.value would be done here, so that values can be\n // changed by interceptor. Same applies for other Set and Map api's.\n }\n\n if (!this.has(value)) {\n transaction(function () {\n _this3.data_.add(_this3.enhancer_(value, undefined));\n _this3.atom_.reportChanged();\n });\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n var notify = hasListeners(this);\n var _change = notify || notifySpy ? {\n observableKind: \"set\",\n debugObjectName: this.name_,\n type: ADD,\n object: this,\n newValue: value\n } : null;\n if (notifySpy && process.env.NODE_ENV !== \"production\") {\n spyReportStart(_change);\n }\n if (notify) {\n notifyListeners(this, _change);\n }\n if (notifySpy && process.env.NODE_ENV !== \"production\") {\n spyReportEnd();\n }\n }\n return this;\n };\n _proto[\"delete\"] = function _delete(value) {\n var _this4 = this;\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: DELETE,\n object: this,\n oldValue: value\n });\n if (!change) {\n return false;\n }\n }\n if (this.has(value)) {\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n var notify = hasListeners(this);\n var _change2 = notify || notifySpy ? {\n observableKind: \"set\",\n debugObjectName: this.name_,\n type: DELETE,\n object: this,\n oldValue: value\n } : null;\n if (notifySpy && process.env.NODE_ENV !== \"production\") {\n spyReportStart(_change2);\n }\n transaction(function () {\n _this4.atom_.reportChanged();\n _this4.data_[\"delete\"](value);\n });\n if (notify) {\n notifyListeners(this, _change2);\n }\n if (notifySpy && process.env.NODE_ENV !== \"production\") {\n spyReportEnd();\n }\n return true;\n }\n return false;\n };\n _proto.has = function has(value) {\n this.atom_.reportObserved();\n return this.data_.has(this.dehanceValue_(value));\n };\n _proto.entries = function entries() {\n var nextIndex = 0;\n var keys = Array.from(this.keys());\n var values = Array.from(this.values());\n return makeIterable({\n next: function next() {\n var index = nextIndex;\n nextIndex += 1;\n return index < values.length ? {\n value: [keys[index], values[index]],\n done: false\n } : {\n done: true\n };\n }\n });\n };\n _proto.keys = function keys() {\n return this.values();\n };\n _proto.values = function values() {\n this.atom_.reportObserved();\n var self = this;\n var nextIndex = 0;\n var observableValues = Array.from(this.data_.values());\n return makeIterable({\n next: function next() {\n return nextIndex < observableValues.length ? {\n value: self.dehanceValue_(observableValues[nextIndex++]),\n done: false\n } : {\n done: true\n };\n }\n });\n };\n _proto.replace = function replace(other) {\n var _this5 = this;\n if (isObservableSet(other)) {\n other = new Set(other);\n }\n transaction(function () {\n if (Array.isArray(other)) {\n _this5.clear();\n other.forEach(function (value) {\n return _this5.add(value);\n });\n } else if (isES6Set(other)) {\n _this5.clear();\n other.forEach(function (value) {\n return _this5.add(value);\n });\n } else if (other !== null && other !== undefined) {\n die(\"Cannot initialize set from \" + other);\n }\n });\n return this;\n };\n _proto.observe_ = function observe_(listener, fireImmediately) {\n // ... 'fireImmediately' could also be true?\n if (process.env.NODE_ENV !== \"production\" && fireImmediately === true) {\n die(\"`observe` doesn't support fireImmediately=true in combination with sets.\");\n }\n return registerListener(this, listener);\n };\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n _proto.toJSON = function toJSON() {\n return Array.from(this);\n };\n _proto.toString = function toString() {\n return \"[object ObservableSet]\";\n };\n _proto[_Symbol$iterator$1] = function () {\n return this.values();\n };\n _createClass(ObservableSet, [{\n key: \"size\",\n get: function get() {\n this.atom_.reportObserved();\n return this.data_.size;\n }\n }, {\n key: _Symbol$toStringTag$1,\n get: function get() {\n return \"Set\";\n }\n }]);\n return ObservableSet;\n}();\n// eslint-disable-next-line\nvar isObservableSet = /*#__PURE__*/createInstanceofPredicate(\"ObservableSet\", ObservableSet);\n\nvar descriptorCache = /*#__PURE__*/Object.create(null);\nvar REMOVE = \"remove\";\nvar ObservableObjectAdministration = /*#__PURE__*/function () {\n function ObservableObjectAdministration(target_, values_, name_,\n // Used anytime annotation is not explicitely provided\n defaultAnnotation_) {\n if (values_ === void 0) {\n values_ = new Map();\n }\n if (defaultAnnotation_ === void 0) {\n defaultAnnotation_ = autoAnnotation;\n }\n this.target_ = void 0;\n this.values_ = void 0;\n this.name_ = void 0;\n this.defaultAnnotation_ = void 0;\n this.keysAtom_ = void 0;\n this.changeListeners_ = void 0;\n this.interceptors_ = void 0;\n this.proxy_ = void 0;\n this.isPlainObject_ = void 0;\n this.appliedAnnotations_ = void 0;\n this.pendingKeys_ = void 0;\n this.target_ = target_;\n this.values_ = values_;\n this.name_ = name_;\n this.defaultAnnotation_ = defaultAnnotation_;\n this.keysAtom_ = new Atom(process.env.NODE_ENV !== \"production\" ? this.name_ + \".keys\" : \"ObservableObject.keys\");\n // Optimization: we use this frequently\n this.isPlainObject_ = isPlainObject(this.target_);\n if (process.env.NODE_ENV !== \"production\" && !isAnnotation(this.defaultAnnotation_)) {\n die(\"defaultAnnotation must be valid annotation\");\n }\n if (process.env.NODE_ENV !== \"production\") {\n // Prepare structure for tracking which fields were already annotated\n this.appliedAnnotations_ = {};\n }\n }\n var _proto = ObservableObjectAdministration.prototype;\n _proto.getObservablePropValue_ = function getObservablePropValue_(key) {\n return this.values_.get(key).get();\n };\n _proto.setObservablePropValue_ = function setObservablePropValue_(key, newValue) {\n var observable = this.values_.get(key);\n if (observable instanceof ComputedValue) {\n observable.set(newValue);\n return true;\n }\n // intercept\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: UPDATE,\n object: this.proxy_ || this.target_,\n name: key,\n newValue: newValue\n });\n if (!change) {\n return null;\n }\n newValue = change.newValue;\n }\n newValue = observable.prepareNewValue_(newValue);\n // notify spy & observers\n if (newValue !== globalState.UNCHANGED) {\n var notify = hasListeners(this);\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n var _change = notify || notifySpy ? {\n type: UPDATE,\n observableKind: \"object\",\n debugObjectName: this.name_,\n object: this.proxy_ || this.target_,\n oldValue: observable.value_,\n name: key,\n newValue: newValue\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportStart(_change);\n }\n observable.setNewValue_(newValue);\n if (notify) {\n notifyListeners(this, _change);\n }\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportEnd();\n }\n }\n return true;\n };\n _proto.get_ = function get_(key) {\n if (globalState.trackingDerivation && !hasProp(this.target_, key)) {\n // Key doesn't exist yet, subscribe for it in case it's added later\n this.has_(key);\n }\n return this.target_[key];\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {any} value\r\n * @param {Annotation|boolean} annotation true - use default annotation, false - copy as is\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */;\n _proto.set_ = function set_(key, value, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n // Don't use .has(key) - we care about own\n if (hasProp(this.target_, key)) {\n // Existing prop\n if (this.values_.has(key)) {\n // Observable (can be intercepted)\n return this.setObservablePropValue_(key, value);\n } else if (proxyTrap) {\n // Non-observable - proxy\n return Reflect.set(this.target_, key, value);\n } else {\n // Non-observable\n this.target_[key] = value;\n return true;\n }\n } else {\n // New prop\n return this.extend_(key, {\n value: value,\n enumerable: true,\n writable: true,\n configurable: true\n }, this.defaultAnnotation_, proxyTrap);\n }\n }\n // Trap for \"in\"\n ;\n _proto.has_ = function has_(key) {\n if (!globalState.trackingDerivation) {\n // Skip key subscription outside derivation\n return key in this.target_;\n }\n this.pendingKeys_ || (this.pendingKeys_ = new Map());\n var entry = this.pendingKeys_.get(key);\n if (!entry) {\n entry = new ObservableValue(key in this.target_, referenceEnhancer, process.env.NODE_ENV !== \"production\" ? this.name_ + \".\" + stringifyKey(key) + \"?\" : \"ObservableObject.key?\", false);\n this.pendingKeys_.set(key, entry);\n }\n return entry.get();\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {Annotation|boolean} annotation true - use default annotation, false - ignore prop\r\n */;\n _proto.make_ = function make_(key, annotation) {\n if (annotation === true) {\n annotation = this.defaultAnnotation_;\n }\n if (annotation === false) {\n return;\n }\n assertAnnotable(this, annotation, key);\n if (!(key in this.target_)) {\n var _this$target_$storedA;\n // Throw on missing key, except for decorators:\n // Decorator annotations are collected from whole prototype chain.\n // When called from super() some props may not exist yet.\n // However we don't have to worry about missing prop,\n // because the decorator must have been applied to something.\n if ((_this$target_$storedA = this.target_[storedAnnotationsSymbol]) != null && _this$target_$storedA[key]) {\n return; // will be annotated by subclass constructor\n } else {\n die(1, annotation.annotationType_, this.name_ + \".\" + key.toString());\n }\n }\n var source = this.target_;\n while (source && source !== objectPrototype) {\n var descriptor = getDescriptor(source, key);\n if (descriptor) {\n var outcome = annotation.make_(this, key, descriptor, source);\n if (outcome === 0 /* Cancel */) {\n return;\n }\n if (outcome === 1 /* Break */) {\n break;\n }\n }\n source = Object.getPrototypeOf(source);\n }\n recordAnnotationApplied(this, annotation, key);\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {Annotation|boolean} annotation true - use default annotation, false - copy as is\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */;\n _proto.extend_ = function extend_(key, descriptor, annotation, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n if (annotation === true) {\n annotation = this.defaultAnnotation_;\n }\n if (annotation === false) {\n return this.defineProperty_(key, descriptor, proxyTrap);\n }\n assertAnnotable(this, annotation, key);\n var outcome = annotation.extend_(this, key, descriptor, proxyTrap);\n if (outcome) {\n recordAnnotationApplied(this, annotation, key);\n }\n return outcome;\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */;\n _proto.defineProperty_ = function defineProperty_(key, descriptor, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n try {\n startBatch();\n // Delete\n var deleteOutcome = this.delete_(key);\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n }\n // ADD interceptor\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: descriptor.value\n });\n if (!change) {\n return null;\n }\n var newValue = change.newValue;\n if (descriptor.value !== newValue) {\n descriptor = _extends({}, descriptor, {\n value: newValue\n });\n }\n }\n // Define\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n }\n // Notify\n this.notifyPropertyAddition_(key, descriptor.value);\n } finally {\n endBatch();\n }\n return true;\n }\n // If original descriptor becomes relevant, move this to annotation directly\n ;\n _proto.defineObservableProperty_ = function defineObservableProperty_(key, value, enhancer, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n try {\n startBatch();\n // Delete\n var deleteOutcome = this.delete_(key);\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n }\n // ADD interceptor\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: value\n });\n if (!change) {\n return null;\n }\n value = change.newValue;\n }\n var cachedDescriptor = getCachedObservablePropDescriptor(key);\n var descriptor = {\n configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n enumerable: true,\n get: cachedDescriptor.get,\n set: cachedDescriptor.set\n };\n // Define\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n }\n var observable = new ObservableValue(value, enhancer, process.env.NODE_ENV !== \"production\" ? this.name_ + \".\" + key.toString() : \"ObservableObject.key\", false);\n this.values_.set(key, observable);\n // Notify (value possibly changed by ObservableValue)\n this.notifyPropertyAddition_(key, observable.value_);\n } finally {\n endBatch();\n }\n return true;\n }\n // If original descriptor becomes relevant, move this to annotation directly\n ;\n _proto.defineComputedProperty_ = function defineComputedProperty_(key, options, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n try {\n startBatch();\n // Delete\n var deleteOutcome = this.delete_(key);\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n }\n // ADD interceptor\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: undefined\n });\n if (!change) {\n return null;\n }\n }\n options.name || (options.name = process.env.NODE_ENV !== \"production\" ? this.name_ + \".\" + key.toString() : \"ObservableObject.key\");\n options.context = this.proxy_ || this.target_;\n var cachedDescriptor = getCachedObservablePropDescriptor(key);\n var descriptor = {\n configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n enumerable: false,\n get: cachedDescriptor.get,\n set: cachedDescriptor.set\n };\n // Define\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n }\n this.values_.set(key, new ComputedValue(options));\n // Notify\n this.notifyPropertyAddition_(key, undefined);\n } finally {\n endBatch();\n }\n return true;\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */;\n _proto.delete_ = function delete_(key, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n // No such prop\n if (!hasProp(this.target_, key)) {\n return true;\n }\n // Intercept\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: REMOVE\n });\n // Cancelled\n if (!change) {\n return null;\n }\n }\n // Delete\n try {\n var _this$pendingKeys_, _this$pendingKeys_$ge;\n startBatch();\n var notify = hasListeners(this);\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n var observable = this.values_.get(key);\n // Value needed for spies/listeners\n var value = undefined;\n // Optimization: don't pull the value unless we will need it\n if (!observable && (notify || notifySpy)) {\n var _getDescriptor;\n value = (_getDescriptor = getDescriptor(this.target_, key)) == null ? void 0 : _getDescriptor.value;\n }\n // delete prop (do first, may fail)\n if (proxyTrap) {\n if (!Reflect.deleteProperty(this.target_, key)) {\n return false;\n }\n } else {\n delete this.target_[key];\n }\n // Allow re-annotating this field\n if (process.env.NODE_ENV !== \"production\") {\n delete this.appliedAnnotations_[key];\n }\n // Clear observable\n if (observable) {\n this.values_[\"delete\"](key);\n // for computed, value is undefined\n if (observable instanceof ObservableValue) {\n value = observable.value_;\n }\n // Notify: autorun(() => obj[key]), see #1796\n propagateChanged(observable);\n }\n // Notify \"keys/entries/values\" observers\n this.keysAtom_.reportChanged();\n // Notify \"has\" observers\n // \"in\" as it may still exist in proto\n (_this$pendingKeys_ = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_$ge = _this$pendingKeys_.get(key)) == null ? void 0 : _this$pendingKeys_$ge.set(key in this.target_);\n // Notify spies/listeners\n if (notify || notifySpy) {\n var _change2 = {\n type: REMOVE,\n observableKind: \"object\",\n object: this.proxy_ || this.target_,\n debugObjectName: this.name_,\n oldValue: value,\n name: key\n };\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportStart(_change2);\n }\n if (notify) {\n notifyListeners(this, _change2);\n }\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportEnd();\n }\n }\n } finally {\n endBatch();\n }\n return true;\n }\n /**\r\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\r\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\r\n * for callback details\r\n */;\n _proto.observe_ = function observe_(callback, fireImmediately) {\n if (process.env.NODE_ENV !== \"production\" && fireImmediately === true) {\n die(\"`observe` doesn't support the fire immediately property for observable objects.\");\n }\n return registerListener(this, callback);\n };\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n _proto.notifyPropertyAddition_ = function notifyPropertyAddition_(key, value) {\n var _this$pendingKeys_2, _this$pendingKeys_2$g;\n var notify = hasListeners(this);\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n if (notify || notifySpy) {\n var change = notify || notifySpy ? {\n type: ADD,\n observableKind: \"object\",\n debugObjectName: this.name_,\n object: this.proxy_ || this.target_,\n name: key,\n newValue: value\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportStart(change);\n }\n if (notify) {\n notifyListeners(this, change);\n }\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportEnd();\n }\n }\n (_this$pendingKeys_2 = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_2$g = _this$pendingKeys_2.get(key)) == null ? void 0 : _this$pendingKeys_2$g.set(true);\n // Notify \"keys/entries/values\" observers\n this.keysAtom_.reportChanged();\n };\n _proto.ownKeys_ = function ownKeys_() {\n this.keysAtom_.reportObserved();\n return ownKeys(this.target_);\n };\n _proto.keys_ = function keys_() {\n // Returns enumerable && own, but unfortunately keysAtom will report on ANY key change.\n // There is no way to distinguish between Object.keys(object) and Reflect.ownKeys(object) - both are handled by ownKeys trap.\n // We can either over-report in Object.keys(object) or under-report in Reflect.ownKeys(object)\n // We choose to over-report in Object.keys(object), because:\n // - typically it's used with simple data objects\n // - when symbolic/non-enumerable keys are relevant Reflect.ownKeys works as expected\n this.keysAtom_.reportObserved();\n return Object.keys(this.target_);\n };\n return ObservableObjectAdministration;\n}();\nfunction asObservableObject(target, options) {\n var _options$name;\n if (process.env.NODE_ENV !== \"production\" && options && isObservableObject(target)) {\n die(\"Options can't be provided for already observable objects.\");\n }\n if (hasProp(target, $mobx)) {\n if (process.env.NODE_ENV !== \"production\" && !(getAdministration(target) instanceof ObservableObjectAdministration)) {\n die(\"Cannot convert '\" + getDebugName(target) + \"' into observable object:\" + \"\\nThe target is already observable of different type.\" + \"\\nExtending builtins is not supported.\");\n }\n return target;\n }\n if (process.env.NODE_ENV !== \"production\" && !Object.isExtensible(target)) {\n die(\"Cannot make the designated object observable; it is not extensible\");\n }\n var name = (_options$name = options == null ? void 0 : options.name) != null ? _options$name : process.env.NODE_ENV !== \"production\" ? (isPlainObject(target) ? \"ObservableObject\" : target.constructor.name) + \"@\" + getNextId() : \"ObservableObject\";\n var adm = new ObservableObjectAdministration(target, new Map(), String(name), getAnnotationFromOptions(options));\n addHiddenProp(target, $mobx, adm);\n return target;\n}\nvar isObservableObjectAdministration = /*#__PURE__*/createInstanceofPredicate(\"ObservableObjectAdministration\", ObservableObjectAdministration);\nfunction getCachedObservablePropDescriptor(key) {\n return descriptorCache[key] || (descriptorCache[key] = {\n get: function get() {\n return this[$mobx].getObservablePropValue_(key);\n },\n set: function set(value) {\n return this[$mobx].setObservablePropValue_(key, value);\n }\n });\n}\nfunction isObservableObject(thing) {\n if (isObject(thing)) {\n return isObservableObjectAdministration(thing[$mobx]);\n }\n return false;\n}\nfunction recordAnnotationApplied(adm, annotation, key) {\n var _adm$target_$storedAn;\n if (process.env.NODE_ENV !== \"production\") {\n adm.appliedAnnotations_[key] = annotation;\n }\n // Remove applied decorator annotation so we don't try to apply it again in subclass constructor\n (_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? true : delete _adm$target_$storedAn[key];\n}\nfunction assertAnnotable(adm, annotation, key) {\n // Valid annotation\n if (process.env.NODE_ENV !== \"production\" && !isAnnotation(annotation)) {\n die(\"Cannot annotate '\" + adm.name_ + \".\" + key.toString() + \"': Invalid annotation.\");\n }\n /*\r\n // Configurable, not sealed, not frozen\r\n // Possibly not needed, just a little better error then the one thrown by engine.\r\n // Cases where this would be useful the most (subclass field initializer) are not interceptable by this.\r\n if (__DEV__) {\r\n const configurable = getDescriptor(adm.target_, key)?.configurable\r\n const frozen = Object.isFrozen(adm.target_)\r\n const sealed = Object.isSealed(adm.target_)\r\n if (!configurable || frozen || sealed) {\r\n const fieldName = `${adm.name_}.${key.toString()}`\r\n const requestedAnnotationType = annotation.annotationType_\r\n let error = `Cannot apply '${requestedAnnotationType}' to '${fieldName}':`\r\n if (frozen) {\r\n error += `\\nObject is frozen.`\r\n }\r\n if (sealed) {\r\n error += `\\nObject is sealed.`\r\n }\r\n if (!configurable) {\r\n error += `\\nproperty is not configurable.`\r\n // Mention only if caused by us to avoid confusion\r\n if (hasProp(adm.appliedAnnotations!, key)) {\r\n error += `\\nTo prevent accidental re-definition of a field by a subclass, `\r\n error += `all annotated fields of non-plain objects (classes) are not configurable.`\r\n }\r\n }\r\n die(error)\r\n }\r\n }\r\n */\n // Not annotated\n if (process.env.NODE_ENV !== \"production\" && !isOverride(annotation) && hasProp(adm.appliedAnnotations_, key)) {\n var fieldName = adm.name_ + \".\" + key.toString();\n var currentAnnotationType = adm.appliedAnnotations_[key].annotationType_;\n var requestedAnnotationType = annotation.annotationType_;\n die(\"Cannot apply '\" + requestedAnnotationType + \"' to '\" + fieldName + \"':\" + (\"\\nThe field is already annotated with '\" + currentAnnotationType + \"'.\") + \"\\nRe-annotating fields is not allowed.\" + \"\\nUse 'override' annotation for methods overridden by subclass.\");\n }\n}\n\n// Bug in safari 9.* (or iOS 9 safari mobile). See #364\nvar ENTRY_0 = /*#__PURE__*/createArrayEntryDescriptor(0);\nvar safariPrototypeSetterInheritanceBug = /*#__PURE__*/function () {\n var v = false;\n var p = {};\n Object.defineProperty(p, \"0\", {\n set: function set() {\n v = true;\n }\n });\n /*#__PURE__*/Object.create(p)[\"0\"] = 1;\n return v === false;\n}();\n/**\r\n * This array buffer contains two lists of properties, so that all arrays\r\n * can recycle their property definitions, which significantly improves performance of creating\r\n * properties on the fly.\r\n */\nvar OBSERVABLE_ARRAY_BUFFER_SIZE = 0;\n// Typescript workaround to make sure ObservableArray extends Array\nvar StubArray = function StubArray() {};\nfunction inherit(ctor, proto) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(ctor.prototype, proto);\n } else if (ctor.prototype.__proto__ !== undefined) {\n ctor.prototype.__proto__ = proto;\n } else {\n ctor.prototype = proto;\n }\n}\ninherit(StubArray, Array.prototype);\n// Weex proto freeze protection was here,\n// but it is unclear why the hack is need as MobX never changed the prototype\n// anyway, so removed it in V6\nvar LegacyObservableArray = /*#__PURE__*/function (_StubArray, _Symbol$toStringTag, _Symbol$iterator) {\n _inheritsLoose(LegacyObservableArray, _StubArray);\n function LegacyObservableArray(initialValues, enhancer, name, owned) {\n var _this;\n if (name === void 0) {\n name = process.env.NODE_ENV !== \"production\" ? \"ObservableArray@\" + getNextId() : \"ObservableArray\";\n }\n if (owned === void 0) {\n owned = false;\n }\n _this = _StubArray.call(this) || this;\n initObservable(function () {\n var adm = new ObservableArrayAdministration(name, enhancer, owned, true);\n adm.proxy_ = _assertThisInitialized(_this);\n addHiddenFinalProp(_assertThisInitialized(_this), $mobx, adm);\n if (initialValues && initialValues.length) {\n // @ts-ignore\n _this.spliceWithArray(0, 0, initialValues);\n }\n if (safariPrototypeSetterInheritanceBug) {\n // Seems that Safari won't use numeric prototype setter untill any * numeric property is\n // defined on the instance. After that it works fine, even if this property is deleted.\n Object.defineProperty(_assertThisInitialized(_this), \"0\", ENTRY_0);\n }\n });\n return _this;\n }\n var _proto = LegacyObservableArray.prototype;\n _proto.concat = function concat() {\n this[$mobx].atom_.reportObserved();\n for (var _len = arguments.length, arrays = new Array(_len), _key = 0; _key < _len; _key++) {\n arrays[_key] = arguments[_key];\n }\n return Array.prototype.concat.apply(this.slice(),\n //@ts-ignore\n arrays.map(function (a) {\n return isObservableArray(a) ? a.slice() : a;\n }));\n };\n _proto[_Symbol$iterator] = function () {\n var self = this;\n var nextIndex = 0;\n return makeIterable({\n next: function next() {\n return nextIndex < self.length ? {\n value: self[nextIndex++],\n done: false\n } : {\n done: true,\n value: undefined\n };\n }\n });\n };\n _createClass(LegacyObservableArray, [{\n key: \"length\",\n get: function get() {\n return this[$mobx].getArrayLength_();\n },\n set: function set(newLength) {\n this[$mobx].setArrayLength_(newLength);\n }\n }, {\n key: _Symbol$toStringTag,\n get: function get() {\n return \"Array\";\n }\n }]);\n return LegacyObservableArray;\n}(StubArray, Symbol.toStringTag, Symbol.iterator);\nObject.entries(arrayExtensions).forEach(function (_ref) {\n var prop = _ref[0],\n fn = _ref[1];\n if (prop !== \"concat\") {\n addHiddenProp(LegacyObservableArray.prototype, prop, fn);\n }\n});\nfunction createArrayEntryDescriptor(index) {\n return {\n enumerable: false,\n configurable: true,\n get: function get() {\n return this[$mobx].get_(index);\n },\n set: function set(value) {\n this[$mobx].set_(index, value);\n }\n };\n}\nfunction createArrayBufferItem(index) {\n defineProperty(LegacyObservableArray.prototype, \"\" + index, createArrayEntryDescriptor(index));\n}\nfunction reserveArrayBuffer(max) {\n if (max > OBSERVABLE_ARRAY_BUFFER_SIZE) {\n for (var index = OBSERVABLE_ARRAY_BUFFER_SIZE; index < max + 100; index++) {\n createArrayBufferItem(index);\n }\n OBSERVABLE_ARRAY_BUFFER_SIZE = max;\n }\n}\nreserveArrayBuffer(1000);\nfunction createLegacyArray(initialValues, enhancer, name) {\n return new LegacyObservableArray(initialValues, enhancer, name);\n}\n\nfunction getAtom(thing, property) {\n if (typeof thing === \"object\" && thing !== null) {\n if (isObservableArray(thing)) {\n if (property !== undefined) {\n die(23);\n }\n return thing[$mobx].atom_;\n }\n if (isObservableSet(thing)) {\n return thing.atom_;\n }\n if (isObservableMap(thing)) {\n if (property === undefined) {\n return thing.keysAtom_;\n }\n var observable = thing.data_.get(property) || thing.hasMap_.get(property);\n if (!observable) {\n die(25, property, getDebugName(thing));\n }\n return observable;\n }\n if (isObservableObject(thing)) {\n if (!property) {\n return die(26);\n }\n var _observable = thing[$mobx].values_.get(property);\n if (!_observable) {\n die(27, property, getDebugName(thing));\n }\n return _observable;\n }\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) {\n return thing;\n }\n } else if (isFunction(thing)) {\n if (isReaction(thing[$mobx])) {\n // disposer function\n return thing[$mobx];\n }\n }\n die(28);\n}\nfunction getAdministration(thing, property) {\n if (!thing) {\n die(29);\n }\n if (property !== undefined) {\n return getAdministration(getAtom(thing, property));\n }\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) {\n return thing;\n }\n if (isObservableMap(thing) || isObservableSet(thing)) {\n return thing;\n }\n if (thing[$mobx]) {\n return thing[$mobx];\n }\n die(24, thing);\n}\nfunction getDebugName(thing, property) {\n var named;\n if (property !== undefined) {\n named = getAtom(thing, property);\n } else if (isAction(thing)) {\n return thing.name;\n } else if (isObservableObject(thing) || isObservableMap(thing) || isObservableSet(thing)) {\n named = getAdministration(thing);\n } else {\n // valid for arrays as well\n named = getAtom(thing);\n }\n return named.name_;\n}\n/**\r\n * Helper function for initializing observable structures, it applies:\r\n * 1. allowStateChanges so we don't violate enforceActions.\r\n * 2. untracked so we don't accidentaly subscribe to anything observable accessed during init in case the observable is created inside derivation.\r\n * 3. batch to avoid state version updates\r\n */\nfunction initObservable(cb) {\n var derivation = untrackedStart();\n var allowStateChanges = allowStateChangesStart(true);\n startBatch();\n try {\n return cb();\n } finally {\n endBatch();\n allowStateChangesEnd(allowStateChanges);\n untrackedEnd(derivation);\n }\n}\n\nvar toString = objectPrototype.toString;\nfunction deepEqual(a, b, depth) {\n if (depth === void 0) {\n depth = -1;\n }\n return eq(a, b, depth);\n}\n// Copied from https://github.com/jashkenas/underscore/blob/5c237a7c682fb68fd5378203f0bf22dce1624854/underscore.js#L1186-L1289\n// Internal recursive comparison function for `isEqual`.\nfunction eq(a, b, depth, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) {\n return a !== 0 || 1 / a === 1 / b;\n }\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null) {\n return false;\n }\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a) {\n return b !== b;\n }\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== \"function\" && type !== \"object\" && typeof b != \"object\") {\n return false;\n }\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) {\n return false;\n }\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case \"[object RegExp]\":\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case \"[object String]\":\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return \"\" + a === \"\" + b;\n case \"[object Number]\":\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) {\n return +b !== +b;\n }\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case \"[object Date]\":\n case \"[object Boolean]\":\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case \"[object Symbol]\":\n return typeof Symbol !== \"undefined\" && Symbol.valueOf.call(a) === Symbol.valueOf.call(b);\n case \"[object Map]\":\n case \"[object Set]\":\n // Maps and Sets are unwrapped to arrays of entry-pairs, adding an incidental level.\n // Hide this extra level by increasing the depth.\n if (depth >= 0) {\n depth++;\n }\n break;\n }\n // Unwrap any wrapped objects.\n a = unwrap(a);\n b = unwrap(b);\n var areArrays = className === \"[object Array]\";\n if (!areArrays) {\n if (typeof a != \"object\" || typeof b != \"object\") {\n return false;\n }\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor,\n bCtor = b.constructor;\n if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor && isFunction(bCtor) && bCtor instanceof bCtor) && \"constructor\" in a && \"constructor\" in b) {\n return false;\n }\n }\n if (depth === 0) {\n return false;\n } else if (depth < 0) {\n depth = -1;\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) {\n return bStack[length] === b;\n }\n }\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) {\n return false;\n }\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], depth - 1, aStack, bStack)) {\n return false;\n }\n }\n } else {\n // Deep compare objects.\n var keys = Object.keys(a);\n var key;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (Object.keys(b).length !== length) {\n return false;\n }\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(hasProp(b, key) && eq(a[key], b[key], depth - 1, aStack, bStack))) {\n return false;\n }\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n}\nfunction unwrap(a) {\n if (isObservableArray(a)) {\n return a.slice();\n }\n if (isES6Map(a) || isObservableMap(a)) {\n return Array.from(a.entries());\n }\n if (isES6Set(a) || isObservableSet(a)) {\n return Array.from(a.entries());\n }\n return a;\n}\n\nfunction makeIterable(iterator) {\n iterator[Symbol.iterator] = getSelf;\n return iterator;\n}\nfunction getSelf() {\n return this;\n}\n\nfunction isAnnotation(thing) {\n return (\n // Can be function\n thing instanceof Object && typeof thing.annotationType_ === \"string\" && isFunction(thing.make_) && isFunction(thing.extend_)\n );\n}\n\n/**\r\n * (c) Michel Weststrate 2015 - 2020\r\n * MIT Licensed\r\n *\r\n * Welcome to the mobx sources! To get a global overview of how MobX internally works,\r\n * this is a good place to start:\r\n * https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74\r\n *\r\n * Source folders:\r\n * ===============\r\n *\r\n * - api/ Most of the public static methods exposed by the module can be found here.\r\n * - core/ Implementation of the MobX algorithm; atoms, derivations, reactions, dependency trees, optimizations. Cool stuff can be found here.\r\n * - types/ All the magic that is need to have observable objects, arrays and values is in this folder. Including the modifiers like `asFlat`.\r\n * - utils/ Utility stuff.\r\n *\r\n */\n[\"Symbol\", \"Map\", \"Set\"].forEach(function (m) {\n var g = getGlobal();\n if (typeof g[m] === \"undefined\") {\n die(\"MobX requires global '\" + m + \"' to be available or polyfilled\");\n }\n});\nif (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === \"object\") {\n // See: https://github.com/andykog/mobx-devtools/\n __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({\n spy: spy,\n extras: {\n getDebugName: getDebugName\n },\n $mobx: $mobx\n });\n}\n\nexport { $mobx, FlowCancellationError, ObservableMap, ObservableSet, Reaction, allowStateChanges as _allowStateChanges, runInAction as _allowStateChangesInsideComputed, allowStateReadsEnd as _allowStateReadsEnd, allowStateReadsStart as _allowStateReadsStart, autoAction as _autoAction, _endAction, getAdministration as _getAdministration, getGlobalState as _getGlobalState, interceptReads as _interceptReads, isComputingDerivation as _isComputingDerivation, resetGlobalState as _resetGlobalState, _startAction, action, autorun, comparer, computed, configure, createAtom, apiDefineProperty as defineProperty, entries, extendObservable, flow, flowResult, get, getAtom, getDebugName, getDependencyTree, getObserverTree, has, intercept, isAction, isObservableValue as isBoxedObservable, isComputed, isComputedProp, isFlow, isFlowCancellationError, isObservable, isObservableArray, isObservableMap, isObservableObject, isObservableProp, isObservableSet, keys, makeAutoObservable, makeObservable, observable, observe, onBecomeObserved, onBecomeUnobserved, onReactionError, override, apiOwnKeys as ownKeys, reaction, remove, runInAction, set, spy, toJS, trace, transaction, untracked, values, when };\n//# sourceMappingURL=mobx.esm.js.map\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","export function createErrorClass(createImpl) {\n var _super = function (instance) {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n var ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","import { createErrorClass } from './createErrorClass';\nexport var UnsubscriptionError = createErrorClass(function (_super) {\n return function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ')\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n };\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","export function arrRemove(arr, item) {\n if (arr) {\n var index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n//# sourceMappingURL=arrRemove.js.map","import { __read, __spreadArray, __values } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nvar Subscription = (function () {\n function Subscription(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n Subscription.prototype.unsubscribe = function () {\n var e_1, _a, e_2, _b;\n var errors;\n if (!this.closed) {\n this.closed = true;\n var _parentage = this._parentage;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n try {\n for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {\n var parent_1 = _parentage_1_1.value;\n parent_1.remove(this);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n var initialFinalizer = this.initialTeardown;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n var _finalizers = this._finalizers;\n if (_finalizers) {\n this._finalizers = null;\n try {\n for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {\n var finalizer = _finalizers_1_1.value;\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n };\n Subscription.prototype.add = function (teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n };\n Subscription.prototype._hasParent = function (parent) {\n var _parentage = this._parentage;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n };\n Subscription.prototype._addParent = function (parent) {\n var _parentage = this._parentage;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n };\n Subscription.prototype._removeParent = function (parent) {\n var _parentage = this._parentage;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n };\n Subscription.prototype.remove = function (teardown) {\n var _finalizers = this._finalizers;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n };\n Subscription.EMPTY = (function () {\n var empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n return Subscription;\n}());\nexport { Subscription };\nexport var EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n//# sourceMappingURL=Subscription.js.map","export var config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n//# sourceMappingURL=config.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var timeoutProvider = {\n setTimeout: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = timeoutProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearTimeout: function (handle) {\n var delegate = timeoutProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=timeoutProvider.js.map","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(function () {\n var onUnhandledError = config.onUnhandledError;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","import { config } from '../config';\nvar context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n var isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n var _a = context, errorThrown = _a.errorThrown, error = _a.error;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n//# sourceMappingURL=errorContext.js.map","import { __extends } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nvar Subscriber = (function (_super) {\n __extends(Subscriber, _super);\n function Subscriber(destination) {\n var _this = _super.call(this) || this;\n _this.isStopped = false;\n if (destination) {\n _this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(_this);\n }\n }\n else {\n _this.destination = EMPTY_OBSERVER;\n }\n return _this;\n }\n Subscriber.create = function (next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n };\n Subscriber.prototype.next = function (value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (!this.closed) {\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n this.destination = null;\n }\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n };\n Subscriber.prototype._complete = function () {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nvar ConsumerObserver = (function () {\n function ConsumerObserver(partialObserver) {\n this.partialObserver = partialObserver;\n }\n ConsumerObserver.prototype.next = function (value) {\n var partialObserver = this.partialObserver;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n ConsumerObserver.prototype.error = function (err) {\n var partialObserver = this.partialObserver;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n };\n ConsumerObserver.prototype.complete = function () {\n var partialObserver = this.partialObserver;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n return ConsumerObserver;\n}());\nvar SafeSubscriber = (function (_super) {\n __extends(SafeSubscriber, _super);\n function SafeSubscriber(observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n var partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined,\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n var context_1;\n if (_this && config.useDeprecatedNextContext) {\n context_1 = Object.create(observerOrNext);\n context_1.unsubscribe = function () { return _this.unsubscribe(); };\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context_1),\n error: observerOrNext.error && bind(observerOrNext.error, context_1),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n _this.destination = new ConsumerObserver(partialObserver);\n return _this;\n }\n return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n var onStoppedNotification = config.onStoppedNotification;\n onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); });\n}\nexport var EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n//# sourceMappingURL=Subscriber.js.map","export var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();\n//# sourceMappingURL=observable.js.map","export function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map","import { identity } from './identity';\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nvar Observable = (function () {\n function Observable(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var _this = this;\n var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(function () {\n var _a = _this, operator = _a.operator, source = _a.source;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n _this._subscribe(subscriber)\n :\n _this._trySubscribe(subscriber));\n });\n return subscriber;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n _this.subscribe(subscriber);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n//# sourceMappingURL=Observable.js.map","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return function (source) {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n//# sourceMappingURL=lift.js.map","import { __extends } from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nvar OperatorSubscriber = (function (_super) {\n __extends(OperatorSubscriber, _super);\n function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n var _this = _super.call(this, destination) || this;\n _this.onFinalize = onFinalize;\n _this.shouldUnsubscribe = shouldUnsubscribe;\n _this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : _super.prototype._next;\n _this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._error;\n _this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._complete;\n return _this;\n }\n OperatorSubscriber.prototype.unsubscribe = function () {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n var closed_1 = this.closed;\n _super.prototype.unsubscribe.call(this);\n !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n };\n return OperatorSubscriber;\n}(Subscriber));\nexport { OperatorSubscriber };\n//# sourceMappingURL=OperatorSubscriber.js.map","import { createErrorClass } from './createErrorClass';\nexport var ObjectUnsubscribedError = createErrorClass(function (_super) {\n return function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n };\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { __extends, __values } from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nvar Subject = (function (_super) {\n __extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.closed = false;\n _this.currentObservers = null;\n _this.observers = [];\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype._throwIfClosed = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n };\n Subject.prototype.next = function (value) {\n var _this = this;\n errorContext(function () {\n var e_1, _a;\n _this._throwIfClosed();\n if (!_this.isStopped) {\n if (!_this.currentObservers) {\n _this.currentObservers = Array.from(_this.observers);\n }\n try {\n for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {\n var observer = _c.value;\n observer.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n });\n };\n Subject.prototype.error = function (err) {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.hasError = _this.isStopped = true;\n _this.thrownError = err;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n };\n Subject.prototype.complete = function () {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.isStopped = true;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n };\n Object.defineProperty(Subject.prototype, \"observed\", {\n get: function () {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n },\n enumerable: false,\n configurable: true\n });\n Subject.prototype._trySubscribe = function (subscriber) {\n this._throwIfClosed();\n return _super.prototype._trySubscribe.call(this, subscriber);\n };\n Subject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n };\n Subject.prototype._innerSubscribe = function (subscriber) {\n var _this = this;\n var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(function () {\n _this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n };\n Subject.prototype._checkFinalizedStatuses = function (subscriber) {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = (function (_super) {\n __extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n };\n AnonymousSubject.prototype.error = function (err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n AnonymousSubject.prototype.complete = function () {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n };\n return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map","export var dateTimestampProvider = {\n now: function () {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nvar ReplaySubject = (function (_super) {\n __extends(ReplaySubject, _super);\n function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) {\n if (_bufferSize === void 0) { _bufferSize = Infinity; }\n if (_windowTime === void 0) { _windowTime = Infinity; }\n if (_timestampProvider === void 0) { _timestampProvider = dateTimestampProvider; }\n var _this = _super.call(this) || this;\n _this._bufferSize = _bufferSize;\n _this._windowTime = _windowTime;\n _this._timestampProvider = _timestampProvider;\n _this._buffer = [];\n _this._infiniteTimeWindow = true;\n _this._infiniteTimeWindow = _windowTime === Infinity;\n _this._bufferSize = Math.max(1, _bufferSize);\n _this._windowTime = Math.max(1, _windowTime);\n return _this;\n }\n ReplaySubject.prototype.next = function (value) {\n var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n _super.prototype.next.call(this, value);\n };\n ReplaySubject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._trimBuffer();\n var subscription = this._innerSubscribe(subscriber);\n var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer;\n var copy = _buffer.slice();\n for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i]);\n }\n this._checkFinalizedStatuses(subscriber);\n return subscription;\n };\n ReplaySubject.prototype._trimBuffer = function () {\n var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow;\n var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n if (!_infiniteTimeWindow) {\n var now = _timestampProvider.now();\n var last = 0;\n for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n };\n return ReplaySubject;\n}(Subject));\nexport { ReplaySubject };\n//# sourceMappingURL=ReplaySubject.js.map","import { Observable } from '../Observable';\nexport var EMPTY = new Observable(function (subscriber) { return subscriber.complete(); });\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });\n}\n//# sourceMappingURL=empty.js.map","import { isFunction } from './isFunction';\nexport function isScheduler(value) {\n return value && isFunction(value.schedule);\n}\n//# sourceMappingURL=isScheduler.js.map","import { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n//# sourceMappingURL=args.js.map","export var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n//# sourceMappingURL=isPromise.js.map","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n return isFunction(input[Symbol_observable]);\n}\n//# sourceMappingURL=isInteropObservable.js.map","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n//# sourceMappingURL=isAsyncIterable.js.map","export function createInvalidObservableTypeError(input) {\n return new TypeError(\"You provided \" + (input !== null && typeof input === 'object' ? 'an invalid object' : \"'\" + input + \"'\") + \" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.\");\n}\n//# sourceMappingURL=throwUnobservableError.js.map","export function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport var iterator = getSymbolIterator();\n//# sourceMappingURL=iterator.js.map","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n//# sourceMappingURL=isIterable.js.map","import { __asyncGenerator, __await, __generator } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() {\n var reader, _a, value, done;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n reader = readableStream.getReader();\n _b.label = 1;\n case 1:\n _b.trys.push([1, , 9, 10]);\n _b.label = 2;\n case 2:\n if (!true) return [3, 8];\n return [4, __await(reader.read())];\n case 3:\n _a = _b.sent(), value = _a.value, done = _a.done;\n if (!done) return [3, 5];\n return [4, __await(void 0)];\n case 4: return [2, _b.sent()];\n case 5: return [4, __await(value)];\n case 6: return [4, _b.sent()];\n case 7:\n _b.sent();\n return [3, 2];\n case 8: return [3, 10];\n case 9:\n reader.releaseLock();\n return [7];\n case 10: return [2];\n }\n });\n });\n}\nexport function isReadableStreamLike(obj) {\n return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n//# sourceMappingURL=isReadableStreamLike.js.map","import { __asyncValues, __awaiter, __generator, __values } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n if (input instanceof Observable) {\n return input;\n }\n if (input != null) {\n if (isInteropObservable(input)) {\n return fromInteropObservable(input);\n }\n if (isArrayLike(input)) {\n return fromArrayLike(input);\n }\n if (isPromise(input)) {\n return fromPromise(input);\n }\n if (isAsyncIterable(input)) {\n return fromAsyncIterable(input);\n }\n if (isIterable(input)) {\n return fromIterable(input);\n }\n if (isReadableStreamLike(input)) {\n return fromReadableStreamLike(input);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n return new Observable(function (subscriber) {\n var obs = obj[Symbol_observable]();\n if (isFunction(obs.subscribe)) {\n return obs.subscribe(subscriber);\n }\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n });\n}\nexport function fromArrayLike(array) {\n return new Observable(function (subscriber) {\n for (var i = 0; i < array.length && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n });\n}\nexport function fromPromise(promise) {\n return new Observable(function (subscriber) {\n promise\n .then(function (value) {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, function (err) { return subscriber.error(err); })\n .then(null, reportUnhandledError);\n });\n}\nexport function fromIterable(iterable) {\n return new Observable(function (subscriber) {\n var e_1, _a;\n try {\n for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {\n var value = iterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n subscriber.complete();\n });\n}\nexport function fromAsyncIterable(asyncIterable) {\n return new Observable(function (subscriber) {\n process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); });\n });\n}\nexport function fromReadableStreamLike(readableStream) {\n return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n var asyncIterable_1, asyncIterable_1_1;\n var e_2, _a;\n return __awaiter(this, void 0, void 0, function () {\n var value, e_2_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 5, 6, 11]);\n asyncIterable_1 = __asyncValues(asyncIterable);\n _b.label = 1;\n case 1: return [4, asyncIterable_1.next()];\n case 2:\n if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4];\n value = asyncIterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return [2];\n }\n _b.label = 3;\n case 3: return [3, 1];\n case 4: return [3, 11];\n case 5:\n e_2_1 = _b.sent();\n e_2 = { error: e_2_1 };\n return [3, 11];\n case 6:\n _b.trys.push([6, , 9, 10]);\n if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8];\n return [4, _a.call(asyncIterable_1)];\n case 7:\n _b.sent();\n _b.label = 8;\n case 8: return [3, 10];\n case 9:\n if (e_2) throw e_2.error;\n return [7];\n case 10: return [7];\n case 11:\n subscriber.complete();\n return [2];\n }\n });\n });\n}\n//# sourceMappingURL=innerFrom.js.map","export function executeSchedule(parentSubscription, scheduler, work, delay, repeat) {\n if (delay === void 0) { delay = 0; }\n if (repeat === void 0) { repeat = false; }\n var scheduleSubscription = scheduler.schedule(function () {\n work();\n if (repeat) {\n parentSubscription.add(this.schedule(null, delay));\n }\n else {\n this.unsubscribe();\n }\n }, delay);\n parentSubscription.add(scheduleSubscription);\n if (!repeat) {\n return scheduleSubscription;\n }\n}\n//# sourceMappingURL=executeSchedule.js.map","import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); }));\n });\n}\n//# sourceMappingURL=observeOn.js.map","import { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return operate(function (source, subscriber) {\n subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay));\n });\n}\n//# sourceMappingURL=subscribeOn.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=scheduleObservable.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=schedulePromise.js.map","import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n return new Observable(function (subscriber) {\n var i = 0;\n return scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n }\n else {\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n this.schedule();\n }\n }\n });\n });\n}\n//# sourceMappingURL=scheduleArray.js.map","import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n return new Observable(function (subscriber) {\n var iterator;\n executeSchedule(subscriber, scheduler, function () {\n iterator = input[Symbol_iterator]();\n executeSchedule(subscriber, scheduler, function () {\n var _a;\n var value;\n var done;\n try {\n (_a = iterator.next(), value = _a.value, done = _a.done);\n }\n catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n }\n else {\n subscriber.next(value);\n }\n }, 0, true);\n });\n return function () { return isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); };\n });\n}\n//# sourceMappingURL=scheduleIterable.js.map","import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable(function (subscriber) {\n executeSchedule(subscriber, scheduler, function () {\n var iterator = input[Symbol.asyncIterator]();\n executeSchedule(subscriber, scheduler, function () {\n iterator.next().then(function (result) {\n if (result.done) {\n subscriber.complete();\n }\n else {\n subscriber.next(result.value);\n }\n });\n }, 0, true);\n });\n });\n}\n//# sourceMappingURL=scheduleAsyncIterable.js.map","import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n//# sourceMappingURL=scheduleReadableStreamLike.js.map","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n if (isAsyncIterable(input)) {\n return scheduleAsyncIterable(input, scheduler);\n }\n if (isIterable(input)) {\n return scheduleIterable(input, scheduler);\n }\n if (isReadableStreamLike(input)) {\n return scheduleReadableStreamLike(input, scheduler);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\n//# sourceMappingURL=scheduled.js.map","import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n//# sourceMappingURL=from.js.map","import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n return from(args, scheduler);\n}\n//# sourceMappingURL=of.js.map","import { createErrorClass } from './createErrorClass';\nexport var EmptyError = createErrorClass(function (_super) { return function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n}; });\n//# sourceMappingURL=EmptyError.js.map","import { EmptyError } from './util/EmptyError';\nimport { SafeSubscriber } from './Subscriber';\nexport function firstValueFrom(source, config) {\n var hasConfig = typeof config === 'object';\n return new Promise(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n resolve(value);\n subscriber.unsubscribe();\n },\n error: reject,\n complete: function () {\n if (hasConfig) {\n resolve(config.defaultValue);\n }\n else {\n reject(new EmptyError());\n }\n },\n });\n source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=firstValueFrom.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n//# sourceMappingURL=map.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { map } from \"../operators/map\";\nvar isArray = Array.isArray;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(function (args) { return callOrApply(fn, args); });\n}\n//# sourceMappingURL=mapOneOrManyArgs.js.map","var isArray = Array.isArray;\nvar getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys;\nexport function argsArgArrayOrObject(args) {\n if (args.length === 1) {\n var first_1 = args[0];\n if (isArray(first_1)) {\n return { args: first_1, keys: null };\n }\n if (isPOJO(first_1)) {\n var keys = getKeys(first_1);\n return {\n args: keys.map(function (key) { return first_1[key]; }),\n keys: keys,\n };\n }\n }\n return { args: args, keys: null };\n}\nfunction isPOJO(obj) {\n return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n//# sourceMappingURL=argsArgArrayOrObject.js.map","export function createObject(keys, values) {\n return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {});\n}\n//# sourceMappingURL=createObject.js.map","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n var resultSelector = popResultSelector(args);\n var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys;\n if (observables.length === 0) {\n return from([], scheduler);\n }\n var result = new Observable(combineLatestInit(observables, scheduler, keys\n ?\n function (values) { return createObject(keys, values); }\n :\n identity));\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform) {\n if (valueTransform === void 0) { valueTransform = identity; }\n return function (subscriber) {\n maybeSchedule(scheduler, function () {\n var length = observables.length;\n var values = new Array(length);\n var active = length;\n var remainingFirstValues = length;\n var _loop_1 = function (i) {\n maybeSchedule(scheduler, function () {\n var source = from(observables[i], scheduler);\n var hasFirstValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n values[i] = value;\n if (!hasFirstValue) {\n hasFirstValue = true;\n remainingFirstValues--;\n }\n if (!remainingFirstValues) {\n subscriber.next(valueTransform(values.slice()));\n }\n }, function () {\n if (!--active) {\n subscriber.complete();\n }\n }));\n }, subscriber);\n };\n for (var i = 0; i < length; i++) {\n _loop_1(i);\n }\n }, subscriber);\n };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n if (scheduler) {\n executeSchedule(subscription, scheduler, execute);\n }\n else {\n execute();\n }\n}\n//# sourceMappingURL=combineLatest.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n var buffer = [];\n var active = 0;\n var index = 0;\n var isComplete = false;\n var checkComplete = function () {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); };\n var doInnerSub = function (value) {\n expand && subscriber.next(value);\n active++;\n var innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function (innerValue) {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n }\n else {\n subscriber.next(innerValue);\n }\n }, function () {\n innerComplete = true;\n }, undefined, function () {\n if (innerComplete) {\n try {\n active--;\n var _loop_1 = function () {\n var bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); });\n }\n else {\n doInnerSub(bufferedValue);\n }\n };\n while (buffer.length && active < concurrent) {\n _loop_1();\n }\n checkComplete();\n }\n catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, function () {\n isComplete = true;\n checkComplete();\n }));\n return function () {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n//# sourceMappingURL=mergeInternals.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n if (isFunction(resultSelector)) {\n return mergeMap(function (a, i) { return map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom(project(a, i))); }, concurrent);\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate(function (source, subscriber) { return mergeInternals(source, subscriber, project, concurrent); });\n}\n//# sourceMappingURL=mergeMap.js.map","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return concatAll()(from(args, popScheduler(args)));\n}\n//# sourceMappingURL=concat.js.map","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nexport function defer(observableFactory) {\n return new Observable(function (subscriber) {\n innerFrom(observableFactory()).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=defer.js.map","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n var concurrent = popNumber(args, Infinity);\n var sources = args;\n return !sources.length\n ?\n EMPTY\n : sources.length === 1\n ?\n innerFrom(sources[0])\n :\n mergeAll(concurrent)(from(sources, scheduler));\n}\n//# sourceMappingURL=merge.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); }));\n });\n}\n//# sourceMappingURL=filter.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate(function (source, subscriber) {\n var innerSub = null;\n var syncUnsub = false;\n var handledResult;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n//# sourceMappingURL=catchError.js.map","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMap(project, resultSelector) {\n return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n//# sourceMappingURL=concatMap.js.map","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0\n ?\n function () { return EMPTY; }\n : operate(function (source, subscriber) {\n var seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n//# sourceMappingURL=take.js.map","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector) {\n if (keySelector === void 0) { keySelector = identity; }\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate(function (source, subscriber) {\n var previousKey;\n var first = true;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n//# sourceMappingURL=distinctUntilChanged.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { from } from '../observable/from';\nimport { take } from '../operators/take';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { operate } from '../util/lift';\nexport function share(options) {\n if (options === void 0) { options = {}; }\n var _a = options.connector, connector = _a === void 0 ? function () { return new Subject(); } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d;\n return function (wrapperSource) {\n var connection = null;\n var resetConnection = null;\n var subject = null;\n var refCount = 0;\n var hasCompleted = false;\n var hasErrored = false;\n var cancelReset = function () {\n resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();\n resetConnection = null;\n };\n var reset = function () {\n cancelReset();\n connection = subject = null;\n hasCompleted = hasErrored = false;\n };\n var resetAndUnsubscribe = function () {\n var conn = connection;\n reset();\n conn === null || conn === void 0 ? void 0 : conn.unsubscribe();\n };\n return operate(function (source, subscriber) {\n refCount++;\n if (!hasErrored && !hasCompleted) {\n cancelReset();\n }\n var dest = (subject = subject !== null && subject !== void 0 ? subject : connector());\n subscriber.add(function () {\n refCount--;\n if (refCount === 0 && !hasErrored && !hasCompleted) {\n resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n }\n });\n dest.subscribe(subscriber);\n if (!connection) {\n connection = new SafeSubscriber({\n next: function (value) { return dest.next(value); },\n error: function (err) {\n hasErrored = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnError, err);\n dest.error(err);\n },\n complete: function () {\n hasCompleted = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnComplete);\n dest.complete();\n },\n });\n from(source).subscribe(connection);\n }\n })(wrapperSource);\n };\n}\nfunction handleReset(reset, on) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n if (on === true) {\n reset();\n return null;\n }\n if (on === false) {\n return null;\n }\n return on.apply(void 0, __spreadArray([], __read(args))).pipe(take(1))\n .subscribe(function () { return reset(); });\n}\n//# sourceMappingURL=share.js.map","import { ReplaySubject } from '../ReplaySubject';\nimport { share } from './share';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n var _a, _b, _c;\n var bufferSize;\n var refCount = false;\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n (_a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler);\n }\n else {\n bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity;\n }\n return share({\n connector: function () { return new ReplaySubject(bufferSize, windowTime, scheduler); },\n resetOnError: true,\n resetOnComplete: false,\n resetOnRefCountZero: refCount,\n });\n}\n//# sourceMappingURL=shareReplay.js.map","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n var tapObserver = isFunction(observerOrNext) || error || complete\n ?\n { next: observerOrNext, error: error, complete: complete }\n : observerOrNext;\n return tapObserver\n ? operate(function (source, subscriber) {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n var isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, function () {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, function (err) {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, function () {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n })\n :\n identity;\n}\n//# sourceMappingURL=tap.js.map","export default {}","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","export const version = \"logger/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nlet _permanentCensorErrors = false;\nlet _censorErrors = false;\nconst LogLevels = { debug: 1, \"default\": 2, info: 2, warning: 3, error: 4, off: 5 };\nlet _logLevel = LogLevels[\"default\"];\nimport { version } from \"./_version\";\nlet _globalLogger = null;\nfunction _checkNormalize() {\n try {\n const missing = [];\n // Make sure all forms of normalization are supported\n [\"NFD\", \"NFC\", \"NFKD\", \"NFKC\"].forEach((form) => {\n try {\n if (\"test\".normalize(form) !== \"test\") {\n throw new Error(\"bad normalize\");\n }\n ;\n }\n catch (error) {\n missing.push(form);\n }\n });\n if (missing.length) {\n throw new Error(\"missing \" + missing.join(\", \"));\n }\n if (String.fromCharCode(0xe9).normalize(\"NFD\") !== String.fromCharCode(0x65, 0x0301)) {\n throw new Error(\"broken implementation\");\n }\n }\n catch (error) {\n return error.message;\n }\n return null;\n}\nconst _normalizeError = _checkNormalize();\nexport var LogLevel;\n(function (LogLevel) {\n LogLevel[\"DEBUG\"] = \"DEBUG\";\n LogLevel[\"INFO\"] = \"INFO\";\n LogLevel[\"WARNING\"] = \"WARNING\";\n LogLevel[\"ERROR\"] = \"ERROR\";\n LogLevel[\"OFF\"] = \"OFF\";\n})(LogLevel || (LogLevel = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ///////////////////\n // Generic Errors\n // Unknown Error\n ErrorCode[\"UNKNOWN_ERROR\"] = \"UNKNOWN_ERROR\";\n // Not Implemented\n ErrorCode[\"NOT_IMPLEMENTED\"] = \"NOT_IMPLEMENTED\";\n // Unsupported Operation\n // - operation\n ErrorCode[\"UNSUPPORTED_OPERATION\"] = \"UNSUPPORTED_OPERATION\";\n // Network Error (i.e. Ethereum Network, such as an invalid chain ID)\n // - event (\"noNetwork\" is not re-thrown in provider.ready; otherwise thrown)\n ErrorCode[\"NETWORK_ERROR\"] = \"NETWORK_ERROR\";\n // Some sort of bad response from the server\n ErrorCode[\"SERVER_ERROR\"] = \"SERVER_ERROR\";\n // Timeout\n ErrorCode[\"TIMEOUT\"] = \"TIMEOUT\";\n ///////////////////\n // Operational Errors\n // Buffer Overrun\n ErrorCode[\"BUFFER_OVERRUN\"] = \"BUFFER_OVERRUN\";\n // Numeric Fault\n // - operation: the operation being executed\n // - fault: the reason this faulted\n ErrorCode[\"NUMERIC_FAULT\"] = \"NUMERIC_FAULT\";\n ///////////////////\n // Argument Errors\n // Missing new operator to an object\n // - name: The name of the class\n ErrorCode[\"MISSING_NEW\"] = \"MISSING_NEW\";\n // Invalid argument (e.g. value is incompatible with type) to a function:\n // - argument: The argument name that was invalid\n // - value: The value of the argument\n ErrorCode[\"INVALID_ARGUMENT\"] = \"INVALID_ARGUMENT\";\n // Missing argument to a function:\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"MISSING_ARGUMENT\"] = \"MISSING_ARGUMENT\";\n // Too many arguments\n // - count: The number of arguments received\n // - expectedCount: The number of arguments expected\n ErrorCode[\"UNEXPECTED_ARGUMENT\"] = \"UNEXPECTED_ARGUMENT\";\n ///////////////////\n // Blockchain Errors\n // Call exception\n // - transaction: the transaction\n // - address?: the contract address\n // - args?: The arguments passed into the function\n // - method?: The Solidity method signature\n // - errorSignature?: The EIP848 error signature\n // - errorArgs?: The EIP848 error parameters\n // - reason: The reason (only for EIP848 \"Error(string)\")\n ErrorCode[\"CALL_EXCEPTION\"] = \"CALL_EXCEPTION\";\n // Insufficient funds (< value + gasLimit * gasPrice)\n // - transaction: the transaction attempted\n ErrorCode[\"INSUFFICIENT_FUNDS\"] = \"INSUFFICIENT_FUNDS\";\n // Nonce has already been used\n // - transaction: the transaction attempted\n ErrorCode[\"NONCE_EXPIRED\"] = \"NONCE_EXPIRED\";\n // The replacement fee for the transaction is too low\n // - transaction: the transaction attempted\n ErrorCode[\"REPLACEMENT_UNDERPRICED\"] = \"REPLACEMENT_UNDERPRICED\";\n // The gas limit could not be estimated\n // - transaction: the transaction passed to estimateGas\n ErrorCode[\"UNPREDICTABLE_GAS_LIMIT\"] = \"UNPREDICTABLE_GAS_LIMIT\";\n // The transaction was replaced by one with a higher gas price\n // - reason: \"cancelled\", \"replaced\" or \"repriced\"\n // - cancelled: true if reason == \"cancelled\" or reason == \"replaced\")\n // - hash: original transaction hash\n // - replacement: the full TransactionsResponse for the replacement\n // - receipt: the receipt of the replacement\n ErrorCode[\"TRANSACTION_REPLACED\"] = \"TRANSACTION_REPLACED\";\n ///////////////////\n // Interaction Errors\n // The user rejected the action, such as signing a message or sending\n // a transaction\n ErrorCode[\"ACTION_REJECTED\"] = \"ACTION_REJECTED\";\n})(ErrorCode || (ErrorCode = {}));\n;\nconst HEX = \"0123456789abcdef\";\nexport class Logger {\n constructor(version) {\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n value: version,\n writable: false\n });\n }\n _log(logLevel, args) {\n const level = logLevel.toLowerCase();\n if (LogLevels[level] == null) {\n this.throwArgumentError(\"invalid log level name\", \"logLevel\", logLevel);\n }\n if (_logLevel > LogLevels[level]) {\n return;\n }\n console.log.apply(console, args);\n }\n debug(...args) {\n this._log(Logger.levels.DEBUG, args);\n }\n info(...args) {\n this._log(Logger.levels.INFO, args);\n }\n warn(...args) {\n this._log(Logger.levels.WARNING, args);\n }\n makeError(message, code, params) {\n // Errors are being censored\n if (_censorErrors) {\n return this.makeError(\"censored error\", code, {});\n }\n if (!code) {\n code = Logger.errors.UNKNOWN_ERROR;\n }\n if (!params) {\n params = {};\n }\n const messageDetails = [];\n Object.keys(params).forEach((key) => {\n const value = params[key];\n try {\n if (value instanceof Uint8Array) {\n let hex = \"\";\n for (let i = 0; i < value.length; i++) {\n hex += HEX[value[i] >> 4];\n hex += HEX[value[i] & 0x0f];\n }\n messageDetails.push(key + \"=Uint8Array(0x\" + hex + \")\");\n }\n else {\n messageDetails.push(key + \"=\" + JSON.stringify(value));\n }\n }\n catch (error) {\n messageDetails.push(key + \"=\" + JSON.stringify(params[key].toString()));\n }\n });\n messageDetails.push(`code=${code}`);\n messageDetails.push(`version=${this.version}`);\n const reason = message;\n let url = \"\";\n switch (code) {\n case ErrorCode.NUMERIC_FAULT: {\n url = \"NUMERIC_FAULT\";\n const fault = message;\n switch (fault) {\n case \"overflow\":\n case \"underflow\":\n case \"division-by-zero\":\n url += \"-\" + fault;\n break;\n case \"negative-power\":\n case \"negative-width\":\n url += \"-unsupported\";\n break;\n case \"unbound-bitwise-result\":\n url += \"-unbound-result\";\n break;\n }\n break;\n }\n case ErrorCode.CALL_EXCEPTION:\n case ErrorCode.INSUFFICIENT_FUNDS:\n case ErrorCode.MISSING_NEW:\n case ErrorCode.NONCE_EXPIRED:\n case ErrorCode.REPLACEMENT_UNDERPRICED:\n case ErrorCode.TRANSACTION_REPLACED:\n case ErrorCode.UNPREDICTABLE_GAS_LIMIT:\n url = code;\n break;\n }\n if (url) {\n message += \" [ See: https:/\\/links.ethers.org/v5-errors-\" + url + \" ]\";\n }\n if (messageDetails.length) {\n message += \" (\" + messageDetails.join(\", \") + \")\";\n }\n // @TODO: Any??\n const error = new Error(message);\n error.reason = reason;\n error.code = code;\n Object.keys(params).forEach(function (key) {\n error[key] = params[key];\n });\n return error;\n }\n throwError(message, code, params) {\n throw this.makeError(message, code, params);\n }\n throwArgumentError(message, name, value) {\n return this.throwError(message, Logger.errors.INVALID_ARGUMENT, {\n argument: name,\n value: value\n });\n }\n assert(condition, message, code, params) {\n if (!!condition) {\n return;\n }\n this.throwError(message, code, params);\n }\n assertArgument(condition, message, name, value) {\n if (!!condition) {\n return;\n }\n this.throwArgumentError(message, name, value);\n }\n checkNormalize(message) {\n if (message == null) {\n message = \"platform missing String.prototype.normalize\";\n }\n if (_normalizeError) {\n this.throwError(\"platform missing String.prototype.normalize\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"String.prototype.normalize\", form: _normalizeError\n });\n }\n }\n checkSafeUint53(value, message) {\n if (typeof (value) !== \"number\") {\n return;\n }\n if (message == null) {\n message = \"value not safe\";\n }\n if (value < 0 || value >= 0x1fffffffffffff) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"out-of-safe-range\",\n value: value\n });\n }\n if (value % 1) {\n this.throwError(message, Logger.errors.NUMERIC_FAULT, {\n operation: \"checkSafeInteger\",\n fault: \"non-integer\",\n value: value\n });\n }\n }\n checkArgumentCount(count, expectedCount, message) {\n if (message) {\n message = \": \" + message;\n }\n else {\n message = \"\";\n }\n if (count < expectedCount) {\n this.throwError(\"missing argument\" + message, Logger.errors.MISSING_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n if (count > expectedCount) {\n this.throwError(\"too many arguments\" + message, Logger.errors.UNEXPECTED_ARGUMENT, {\n count: count,\n expectedCount: expectedCount\n });\n }\n }\n checkNew(target, kind) {\n if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n checkAbstract(target, kind) {\n if (target === kind) {\n this.throwError(\"cannot instantiate abstract class \" + JSON.stringify(kind.name) + \" directly; use a sub-class\", Logger.errors.UNSUPPORTED_OPERATION, { name: target.name, operation: \"new\" });\n }\n else if (target === Object || target == null) {\n this.throwError(\"missing new\", Logger.errors.MISSING_NEW, { name: kind.name });\n }\n }\n static globalLogger() {\n if (!_globalLogger) {\n _globalLogger = new Logger(version);\n }\n return _globalLogger;\n }\n static setCensorship(censorship, permanent) {\n if (!censorship && permanent) {\n this.globalLogger().throwError(\"cannot permanently disable censorship\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n if (_permanentCensorErrors) {\n if (!censorship) {\n return;\n }\n this.globalLogger().throwError(\"error censorship permanent\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"setCensorship\"\n });\n }\n _censorErrors = !!censorship;\n _permanentCensorErrors = !!permanent;\n }\n static setLogLevel(logLevel) {\n const level = LogLevels[logLevel.toLowerCase()];\n if (level == null) {\n Logger.globalLogger().warn(\"invalid log level - \" + logLevel);\n return;\n }\n _logLevel = level;\n }\n static from(version) {\n return new Logger(version);\n }\n}\nLogger.errors = ErrorCode;\nLogger.levels = LogLevel;\n//# sourceMappingURL=index.js.map","export const version = \"bytes/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n///////////////////////////////\nfunction isHexable(value) {\n return !!(value.toHexString);\n}\nfunction addSlice(array) {\n if (array.slice) {\n return array;\n }\n array.slice = function () {\n const args = Array.prototype.slice.call(arguments);\n return addSlice(new Uint8Array(Array.prototype.slice.apply(array, args)));\n };\n return array;\n}\nexport function isBytesLike(value) {\n return ((isHexString(value) && !(value.length % 2)) || isBytes(value));\n}\nfunction isInteger(value) {\n return (typeof (value) === \"number\" && value == value && (value % 1) === 0);\n}\nexport function isBytes(value) {\n if (value == null) {\n return false;\n }\n if (value.constructor === Uint8Array) {\n return true;\n }\n if (typeof (value) === \"string\") {\n return false;\n }\n if (!isInteger(value.length) || value.length < 0) {\n return false;\n }\n for (let i = 0; i < value.length; i++) {\n const v = value[i];\n if (!isInteger(v) || v < 0 || v >= 256) {\n return false;\n }\n }\n return true;\n}\nexport function arrayify(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof (value) === \"number\") {\n logger.checkSafeUint53(value, \"invalid arrayify value\");\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value = parseInt(String(value / 256));\n }\n if (result.length === 0) {\n result.push(0);\n }\n return addSlice(new Uint8Array(result));\n }\n if (options.allowMissingPrefix && typeof (value) === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexable(value)) {\n value = value.toHexString();\n }\n if (isHexString(value)) {\n let hex = value.substring(2);\n if (hex.length % 2) {\n if (options.hexPad === \"left\") {\n hex = \"0\" + hex;\n }\n else if (options.hexPad === \"right\") {\n hex += \"0\";\n }\n else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n const result = [];\n for (let i = 0; i < hex.length; i += 2) {\n result.push(parseInt(hex.substring(i, i + 2), 16));\n }\n return addSlice(new Uint8Array(result));\n }\n if (isBytes(value)) {\n return addSlice(new Uint8Array(value));\n }\n return logger.throwArgumentError(\"invalid arrayify value\", \"value\", value);\n}\nexport function concat(items) {\n const objects = items.map(item => arrayify(item));\n const length = objects.reduce((accum, item) => (accum + item.length), 0);\n const result = new Uint8Array(length);\n objects.reduce((offset, object) => {\n result.set(object, offset);\n return offset + object.length;\n }, 0);\n return addSlice(result);\n}\nexport function stripZeros(value) {\n let result = arrayify(value);\n if (result.length === 0) {\n return result;\n }\n // Find the first non-zero entry\n let start = 0;\n while (start < result.length && result[start] === 0) {\n start++;\n }\n // If we started with zeros, strip them\n if (start) {\n result = result.slice(start);\n }\n return result;\n}\nexport function zeroPad(value, length) {\n value = arrayify(value);\n if (value.length > length) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[0]);\n }\n const result = new Uint8Array(length);\n result.set(value, length - value.length);\n return addSlice(result);\n}\nexport function isHexString(value, length) {\n if (typeof (value) !== \"string\" || !value.match(/^0x[0-9A-Fa-f]*$/)) {\n return false;\n }\n if (length && value.length !== 2 + 2 * length) {\n return false;\n }\n return true;\n}\nconst HexCharacters = \"0123456789abcdef\";\nexport function hexlify(value, options) {\n if (!options) {\n options = {};\n }\n if (typeof (value) === \"number\") {\n logger.checkSafeUint53(value, \"invalid hexlify value\");\n let hex = \"\";\n while (value) {\n hex = HexCharacters[value & 0xf] + hex;\n value = Math.floor(value / 16);\n }\n if (hex.length) {\n if (hex.length % 2) {\n hex = \"0\" + hex;\n }\n return \"0x\" + hex;\n }\n return \"0x00\";\n }\n if (typeof (value) === \"bigint\") {\n value = value.toString(16);\n if (value.length % 2) {\n return (\"0x0\" + value);\n }\n return \"0x\" + value;\n }\n if (options.allowMissingPrefix && typeof (value) === \"string\" && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexable(value)) {\n return value.toHexString();\n }\n if (isHexString(value)) {\n if (value.length % 2) {\n if (options.hexPad === \"left\") {\n value = \"0x0\" + value.substring(2);\n }\n else if (options.hexPad === \"right\") {\n value += \"0\";\n }\n else {\n logger.throwArgumentError(\"hex data is odd-length\", \"value\", value);\n }\n }\n return value.toLowerCase();\n }\n if (isBytes(value)) {\n let result = \"0x\";\n for (let i = 0; i < value.length; i++) {\n let v = value[i];\n result += HexCharacters[(v & 0xf0) >> 4] + HexCharacters[v & 0x0f];\n }\n return result;\n }\n return logger.throwArgumentError(\"invalid hexlify value\", \"value\", value);\n}\n/*\nfunction unoddify(value: BytesLike | Hexable | number): BytesLike | Hexable | number {\n if (typeof(value) === \"string\" && value.length % 2 && value.substring(0, 2) === \"0x\") {\n return \"0x0\" + value.substring(2);\n }\n return value;\n}\n*/\nexport function hexDataLength(data) {\n if (typeof (data) !== \"string\") {\n data = hexlify(data);\n }\n else if (!isHexString(data) || (data.length % 2)) {\n return null;\n }\n return (data.length - 2) / 2;\n}\nexport function hexDataSlice(data, offset, endOffset) {\n if (typeof (data) !== \"string\") {\n data = hexlify(data);\n }\n else if (!isHexString(data) || (data.length % 2)) {\n logger.throwArgumentError(\"invalid hexData\", \"value\", data);\n }\n offset = 2 + 2 * offset;\n if (endOffset != null) {\n return \"0x\" + data.substring(offset, 2 + 2 * endOffset);\n }\n return \"0x\" + data.substring(offset);\n}\nexport function hexConcat(items) {\n let result = \"0x\";\n items.forEach((item) => {\n result += hexlify(item).substring(2);\n });\n return result;\n}\nexport function hexValue(value) {\n const trimmed = hexStripZeros(hexlify(value, { hexPad: \"left\" }));\n if (trimmed === \"0x\") {\n return \"0x0\";\n }\n return trimmed;\n}\nexport function hexStripZeros(value) {\n if (typeof (value) !== \"string\") {\n value = hexlify(value);\n }\n if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n value = value.substring(2);\n let offset = 0;\n while (offset < value.length && value[offset] === \"0\") {\n offset++;\n }\n return \"0x\" + value.substring(offset);\n}\nexport function hexZeroPad(value, length) {\n if (typeof (value) !== \"string\") {\n value = hexlify(value);\n }\n else if (!isHexString(value)) {\n logger.throwArgumentError(\"invalid hex string\", \"value\", value);\n }\n if (value.length > 2 * length + 2) {\n logger.throwArgumentError(\"value out of range\", \"value\", arguments[1]);\n }\n while (value.length < 2 * length + 2) {\n value = \"0x0\" + value.substring(2);\n }\n return value;\n}\nexport function splitSignature(signature) {\n const result = {\n r: \"0x\",\n s: \"0x\",\n _vs: \"0x\",\n recoveryParam: 0,\n v: 0,\n yParityAndS: \"0x\",\n compact: \"0x\"\n };\n if (isBytesLike(signature)) {\n let bytes = arrayify(signature);\n // Get the r, s and v\n if (bytes.length === 64) {\n // EIP-2098; pull the v from the top bit of s and clear it\n result.v = 27 + (bytes[32] >> 7);\n bytes[32] &= 0x7f;\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n }\n else if (bytes.length === 65) {\n result.r = hexlify(bytes.slice(0, 32));\n result.s = hexlify(bytes.slice(32, 64));\n result.v = bytes[64];\n }\n else {\n logger.throwArgumentError(\"invalid signature string\", \"signature\", signature);\n }\n // Allow a recid to be used as the v\n if (result.v < 27) {\n if (result.v === 0 || result.v === 1) {\n result.v += 27;\n }\n else {\n logger.throwArgumentError(\"signature invalid v byte\", \"signature\", signature);\n }\n }\n // Compute recoveryParam from v\n result.recoveryParam = 1 - (result.v % 2);\n // Compute _vs from recoveryParam and s\n if (result.recoveryParam) {\n bytes[32] |= 0x80;\n }\n result._vs = hexlify(bytes.slice(32, 64));\n }\n else {\n result.r = signature.r;\n result.s = signature.s;\n result.v = signature.v;\n result.recoveryParam = signature.recoveryParam;\n result._vs = signature._vs;\n // If the _vs is available, use it to populate missing s, v and recoveryParam\n // and verify non-missing s, v and recoveryParam\n if (result._vs != null) {\n const vs = zeroPad(arrayify(result._vs), 32);\n result._vs = hexlify(vs);\n // Set or check the recid\n const recoveryParam = ((vs[0] >= 128) ? 1 : 0);\n if (result.recoveryParam == null) {\n result.recoveryParam = recoveryParam;\n }\n else if (result.recoveryParam !== recoveryParam) {\n logger.throwArgumentError(\"signature recoveryParam mismatch _vs\", \"signature\", signature);\n }\n // Set or check the s\n vs[0] &= 0x7f;\n const s = hexlify(vs);\n if (result.s == null) {\n result.s = s;\n }\n else if (result.s !== s) {\n logger.throwArgumentError(\"signature v mismatch _vs\", \"signature\", signature);\n }\n }\n // Use recid and v to populate each other\n if (result.recoveryParam == null) {\n if (result.v == null) {\n logger.throwArgumentError(\"signature missing v and recoveryParam\", \"signature\", signature);\n }\n else if (result.v === 0 || result.v === 1) {\n result.recoveryParam = result.v;\n }\n else {\n result.recoveryParam = 1 - (result.v % 2);\n }\n }\n else {\n if (result.v == null) {\n result.v = 27 + result.recoveryParam;\n }\n else {\n const recId = (result.v === 0 || result.v === 1) ? result.v : (1 - (result.v % 2));\n if (result.recoveryParam !== recId) {\n logger.throwArgumentError(\"signature recoveryParam mismatch v\", \"signature\", signature);\n }\n }\n }\n if (result.r == null || !isHexString(result.r)) {\n logger.throwArgumentError(\"signature missing or invalid r\", \"signature\", signature);\n }\n else {\n result.r = hexZeroPad(result.r, 32);\n }\n if (result.s == null || !isHexString(result.s)) {\n logger.throwArgumentError(\"signature missing or invalid s\", \"signature\", signature);\n }\n else {\n result.s = hexZeroPad(result.s, 32);\n }\n const vs = arrayify(result.s);\n if (vs[0] >= 128) {\n logger.throwArgumentError(\"signature s out of range\", \"signature\", signature);\n }\n if (result.recoveryParam) {\n vs[0] |= 0x80;\n }\n const _vs = hexlify(vs);\n if (result._vs) {\n if (!isHexString(result._vs)) {\n logger.throwArgumentError(\"signature invalid _vs\", \"signature\", signature);\n }\n result._vs = hexZeroPad(result._vs, 32);\n }\n // Set or check the _vs\n if (result._vs == null) {\n result._vs = _vs;\n }\n else if (result._vs !== _vs) {\n logger.throwArgumentError(\"signature _vs mismatch v and s\", \"signature\", signature);\n }\n }\n result.yParityAndS = result._vs;\n result.compact = result.r + result.yParityAndS.substring(2);\n return result;\n}\nexport function joinSignature(signature) {\n signature = splitSignature(signature);\n return hexlify(concat([\n signature.r,\n signature.s,\n (signature.recoveryParam ? \"0x1c\" : \"0x1b\")\n ]));\n}\n//# sourceMappingURL=index.js.map","export const version = \"bignumber/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\n/**\n * BigNumber\n *\n * A wrapper around the BN.js object. We use the BN.js library\n * because it is used by elliptic, so it is required regardless.\n *\n */\nimport _BN from \"bn.js\";\nvar BN = _BN.BN;\nimport { hexlify, isBytes, isHexString } from \"@ethersproject/bytes\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nconst _constructorGuard = {};\nconst MAX_SAFE = 0x1fffffffffffff;\nexport function isBigNumberish(value) {\n return (value != null) && (BigNumber.isBigNumber(value) ||\n (typeof (value) === \"number\" && (value % 1) === 0) ||\n (typeof (value) === \"string\" && !!value.match(/^-?[0-9]+$/)) ||\n isHexString(value) ||\n (typeof (value) === \"bigint\") ||\n isBytes(value));\n}\n// Only warn about passing 10 into radix once\nlet _warnedToStringRadix = false;\nexport class BigNumber {\n constructor(constructorGuard, hex) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot call constructor directly; use BigNumber.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new (BigNumber)\"\n });\n }\n this._hex = hex;\n this._isBigNumber = true;\n Object.freeze(this);\n }\n fromTwos(value) {\n return toBigNumber(toBN(this).fromTwos(value));\n }\n toTwos(value) {\n return toBigNumber(toBN(this).toTwos(value));\n }\n abs() {\n if (this._hex[0] === \"-\") {\n return BigNumber.from(this._hex.substring(1));\n }\n return this;\n }\n add(other) {\n return toBigNumber(toBN(this).add(toBN(other)));\n }\n sub(other) {\n return toBigNumber(toBN(this).sub(toBN(other)));\n }\n div(other) {\n const o = BigNumber.from(other);\n if (o.isZero()) {\n throwFault(\"division-by-zero\", \"div\");\n }\n return toBigNumber(toBN(this).div(toBN(other)));\n }\n mul(other) {\n return toBigNumber(toBN(this).mul(toBN(other)));\n }\n mod(other) {\n const value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"division-by-zero\", \"mod\");\n }\n return toBigNumber(toBN(this).umod(value));\n }\n pow(other) {\n const value = toBN(other);\n if (value.isNeg()) {\n throwFault(\"negative-power\", \"pow\");\n }\n return toBigNumber(toBN(this).pow(value));\n }\n and(other) {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"and\");\n }\n return toBigNumber(toBN(this).and(value));\n }\n or(other) {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"or\");\n }\n return toBigNumber(toBN(this).or(value));\n }\n xor(other) {\n const value = toBN(other);\n if (this.isNegative() || value.isNeg()) {\n throwFault(\"unbound-bitwise-result\", \"xor\");\n }\n return toBigNumber(toBN(this).xor(value));\n }\n mask(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"mask\");\n }\n return toBigNumber(toBN(this).maskn(value));\n }\n shl(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"shl\");\n }\n return toBigNumber(toBN(this).shln(value));\n }\n shr(value) {\n if (this.isNegative() || value < 0) {\n throwFault(\"negative-width\", \"shr\");\n }\n return toBigNumber(toBN(this).shrn(value));\n }\n eq(other) {\n return toBN(this).eq(toBN(other));\n }\n lt(other) {\n return toBN(this).lt(toBN(other));\n }\n lte(other) {\n return toBN(this).lte(toBN(other));\n }\n gt(other) {\n return toBN(this).gt(toBN(other));\n }\n gte(other) {\n return toBN(this).gte(toBN(other));\n }\n isNegative() {\n return (this._hex[0] === \"-\");\n }\n isZero() {\n return toBN(this).isZero();\n }\n toNumber() {\n try {\n return toBN(this).toNumber();\n }\n catch (error) {\n throwFault(\"overflow\", \"toNumber\", this.toString());\n }\n return null;\n }\n toBigInt() {\n try {\n return BigInt(this.toString());\n }\n catch (e) { }\n return logger.throwError(\"this platform does not support BigInt\", Logger.errors.UNSUPPORTED_OPERATION, {\n value: this.toString()\n });\n }\n toString() {\n // Lots of people expect this, which we do not support, so check (See: #889)\n if (arguments.length > 0) {\n if (arguments[0] === 10) {\n if (!_warnedToStringRadix) {\n _warnedToStringRadix = true;\n logger.warn(\"BigNumber.toString does not accept any parameters; base-10 is assumed\");\n }\n }\n else if (arguments[0] === 16) {\n logger.throwError(\"BigNumber.toString does not accept any parameters; use bigNumber.toHexString()\", Logger.errors.UNEXPECTED_ARGUMENT, {});\n }\n else {\n logger.throwError(\"BigNumber.toString does not accept parameters\", Logger.errors.UNEXPECTED_ARGUMENT, {});\n }\n }\n return toBN(this).toString(10);\n }\n toHexString() {\n return this._hex;\n }\n toJSON(key) {\n return { type: \"BigNumber\", hex: this.toHexString() };\n }\n static from(value) {\n if (value instanceof BigNumber) {\n return value;\n }\n if (typeof (value) === \"string\") {\n if (value.match(/^-?0x[0-9a-f]+$/i)) {\n return new BigNumber(_constructorGuard, toHex(value));\n }\n if (value.match(/^-?[0-9]+$/)) {\n return new BigNumber(_constructorGuard, toHex(new BN(value)));\n }\n return logger.throwArgumentError(\"invalid BigNumber string\", \"value\", value);\n }\n if (typeof (value) === \"number\") {\n if (value % 1) {\n throwFault(\"underflow\", \"BigNumber.from\", value);\n }\n if (value >= MAX_SAFE || value <= -MAX_SAFE) {\n throwFault(\"overflow\", \"BigNumber.from\", value);\n }\n return BigNumber.from(String(value));\n }\n const anyValue = value;\n if (typeof (anyValue) === \"bigint\") {\n return BigNumber.from(anyValue.toString());\n }\n if (isBytes(anyValue)) {\n return BigNumber.from(hexlify(anyValue));\n }\n if (anyValue) {\n // Hexable interface (takes priority)\n if (anyValue.toHexString) {\n const hex = anyValue.toHexString();\n if (typeof (hex) === \"string\") {\n return BigNumber.from(hex);\n }\n }\n else {\n // For now, handle legacy JSON-ified values (goes away in v6)\n let hex = anyValue._hex;\n // New-form JSON\n if (hex == null && anyValue.type === \"BigNumber\") {\n hex = anyValue.hex;\n }\n if (typeof (hex) === \"string\") {\n if (isHexString(hex) || (hex[0] === \"-\" && isHexString(hex.substring(1)))) {\n return BigNumber.from(hex);\n }\n }\n }\n }\n return logger.throwArgumentError(\"invalid BigNumber value\", \"value\", value);\n }\n static isBigNumber(value) {\n return !!(value && value._isBigNumber);\n }\n}\n// Normalize the hex string\nfunction toHex(value) {\n // For BN, call on the hex string\n if (typeof (value) !== \"string\") {\n return toHex(value.toString(16));\n }\n // If negative, prepend the negative sign to the normalized positive value\n if (value[0] === \"-\") {\n // Strip off the negative sign\n value = value.substring(1);\n // Cannot have multiple negative signs (e.g. \"--0x04\")\n if (value[0] === \"-\") {\n logger.throwArgumentError(\"invalid hex\", \"value\", value);\n }\n // Call toHex on the positive component\n value = toHex(value);\n // Do not allow \"-0x00\"\n if (value === \"0x00\") {\n return value;\n }\n // Negate the value\n return \"-\" + value;\n }\n // Add a \"0x\" prefix if missing\n if (value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n // Normalize zero\n if (value === \"0x\") {\n return \"0x00\";\n }\n // Make the string even length\n if (value.length % 2) {\n value = \"0x0\" + value.substring(2);\n }\n // Trim to smallest even-length string\n while (value.length > 4 && value.substring(0, 4) === \"0x00\") {\n value = \"0x\" + value.substring(4);\n }\n return value;\n}\nfunction toBigNumber(value) {\n return BigNumber.from(toHex(value));\n}\nfunction toBN(value) {\n const hex = BigNumber.from(value).toHexString();\n if (hex[0] === \"-\") {\n return (new BN(\"-\" + hex.substring(3), 16));\n }\n return new BN(hex.substring(2), 16);\n}\nfunction throwFault(fault, operation, value) {\n const params = { fault: fault, operation: operation };\n if (value != null) {\n params.value = value;\n }\n return logger.throwError(fault, Logger.errors.NUMERIC_FAULT, params);\n}\n// value should have no prefix\nexport function _base36To16(value) {\n return (new BN(value, 36)).toString(16);\n}\n// value should have no prefix\nexport function _base16To36(value) {\n return (new BN(value, 16)).toString(36);\n}\n//# sourceMappingURL=bignumber.js.map","\"use strict\";\nimport { arrayify, hexZeroPad, isBytes } from \"@ethersproject/bytes\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nimport { BigNumber, isBigNumberish } from \"./bignumber\";\nconst _constructorGuard = {};\nconst Zero = BigNumber.from(0);\nconst NegativeOne = BigNumber.from(-1);\nfunction throwFault(message, fault, operation, value) {\n const params = { fault: fault, operation: operation };\n if (value !== undefined) {\n params.value = value;\n }\n return logger.throwError(message, Logger.errors.NUMERIC_FAULT, params);\n}\n// Constant to pull zeros from for multipliers\nlet zeros = \"0\";\nwhile (zeros.length < 256) {\n zeros += zeros;\n}\n// Returns a string \"1\" followed by decimal \"0\"s\nfunction getMultiplier(decimals) {\n if (typeof (decimals) !== \"number\") {\n try {\n decimals = BigNumber.from(decimals).toNumber();\n }\n catch (e) { }\n }\n if (typeof (decimals) === \"number\" && decimals >= 0 && decimals <= 256 && !(decimals % 1)) {\n return (\"1\" + zeros.substring(0, decimals));\n }\n return logger.throwArgumentError(\"invalid decimal size\", \"decimals\", decimals);\n}\nexport function formatFixed(value, decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n const multiplier = getMultiplier(decimals);\n // Make sure wei is a big number (convert as necessary)\n value = BigNumber.from(value);\n const negative = value.lt(Zero);\n if (negative) {\n value = value.mul(NegativeOne);\n }\n let fraction = value.mod(multiplier).toString();\n while (fraction.length < multiplier.length - 1) {\n fraction = \"0\" + fraction;\n }\n // Strip training 0\n fraction = fraction.match(/^([0-9]*[1-9]|0)(0*)/)[1];\n const whole = value.div(multiplier).toString();\n if (multiplier.length === 1) {\n value = whole;\n }\n else {\n value = whole + \".\" + fraction;\n }\n if (negative) {\n value = \"-\" + value;\n }\n return value;\n}\nexport function parseFixed(value, decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n const multiplier = getMultiplier(decimals);\n if (typeof (value) !== \"string\" || !value.match(/^-?[0-9.]+$/)) {\n logger.throwArgumentError(\"invalid decimal value\", \"value\", value);\n }\n // Is it negative?\n const negative = (value.substring(0, 1) === \"-\");\n if (negative) {\n value = value.substring(1);\n }\n if (value === \".\") {\n logger.throwArgumentError(\"missing value\", \"value\", value);\n }\n // Split it into a whole and fractional part\n const comps = value.split(\".\");\n if (comps.length > 2) {\n logger.throwArgumentError(\"too many decimal points\", \"value\", value);\n }\n let whole = comps[0], fraction = comps[1];\n if (!whole) {\n whole = \"0\";\n }\n if (!fraction) {\n fraction = \"0\";\n }\n // Trim trailing zeros\n while (fraction[fraction.length - 1] === \"0\") {\n fraction = fraction.substring(0, fraction.length - 1);\n }\n // Check the fraction doesn't exceed our decimals size\n if (fraction.length > multiplier.length - 1) {\n throwFault(\"fractional component exceeds decimals\", \"underflow\", \"parseFixed\");\n }\n // If decimals is 0, we have an empty string for fraction\n if (fraction === \"\") {\n fraction = \"0\";\n }\n // Fully pad the string with zeros to get to wei\n while (fraction.length < multiplier.length - 1) {\n fraction += \"0\";\n }\n const wholeValue = BigNumber.from(whole);\n const fractionValue = BigNumber.from(fraction);\n let wei = (wholeValue.mul(multiplier)).add(fractionValue);\n if (negative) {\n wei = wei.mul(NegativeOne);\n }\n return wei;\n}\nexport class FixedFormat {\n constructor(constructorGuard, signed, width, decimals) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedFormat constructor; use FixedFormat.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n this.signed = signed;\n this.width = width;\n this.decimals = decimals;\n this.name = (signed ? \"\" : \"u\") + \"fixed\" + String(width) + \"x\" + String(decimals);\n this._multiplier = getMultiplier(decimals);\n Object.freeze(this);\n }\n static from(value) {\n if (value instanceof FixedFormat) {\n return value;\n }\n if (typeof (value) === \"number\") {\n value = `fixed128x${value}`;\n }\n let signed = true;\n let width = 128;\n let decimals = 18;\n if (typeof (value) === \"string\") {\n if (value === \"fixed\") {\n // defaults...\n }\n else if (value === \"ufixed\") {\n signed = false;\n }\n else {\n const match = value.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);\n if (!match) {\n logger.throwArgumentError(\"invalid fixed format\", \"format\", value);\n }\n signed = (match[1] !== \"u\");\n width = parseInt(match[2]);\n decimals = parseInt(match[3]);\n }\n }\n else if (value) {\n const check = (key, type, defaultValue) => {\n if (value[key] == null) {\n return defaultValue;\n }\n if (typeof (value[key]) !== type) {\n logger.throwArgumentError(\"invalid fixed format (\" + key + \" not \" + type + \")\", \"format.\" + key, value[key]);\n }\n return value[key];\n };\n signed = check(\"signed\", \"boolean\", signed);\n width = check(\"width\", \"number\", width);\n decimals = check(\"decimals\", \"number\", decimals);\n }\n if (width % 8) {\n logger.throwArgumentError(\"invalid fixed format width (not byte aligned)\", \"format.width\", width);\n }\n if (decimals > 80) {\n logger.throwArgumentError(\"invalid fixed format (decimals too large)\", \"format.decimals\", decimals);\n }\n return new FixedFormat(_constructorGuard, signed, width, decimals);\n }\n}\nexport class FixedNumber {\n constructor(constructorGuard, hex, value, format) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"cannot use FixedNumber constructor; use FixedNumber.from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new FixedFormat\"\n });\n }\n this.format = format;\n this._hex = hex;\n this._value = value;\n this._isFixedNumber = true;\n Object.freeze(this);\n }\n _checkFormat(other) {\n if (this.format.name !== other.format.name) {\n logger.throwArgumentError(\"incompatible format; use fixedNumber.toFormat\", \"other\", other);\n }\n }\n addUnsafe(other) {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.add(b), this.format.decimals, this.format);\n }\n subUnsafe(other) {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.sub(b), this.format.decimals, this.format);\n }\n mulUnsafe(other) {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.mul(b).div(this.format._multiplier), this.format.decimals, this.format);\n }\n divUnsafe(other) {\n this._checkFormat(other);\n const a = parseFixed(this._value, this.format.decimals);\n const b = parseFixed(other._value, other.format.decimals);\n return FixedNumber.fromValue(a.mul(this.format._multiplier).div(b), this.format.decimals, this.format);\n }\n floor() {\n const comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n let result = FixedNumber.from(comps[0], this.format);\n const hasFraction = !comps[1].match(/^(0*)$/);\n if (this.isNegative() && hasFraction) {\n result = result.subUnsafe(ONE.toFormat(result.format));\n }\n return result;\n }\n ceiling() {\n const comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n let result = FixedNumber.from(comps[0], this.format);\n const hasFraction = !comps[1].match(/^(0*)$/);\n if (!this.isNegative() && hasFraction) {\n result = result.addUnsafe(ONE.toFormat(result.format));\n }\n return result;\n }\n // @TODO: Support other rounding algorithms\n round(decimals) {\n if (decimals == null) {\n decimals = 0;\n }\n // If we are already in range, we're done\n const comps = this.toString().split(\".\");\n if (comps.length === 1) {\n comps.push(\"0\");\n }\n if (decimals < 0 || decimals > 80 || (decimals % 1)) {\n logger.throwArgumentError(\"invalid decimal count\", \"decimals\", decimals);\n }\n if (comps[1].length <= decimals) {\n return this;\n }\n const factor = FixedNumber.from(\"1\" + zeros.substring(0, decimals), this.format);\n const bump = BUMP.toFormat(this.format);\n return this.mulUnsafe(factor).addUnsafe(bump).floor().divUnsafe(factor);\n }\n isZero() {\n return (this._value === \"0.0\" || this._value === \"0\");\n }\n isNegative() {\n return (this._value[0] === \"-\");\n }\n toString() { return this._value; }\n toHexString(width) {\n if (width == null) {\n return this._hex;\n }\n if (width % 8) {\n logger.throwArgumentError(\"invalid byte width\", \"width\", width);\n }\n const hex = BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();\n return hexZeroPad(hex, width / 8);\n }\n toUnsafeFloat() { return parseFloat(this.toString()); }\n toFormat(format) {\n return FixedNumber.fromString(this._value, format);\n }\n static fromValue(value, decimals, format) {\n // If decimals looks more like a format, and there is no format, shift the parameters\n if (format == null && decimals != null && !isBigNumberish(decimals)) {\n format = decimals;\n decimals = null;\n }\n if (decimals == null) {\n decimals = 0;\n }\n if (format == null) {\n format = \"fixed\";\n }\n return FixedNumber.fromString(formatFixed(value, decimals), FixedFormat.from(format));\n }\n static fromString(value, format) {\n if (format == null) {\n format = \"fixed\";\n }\n const fixedFormat = FixedFormat.from(format);\n const numeric = parseFixed(value, fixedFormat.decimals);\n if (!fixedFormat.signed && numeric.lt(Zero)) {\n throwFault(\"unsigned value cannot be negative\", \"overflow\", \"value\", value);\n }\n let hex = null;\n if (fixedFormat.signed) {\n hex = numeric.toTwos(fixedFormat.width).toHexString();\n }\n else {\n hex = numeric.toHexString();\n hex = hexZeroPad(hex, fixedFormat.width / 8);\n }\n const decimal = formatFixed(numeric, fixedFormat.decimals);\n return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat);\n }\n static fromBytes(value, format) {\n if (format == null) {\n format = \"fixed\";\n }\n const fixedFormat = FixedFormat.from(format);\n if (arrayify(value).length > fixedFormat.width / 8) {\n throw new Error(\"overflow\");\n }\n let numeric = BigNumber.from(value);\n if (fixedFormat.signed) {\n numeric = numeric.fromTwos(fixedFormat.width);\n }\n const hex = numeric.toTwos((fixedFormat.signed ? 0 : 1) + fixedFormat.width).toHexString();\n const decimal = formatFixed(numeric, fixedFormat.decimals);\n return new FixedNumber(_constructorGuard, hex, decimal, fixedFormat);\n }\n static from(value, format) {\n if (typeof (value) === \"string\") {\n return FixedNumber.fromString(value, format);\n }\n if (isBytes(value)) {\n return FixedNumber.fromBytes(value, format);\n }\n try {\n return FixedNumber.fromValue(value, 0, format);\n }\n catch (error) {\n // Allow NUMERIC_FAULT to bubble up\n if (error.code !== Logger.errors.INVALID_ARGUMENT) {\n throw error;\n }\n }\n return logger.throwArgumentError(\"invalid FixedNumber value\", \"value\", value);\n }\n static isFixedNumber(value) {\n return !!(value && value._isFixedNumber);\n }\n}\nconst ONE = FixedNumber.from(1);\nconst BUMP = FixedNumber.from(\"0.5\");\n//# sourceMappingURL=fixednumber.js.map","export const version = \"properties/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nexport function defineReadOnly(object, name, value) {\n Object.defineProperty(object, name, {\n enumerable: true,\n value: value,\n writable: false,\n });\n}\n// Crawl up the constructor chain to find a static method\nexport function getStatic(ctor, key) {\n for (let i = 0; i < 32; i++) {\n if (ctor[key]) {\n return ctor[key];\n }\n if (!ctor.prototype || typeof (ctor.prototype) !== \"object\") {\n break;\n }\n ctor = Object.getPrototypeOf(ctor.prototype).constructor;\n }\n return null;\n}\nexport function resolveProperties(object) {\n return __awaiter(this, void 0, void 0, function* () {\n const promises = Object.keys(object).map((key) => {\n const value = object[key];\n return Promise.resolve(value).then((v) => ({ key: key, value: v }));\n });\n const results = yield Promise.all(promises);\n return results.reduce((accum, result) => {\n accum[(result.key)] = result.value;\n return accum;\n }, {});\n });\n}\nexport function checkProperties(object, properties) {\n if (!object || typeof (object) !== \"object\") {\n logger.throwArgumentError(\"invalid object\", \"object\", object);\n }\n Object.keys(object).forEach((key) => {\n if (!properties[key]) {\n logger.throwArgumentError(\"invalid object key - \" + key, \"transaction:\" + key, object);\n }\n });\n}\nexport function shallowCopy(object) {\n const result = {};\n for (const key in object) {\n result[key] = object[key];\n }\n return result;\n}\nconst opaque = { bigint: true, boolean: true, \"function\": true, number: true, string: true };\nfunction _isFrozen(object) {\n // Opaque objects are not mutable, so safe to copy by assignment\n if (object === undefined || object === null || opaque[typeof (object)]) {\n return true;\n }\n if (Array.isArray(object) || typeof (object) === \"object\") {\n if (!Object.isFrozen(object)) {\n return false;\n }\n const keys = Object.keys(object);\n for (let i = 0; i < keys.length; i++) {\n let value = null;\n try {\n value = object[keys[i]];\n }\n catch (error) {\n // If accessing a value triggers an error, it is a getter\n // designed to do so (e.g. Result) and is therefore \"frozen\"\n continue;\n }\n if (!_isFrozen(value)) {\n return false;\n }\n }\n return true;\n }\n return logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, \"object\", object);\n}\n// Returns a new copy of object, such that no properties may be replaced.\n// New properties may be added only to objects.\nfunction _deepCopy(object) {\n if (_isFrozen(object)) {\n return object;\n }\n // Arrays are mutable, so we need to create a copy\n if (Array.isArray(object)) {\n return Object.freeze(object.map((item) => deepCopy(item)));\n }\n if (typeof (object) === \"object\") {\n const result = {};\n for (const key in object) {\n const value = object[key];\n if (value === undefined) {\n continue;\n }\n defineReadOnly(result, key, deepCopy(value));\n }\n return result;\n }\n return logger.throwArgumentError(`Cannot deepCopy ${typeof (object)}`, \"object\", object);\n}\nexport function deepCopy(object) {\n return _deepCopy(object);\n}\nexport class Description {\n constructor(info) {\n for (const key in info) {\n this[key] = deepCopy(info[key]);\n }\n }\n}\n//# sourceMappingURL=index.js.map","export const version = \"abi/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n;\nconst _constructorGuard = {};\nlet ModifiersBytes = { calldata: true, memory: true, storage: true };\nlet ModifiersNest = { calldata: true, memory: true };\nfunction checkModifier(type, name) {\n if (type === \"bytes\" || type === \"string\") {\n if (ModifiersBytes[name]) {\n return true;\n }\n }\n else if (type === \"address\") {\n if (name === \"payable\") {\n return true;\n }\n }\n else if (type.indexOf(\"[\") >= 0 || type === \"tuple\") {\n if (ModifiersNest[name]) {\n return true;\n }\n }\n if (ModifiersBytes[name] || name === \"payable\") {\n logger.throwArgumentError(\"invalid modifier\", \"name\", name);\n }\n return false;\n}\n// @TODO: Make sure that children of an indexed tuple are marked with a null indexed\nfunction parseParamType(param, allowIndexed) {\n let originalParam = param;\n function throwError(i) {\n logger.throwArgumentError(`unexpected character at position ${i}`, \"param\", param);\n }\n param = param.replace(/\\s/g, \" \");\n function newNode(parent) {\n let node = { type: \"\", name: \"\", parent: parent, state: { allowType: true } };\n if (allowIndexed) {\n node.indexed = false;\n }\n return node;\n }\n let parent = { type: \"\", name: \"\", state: { allowType: true } };\n let node = parent;\n for (let i = 0; i < param.length; i++) {\n let c = param[i];\n switch (c) {\n case \"(\":\n if (node.state.allowType && node.type === \"\") {\n node.type = \"tuple\";\n }\n else if (!node.state.allowParams) {\n throwError(i);\n }\n node.state.allowType = false;\n node.type = verifyType(node.type);\n node.components = [newNode(node)];\n node = node.components[0];\n break;\n case \")\":\n delete node.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i);\n }\n node.indexed = true;\n node.name = \"\";\n }\n if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n node.type = verifyType(node.type);\n let child = node;\n node = node.parent;\n if (!node) {\n throwError(i);\n }\n delete child.parent;\n node.state.allowParams = false;\n node.state.allowName = true;\n node.state.allowArray = true;\n break;\n case \",\":\n delete node.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i);\n }\n node.indexed = true;\n node.name = \"\";\n }\n if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n node.type = verifyType(node.type);\n let sibling = newNode(node.parent);\n //{ type: \"\", name: \"\", parent: node.parent, state: { allowType: true } };\n node.parent.components.push(sibling);\n delete node.parent;\n node = sibling;\n break;\n // Hit a space...\n case \" \":\n // If reading type, the type is done and may read a param or name\n if (node.state.allowType) {\n if (node.type !== \"\") {\n node.type = verifyType(node.type);\n delete node.state.allowType;\n node.state.allowName = true;\n node.state.allowParams = true;\n }\n }\n // If reading name, the name is done\n if (node.state.allowName) {\n if (node.name !== \"\") {\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(i);\n }\n if (node.indexed) {\n throwError(i);\n }\n node.indexed = true;\n node.name = \"\";\n }\n else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n else {\n node.state.allowName = false;\n }\n }\n }\n break;\n case \"[\":\n if (!node.state.allowArray) {\n throwError(i);\n }\n node.type += c;\n node.state.allowArray = false;\n node.state.allowName = false;\n node.state.readArray = true;\n break;\n case \"]\":\n if (!node.state.readArray) {\n throwError(i);\n }\n node.type += c;\n node.state.readArray = false;\n node.state.allowArray = true;\n node.state.allowName = true;\n break;\n default:\n if (node.state.allowType) {\n node.type += c;\n node.state.allowParams = true;\n node.state.allowArray = true;\n }\n else if (node.state.allowName) {\n node.name += c;\n delete node.state.allowArray;\n }\n else if (node.state.readArray) {\n node.type += c;\n }\n else {\n throwError(i);\n }\n }\n }\n if (node.parent) {\n logger.throwArgumentError(\"unexpected eof\", \"param\", param);\n }\n delete parent.state;\n if (node.name === \"indexed\") {\n if (!allowIndexed) {\n throwError(originalParam.length - 7);\n }\n if (node.indexed) {\n throwError(originalParam.length - 7);\n }\n node.indexed = true;\n node.name = \"\";\n }\n else if (checkModifier(node.type, node.name)) {\n node.name = \"\";\n }\n parent.type = verifyType(parent.type);\n return parent;\n}\nfunction populate(object, params) {\n for (let key in params) {\n defineReadOnly(object, key, params[key]);\n }\n}\nexport const FormatTypes = Object.freeze({\n // Bare formatting, as is needed for computing a sighash of an event or function\n sighash: \"sighash\",\n // Human-Readable with Minimal spacing and without names (compact human-readable)\n minimal: \"minimal\",\n // Human-Readable with nice spacing, including all names\n full: \"full\",\n // JSON-format a la Solidity\n json: \"json\"\n});\nconst paramTypeArray = new RegExp(/^(.*)\\[([0-9]*)\\]$/);\nexport class ParamType {\n constructor(constructorGuard, params) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use fromString\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new ParamType()\"\n });\n }\n populate(this, params);\n let match = this.type.match(paramTypeArray);\n if (match) {\n populate(this, {\n arrayLength: parseInt(match[2] || \"-1\"),\n arrayChildren: ParamType.fromObject({\n type: match[1],\n components: this.components\n }),\n baseType: \"array\"\n });\n }\n else {\n populate(this, {\n arrayLength: null,\n arrayChildren: null,\n baseType: ((this.components != null) ? \"tuple\" : this.type)\n });\n }\n this._isParamType = true;\n Object.freeze(this);\n }\n // Format the parameter fragment\n // - sighash: \"(uint256,address)\"\n // - minimal: \"tuple(uint256,address) indexed\"\n // - full: \"tuple(uint256 foo, address bar) indexed baz\"\n format(format) {\n if (!format) {\n format = FormatTypes.sighash;\n }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === FormatTypes.json) {\n let result = {\n type: ((this.baseType === \"tuple\") ? \"tuple\" : this.type),\n name: (this.name || undefined)\n };\n if (typeof (this.indexed) === \"boolean\") {\n result.indexed = this.indexed;\n }\n if (this.components) {\n result.components = this.components.map((comp) => JSON.parse(comp.format(format)));\n }\n return JSON.stringify(result);\n }\n let result = \"\";\n // Array\n if (this.baseType === \"array\") {\n result += this.arrayChildren.format(format);\n result += \"[\" + (this.arrayLength < 0 ? \"\" : String(this.arrayLength)) + \"]\";\n }\n else {\n if (this.baseType === \"tuple\") {\n if (format !== FormatTypes.sighash) {\n result += this.type;\n }\n result += \"(\" + this.components.map((comp) => comp.format(format)).join((format === FormatTypes.full) ? \", \" : \",\") + \")\";\n }\n else {\n result += this.type;\n }\n }\n if (format !== FormatTypes.sighash) {\n if (this.indexed === true) {\n result += \" indexed\";\n }\n if (format === FormatTypes.full && this.name) {\n result += \" \" + this.name;\n }\n }\n return result;\n }\n static from(value, allowIndexed) {\n if (typeof (value) === \"string\") {\n return ParamType.fromString(value, allowIndexed);\n }\n return ParamType.fromObject(value);\n }\n static fromObject(value) {\n if (ParamType.isParamType(value)) {\n return value;\n }\n return new ParamType(_constructorGuard, {\n name: (value.name || null),\n type: verifyType(value.type),\n indexed: ((value.indexed == null) ? null : !!value.indexed),\n components: (value.components ? value.components.map(ParamType.fromObject) : null)\n });\n }\n static fromString(value, allowIndexed) {\n function ParamTypify(node) {\n return ParamType.fromObject({\n name: node.name,\n type: node.type,\n indexed: node.indexed,\n components: node.components\n });\n }\n return ParamTypify(parseParamType(value, !!allowIndexed));\n }\n static isParamType(value) {\n return !!(value != null && value._isParamType);\n }\n}\n;\nfunction parseParams(value, allowIndex) {\n return splitNesting(value).map((param) => ParamType.fromString(param, allowIndex));\n}\nexport class Fragment {\n constructor(constructorGuard, params) {\n if (constructorGuard !== _constructorGuard) {\n logger.throwError(\"use a static from method\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Fragment()\"\n });\n }\n populate(this, params);\n this._isFragment = true;\n Object.freeze(this);\n }\n static from(value) {\n if (Fragment.isFragment(value)) {\n return value;\n }\n if (typeof (value) === \"string\") {\n return Fragment.fromString(value);\n }\n return Fragment.fromObject(value);\n }\n static fromObject(value) {\n if (Fragment.isFragment(value)) {\n return value;\n }\n switch (value.type) {\n case \"function\":\n return FunctionFragment.fromObject(value);\n case \"event\":\n return EventFragment.fromObject(value);\n case \"constructor\":\n return ConstructorFragment.fromObject(value);\n case \"error\":\n return ErrorFragment.fromObject(value);\n case \"fallback\":\n case \"receive\":\n // @TODO: Something? Maybe return a FunctionFragment? A custom DefaultFunctionFragment?\n return null;\n }\n return logger.throwArgumentError(\"invalid fragment object\", \"value\", value);\n }\n static fromString(value) {\n // Make sure the \"returns\" is surrounded by a space and all whitespace is exactly one space\n value = value.replace(/\\s/g, \" \");\n value = value.replace(/\\(/g, \" (\").replace(/\\)/g, \") \").replace(/\\s+/g, \" \");\n value = value.trim();\n if (value.split(\" \")[0] === \"event\") {\n return EventFragment.fromString(value.substring(5).trim());\n }\n else if (value.split(\" \")[0] === \"function\") {\n return FunctionFragment.fromString(value.substring(8).trim());\n }\n else if (value.split(\"(\")[0].trim() === \"constructor\") {\n return ConstructorFragment.fromString(value.trim());\n }\n else if (value.split(\" \")[0] === \"error\") {\n return ErrorFragment.fromString(value.substring(5).trim());\n }\n return logger.throwArgumentError(\"unsupported fragment\", \"value\", value);\n }\n static isFragment(value) {\n return !!(value && value._isFragment);\n }\n}\nexport class EventFragment extends Fragment {\n format(format) {\n if (!format) {\n format = FormatTypes.sighash;\n }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"event\",\n anonymous: this.anonymous,\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n let result = \"\";\n if (format !== FormatTypes.sighash) {\n result += \"event \";\n }\n result += this.name + \"(\" + this.inputs.map((input) => input.format(format)).join((format === FormatTypes.full) ? \", \" : \",\") + \") \";\n if (format !== FormatTypes.sighash) {\n if (this.anonymous) {\n result += \"anonymous \";\n }\n }\n return result.trim();\n }\n static from(value) {\n if (typeof (value) === \"string\") {\n return EventFragment.fromString(value);\n }\n return EventFragment.fromObject(value);\n }\n static fromObject(value) {\n if (EventFragment.isEventFragment(value)) {\n return value;\n }\n if (value.type !== \"event\") {\n logger.throwArgumentError(\"invalid event object\", \"value\", value);\n }\n const params = {\n name: verifyIdentifier(value.name),\n anonymous: value.anonymous,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []),\n type: \"event\"\n };\n return new EventFragment(_constructorGuard, params);\n }\n static fromString(value) {\n let match = value.match(regexParen);\n if (!match) {\n logger.throwArgumentError(\"invalid event string\", \"value\", value);\n }\n let anonymous = false;\n match[3].split(\" \").forEach((modifier) => {\n switch (modifier.trim()) {\n case \"anonymous\":\n anonymous = true;\n break;\n case \"\":\n break;\n default:\n logger.warn(\"unknown modifier: \" + modifier);\n }\n });\n return EventFragment.fromObject({\n name: match[1].trim(),\n anonymous: anonymous,\n inputs: parseParams(match[2], true),\n type: \"event\"\n });\n }\n static isEventFragment(value) {\n return (value && value._isFragment && value.type === \"event\");\n }\n}\nfunction parseGas(value, params) {\n params.gas = null;\n let comps = value.split(\"@\");\n if (comps.length !== 1) {\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid human-readable ABI signature\", \"value\", value);\n }\n if (!comps[1].match(/^[0-9]+$/)) {\n logger.throwArgumentError(\"invalid human-readable ABI signature gas\", \"value\", value);\n }\n params.gas = BigNumber.from(comps[1]);\n return comps[0];\n }\n return value;\n}\nfunction parseModifiers(value, params) {\n params.constant = false;\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n value.split(\" \").forEach((modifier) => {\n switch (modifier.trim()) {\n case \"constant\":\n params.constant = true;\n break;\n case \"payable\":\n params.payable = true;\n params.stateMutability = \"payable\";\n break;\n case \"nonpayable\":\n params.payable = false;\n params.stateMutability = \"nonpayable\";\n break;\n case \"pure\":\n params.constant = true;\n params.stateMutability = \"pure\";\n break;\n case \"view\":\n params.constant = true;\n params.stateMutability = \"view\";\n break;\n case \"external\":\n case \"public\":\n case \"\":\n break;\n default:\n console.log(\"unknown modifier: \" + modifier);\n }\n });\n}\nfunction verifyState(value) {\n let result = {\n constant: false,\n payable: true,\n stateMutability: \"payable\"\n };\n if (value.stateMutability != null) {\n result.stateMutability = value.stateMutability;\n // Set (and check things are consistent) the constant property\n result.constant = (result.stateMutability === \"view\" || result.stateMutability === \"pure\");\n if (value.constant != null) {\n if ((!!value.constant) !== result.constant) {\n logger.throwArgumentError(\"cannot have constant function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n // Set (and check things are consistent) the payable property\n result.payable = (result.stateMutability === \"payable\");\n if (value.payable != null) {\n if ((!!value.payable) !== result.payable) {\n logger.throwArgumentError(\"cannot have payable function with mutability \" + result.stateMutability, \"value\", value);\n }\n }\n }\n else if (value.payable != null) {\n result.payable = !!value.payable;\n // If payable we can assume non-constant; otherwise we can't assume\n if (value.constant == null && !result.payable && value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n result.constant = !!value.constant;\n if (result.constant) {\n result.stateMutability = \"view\";\n }\n else {\n result.stateMutability = (result.payable ? \"payable\" : \"nonpayable\");\n }\n if (result.payable && result.constant) {\n logger.throwArgumentError(\"cannot have constant payable function\", \"value\", value);\n }\n }\n else if (value.constant != null) {\n result.constant = !!value.constant;\n result.payable = !result.constant;\n result.stateMutability = (result.constant ? \"view\" : \"payable\");\n }\n else if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"unable to determine stateMutability\", \"value\", value);\n }\n return result;\n}\nexport class ConstructorFragment extends Fragment {\n format(format) {\n if (!format) {\n format = FormatTypes.sighash;\n }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"constructor\",\n stateMutability: ((this.stateMutability !== \"nonpayable\") ? this.stateMutability : undefined),\n payable: this.payable,\n gas: (this.gas ? this.gas.toNumber() : undefined),\n inputs: this.inputs.map((input) => JSON.parse(input.format(format)))\n });\n }\n if (format === FormatTypes.sighash) {\n logger.throwError(\"cannot format a constructor for sighash\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"format(sighash)\"\n });\n }\n let result = \"constructor(\" + this.inputs.map((input) => input.format(format)).join((format === FormatTypes.full) ? \", \" : \",\") + \") \";\n if (this.stateMutability && this.stateMutability !== \"nonpayable\") {\n result += this.stateMutability + \" \";\n }\n return result.trim();\n }\n static from(value) {\n if (typeof (value) === \"string\") {\n return ConstructorFragment.fromString(value);\n }\n return ConstructorFragment.fromObject(value);\n }\n static fromObject(value) {\n if (ConstructorFragment.isConstructorFragment(value)) {\n return value;\n }\n if (value.type !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor object\", \"value\", value);\n }\n let state = verifyState(value);\n if (state.constant) {\n logger.throwArgumentError(\"constructor cannot be constant\", \"value\", value);\n }\n const params = {\n name: null,\n type: value.type,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []),\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: (value.gas ? BigNumber.from(value.gas) : null)\n };\n return new ConstructorFragment(_constructorGuard, params);\n }\n static fromString(value) {\n let params = { type: \"constructor\" };\n value = parseGas(value, params);\n let parens = value.match(regexParen);\n if (!parens || parens[1].trim() !== \"constructor\") {\n logger.throwArgumentError(\"invalid constructor string\", \"value\", value);\n }\n params.inputs = parseParams(parens[2].trim(), false);\n parseModifiers(parens[3].trim(), params);\n return ConstructorFragment.fromObject(params);\n }\n static isConstructorFragment(value) {\n return (value && value._isFragment && value.type === \"constructor\");\n }\n}\nexport class FunctionFragment extends ConstructorFragment {\n format(format) {\n if (!format) {\n format = FormatTypes.sighash;\n }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"function\",\n name: this.name,\n constant: this.constant,\n stateMutability: ((this.stateMutability !== \"nonpayable\") ? this.stateMutability : undefined),\n payable: this.payable,\n gas: (this.gas ? this.gas.toNumber() : undefined),\n inputs: this.inputs.map((input) => JSON.parse(input.format(format))),\n outputs: this.outputs.map((output) => JSON.parse(output.format(format))),\n });\n }\n let result = \"\";\n if (format !== FormatTypes.sighash) {\n result += \"function \";\n }\n result += this.name + \"(\" + this.inputs.map((input) => input.format(format)).join((format === FormatTypes.full) ? \", \" : \",\") + \") \";\n if (format !== FormatTypes.sighash) {\n if (this.stateMutability) {\n if (this.stateMutability !== \"nonpayable\") {\n result += (this.stateMutability + \" \");\n }\n }\n else if (this.constant) {\n result += \"view \";\n }\n if (this.outputs && this.outputs.length) {\n result += \"returns (\" + this.outputs.map((output) => output.format(format)).join(\", \") + \") \";\n }\n if (this.gas != null) {\n result += \"@\" + this.gas.toString() + \" \";\n }\n }\n return result.trim();\n }\n static from(value) {\n if (typeof (value) === \"string\") {\n return FunctionFragment.fromString(value);\n }\n return FunctionFragment.fromObject(value);\n }\n static fromObject(value) {\n if (FunctionFragment.isFunctionFragment(value)) {\n return value;\n }\n if (value.type !== \"function\") {\n logger.throwArgumentError(\"invalid function object\", \"value\", value);\n }\n let state = verifyState(value);\n const params = {\n type: value.type,\n name: verifyIdentifier(value.name),\n constant: state.constant,\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : []),\n outputs: (value.outputs ? value.outputs.map(ParamType.fromObject) : []),\n payable: state.payable,\n stateMutability: state.stateMutability,\n gas: (value.gas ? BigNumber.from(value.gas) : null)\n };\n return new FunctionFragment(_constructorGuard, params);\n }\n static fromString(value) {\n let params = { type: \"function\" };\n value = parseGas(value, params);\n let comps = value.split(\" returns \");\n if (comps.length > 2) {\n logger.throwArgumentError(\"invalid function string\", \"value\", value);\n }\n let parens = comps[0].match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid function signature\", \"value\", value);\n }\n params.name = parens[1].trim();\n if (params.name) {\n verifyIdentifier(params.name);\n }\n params.inputs = parseParams(parens[2], false);\n parseModifiers(parens[3].trim(), params);\n // We have outputs\n if (comps.length > 1) {\n let returns = comps[1].match(regexParen);\n if (returns[1].trim() != \"\" || returns[3].trim() != \"\") {\n logger.throwArgumentError(\"unexpected tokens\", \"value\", value);\n }\n params.outputs = parseParams(returns[2], false);\n }\n else {\n params.outputs = [];\n }\n return FunctionFragment.fromObject(params);\n }\n static isFunctionFragment(value) {\n return (value && value._isFragment && value.type === \"function\");\n }\n}\n//export class StructFragment extends Fragment {\n//}\nfunction checkForbidden(fragment) {\n const sig = fragment.format();\n if (sig === \"Error(string)\" || sig === \"Panic(uint256)\") {\n logger.throwArgumentError(`cannot specify user defined ${sig} error`, \"fragment\", fragment);\n }\n return fragment;\n}\nexport class ErrorFragment extends Fragment {\n format(format) {\n if (!format) {\n format = FormatTypes.sighash;\n }\n if (!FormatTypes[format]) {\n logger.throwArgumentError(\"invalid format type\", \"format\", format);\n }\n if (format === FormatTypes.json) {\n return JSON.stringify({\n type: \"error\",\n name: this.name,\n inputs: this.inputs.map((input) => JSON.parse(input.format(format))),\n });\n }\n let result = \"\";\n if (format !== FormatTypes.sighash) {\n result += \"error \";\n }\n result += this.name + \"(\" + this.inputs.map((input) => input.format(format)).join((format === FormatTypes.full) ? \", \" : \",\") + \") \";\n return result.trim();\n }\n static from(value) {\n if (typeof (value) === \"string\") {\n return ErrorFragment.fromString(value);\n }\n return ErrorFragment.fromObject(value);\n }\n static fromObject(value) {\n if (ErrorFragment.isErrorFragment(value)) {\n return value;\n }\n if (value.type !== \"error\") {\n logger.throwArgumentError(\"invalid error object\", \"value\", value);\n }\n const params = {\n type: value.type,\n name: verifyIdentifier(value.name),\n inputs: (value.inputs ? value.inputs.map(ParamType.fromObject) : [])\n };\n return checkForbidden(new ErrorFragment(_constructorGuard, params));\n }\n static fromString(value) {\n let params = { type: \"error\" };\n let parens = value.match(regexParen);\n if (!parens) {\n logger.throwArgumentError(\"invalid error signature\", \"value\", value);\n }\n params.name = parens[1].trim();\n if (params.name) {\n verifyIdentifier(params.name);\n }\n params.inputs = parseParams(parens[2], false);\n return checkForbidden(ErrorFragment.fromObject(params));\n }\n static isErrorFragment(value) {\n return (value && value._isFragment && value.type === \"error\");\n }\n}\nfunction verifyType(type) {\n // These need to be transformed to their full description\n if (type.match(/^uint($|[^1-9])/)) {\n type = \"uint256\" + type.substring(4);\n }\n else if (type.match(/^int($|[^1-9])/)) {\n type = \"int256\" + type.substring(3);\n }\n // @TODO: more verification\n return type;\n}\n// See: https://github.com/ethereum/solidity/blob/1f8f1a3db93a548d0555e3e14cfc55a10e25b60e/docs/grammar/SolidityLexer.g4#L234\nconst regexIdentifier = new RegExp(\"^[a-zA-Z$_][a-zA-Z0-9$_]*$\");\nfunction verifyIdentifier(value) {\n if (!value || !value.match(regexIdentifier)) {\n logger.throwArgumentError(`invalid identifier \"${value}\"`, \"value\", value);\n }\n return value;\n}\nconst regexParen = new RegExp(\"^([^)(]*)\\\\((.*)\\\\)([^)(]*)$\");\nfunction splitNesting(value) {\n value = value.trim();\n let result = [];\n let accum = \"\";\n let depth = 0;\n for (let offset = 0; offset < value.length; offset++) {\n let c = value[offset];\n if (c === \",\" && depth === 0) {\n result.push(accum);\n accum = \"\";\n }\n else {\n accum += c;\n if (c === \"(\") {\n depth++;\n }\n else if (c === \")\") {\n depth--;\n if (depth === -1) {\n logger.throwArgumentError(\"unbalanced parenthesis\", \"value\", value);\n }\n }\n }\n }\n if (accum) {\n result.push(accum);\n }\n return result;\n}\n//# sourceMappingURL=fragments.js.map","\"use strict\";\nimport { arrayify, concat, hexConcat, hexlify } from \"@ethersproject/bytes\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"../_version\";\nconst logger = new Logger(version);\nexport function checkResultErrors(result) {\n // Find the first error (if any)\n const errors = [];\n const checkErrors = function (path, object) {\n if (!Array.isArray(object)) {\n return;\n }\n for (let key in object) {\n const childPath = path.slice();\n childPath.push(key);\n try {\n checkErrors(childPath, object[key]);\n }\n catch (error) {\n errors.push({ path: childPath, error: error });\n }\n }\n };\n checkErrors([], result);\n return errors;\n}\nexport class Coder {\n constructor(name, type, localName, dynamic) {\n // @TODO: defineReadOnly these\n this.name = name;\n this.type = type;\n this.localName = localName;\n this.dynamic = dynamic;\n }\n _throwError(message, value) {\n logger.throwArgumentError(message, this.localName, value);\n }\n}\nexport class Writer {\n constructor(wordSize) {\n defineReadOnly(this, \"wordSize\", wordSize || 32);\n this._data = [];\n this._dataLength = 0;\n this._padding = new Uint8Array(wordSize);\n }\n get data() {\n return hexConcat(this._data);\n }\n get length() { return this._dataLength; }\n _writeData(data) {\n this._data.push(data);\n this._dataLength += data.length;\n return data.length;\n }\n appendWriter(writer) {\n return this._writeData(concat(writer._data));\n }\n // Arrayish items; padded on the right to wordSize\n writeBytes(value) {\n let bytes = arrayify(value);\n const paddingOffset = bytes.length % this.wordSize;\n if (paddingOffset) {\n bytes = concat([bytes, this._padding.slice(paddingOffset)]);\n }\n return this._writeData(bytes);\n }\n _getValue(value) {\n let bytes = arrayify(BigNumber.from(value));\n if (bytes.length > this.wordSize) {\n logger.throwError(\"value out-of-bounds\", Logger.errors.BUFFER_OVERRUN, {\n length: this.wordSize,\n offset: bytes.length\n });\n }\n if (bytes.length % this.wordSize) {\n bytes = concat([this._padding.slice(bytes.length % this.wordSize), bytes]);\n }\n return bytes;\n }\n // BigNumberish items; padded on the left to wordSize\n writeValue(value) {\n return this._writeData(this._getValue(value));\n }\n writeUpdatableValue() {\n const offset = this._data.length;\n this._data.push(this._padding);\n this._dataLength += this.wordSize;\n return (value) => {\n this._data[offset] = this._getValue(value);\n };\n }\n}\nexport class Reader {\n constructor(data, wordSize, coerceFunc, allowLoose) {\n defineReadOnly(this, \"_data\", arrayify(data));\n defineReadOnly(this, \"wordSize\", wordSize || 32);\n defineReadOnly(this, \"_coerceFunc\", coerceFunc);\n defineReadOnly(this, \"allowLoose\", allowLoose);\n this._offset = 0;\n }\n get data() { return hexlify(this._data); }\n get consumed() { return this._offset; }\n // The default Coerce function\n static coerce(name, value) {\n let match = name.match(\"^u?int([0-9]+)$\");\n if (match && parseInt(match[1]) <= 48) {\n value = value.toNumber();\n }\n return value;\n }\n coerce(name, value) {\n if (this._coerceFunc) {\n return this._coerceFunc(name, value);\n }\n return Reader.coerce(name, value);\n }\n _peekBytes(offset, length, loose) {\n let alignedLength = Math.ceil(length / this.wordSize) * this.wordSize;\n if (this._offset + alignedLength > this._data.length) {\n if (this.allowLoose && loose && this._offset + length <= this._data.length) {\n alignedLength = length;\n }\n else {\n logger.throwError(\"data out-of-bounds\", Logger.errors.BUFFER_OVERRUN, {\n length: this._data.length,\n offset: this._offset + alignedLength\n });\n }\n }\n return this._data.slice(this._offset, this._offset + alignedLength);\n }\n subReader(offset) {\n return new Reader(this._data.slice(this._offset + offset), this.wordSize, this._coerceFunc, this.allowLoose);\n }\n readBytes(length, loose) {\n let bytes = this._peekBytes(0, length, !!loose);\n this._offset += bytes.length;\n // @TODO: Make sure the length..end bytes are all 0?\n return bytes.slice(0, length);\n }\n readValue() {\n return BigNumber.from(this.readBytes(this.wordSize));\n }\n}\n//# sourceMappingURL=abstract-coder.js.map","/**\n * [js-sha3]{@link https://github.com/emn178/js-sha3}\n *\n * @version 0.8.0\n * @author Chen, Yi-Cyuan [emn178@gmail.com]\n * @copyright Chen, Yi-Cyuan 2015-2018\n * @license MIT\n */\n/*jslint bitwise: true */\n(function () {\n 'use strict';\n\n var INPUT_ERROR = 'input is invalid type';\n var FINALIZE_ERROR = 'finalize already called';\n var WINDOW = typeof window === 'object';\n var root = WINDOW ? window : {};\n if (root.JS_SHA3_NO_WINDOW) {\n WINDOW = false;\n }\n var WEB_WORKER = !WINDOW && typeof self === 'object';\n var NODE_JS = !root.JS_SHA3_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;\n if (NODE_JS) {\n root = global;\n } else if (WEB_WORKER) {\n root = self;\n }\n var COMMON_JS = !root.JS_SHA3_NO_COMMON_JS && typeof module === 'object' && module.exports;\n var AMD = typeof define === 'function' && define.amd;\n var ARRAY_BUFFER = !root.JS_SHA3_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';\n var HEX_CHARS = '0123456789abcdef'.split('');\n var SHAKE_PADDING = [31, 7936, 2031616, 520093696];\n var CSHAKE_PADDING = [4, 1024, 262144, 67108864];\n var KECCAK_PADDING = [1, 256, 65536, 16777216];\n var PADDING = [6, 1536, 393216, 100663296];\n var SHIFT = [0, 8, 16, 24];\n var RC = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649,\n 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0,\n 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771,\n 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648,\n 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648];\n var BITS = [224, 256, 384, 512];\n var SHAKE_BITS = [128, 256];\n var OUTPUT_TYPES = ['hex', 'buffer', 'arrayBuffer', 'array', 'digest'];\n var CSHAKE_BYTEPAD = {\n '128': 168,\n '256': 136\n };\n\n if (root.JS_SHA3_NO_NODE_JS || !Array.isArray) {\n Array.isArray = function (obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n }\n\n if (ARRAY_BUFFER && (root.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {\n ArrayBuffer.isView = function (obj) {\n return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;\n };\n }\n\n var createOutputMethod = function (bits, padding, outputType) {\n return function (message) {\n return new Keccak(bits, padding, bits).update(message)[outputType]();\n };\n };\n\n var createShakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits) {\n return new Keccak(bits, padding, outputBits).update(message)[outputType]();\n };\n };\n\n var createCshakeOutputMethod = function (bits, padding, outputType) {\n return function (message, outputBits, n, s) {\n return methods['cshake' + bits].update(message, outputBits, n, s)[outputType]();\n };\n };\n\n var createKmacOutputMethod = function (bits, padding, outputType) {\n return function (key, message, outputBits, s) {\n return methods['kmac' + bits].update(key, message, outputBits, s)[outputType]();\n };\n };\n\n var createOutputMethods = function (method, createMethod, bits, padding) {\n for (var i = 0; i < OUTPUT_TYPES.length; ++i) {\n var type = OUTPUT_TYPES[i];\n method[type] = createMethod(bits, padding, type);\n }\n return method;\n };\n\n var createMethod = function (bits, padding) {\n var method = createOutputMethod(bits, padding, 'hex');\n method.create = function () {\n return new Keccak(bits, padding, bits);\n };\n method.update = function (message) {\n return method.create().update(message);\n };\n return createOutputMethods(method, createOutputMethod, bits, padding);\n };\n\n var createShakeMethod = function (bits, padding) {\n var method = createShakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits) {\n return new Keccak(bits, padding, outputBits);\n };\n method.update = function (message, outputBits) {\n return method.create(outputBits).update(message);\n };\n return createOutputMethods(method, createShakeOutputMethod, bits, padding);\n };\n\n var createCshakeMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createCshakeOutputMethod(bits, padding, 'hex');\n method.create = function (outputBits, n, s) {\n if (!n && !s) {\n return methods['shake' + bits].create(outputBits);\n } else {\n return new Keccak(bits, padding, outputBits).bytepad([n, s], w);\n }\n };\n method.update = function (message, outputBits, n, s) {\n return method.create(outputBits, n, s).update(message);\n };\n return createOutputMethods(method, createCshakeOutputMethod, bits, padding);\n };\n\n var createKmacMethod = function (bits, padding) {\n var w = CSHAKE_BYTEPAD[bits];\n var method = createKmacOutputMethod(bits, padding, 'hex');\n method.create = function (key, outputBits, s) {\n return new Kmac(bits, padding, outputBits).bytepad(['KMAC', s], w).bytepad([key], w);\n };\n method.update = function (key, message, outputBits, s) {\n return method.create(key, outputBits, s).update(message);\n };\n return createOutputMethods(method, createKmacOutputMethod, bits, padding);\n };\n\n var algorithms = [\n { name: 'keccak', padding: KECCAK_PADDING, bits: BITS, createMethod: createMethod },\n { name: 'sha3', padding: PADDING, bits: BITS, createMethod: createMethod },\n { name: 'shake', padding: SHAKE_PADDING, bits: SHAKE_BITS, createMethod: createShakeMethod },\n { name: 'cshake', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createCshakeMethod },\n { name: 'kmac', padding: CSHAKE_PADDING, bits: SHAKE_BITS, createMethod: createKmacMethod }\n ];\n\n var methods = {}, methodNames = [];\n\n for (var i = 0; i < algorithms.length; ++i) {\n var algorithm = algorithms[i];\n var bits = algorithm.bits;\n for (var j = 0; j < bits.length; ++j) {\n var methodName = algorithm.name + '_' + bits[j];\n methodNames.push(methodName);\n methods[methodName] = algorithm.createMethod(bits[j], algorithm.padding);\n if (algorithm.name !== 'sha3') {\n var newMethodName = algorithm.name + bits[j];\n methodNames.push(newMethodName);\n methods[newMethodName] = methods[methodName];\n }\n }\n }\n\n function Keccak(bits, padding, outputBits) {\n this.blocks = [];\n this.s = [];\n this.padding = padding;\n this.outputBits = outputBits;\n this.reset = true;\n this.finalized = false;\n this.block = 0;\n this.start = 0;\n this.blockCount = (1600 - (bits << 1)) >> 5;\n this.byteCount = this.blockCount << 2;\n this.outputBlocks = outputBits >> 5;\n this.extraBytes = (outputBits & 31) >> 3;\n\n for (var i = 0; i < 50; ++i) {\n this.s[i] = 0;\n }\n }\n\n Keccak.prototype.update = function (message) {\n if (this.finalized) {\n throw new Error(FINALIZE_ERROR);\n }\n var notString, type = typeof message;\n if (type !== 'string') {\n if (type === 'object') {\n if (message === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {\n message = new Uint8Array(message);\n } else if (!Array.isArray(message)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var blocks = this.blocks, byteCount = this.byteCount, length = message.length,\n blockCount = this.blockCount, index = 0, s = this.s, i, code;\n\n while (index < length) {\n if (this.reset) {\n this.reset = false;\n blocks[0] = this.block;\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n if (notString) {\n for (i = this.start; index < length && i < byteCount; ++index) {\n blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];\n }\n } else {\n for (i = this.start; index < length && i < byteCount; ++index) {\n code = message.charCodeAt(index);\n if (code < 0x80) {\n blocks[i >> 2] |= code << SHIFT[i++ & 3];\n } else if (code < 0x800) {\n blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else if (code < 0xd800 || code >= 0xe000) {\n blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));\n blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];\n blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];\n }\n }\n }\n this.lastByteIndex = i;\n if (i >= byteCount) {\n this.start = i - byteCount;\n this.block = blocks[blockCount];\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n this.reset = true;\n } else {\n this.start = i;\n }\n }\n return this;\n };\n\n Keccak.prototype.encode = function (x, right) {\n var o = x & 255, n = 1;\n var bytes = [o];\n x = x >> 8;\n o = x & 255;\n while (o > 0) {\n bytes.unshift(o);\n x = x >> 8;\n o = x & 255;\n ++n;\n }\n if (right) {\n bytes.push(n);\n } else {\n bytes.unshift(n);\n }\n this.update(bytes);\n return bytes.length;\n };\n\n Keccak.prototype.encodeString = function (str) {\n var notString, type = typeof str;\n if (type !== 'string') {\n if (type === 'object') {\n if (str === null) {\n throw new Error(INPUT_ERROR);\n } else if (ARRAY_BUFFER && str.constructor === ArrayBuffer) {\n str = new Uint8Array(str);\n } else if (!Array.isArray(str)) {\n if (!ARRAY_BUFFER || !ArrayBuffer.isView(str)) {\n throw new Error(INPUT_ERROR);\n }\n }\n } else {\n throw new Error(INPUT_ERROR);\n }\n notString = true;\n }\n var bytes = 0, length = str.length;\n if (notString) {\n bytes = length;\n } else {\n for (var i = 0; i < str.length; ++i) {\n var code = str.charCodeAt(i);\n if (code < 0x80) {\n bytes += 1;\n } else if (code < 0x800) {\n bytes += 2;\n } else if (code < 0xd800 || code >= 0xe000) {\n bytes += 3;\n } else {\n code = 0x10000 + (((code & 0x3ff) << 10) | (str.charCodeAt(++i) & 0x3ff));\n bytes += 4;\n }\n }\n }\n bytes += this.encode(bytes * 8);\n this.update(str);\n return bytes;\n };\n\n Keccak.prototype.bytepad = function (strs, w) {\n var bytes = this.encode(w);\n for (var i = 0; i < strs.length; ++i) {\n bytes += this.encodeString(strs[i]);\n }\n var paddingBytes = w - bytes % w;\n var zeros = [];\n zeros.length = paddingBytes;\n this.update(zeros);\n return this;\n };\n\n Keccak.prototype.finalize = function () {\n if (this.finalized) {\n return;\n }\n this.finalized = true;\n var blocks = this.blocks, i = this.lastByteIndex, blockCount = this.blockCount, s = this.s;\n blocks[i >> 2] |= this.padding[i & 3];\n if (this.lastByteIndex === this.byteCount) {\n blocks[0] = blocks[blockCount];\n for (i = 1; i < blockCount + 1; ++i) {\n blocks[i] = 0;\n }\n }\n blocks[blockCount - 1] |= 0x80000000;\n for (i = 0; i < blockCount; ++i) {\n s[i] ^= blocks[i];\n }\n f(s);\n };\n\n Keccak.prototype.toString = Keccak.prototype.hex = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var hex = '', block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F] +\n HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F] +\n HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F] +\n HEX_CHARS[(block >> 28) & 0x0F] + HEX_CHARS[(block >> 24) & 0x0F];\n }\n if (j % blockCount === 0) {\n f(s);\n i = 0;\n }\n }\n if (extraBytes) {\n block = s[i];\n hex += HEX_CHARS[(block >> 4) & 0x0F] + HEX_CHARS[block & 0x0F];\n if (extraBytes > 1) {\n hex += HEX_CHARS[(block >> 12) & 0x0F] + HEX_CHARS[(block >> 8) & 0x0F];\n }\n if (extraBytes > 2) {\n hex += HEX_CHARS[(block >> 20) & 0x0F] + HEX_CHARS[(block >> 16) & 0x0F];\n }\n }\n return hex;\n };\n\n Keccak.prototype.arrayBuffer = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var bytes = this.outputBits >> 3;\n var buffer;\n if (extraBytes) {\n buffer = new ArrayBuffer((outputBlocks + 1) << 2);\n } else {\n buffer = new ArrayBuffer(bytes);\n }\n var array = new Uint32Array(buffer);\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n array[j] = s[i];\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n array[i] = s[i];\n buffer = buffer.slice(0, bytes);\n }\n return buffer;\n };\n\n Keccak.prototype.buffer = Keccak.prototype.arrayBuffer;\n\n Keccak.prototype.digest = Keccak.prototype.array = function () {\n this.finalize();\n\n var blockCount = this.blockCount, s = this.s, outputBlocks = this.outputBlocks,\n extraBytes = this.extraBytes, i = 0, j = 0;\n var array = [], offset, block;\n while (j < outputBlocks) {\n for (i = 0; i < blockCount && j < outputBlocks; ++i, ++j) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n array[offset + 1] = (block >> 8) & 0xFF;\n array[offset + 2] = (block >> 16) & 0xFF;\n array[offset + 3] = (block >> 24) & 0xFF;\n }\n if (j % blockCount === 0) {\n f(s);\n }\n }\n if (extraBytes) {\n offset = j << 2;\n block = s[i];\n array[offset] = block & 0xFF;\n if (extraBytes > 1) {\n array[offset + 1] = (block >> 8) & 0xFF;\n }\n if (extraBytes > 2) {\n array[offset + 2] = (block >> 16) & 0xFF;\n }\n }\n return array;\n };\n\n function Kmac(bits, padding, outputBits) {\n Keccak.call(this, bits, padding, outputBits);\n }\n\n Kmac.prototype = new Keccak();\n\n Kmac.prototype.finalize = function () {\n this.encode(this.outputBits, true);\n return Keccak.prototype.finalize.call(this);\n };\n\n var f = function (s) {\n var h, l, n, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9,\n b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17,\n b18, b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30, b31, b32, b33,\n b34, b35, b36, b37, b38, b39, b40, b41, b42, b43, b44, b45, b46, b47, b48, b49;\n for (n = 0; n < 48; n += 2) {\n c0 = s[0] ^ s[10] ^ s[20] ^ s[30] ^ s[40];\n c1 = s[1] ^ s[11] ^ s[21] ^ s[31] ^ s[41];\n c2 = s[2] ^ s[12] ^ s[22] ^ s[32] ^ s[42];\n c3 = s[3] ^ s[13] ^ s[23] ^ s[33] ^ s[43];\n c4 = s[4] ^ s[14] ^ s[24] ^ s[34] ^ s[44];\n c5 = s[5] ^ s[15] ^ s[25] ^ s[35] ^ s[45];\n c6 = s[6] ^ s[16] ^ s[26] ^ s[36] ^ s[46];\n c7 = s[7] ^ s[17] ^ s[27] ^ s[37] ^ s[47];\n c8 = s[8] ^ s[18] ^ s[28] ^ s[38] ^ s[48];\n c9 = s[9] ^ s[19] ^ s[29] ^ s[39] ^ s[49];\n\n h = c8 ^ ((c2 << 1) | (c3 >>> 31));\n l = c9 ^ ((c3 << 1) | (c2 >>> 31));\n s[0] ^= h;\n s[1] ^= l;\n s[10] ^= h;\n s[11] ^= l;\n s[20] ^= h;\n s[21] ^= l;\n s[30] ^= h;\n s[31] ^= l;\n s[40] ^= h;\n s[41] ^= l;\n h = c0 ^ ((c4 << 1) | (c5 >>> 31));\n l = c1 ^ ((c5 << 1) | (c4 >>> 31));\n s[2] ^= h;\n s[3] ^= l;\n s[12] ^= h;\n s[13] ^= l;\n s[22] ^= h;\n s[23] ^= l;\n s[32] ^= h;\n s[33] ^= l;\n s[42] ^= h;\n s[43] ^= l;\n h = c2 ^ ((c6 << 1) | (c7 >>> 31));\n l = c3 ^ ((c7 << 1) | (c6 >>> 31));\n s[4] ^= h;\n s[5] ^= l;\n s[14] ^= h;\n s[15] ^= l;\n s[24] ^= h;\n s[25] ^= l;\n s[34] ^= h;\n s[35] ^= l;\n s[44] ^= h;\n s[45] ^= l;\n h = c4 ^ ((c8 << 1) | (c9 >>> 31));\n l = c5 ^ ((c9 << 1) | (c8 >>> 31));\n s[6] ^= h;\n s[7] ^= l;\n s[16] ^= h;\n s[17] ^= l;\n s[26] ^= h;\n s[27] ^= l;\n s[36] ^= h;\n s[37] ^= l;\n s[46] ^= h;\n s[47] ^= l;\n h = c6 ^ ((c0 << 1) | (c1 >>> 31));\n l = c7 ^ ((c1 << 1) | (c0 >>> 31));\n s[8] ^= h;\n s[9] ^= l;\n s[18] ^= h;\n s[19] ^= l;\n s[28] ^= h;\n s[29] ^= l;\n s[38] ^= h;\n s[39] ^= l;\n s[48] ^= h;\n s[49] ^= l;\n\n b0 = s[0];\n b1 = s[1];\n b32 = (s[11] << 4) | (s[10] >>> 28);\n b33 = (s[10] << 4) | (s[11] >>> 28);\n b14 = (s[20] << 3) | (s[21] >>> 29);\n b15 = (s[21] << 3) | (s[20] >>> 29);\n b46 = (s[31] << 9) | (s[30] >>> 23);\n b47 = (s[30] << 9) | (s[31] >>> 23);\n b28 = (s[40] << 18) | (s[41] >>> 14);\n b29 = (s[41] << 18) | (s[40] >>> 14);\n b20 = (s[2] << 1) | (s[3] >>> 31);\n b21 = (s[3] << 1) | (s[2] >>> 31);\n b2 = (s[13] << 12) | (s[12] >>> 20);\n b3 = (s[12] << 12) | (s[13] >>> 20);\n b34 = (s[22] << 10) | (s[23] >>> 22);\n b35 = (s[23] << 10) | (s[22] >>> 22);\n b16 = (s[33] << 13) | (s[32] >>> 19);\n b17 = (s[32] << 13) | (s[33] >>> 19);\n b48 = (s[42] << 2) | (s[43] >>> 30);\n b49 = (s[43] << 2) | (s[42] >>> 30);\n b40 = (s[5] << 30) | (s[4] >>> 2);\n b41 = (s[4] << 30) | (s[5] >>> 2);\n b22 = (s[14] << 6) | (s[15] >>> 26);\n b23 = (s[15] << 6) | (s[14] >>> 26);\n b4 = (s[25] << 11) | (s[24] >>> 21);\n b5 = (s[24] << 11) | (s[25] >>> 21);\n b36 = (s[34] << 15) | (s[35] >>> 17);\n b37 = (s[35] << 15) | (s[34] >>> 17);\n b18 = (s[45] << 29) | (s[44] >>> 3);\n b19 = (s[44] << 29) | (s[45] >>> 3);\n b10 = (s[6] << 28) | (s[7] >>> 4);\n b11 = (s[7] << 28) | (s[6] >>> 4);\n b42 = (s[17] << 23) | (s[16] >>> 9);\n b43 = (s[16] << 23) | (s[17] >>> 9);\n b24 = (s[26] << 25) | (s[27] >>> 7);\n b25 = (s[27] << 25) | (s[26] >>> 7);\n b6 = (s[36] << 21) | (s[37] >>> 11);\n b7 = (s[37] << 21) | (s[36] >>> 11);\n b38 = (s[47] << 24) | (s[46] >>> 8);\n b39 = (s[46] << 24) | (s[47] >>> 8);\n b30 = (s[8] << 27) | (s[9] >>> 5);\n b31 = (s[9] << 27) | (s[8] >>> 5);\n b12 = (s[18] << 20) | (s[19] >>> 12);\n b13 = (s[19] << 20) | (s[18] >>> 12);\n b44 = (s[29] << 7) | (s[28] >>> 25);\n b45 = (s[28] << 7) | (s[29] >>> 25);\n b26 = (s[38] << 8) | (s[39] >>> 24);\n b27 = (s[39] << 8) | (s[38] >>> 24);\n b8 = (s[48] << 14) | (s[49] >>> 18);\n b9 = (s[49] << 14) | (s[48] >>> 18);\n\n s[0] = b0 ^ (~b2 & b4);\n s[1] = b1 ^ (~b3 & b5);\n s[10] = b10 ^ (~b12 & b14);\n s[11] = b11 ^ (~b13 & b15);\n s[20] = b20 ^ (~b22 & b24);\n s[21] = b21 ^ (~b23 & b25);\n s[30] = b30 ^ (~b32 & b34);\n s[31] = b31 ^ (~b33 & b35);\n s[40] = b40 ^ (~b42 & b44);\n s[41] = b41 ^ (~b43 & b45);\n s[2] = b2 ^ (~b4 & b6);\n s[3] = b3 ^ (~b5 & b7);\n s[12] = b12 ^ (~b14 & b16);\n s[13] = b13 ^ (~b15 & b17);\n s[22] = b22 ^ (~b24 & b26);\n s[23] = b23 ^ (~b25 & b27);\n s[32] = b32 ^ (~b34 & b36);\n s[33] = b33 ^ (~b35 & b37);\n s[42] = b42 ^ (~b44 & b46);\n s[43] = b43 ^ (~b45 & b47);\n s[4] = b4 ^ (~b6 & b8);\n s[5] = b5 ^ (~b7 & b9);\n s[14] = b14 ^ (~b16 & b18);\n s[15] = b15 ^ (~b17 & b19);\n s[24] = b24 ^ (~b26 & b28);\n s[25] = b25 ^ (~b27 & b29);\n s[34] = b34 ^ (~b36 & b38);\n s[35] = b35 ^ (~b37 & b39);\n s[44] = b44 ^ (~b46 & b48);\n s[45] = b45 ^ (~b47 & b49);\n s[6] = b6 ^ (~b8 & b0);\n s[7] = b7 ^ (~b9 & b1);\n s[16] = b16 ^ (~b18 & b10);\n s[17] = b17 ^ (~b19 & b11);\n s[26] = b26 ^ (~b28 & b20);\n s[27] = b27 ^ (~b29 & b21);\n s[36] = b36 ^ (~b38 & b30);\n s[37] = b37 ^ (~b39 & b31);\n s[46] = b46 ^ (~b48 & b40);\n s[47] = b47 ^ (~b49 & b41);\n s[8] = b8 ^ (~b0 & b2);\n s[9] = b9 ^ (~b1 & b3);\n s[18] = b18 ^ (~b10 & b12);\n s[19] = b19 ^ (~b11 & b13);\n s[28] = b28 ^ (~b20 & b22);\n s[29] = b29 ^ (~b21 & b23);\n s[38] = b38 ^ (~b30 & b32);\n s[39] = b39 ^ (~b31 & b33);\n s[48] = b48 ^ (~b40 & b42);\n s[49] = b49 ^ (~b41 & b43);\n\n s[0] ^= RC[n];\n s[1] ^= RC[n + 1];\n }\n };\n\n if (COMMON_JS) {\n module.exports = methods;\n } else {\n for (i = 0; i < methodNames.length; ++i) {\n root[methodNames[i]] = methods[methodNames[i]];\n }\n if (AMD) {\n define(function () {\n return methods;\n });\n }\n }\n})();\n","\"use strict\";\nimport sha3 from \"js-sha3\";\nimport { arrayify } from \"@ethersproject/bytes\";\nexport function keccak256(data) {\n return '0x' + sha3.keccak_256(arrayify(data));\n}\n//# sourceMappingURL=index.js.map","export const version = \"rlp/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\n//See: https://github.com/ethereum/wiki/wiki/RLP\nimport { arrayify, hexlify, isBytesLike } from \"@ethersproject/bytes\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nfunction arrayifyInteger(value) {\n const result = [];\n while (value) {\n result.unshift(value & 0xff);\n value >>= 8;\n }\n return result;\n}\nfunction unarrayifyInteger(data, offset, length) {\n let result = 0;\n for (let i = 0; i < length; i++) {\n result = (result * 256) + data[offset + i];\n }\n return result;\n}\nfunction _encode(object) {\n if (Array.isArray(object)) {\n let payload = [];\n object.forEach(function (child) {\n payload = payload.concat(_encode(child));\n });\n if (payload.length <= 55) {\n payload.unshift(0xc0 + payload.length);\n return payload;\n }\n const length = arrayifyInteger(payload.length);\n length.unshift(0xf7 + length.length);\n return length.concat(payload);\n }\n if (!isBytesLike(object)) {\n logger.throwArgumentError(\"RLP object must be BytesLike\", \"object\", object);\n }\n const data = Array.prototype.slice.call(arrayify(object));\n if (data.length === 1 && data[0] <= 0x7f) {\n return data;\n }\n else if (data.length <= 55) {\n data.unshift(0x80 + data.length);\n return data;\n }\n const length = arrayifyInteger(data.length);\n length.unshift(0xb7 + length.length);\n return length.concat(data);\n}\nexport function encode(object) {\n return hexlify(_encode(object));\n}\nfunction _decodeChildren(data, offset, childOffset, length) {\n const result = [];\n while (childOffset < offset + 1 + length) {\n const decoded = _decode(data, childOffset);\n result.push(decoded.result);\n childOffset += decoded.consumed;\n if (childOffset > offset + 1 + length) {\n logger.throwError(\"child data too short\", Logger.errors.BUFFER_OVERRUN, {});\n }\n }\n return { consumed: (1 + length), result: result };\n}\n// returns { consumed: number, result: Object }\nfunction _decode(data, offset) {\n if (data.length === 0) {\n logger.throwError(\"data too short\", Logger.errors.BUFFER_OVERRUN, {});\n }\n // Array with extra length prefix\n if (data[offset] >= 0xf8) {\n const lengthLength = data[offset] - 0xf7;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data short segment too short\", Logger.errors.BUFFER_OVERRUN, {});\n }\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length > data.length) {\n logger.throwError(\"data long segment too short\", Logger.errors.BUFFER_OVERRUN, {});\n }\n return _decodeChildren(data, offset, offset + 1 + lengthLength, lengthLength + length);\n }\n else if (data[offset] >= 0xc0) {\n const length = data[offset] - 0xc0;\n if (offset + 1 + length > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, {});\n }\n return _decodeChildren(data, offset, offset + 1, length);\n }\n else if (data[offset] >= 0xb8) {\n const lengthLength = data[offset] - 0xb7;\n if (offset + 1 + lengthLength > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, {});\n }\n const length = unarrayifyInteger(data, offset + 1, lengthLength);\n if (offset + 1 + lengthLength + length > data.length) {\n logger.throwError(\"data array too short\", Logger.errors.BUFFER_OVERRUN, {});\n }\n const result = hexlify(data.slice(offset + 1 + lengthLength, offset + 1 + lengthLength + length));\n return { consumed: (1 + lengthLength + length), result: result };\n }\n else if (data[offset] >= 0x80) {\n const length = data[offset] - 0x80;\n if (offset + 1 + length > data.length) {\n logger.throwError(\"data too short\", Logger.errors.BUFFER_OVERRUN, {});\n }\n const result = hexlify(data.slice(offset + 1, offset + 1 + length));\n return { consumed: (1 + length), result: result };\n }\n return { consumed: 1, result: hexlify(data[offset]) };\n}\nexport function decode(data) {\n const bytes = arrayify(data);\n const decoded = _decode(bytes, 0);\n if (decoded.consumed !== bytes.length) {\n logger.throwArgumentError(\"invalid rlp data\", \"data\", data);\n }\n return decoded.result;\n}\n//# sourceMappingURL=index.js.map","export const version = \"address/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { arrayify, concat, hexDataLength, hexDataSlice, isHexString, stripZeros } from \"@ethersproject/bytes\";\nimport { BigNumber, _base16To36, _base36To16 } from \"@ethersproject/bignumber\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { encode } from \"@ethersproject/rlp\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nfunction getChecksumAddress(address) {\n if (!isHexString(address, 20)) {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n address = address.toLowerCase();\n const chars = address.substring(2).split(\"\");\n const expanded = new Uint8Array(40);\n for (let i = 0; i < 40; i++) {\n expanded[i] = chars[i].charCodeAt(0);\n }\n const hashed = arrayify(keccak256(expanded));\n for (let i = 0; i < 40; i += 2) {\n if ((hashed[i >> 1] >> 4) >= 8) {\n chars[i] = chars[i].toUpperCase();\n }\n if ((hashed[i >> 1] & 0x0f) >= 8) {\n chars[i + 1] = chars[i + 1].toUpperCase();\n }\n }\n return \"0x\" + chars.join(\"\");\n}\n// Shims for environments that are missing some required constants and functions\nconst MAX_SAFE_INTEGER = 0x1fffffffffffff;\nfunction log10(x) {\n if (Math.log10) {\n return Math.log10(x);\n }\n return Math.log(x) / Math.LN10;\n}\n// See: https://en.wikipedia.org/wiki/International_Bank_Account_Number\n// Create lookup table\nconst ibanLookup = {};\nfor (let i = 0; i < 10; i++) {\n ibanLookup[String(i)] = String(i);\n}\nfor (let i = 0; i < 26; i++) {\n ibanLookup[String.fromCharCode(65 + i)] = String(10 + i);\n}\n// How many decimal digits can we process? (for 64-bit float, this is 15)\nconst safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));\nfunction ibanChecksum(address) {\n address = address.toUpperCase();\n address = address.substring(4) + address.substring(0, 2) + \"00\";\n let expanded = address.split(\"\").map((c) => { return ibanLookup[c]; }).join(\"\");\n // Javascript can handle integers safely up to 15 (decimal) digits\n while (expanded.length >= safeDigits) {\n let block = expanded.substring(0, safeDigits);\n expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);\n }\n let checksum = String(98 - (parseInt(expanded, 10) % 97));\n while (checksum.length < 2) {\n checksum = \"0\" + checksum;\n }\n return checksum;\n}\n;\nexport function getAddress(address) {\n let result = null;\n if (typeof (address) !== \"string\") {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {\n // Missing the 0x prefix\n if (address.substring(0, 2) !== \"0x\") {\n address = \"0x\" + address;\n }\n result = getChecksumAddress(address);\n // It is a checksummed address with a bad checksum\n if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {\n logger.throwArgumentError(\"bad address checksum\", \"address\", address);\n }\n // Maybe ICAP? (we only support direct mode)\n }\n else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {\n // It is an ICAP address with a bad checksum\n if (address.substring(2, 4) !== ibanChecksum(address)) {\n logger.throwArgumentError(\"bad icap checksum\", \"address\", address);\n }\n result = _base36To16(address.substring(4));\n while (result.length < 40) {\n result = \"0\" + result;\n }\n result = getChecksumAddress(\"0x\" + result);\n }\n else {\n logger.throwArgumentError(\"invalid address\", \"address\", address);\n }\n return result;\n}\nexport function isAddress(address) {\n try {\n getAddress(address);\n return true;\n }\n catch (error) { }\n return false;\n}\nexport function getIcapAddress(address) {\n let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase();\n while (base36.length < 30) {\n base36 = \"0\" + base36;\n }\n return \"XE\" + ibanChecksum(\"XE00\" + base36) + base36;\n}\n// http://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed\nexport function getContractAddress(transaction) {\n let from = null;\n try {\n from = getAddress(transaction.from);\n }\n catch (error) {\n logger.throwArgumentError(\"missing from address\", \"transaction\", transaction);\n }\n const nonce = stripZeros(arrayify(BigNumber.from(transaction.nonce).toHexString()));\n return getAddress(hexDataSlice(keccak256(encode([from, nonce])), 12));\n}\nexport function getCreate2Address(from, salt, initCodeHash) {\n if (hexDataLength(salt) !== 32) {\n logger.throwArgumentError(\"salt must be 32 bytes\", \"salt\", salt);\n }\n if (hexDataLength(initCodeHash) !== 32) {\n logger.throwArgumentError(\"initCodeHash must be 32 bytes\", \"initCodeHash\", initCodeHash);\n }\n return getAddress(hexDataSlice(keccak256(concat([\"0xff\", getAddress(from), salt, initCodeHash])), 12));\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { hexZeroPad } from \"@ethersproject/bytes\";\nimport { Coder } from \"./abstract-coder\";\nexport class AddressCoder extends Coder {\n constructor(localName) {\n super(\"address\", \"address\", localName, false);\n }\n defaultValue() {\n return \"0x0000000000000000000000000000000000000000\";\n }\n encode(writer, value) {\n try {\n value = getAddress(value);\n }\n catch (error) {\n this._throwError(error.message, value);\n }\n return writer.writeValue(value);\n }\n decode(reader) {\n return getAddress(hexZeroPad(reader.readValue().toHexString(), 20));\n }\n}\n//# sourceMappingURL=address.js.map","\"use strict\";\nimport { Coder } from \"./abstract-coder\";\n// Clones the functionality of an existing Coder, but without a localName\nexport class AnonymousCoder extends Coder {\n constructor(coder) {\n super(coder.name, coder.type, undefined, coder.dynamic);\n this.coder = coder;\n }\n defaultValue() {\n return this.coder.defaultValue();\n }\n encode(writer, value) {\n return this.coder.encode(writer, value);\n }\n decode(reader) {\n return this.coder.decode(reader);\n }\n}\n//# sourceMappingURL=anonymous.js.map","\"use strict\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"../_version\";\nconst logger = new Logger(version);\nimport { Coder, Writer } from \"./abstract-coder\";\nimport { AnonymousCoder } from \"./anonymous\";\nexport function pack(writer, coders, values) {\n let arrayValues = null;\n if (Array.isArray(values)) {\n arrayValues = values;\n }\n else if (values && typeof (values) === \"object\") {\n let unique = {};\n arrayValues = coders.map((coder) => {\n const name = coder.localName;\n if (!name) {\n logger.throwError(\"cannot encode object for signature with missing names\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder: coder,\n value: values\n });\n }\n if (unique[name]) {\n logger.throwError(\"cannot encode object for signature with duplicate names\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"values\",\n coder: coder,\n value: values\n });\n }\n unique[name] = true;\n return values[name];\n });\n }\n else {\n logger.throwArgumentError(\"invalid tuple value\", \"tuple\", values);\n }\n if (coders.length !== arrayValues.length) {\n logger.throwArgumentError(\"types/value length mismatch\", \"tuple\", values);\n }\n let staticWriter = new Writer(writer.wordSize);\n let dynamicWriter = new Writer(writer.wordSize);\n let updateFuncs = [];\n coders.forEach((coder, index) => {\n let value = arrayValues[index];\n if (coder.dynamic) {\n // Get current dynamic offset (for the future pointer)\n let dynamicOffset = dynamicWriter.length;\n // Encode the dynamic value into the dynamicWriter\n coder.encode(dynamicWriter, value);\n // Prepare to populate the correct offset once we are done\n let updateFunc = staticWriter.writeUpdatableValue();\n updateFuncs.push((baseOffset) => {\n updateFunc(baseOffset + dynamicOffset);\n });\n }\n else {\n coder.encode(staticWriter, value);\n }\n });\n // Backfill all the dynamic offsets, now that we know the static length\n updateFuncs.forEach((func) => { func(staticWriter.length); });\n let length = writer.appendWriter(staticWriter);\n length += writer.appendWriter(dynamicWriter);\n return length;\n}\nexport function unpack(reader, coders) {\n let values = [];\n // A reader anchored to this base\n let baseReader = reader.subReader(0);\n coders.forEach((coder) => {\n let value = null;\n if (coder.dynamic) {\n let offset = reader.readValue();\n let offsetReader = baseReader.subReader(offset.toNumber());\n try {\n value = coder.decode(offsetReader);\n }\n catch (error) {\n // Cannot recover from this\n if (error.code === Logger.errors.BUFFER_OVERRUN) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n else {\n try {\n value = coder.decode(reader);\n }\n catch (error) {\n // Cannot recover from this\n if (error.code === Logger.errors.BUFFER_OVERRUN) {\n throw error;\n }\n value = error;\n value.baseType = coder.name;\n value.name = coder.localName;\n value.type = coder.type;\n }\n }\n if (value != undefined) {\n values.push(value);\n }\n });\n // We only output named properties for uniquely named coders\n const uniqueNames = coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n // Add any named parameters (i.e. tuples)\n coders.forEach((coder, index) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n const value = values[index];\n if (value instanceof Error) {\n Object.defineProperty(values, name, {\n enumerable: true,\n get: () => { throw value; }\n });\n }\n else {\n values[name] = value;\n }\n });\n for (let i = 0; i < values.length; i++) {\n const value = values[i];\n if (value instanceof Error) {\n Object.defineProperty(values, i, {\n enumerable: true,\n get: () => { throw value; }\n });\n }\n }\n return Object.freeze(values);\n}\nexport class ArrayCoder extends Coder {\n constructor(coder, length, localName) {\n const type = (coder.type + \"[\" + (length >= 0 ? length : \"\") + \"]\");\n const dynamic = (length === -1 || coder.dynamic);\n super(\"array\", type, localName, dynamic);\n this.coder = coder;\n this.length = length;\n }\n defaultValue() {\n // Verifies the child coder is valid (even if the array is dynamic or 0-length)\n const defaultChild = this.coder.defaultValue();\n const result = [];\n for (let i = 0; i < this.length; i++) {\n result.push(defaultChild);\n }\n return result;\n }\n encode(writer, value) {\n if (!Array.isArray(value)) {\n this._throwError(\"expected array value\", value);\n }\n let count = this.length;\n if (count === -1) {\n count = value.length;\n writer.writeValue(value.length);\n }\n logger.checkArgumentCount(value.length, count, \"coder array\" + (this.localName ? (\" \" + this.localName) : \"\"));\n let coders = [];\n for (let i = 0; i < value.length; i++) {\n coders.push(this.coder);\n }\n return pack(writer, coders, value);\n }\n decode(reader) {\n let count = this.length;\n if (count === -1) {\n count = reader.readValue().toNumber();\n // Check that there is *roughly* enough data to ensure\n // stray random data is not being read as a length. Each\n // slot requires at least 32 bytes for their value (or 32\n // bytes as a link to the data). This could use a much\n // tighter bound, but we are erroring on the side of safety.\n if (count * 32 > reader._data.length) {\n logger.throwError(\"insufficient data length\", Logger.errors.BUFFER_OVERRUN, {\n length: reader._data.length,\n count: count\n });\n }\n }\n let coders = [];\n for (let i = 0; i < count; i++) {\n coders.push(new AnonymousCoder(this.coder));\n }\n return reader.coerce(this.name, unpack(reader, coders));\n }\n}\n//# sourceMappingURL=array.js.map","\"use strict\";\nimport { Coder } from \"./abstract-coder\";\nexport class BooleanCoder extends Coder {\n constructor(localName) {\n super(\"bool\", \"bool\", localName, false);\n }\n defaultValue() {\n return false;\n }\n encode(writer, value) {\n return writer.writeValue(value ? 1 : 0);\n }\n decode(reader) {\n return reader.coerce(this.type, !reader.readValue().isZero());\n }\n}\n//# sourceMappingURL=boolean.js.map","\"use strict\";\nimport { arrayify, hexlify } from \"@ethersproject/bytes\";\nimport { Coder } from \"./abstract-coder\";\nexport class DynamicBytesCoder extends Coder {\n constructor(type, localName) {\n super(type, type, localName, true);\n }\n defaultValue() {\n return \"0x\";\n }\n encode(writer, value) {\n value = arrayify(value);\n let length = writer.writeValue(value.length);\n length += writer.writeBytes(value);\n return length;\n }\n decode(reader) {\n return reader.readBytes(reader.readValue().toNumber(), true);\n }\n}\nexport class BytesCoder extends DynamicBytesCoder {\n constructor(localName) {\n super(\"bytes\", localName);\n }\n decode(reader) {\n return reader.coerce(this.name, hexlify(super.decode(reader)));\n }\n}\n//# sourceMappingURL=bytes.js.map","\"use strict\";\nimport { arrayify, hexlify } from \"@ethersproject/bytes\";\nimport { Coder } from \"./abstract-coder\";\n// @TODO: Merge this with bytes\nexport class FixedBytesCoder extends Coder {\n constructor(size, localName) {\n let name = \"bytes\" + String(size);\n super(name, name, localName, false);\n this.size = size;\n }\n defaultValue() {\n return (\"0x0000000000000000000000000000000000000000000000000000000000000000\").substring(0, 2 + this.size * 2);\n }\n encode(writer, value) {\n let data = arrayify(value);\n if (data.length !== this.size) {\n this._throwError(\"incorrect data length\", value);\n }\n return writer.writeBytes(data);\n }\n decode(reader) {\n return reader.coerce(this.name, hexlify(reader.readBytes(this.size)));\n }\n}\n//# sourceMappingURL=fixed-bytes.js.map","\"use strict\";\nimport { Coder } from \"./abstract-coder\";\nexport class NullCoder extends Coder {\n constructor(localName) {\n super(\"null\", \"\", localName, false);\n }\n defaultValue() {\n return null;\n }\n encode(writer, value) {\n if (value != null) {\n this._throwError(\"not null\", value);\n }\n return writer.writeBytes([]);\n }\n decode(reader) {\n reader.readBytes(0);\n return reader.coerce(this.name, null);\n }\n}\n//# sourceMappingURL=null.js.map","export const AddressZero = \"0x0000000000000000000000000000000000000000\";\n//# sourceMappingURL=addresses.js.map","import { BigNumber } from \"@ethersproject/bignumber\";\nconst NegativeOne = ( /*#__PURE__*/BigNumber.from(-1));\nconst Zero = ( /*#__PURE__*/BigNumber.from(0));\nconst One = ( /*#__PURE__*/BigNumber.from(1));\nconst Two = ( /*#__PURE__*/BigNumber.from(2));\nconst WeiPerEther = ( /*#__PURE__*/BigNumber.from(\"1000000000000000000\"));\nconst MaxUint256 = ( /*#__PURE__*/BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"));\nconst MinInt256 = ( /*#__PURE__*/BigNumber.from(\"-0x8000000000000000000000000000000000000000000000000000000000000000\"));\nconst MaxInt256 = ( /*#__PURE__*/BigNumber.from(\"0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\"));\nexport { NegativeOne, Zero, One, Two, WeiPerEther, MaxUint256, MinInt256, MaxInt256, };\n//# sourceMappingURL=bignumbers.js.map","export const HashZero = \"0x0000000000000000000000000000000000000000000000000000000000000000\";\n//# sourceMappingURL=hashes.js.map","\"use strict\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { MaxUint256, NegativeOne, One, Zero } from \"@ethersproject/constants\";\nimport { Coder } from \"./abstract-coder\";\nexport class NumberCoder extends Coder {\n constructor(size, signed, localName) {\n const name = ((signed ? \"int\" : \"uint\") + (size * 8));\n super(name, name, localName, false);\n this.size = size;\n this.signed = signed;\n }\n defaultValue() {\n return 0;\n }\n encode(writer, value) {\n let v = BigNumber.from(value);\n // Check bounds are safe for encoding\n let maxUintValue = MaxUint256.mask(writer.wordSize * 8);\n if (this.signed) {\n let bounds = maxUintValue.mask(this.size * 8 - 1);\n if (v.gt(bounds) || v.lt(bounds.add(One).mul(NegativeOne))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n }\n else if (v.lt(Zero) || v.gt(maxUintValue.mask(this.size * 8))) {\n this._throwError(\"value out-of-bounds\", value);\n }\n v = v.toTwos(this.size * 8).mask(this.size * 8);\n if (this.signed) {\n v = v.fromTwos(this.size * 8).toTwos(8 * writer.wordSize);\n }\n return writer.writeValue(v);\n }\n decode(reader) {\n let value = reader.readValue().mask(this.size * 8);\n if (this.signed) {\n value = value.fromTwos(this.size * 8);\n }\n return reader.coerce(this.name, value);\n }\n}\n//# sourceMappingURL=number.js.map","export const version = \"strings/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { arrayify } from \"@ethersproject/bytes\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n///////////////////////////////\nexport var UnicodeNormalizationForm;\n(function (UnicodeNormalizationForm) {\n UnicodeNormalizationForm[\"current\"] = \"\";\n UnicodeNormalizationForm[\"NFC\"] = \"NFC\";\n UnicodeNormalizationForm[\"NFD\"] = \"NFD\";\n UnicodeNormalizationForm[\"NFKC\"] = \"NFKC\";\n UnicodeNormalizationForm[\"NFKD\"] = \"NFKD\";\n})(UnicodeNormalizationForm || (UnicodeNormalizationForm = {}));\n;\nexport var Utf8ErrorReason;\n(function (Utf8ErrorReason) {\n // A continuation byte was present where there was nothing to continue\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"UNEXPECTED_CONTINUE\"] = \"unexpected continuation byte\";\n // An invalid (non-continuation) byte to start a UTF-8 codepoint was found\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"BAD_PREFIX\"] = \"bad codepoint prefix\";\n // The string is too short to process the expected codepoint\n // - offset = the index the codepoint began in\n Utf8ErrorReason[\"OVERRUN\"] = \"string overrun\";\n // A missing continuation byte was expected but not found\n // - offset = the index the continuation byte was expected at\n Utf8ErrorReason[\"MISSING_CONTINUE\"] = \"missing continuation byte\";\n // The computed code point is outside the range for UTF-8\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; outside the UTF-8 range\n Utf8ErrorReason[\"OUT_OF_RANGE\"] = \"out of UTF-8 range\";\n // UTF-8 strings may not contain UTF-16 surrogate pairs\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range\n Utf8ErrorReason[\"UTF16_SURROGATE\"] = \"UTF-16 surrogate\";\n // The string is an overlong representation\n // - offset = start of this codepoint\n // - badCodepoint = the computed codepoint; already bounds checked\n Utf8ErrorReason[\"OVERLONG\"] = \"overlong representation\";\n})(Utf8ErrorReason || (Utf8ErrorReason = {}));\n;\nfunction errorFunc(reason, offset, bytes, output, badCodepoint) {\n return logger.throwArgumentError(`invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n}\nfunction ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes\n if (reason === Utf8ErrorReason.BAD_PREFIX || reason === Utf8ErrorReason.UNEXPECTED_CONTINUE) {\n let i = 0;\n for (let o = offset + 1; o < bytes.length; o++) {\n if (bytes[o] >> 6 !== 0x02) {\n break;\n }\n i++;\n }\n return i;\n }\n // This byte runs us past the end of the string, so just jump to the end\n // (but the first byte was read already read and therefore skipped)\n if (reason === Utf8ErrorReason.OVERRUN) {\n return bytes.length - offset - 1;\n }\n // Nothing to skip\n return 0;\n}\nfunction replaceFunc(reason, offset, bytes, output, badCodepoint) {\n // Overlong representations are otherwise \"valid\" code points; just non-deistingtished\n if (reason === Utf8ErrorReason.OVERLONG) {\n output.push(badCodepoint);\n return 0;\n }\n // Put the replacement character into the output\n output.push(0xfffd);\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n// Common error handing strategies\nexport const Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(bytes, onError) {\n if (onError == null) {\n onError = Utf8ErrorFuncs.error;\n }\n bytes = arrayify(bytes);\n const result = [];\n let i = 0;\n // Invalid bytes are ignored\n while (i < bytes.length) {\n const c = bytes[i++];\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n // 1110 xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf8) === 0xf0) {\n extraLength = 3;\n overlongMask = 0xffff;\n }\n else {\n if ((c & 0xc0) === 0x80) {\n i += onError(Utf8ErrorReason.UNEXPECTED_CONTINUE, i - 1, bytes, result);\n }\n else {\n i += onError(Utf8ErrorReason.BAD_PREFIX, i - 1, bytes, result);\n }\n continue;\n }\n // Do we have enough bytes in our data?\n if (i - 1 + extraLength >= bytes.length) {\n i += onError(Utf8ErrorReason.OVERRUN, i - 1, bytes, result);\n continue;\n }\n // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\n // Invalid continuation byte\n if ((nextChar & 0xc0) != 0x80) {\n i += onError(Utf8ErrorReason.MISSING_CONTINUE, i, bytes, result);\n res = null;\n break;\n }\n ;\n res = (res << 6) | (nextChar & 0x3f);\n i++;\n }\n // See above loop for invalid continuation byte\n if (res === null) {\n continue;\n }\n // Maximum code point\n if (res > 0x10ffff) {\n i += onError(Utf8ErrorReason.OUT_OF_RANGE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Reserved for UTF-16 surrogate halves\n if (res >= 0xd800 && res <= 0xdfff) {\n i += onError(Utf8ErrorReason.UTF16_SURROGATE, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Check for overlong sequences (more bytes than needed)\n if (res <= overlongMask) {\n i += onError(Utf8ErrorReason.OVERLONG, i - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n}\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\nexport function toUtf8Bytes(str, form = UnicodeNormalizationForm.current) {\n if (form != UnicodeNormalizationForm.current) {\n logger.checkNormalize();\n str = str.normalize(form);\n }\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\n if (c < 0x80) {\n result.push(c);\n }\n else if (c < 0x800) {\n result.push((c >> 6) | 0xc0);\n result.push((c & 0x3f) | 0x80);\n }\n else if ((c & 0xfc00) == 0xd800) {\n i++;\n const c2 = str.charCodeAt(i);\n if (i >= str.length || (c2 & 0xfc00) !== 0xdc00) {\n throw new Error(\"invalid utf-8 string\");\n }\n // Surrogate Pair\n const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n result.push((pair >> 18) | 0xf0);\n result.push(((pair >> 12) & 0x3f) | 0x80);\n result.push(((pair >> 6) & 0x3f) | 0x80);\n result.push((pair & 0x3f) | 0x80);\n }\n else {\n result.push((c >> 12) | 0xe0);\n result.push(((c >> 6) & 0x3f) | 0x80);\n result.push((c & 0x3f) | 0x80);\n }\n }\n return arrayify(result);\n}\n;\nfunction escapeChar(value) {\n const hex = (\"0000\" + value.toString(16));\n return \"\\\\u\" + hex.substring(hex.length - 4);\n}\nexport function _toEscapedUtf8String(bytes, onError) {\n return '\"' + getUtf8CodePoints(bytes, onError).map((codePoint) => {\n if (codePoint < 256) {\n switch (codePoint) {\n case 8: return \"\\\\b\";\n case 9: return \"\\\\t\";\n case 10: return \"\\\\n\";\n case 13: return \"\\\\r\";\n case 34: return \"\\\\\\\"\";\n case 92: return \"\\\\\\\\\";\n }\n if (codePoint >= 32 && codePoint < 127) {\n return String.fromCharCode(codePoint);\n }\n }\n if (codePoint <= 0xffff) {\n return escapeChar(codePoint);\n }\n codePoint -= 0x10000;\n return escapeChar(((codePoint >> 10) & 0x3ff) + 0xd800) + escapeChar((codePoint & 0x3ff) + 0xdc00);\n }).join(\"\") + '\"';\n}\nexport function _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00));\n }).join(\"\");\n}\nexport function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\nexport function toUtf8CodePoints(str, form = UnicodeNormalizationForm.current) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n//# sourceMappingURL=utf8.js.map","\"use strict\";\nimport { HashZero } from \"@ethersproject/constants\";\nimport { arrayify, concat, hexlify } from \"@ethersproject/bytes\";\nimport { toUtf8Bytes, toUtf8String } from \"./utf8\";\nexport function formatBytes32String(text) {\n // Get the bytes\n const bytes = toUtf8Bytes(text);\n // Check we have room for null-termination\n if (bytes.length > 31) {\n throw new Error(\"bytes32 string must be less than 32 bytes\");\n }\n // Zero-pad (implicitly null-terminates)\n return hexlify(concat([bytes, HashZero]).slice(0, 32));\n}\nexport function parseBytes32String(bytes) {\n const data = arrayify(bytes);\n // Must be 32 bytes with a null-termination\n if (data.length !== 32) {\n throw new Error(\"invalid bytes32 - not 32 bytes long\");\n }\n if (data[31] !== 0) {\n throw new Error(\"invalid bytes32 string - no null terminator\");\n }\n // Find the null termination\n let length = 31;\n while (data[length - 1] === 0) {\n length--;\n }\n // Determine the string value\n return toUtf8String(data.slice(0, length));\n}\n//# sourceMappingURL=bytes32.js.map","\"use strict\";\nimport { toUtf8CodePoints, _toUtf8String, UnicodeNormalizationForm } from \"./utf8\";\nfunction bytes2(data) {\n if ((data.length % 4) !== 0) {\n throw new Error(\"bad data\");\n }\n let result = [];\n for (let i = 0; i < data.length; i += 4) {\n result.push(parseInt(data.substring(i, i + 4), 16));\n }\n return result;\n}\nfunction createTable(data, func) {\n if (!func) {\n func = function (value) { return [parseInt(value, 16)]; };\n }\n let lo = 0;\n let result = {};\n data.split(\",\").forEach((pair) => {\n let comps = pair.split(\":\");\n lo += parseInt(comps[0], 16);\n result[lo] = func(comps[1]);\n });\n return result;\n}\nfunction createRangeTable(data) {\n let hi = 0;\n return data.split(\",\").map((v) => {\n let comps = v.split(\"-\");\n if (comps.length === 1) {\n comps[1] = \"0\";\n }\n else if (comps[1] === \"\") {\n comps[1] = \"1\";\n }\n let lo = hi + parseInt(comps[0], 16);\n hi = parseInt(comps[1], 16);\n return { l: lo, h: hi };\n });\n}\nfunction matchMap(value, ranges) {\n let lo = 0;\n for (let i = 0; i < ranges.length; i++) {\n let range = ranges[i];\n lo += range.l;\n if (value >= lo && value <= lo + range.h && ((value - lo) % (range.d || 1)) === 0) {\n if (range.e && range.e.indexOf(value - lo) !== -1) {\n continue;\n }\n return range;\n }\n }\n return null;\n}\nconst Table_A_1_ranges = createRangeTable(\"221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d\");\n// @TODO: Make this relative...\nconst Table_B_1_flags = \"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff\".split(\",\").map((v) => parseInt(v, 16));\nconst Table_B_2_ranges = [\n { h: 25, s: 32, l: 65 },\n { h: 30, s: 32, e: [23], l: 127 },\n { h: 54, s: 1, e: [48], l: 64, d: 2 },\n { h: 14, s: 1, l: 57, d: 2 },\n { h: 44, s: 1, l: 17, d: 2 },\n { h: 10, s: 1, e: [2, 6, 8], l: 61, d: 2 },\n { h: 16, s: 1, l: 68, d: 2 },\n { h: 84, s: 1, e: [18, 24, 66], l: 19, d: 2 },\n { h: 26, s: 32, e: [17], l: 435 },\n { h: 22, s: 1, l: 71, d: 2 },\n { h: 15, s: 80, l: 40 },\n { h: 31, s: 32, l: 16 },\n { h: 32, s: 1, l: 80, d: 2 },\n { h: 52, s: 1, l: 42, d: 2 },\n { h: 12, s: 1, l: 55, d: 2 },\n { h: 40, s: 1, e: [38], l: 15, d: 2 },\n { h: 14, s: 1, l: 48, d: 2 },\n { h: 37, s: 48, l: 49 },\n { h: 148, s: 1, l: 6351, d: 2 },\n { h: 88, s: 1, l: 160, d: 2 },\n { h: 15, s: 16, l: 704 },\n { h: 25, s: 26, l: 854 },\n { h: 25, s: 32, l: 55915 },\n { h: 37, s: 40, l: 1247 },\n { h: 25, s: -119711, l: 53248 },\n { h: 25, s: -119763, l: 52 },\n { h: 25, s: -119815, l: 52 },\n { h: 25, s: -119867, e: [1, 4, 5, 7, 8, 11, 12, 17], l: 52 },\n { h: 25, s: -119919, l: 52 },\n { h: 24, s: -119971, e: [2, 7, 8, 17], l: 52 },\n { h: 24, s: -120023, e: [2, 7, 13, 15, 16, 17], l: 52 },\n { h: 25, s: -120075, l: 52 },\n { h: 25, s: -120127, l: 52 },\n { h: 25, s: -120179, l: 52 },\n { h: 25, s: -120231, l: 52 },\n { h: 25, s: -120283, l: 52 },\n { h: 25, s: -120335, l: 52 },\n { h: 24, s: -119543, e: [17], l: 56 },\n { h: 24, s: -119601, e: [17], l: 58 },\n { h: 24, s: -119659, e: [17], l: 58 },\n { h: 24, s: -119717, e: [17], l: 58 },\n { h: 24, s: -119775, e: [17], l: 58 }\n];\nconst Table_B_2_lut_abs = createTable(\"b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3\");\nconst Table_B_2_lut_rel = createTable(\"179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7\");\nconst Table_B_2_complex = createTable(\"df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D\", bytes2);\nconst Table_C_ranges = createRangeTable(\"80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001\");\nfunction flatten(values) {\n return values.reduce((accum, value) => {\n value.forEach((value) => { accum.push(value); });\n return accum;\n }, []);\n}\nexport function _nameprepTableA1(codepoint) {\n return !!matchMap(codepoint, Table_A_1_ranges);\n}\nexport function _nameprepTableB2(codepoint) {\n let range = matchMap(codepoint, Table_B_2_ranges);\n if (range) {\n return [codepoint + range.s];\n }\n let codes = Table_B_2_lut_abs[codepoint];\n if (codes) {\n return codes;\n }\n let shift = Table_B_2_lut_rel[codepoint];\n if (shift) {\n return [codepoint + shift[0]];\n }\n let complex = Table_B_2_complex[codepoint];\n if (complex) {\n return complex;\n }\n return null;\n}\nexport function _nameprepTableC(codepoint) {\n return !!matchMap(codepoint, Table_C_ranges);\n}\nexport function nameprep(value) {\n // This allows platforms with incomplete normalize to bypass\n // it for very basic names which the built-in toLowerCase\n // will certainly handle correctly\n if (value.match(/^[a-z0-9-]*$/i) && value.length <= 59) {\n return value.toLowerCase();\n }\n // Get the code points (keeping the current normalization)\n let codes = toUtf8CodePoints(value);\n codes = flatten(codes.map((code) => {\n // Substitute Table B.1 (Maps to Nothing)\n if (Table_B_1_flags.indexOf(code) >= 0) {\n return [];\n }\n if (code >= 0xfe00 && code <= 0xfe0f) {\n return [];\n }\n // Substitute Table B.2 (Case Folding)\n let codesTableB2 = _nameprepTableB2(code);\n if (codesTableB2) {\n return codesTableB2;\n }\n // No Substitution\n return [code];\n }));\n // Normalize using form KC\n codes = toUtf8CodePoints(_toUtf8String(codes), UnicodeNormalizationForm.NFKC);\n // Prohibit Tables C.1.2, C.2.2, C.3, C.4, C.5, C.6, C.7, C.8, C.9\n codes.forEach((code) => {\n if (_nameprepTableC(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_PROHIBITED\");\n }\n });\n // Prohibit Unassigned Code Points (Table A.1)\n codes.forEach((code) => {\n if (_nameprepTableA1(code)) {\n throw new Error(\"STRINGPREP_CONTAINS_UNASSIGNED\");\n }\n });\n // IDNA extras\n let name = _toUtf8String(codes);\n // IDNA: 4.2.3.1\n if (name.substring(0, 1) === \"-\" || name.substring(2, 4) === \"--\" || name.substring(name.length - 1) === \"-\") {\n throw new Error(\"invalid hyphen\");\n }\n return name;\n}\n//# sourceMappingURL=idna.js.map","\"use strict\";\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\nimport { DynamicBytesCoder } from \"./bytes\";\nexport class StringCoder extends DynamicBytesCoder {\n constructor(localName) {\n super(\"string\", localName);\n }\n defaultValue() {\n return \"\";\n }\n encode(writer, value) {\n return super.encode(writer, toUtf8Bytes(value));\n }\n decode(reader) {\n return toUtf8String(super.decode(reader));\n }\n}\n//# sourceMappingURL=string.js.map","\"use strict\";\nimport { Coder } from \"./abstract-coder\";\nimport { pack, unpack } from \"./array\";\nexport class TupleCoder extends Coder {\n constructor(coders, localName) {\n let dynamic = false;\n const types = [];\n coders.forEach((coder) => {\n if (coder.dynamic) {\n dynamic = true;\n }\n types.push(coder.type);\n });\n const type = (\"tuple(\" + types.join(\",\") + \")\");\n super(\"tuple\", type, localName, dynamic);\n this.coders = coders;\n }\n defaultValue() {\n const values = [];\n this.coders.forEach((coder) => {\n values.push(coder.defaultValue());\n });\n // We only output named properties for uniquely named coders\n const uniqueNames = this.coders.reduce((accum, coder) => {\n const name = coder.localName;\n if (name) {\n if (!accum[name]) {\n accum[name] = 0;\n }\n accum[name]++;\n }\n return accum;\n }, {});\n // Add named values\n this.coders.forEach((coder, index) => {\n let name = coder.localName;\n if (!name || uniqueNames[name] !== 1) {\n return;\n }\n if (name === \"length\") {\n name = \"_length\";\n }\n if (values[name] != null) {\n return;\n }\n values[name] = values[index];\n });\n return Object.freeze(values);\n }\n encode(writer, value) {\n return pack(writer, this.coders, value);\n }\n decode(reader) {\n return reader.coerce(this.name, unpack(reader, this.coders));\n }\n}\n//# sourceMappingURL=tuple.js.map","\"use strict\";\n// See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI\nimport { arrayify } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nimport { Reader, Writer } from \"./coders/abstract-coder\";\nimport { AddressCoder } from \"./coders/address\";\nimport { ArrayCoder } from \"./coders/array\";\nimport { BooleanCoder } from \"./coders/boolean\";\nimport { BytesCoder } from \"./coders/bytes\";\nimport { FixedBytesCoder } from \"./coders/fixed-bytes\";\nimport { NullCoder } from \"./coders/null\";\nimport { NumberCoder } from \"./coders/number\";\nimport { StringCoder } from \"./coders/string\";\nimport { TupleCoder } from \"./coders/tuple\";\nimport { ParamType } from \"./fragments\";\nconst paramTypeBytes = new RegExp(/^bytes([0-9]*)$/);\nconst paramTypeNumber = new RegExp(/^(u?int)([0-9]*)$/);\nexport class AbiCoder {\n constructor(coerceFunc) {\n defineReadOnly(this, \"coerceFunc\", coerceFunc || null);\n }\n _getCoder(param) {\n switch (param.baseType) {\n case \"address\":\n return new AddressCoder(param.name);\n case \"bool\":\n return new BooleanCoder(param.name);\n case \"string\":\n return new StringCoder(param.name);\n case \"bytes\":\n return new BytesCoder(param.name);\n case \"array\":\n return new ArrayCoder(this._getCoder(param.arrayChildren), param.arrayLength, param.name);\n case \"tuple\":\n return new TupleCoder((param.components || []).map((component) => {\n return this._getCoder(component);\n }), param.name);\n case \"\":\n return new NullCoder(param.name);\n }\n // u?int[0-9]*\n let match = param.type.match(paramTypeNumber);\n if (match) {\n let size = parseInt(match[2] || \"256\");\n if (size === 0 || size > 256 || (size % 8) !== 0) {\n logger.throwArgumentError(\"invalid \" + match[1] + \" bit length\", \"param\", param);\n }\n return new NumberCoder(size / 8, (match[1] === \"int\"), param.name);\n }\n // bytes[0-9]+\n match = param.type.match(paramTypeBytes);\n if (match) {\n let size = parseInt(match[1]);\n if (size === 0 || size > 32) {\n logger.throwArgumentError(\"invalid bytes length\", \"param\", param);\n }\n return new FixedBytesCoder(size, param.name);\n }\n return logger.throwArgumentError(\"invalid type\", \"type\", param.type);\n }\n _getWordSize() { return 32; }\n _getReader(data, allowLoose) {\n return new Reader(data, this._getWordSize(), this.coerceFunc, allowLoose);\n }\n _getWriter() {\n return new Writer(this._getWordSize());\n }\n getDefaultValue(types) {\n const coders = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.defaultValue();\n }\n encode(types, values) {\n if (types.length !== values.length) {\n logger.throwError(\"types/values length mismatch\", Logger.errors.INVALID_ARGUMENT, {\n count: { types: types.length, values: values.length },\n value: { types: types, values: values }\n });\n }\n const coders = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = (new TupleCoder(coders, \"_\"));\n const writer = this._getWriter();\n coder.encode(writer, values);\n return writer.data;\n }\n decode(types, data, loose) {\n const coders = types.map((type) => this._getCoder(ParamType.from(type)));\n const coder = new TupleCoder(coders, \"_\");\n return coder.decode(this._getReader(arrayify(data), loose));\n }\n}\nexport const defaultAbiCoder = new AbiCoder();\n//# sourceMappingURL=abi-coder.js.map","import { keccak256 } from \"@ethersproject/keccak256\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nexport function id(text) {\n return keccak256(toUtf8Bytes(text));\n}\n//# sourceMappingURL=id.js.map","export const version = \"hash/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { arrayify } from \"@ethersproject/bytes\";\nexport function decode(textData) {\n textData = atob(textData);\n const data = [];\n for (let i = 0; i < textData.length; i++) {\n data.push(textData.charCodeAt(i));\n }\n return arrayify(data);\n}\nexport function encode(data) {\n data = arrayify(data);\n let textData = \"\";\n for (let i = 0; i < data.length; i++) {\n textData += String.fromCharCode(data[i]);\n }\n return btoa(textData);\n}\n//# sourceMappingURL=base64.js.map","/**\n * MIT License\n *\n * Copyright (c) 2021 Andrew Raffensperger\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * This is a near carbon-copy of the original source (link below) with the\n * TypeScript typings added and a few tweaks to make it ES3-compatible.\n *\n * See: https://github.com/adraffy/ens-normalize.js\n */\n// https://github.com/behnammodi/polyfill/blob/master/array.polyfill.js\nfunction flat(array, depth) {\n if (depth == null) {\n depth = 1;\n }\n const result = [];\n const forEach = result.forEach;\n const flatDeep = function (arr, depth) {\n forEach.call(arr, function (val) {\n if (depth > 0 && Array.isArray(val)) {\n flatDeep(val, depth - 1);\n }\n else {\n result.push(val);\n }\n });\n };\n flatDeep(array, depth);\n return result;\n}\nfunction fromEntries(array) {\n const result = {};\n for (let i = 0; i < array.length; i++) {\n const value = array[i];\n result[value[0]] = value[1];\n }\n return result;\n}\nexport function decode_arithmetic(bytes) {\n let pos = 0;\n function u16() { return (bytes[pos++] << 8) | bytes[pos++]; }\n // decode the frequency table\n let symbol_count = u16();\n let total = 1;\n let acc = [0, 1]; // first symbol has frequency 1\n for (let i = 1; i < symbol_count; i++) {\n acc.push(total += u16());\n }\n // skip the sized-payload that the last 3 symbols index into\n let skip = u16();\n let pos_payload = pos;\n pos += skip;\n let read_width = 0;\n let read_buffer = 0;\n function read_bit() {\n if (read_width == 0) {\n // this will read beyond end of buffer\n // but (undefined|0) => zero pad\n read_buffer = (read_buffer << 8) | bytes[pos++];\n read_width = 8;\n }\n return (read_buffer >> --read_width) & 1;\n }\n const N = 31;\n const FULL = Math.pow(2, N);\n const HALF = FULL >>> 1;\n const QRTR = HALF >> 1;\n const MASK = FULL - 1;\n // fill register\n let register = 0;\n for (let i = 0; i < N; i++)\n register = (register << 1) | read_bit();\n let symbols = [];\n let low = 0;\n let range = FULL; // treat like a float\n while (true) {\n let value = Math.floor((((register - low + 1) * total) - 1) / range);\n let start = 0;\n let end = symbol_count;\n while (end - start > 1) { // binary search\n let mid = (start + end) >>> 1;\n if (value < acc[mid]) {\n end = mid;\n }\n else {\n start = mid;\n }\n }\n if (start == 0)\n break; // first symbol is end mark\n symbols.push(start);\n let a = low + Math.floor(range * acc[start] / total);\n let b = low + Math.floor(range * acc[start + 1] / total) - 1;\n while (((a ^ b) & HALF) == 0) {\n register = (register << 1) & MASK | read_bit();\n a = (a << 1) & MASK;\n b = (b << 1) & MASK | 1;\n }\n while (a & ~b & QRTR) {\n register = (register & HALF) | ((register << 1) & (MASK >>> 1)) | read_bit();\n a = (a << 1) ^ HALF;\n b = ((b ^ HALF) << 1) | HALF | 1;\n }\n low = a;\n range = 1 + b - a;\n }\n let offset = symbol_count - 4;\n return symbols.map(x => {\n switch (x - offset) {\n case 3: return offset + 0x10100 + ((bytes[pos_payload++] << 16) | (bytes[pos_payload++] << 8) | bytes[pos_payload++]);\n case 2: return offset + 0x100 + ((bytes[pos_payload++] << 8) | bytes[pos_payload++]);\n case 1: return offset + bytes[pos_payload++];\n default: return x - 1;\n }\n });\n}\n// returns an iterator which returns the next symbol\nexport function read_payload(v) {\n let pos = 0;\n return () => v[pos++];\n}\nexport function read_compressed_payload(bytes) {\n return read_payload(decode_arithmetic(bytes));\n}\n// eg. [0,1,2,3...] => [0,-1,1,-2,...]\nexport function signed(i) {\n return (i & 1) ? (~i >> 1) : (i >> 1);\n}\nfunction read_counts(n, next) {\n let v = Array(n);\n for (let i = 0; i < n; i++)\n v[i] = 1 + next();\n return v;\n}\nfunction read_ascending(n, next) {\n let v = Array(n);\n for (let i = 0, x = -1; i < n; i++)\n v[i] = x += 1 + next();\n return v;\n}\nfunction read_deltas(n, next) {\n let v = Array(n);\n for (let i = 0, x = 0; i < n; i++)\n v[i] = x += signed(next());\n return v;\n}\nexport function read_member_array(next, lookup) {\n let v = read_ascending(next(), next);\n let n = next();\n let vX = read_ascending(n, next);\n let vN = read_counts(n, next);\n for (let i = 0; i < n; i++) {\n for (let j = 0; j < vN[i]; j++) {\n v.push(vX[i] + j);\n }\n }\n return lookup ? v.map(x => lookup[x]) : v;\n}\n// returns array of \n// [x, ys] => single replacement rule\n// [x, ys, n, dx, dx] => linear map\nexport function read_mapped_map(next) {\n let ret = [];\n while (true) {\n let w = next();\n if (w == 0)\n break;\n ret.push(read_linear_table(w, next));\n }\n while (true) {\n let w = next() - 1;\n if (w < 0)\n break;\n ret.push(read_replacement_table(w, next));\n }\n return fromEntries(flat(ret));\n}\nexport function read_zero_terminated_array(next) {\n let v = [];\n while (true) {\n let i = next();\n if (i == 0)\n break;\n v.push(i);\n }\n return v;\n}\nfunction read_transposed(n, w, next) {\n let m = Array(n).fill(undefined).map(() => []);\n for (let i = 0; i < w; i++) {\n read_deltas(n, next).forEach((x, j) => m[j].push(x));\n }\n return m;\n}\nfunction read_linear_table(w, next) {\n let dx = 1 + next();\n let dy = next();\n let vN = read_zero_terminated_array(next);\n let m = read_transposed(vN.length, 1 + w, next);\n return flat(m.map((v, i) => {\n const x = v[0], ys = v.slice(1);\n //let [x, ...ys] = v;\n //return Array(vN[i]).fill().map((_, j) => {\n return Array(vN[i]).fill(undefined).map((_, j) => {\n let j_dy = j * dy;\n return [x + j * dx, ys.map(y => y + j_dy)];\n });\n }));\n}\nfunction read_replacement_table(w, next) {\n let n = 1 + next();\n let m = read_transposed(n, 1 + w, next);\n return m.map(v => [v[0], v.slice(1)]);\n}\nexport function read_emoji_trie(next) {\n let sorted = read_member_array(next).sort((a, b) => a - b);\n return read();\n function read() {\n let branches = [];\n while (true) {\n let keys = read_member_array(next, sorted);\n if (keys.length == 0)\n break;\n branches.push({ set: new Set(keys), node: read() });\n }\n branches.sort((a, b) => b.set.size - a.set.size); // sort by likelihood\n let temp = next();\n let valid = temp % 3;\n temp = (temp / 3) | 0;\n let fe0f = !!(temp & 1);\n temp >>= 1;\n let save = temp == 1;\n let check = temp == 2;\n return { branches, valid, fe0f, save, check };\n }\n}\n//# sourceMappingURL=decoder.js.map","/**\n * MIT License\n *\n * Copyright (c) 2021 Andrew Raffensperger\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * This is a near carbon-copy of the original source (link below) with the\n * TypeScript typings added and a few tweaks to make it ES3-compatible.\n *\n * See: https://github.com/adraffy/ens-normalize.js\n */\nimport { decode } from \"@ethersproject/base64\";\nimport { read_compressed_payload } from './decoder.js';\nexport function getData() {\n return read_compressed_payload(decode('AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2A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ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=='));\n}\n//# sourceMappingURL=include.js.map","/**\n * MIT License\n *\n * Copyright (c) 2021 Andrew Raffensperger\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * This is a near carbon-copy of the original source (link below) with the\n * TypeScript typings added and a few tweaks to make it ES3-compatible.\n *\n * See: https://github.com/adraffy/ens-normalize.js\n */\nimport { toUtf8CodePoints } from \"@ethersproject/strings\";\nimport { getData } from './include.js';\nconst r = getData();\nimport { read_member_array, read_mapped_map, read_emoji_trie } from './decoder.js';\n// @TODO: This should be lazily loaded\nconst VALID = new Set(read_member_array(r));\nconst IGNORED = new Set(read_member_array(r));\nconst MAPPED = read_mapped_map(r);\nconst EMOJI_ROOT = read_emoji_trie(r);\n//const NFC_CHECK = new Set(read_member_array(r, Array.from(VALID.values()).sort((a, b) => a - b)));\n//const STOP = 0x2E;\nconst HYPHEN = 0x2D;\nconst UNDERSCORE = 0x5F;\nfunction explode_cp(name) {\n return toUtf8CodePoints(name);\n}\nfunction filter_fe0f(cps) {\n return cps.filter(cp => cp != 0xFE0F);\n}\nexport function ens_normalize_post_check(name) {\n for (let label of name.split('.')) {\n let cps = explode_cp(label);\n try {\n for (let i = cps.lastIndexOf(UNDERSCORE) - 1; i >= 0; i--) {\n if (cps[i] !== UNDERSCORE) {\n throw new Error(`underscore only allowed at start`);\n }\n }\n if (cps.length >= 4 && cps.every(cp => cp < 0x80) && cps[2] === HYPHEN && cps[3] === HYPHEN) {\n throw new Error(`invalid label extension`);\n }\n }\n catch (err) {\n throw new Error(`Invalid label \"${label}\": ${err.message}`);\n }\n }\n return name;\n}\nexport function ens_normalize(name) {\n return ens_normalize_post_check(normalize(name, filter_fe0f));\n}\nfunction normalize(name, emoji_filter) {\n let input = explode_cp(name).reverse(); // flip for pop\n let output = [];\n while (input.length) {\n let emoji = consume_emoji_reversed(input);\n if (emoji) {\n output.push(...emoji_filter(emoji));\n continue;\n }\n let cp = input.pop();\n if (VALID.has(cp)) {\n output.push(cp);\n continue;\n }\n if (IGNORED.has(cp)) {\n continue;\n }\n let cps = MAPPED[cp];\n if (cps) {\n output.push(...cps);\n continue;\n }\n throw new Error(`Disallowed codepoint: 0x${cp.toString(16).toUpperCase()}`);\n }\n return ens_normalize_post_check(nfc(String.fromCodePoint(...output)));\n}\nfunction nfc(s) {\n return s.normalize('NFC');\n}\nfunction consume_emoji_reversed(cps, eaten) {\n var _a;\n let node = EMOJI_ROOT;\n let emoji;\n let saved;\n let stack = [];\n let pos = cps.length;\n if (eaten)\n eaten.length = 0; // clear input buffer (if needed)\n while (pos) {\n let cp = cps[--pos];\n node = (_a = node.branches.find(x => x.set.has(cp))) === null || _a === void 0 ? void 0 : _a.node;\n if (!node)\n break;\n if (node.save) { // remember\n saved = cp;\n }\n else if (node.check) { // check exclusion\n if (cp === saved)\n break;\n }\n stack.push(cp);\n if (node.fe0f) {\n stack.push(0xFE0F);\n if (pos > 0 && cps[pos - 1] == 0xFE0F)\n pos--; // consume optional FE0F\n }\n if (node.valid) { // this is a valid emoji (so far)\n emoji = stack.slice(); // copy stack\n if (node.valid == 2)\n emoji.splice(1, 1); // delete FE0F at position 1 (RGI ZWJ don't follow spec!)\n if (eaten)\n eaten.push(...cps.slice(pos).reverse()); // copy input (if needed)\n cps.length = pos; // truncate\n }\n }\n return emoji;\n}\n//# sourceMappingURL=lib.js.map","import { concat, hexlify } from \"@ethersproject/bytes\";\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nimport { ens_normalize } from \"./ens-normalize/lib\";\nconst Zeros = new Uint8Array(32);\nZeros.fill(0);\nfunction checkComponent(comp) {\n if (comp.length === 0) {\n throw new Error(\"invalid ENS name; empty component\");\n }\n return comp;\n}\nfunction ensNameSplit(name) {\n const bytes = toUtf8Bytes(ens_normalize(name));\n const comps = [];\n if (name.length === 0) {\n return comps;\n }\n let last = 0;\n for (let i = 0; i < bytes.length; i++) {\n const d = bytes[i];\n // A separator (i.e. \".\"); copy this component\n if (d === 0x2e) {\n comps.push(checkComponent(bytes.slice(last, i)));\n last = i + 1;\n }\n }\n // There was a stray separator at the end of the name\n if (last >= bytes.length) {\n throw new Error(\"invalid ENS name; empty component\");\n }\n comps.push(checkComponent(bytes.slice(last)));\n return comps;\n}\nexport function ensNormalize(name) {\n return ensNameSplit(name).map((comp) => toUtf8String(comp)).join(\".\");\n}\nexport function isValidName(name) {\n try {\n return (ensNameSplit(name).length !== 0);\n }\n catch (error) { }\n return false;\n}\nexport function namehash(name) {\n /* istanbul ignore if */\n if (typeof (name) !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name; not a string\", \"name\", name);\n }\n let result = Zeros;\n const comps = ensNameSplit(name);\n while (comps.length) {\n result = keccak256(concat([result, keccak256(comps.pop())]));\n }\n return hexlify(result);\n}\nexport function dnsEncode(name) {\n return hexlify(concat(ensNameSplit(name).map((comp) => {\n // DNS does not allow components over 63 bytes in length\n if (comp.length > 63) {\n throw new Error(\"invalid DNS encoded entry; length exceeds 63 bytes\");\n }\n const bytes = new Uint8Array(comp.length + 1);\n bytes.set(comp, 1);\n bytes[0] = bytes.length - 1;\n return bytes;\n }))) + \"00\";\n}\n//# sourceMappingURL=namehash.js.map","import { concat } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nexport const messagePrefix = \"\\x19Ethereum Signed Message:\\n\";\nexport function hashMessage(message) {\n if (typeof (message) === \"string\") {\n message = toUtf8Bytes(message);\n }\n return keccak256(concat([\n toUtf8Bytes(messagePrefix),\n toUtf8Bytes(String(message.length)),\n message\n ]));\n}\n//# sourceMappingURL=message.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, hexConcat, hexlify, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { deepCopy, defineReadOnly, shallowCopy } from \"@ethersproject/properties\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nimport { id } from \"./id\";\nconst padding = new Uint8Array(32);\npadding.fill(0);\nconst NegativeOne = BigNumber.from(-1);\nconst Zero = BigNumber.from(0);\nconst One = BigNumber.from(1);\nconst MaxUint256 = BigNumber.from(\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\");\nfunction hexPadRight(value) {\n const bytes = arrayify(value);\n const padOffset = bytes.length % 32;\n if (padOffset) {\n return hexConcat([bytes, padding.slice(padOffset)]);\n }\n return hexlify(bytes);\n}\nconst hexTrue = hexZeroPad(One.toHexString(), 32);\nconst hexFalse = hexZeroPad(Zero.toHexString(), 32);\nconst domainFieldTypes = {\n name: \"string\",\n version: \"string\",\n chainId: \"uint256\",\n verifyingContract: \"address\",\n salt: \"bytes32\"\n};\nconst domainFieldNames = [\n \"name\", \"version\", \"chainId\", \"verifyingContract\", \"salt\"\n];\nfunction checkString(key) {\n return function (value) {\n if (typeof (value) !== \"string\") {\n logger.throwArgumentError(`invalid domain value for ${JSON.stringify(key)}`, `domain.${key}`, value);\n }\n return value;\n };\n}\nconst domainChecks = {\n name: checkString(\"name\"),\n version: checkString(\"version\"),\n chainId: function (value) {\n try {\n return BigNumber.from(value).toString();\n }\n catch (error) { }\n return logger.throwArgumentError(`invalid domain value for \"chainId\"`, \"domain.chainId\", value);\n },\n verifyingContract: function (value) {\n try {\n return getAddress(value).toLowerCase();\n }\n catch (error) { }\n return logger.throwArgumentError(`invalid domain value \"verifyingContract\"`, \"domain.verifyingContract\", value);\n },\n salt: function (value) {\n try {\n const bytes = arrayify(value);\n if (bytes.length !== 32) {\n throw new Error(\"bad length\");\n }\n return hexlify(bytes);\n }\n catch (error) { }\n return logger.throwArgumentError(`invalid domain value \"salt\"`, \"domain.salt\", value);\n }\n};\nfunction getBaseEncoder(type) {\n // intXX and uintXX\n {\n const match = type.match(/^(u?)int(\\d*)$/);\n if (match) {\n const signed = (match[1] === \"\");\n const width = parseInt(match[2] || \"256\");\n if (width % 8 !== 0 || width > 256 || (match[2] && match[2] !== String(width))) {\n logger.throwArgumentError(\"invalid numeric width\", \"type\", type);\n }\n const boundsUpper = MaxUint256.mask(signed ? (width - 1) : width);\n const boundsLower = signed ? boundsUpper.add(One).mul(NegativeOne) : Zero;\n return function (value) {\n const v = BigNumber.from(value);\n if (v.lt(boundsLower) || v.gt(boundsUpper)) {\n logger.throwArgumentError(`value out-of-bounds for ${type}`, \"value\", value);\n }\n return hexZeroPad(v.toTwos(256).toHexString(), 32);\n };\n }\n }\n // bytesXX\n {\n const match = type.match(/^bytes(\\d+)$/);\n if (match) {\n const width = parseInt(match[1]);\n if (width === 0 || width > 32 || match[1] !== String(width)) {\n logger.throwArgumentError(\"invalid bytes width\", \"type\", type);\n }\n return function (value) {\n const bytes = arrayify(value);\n if (bytes.length !== width) {\n logger.throwArgumentError(`invalid length for ${type}`, \"value\", value);\n }\n return hexPadRight(value);\n };\n }\n }\n switch (type) {\n case \"address\": return function (value) {\n return hexZeroPad(getAddress(value), 32);\n };\n case \"bool\": return function (value) {\n return ((!value) ? hexFalse : hexTrue);\n };\n case \"bytes\": return function (value) {\n return keccak256(value);\n };\n case \"string\": return function (value) {\n return id(value);\n };\n }\n return null;\n}\nfunction encodeType(name, fields) {\n return `${name}(${fields.map(({ name, type }) => (type + \" \" + name)).join(\",\")})`;\n}\nexport class TypedDataEncoder {\n constructor(types) {\n defineReadOnly(this, \"types\", Object.freeze(deepCopy(types)));\n defineReadOnly(this, \"_encoderCache\", {});\n defineReadOnly(this, \"_types\", {});\n // Link struct types to their direct child structs\n const links = {};\n // Link structs to structs which contain them as a child\n const parents = {};\n // Link all subtypes within a given struct\n const subtypes = {};\n Object.keys(types).forEach((type) => {\n links[type] = {};\n parents[type] = [];\n subtypes[type] = {};\n });\n for (const name in types) {\n const uniqueNames = {};\n types[name].forEach((field) => {\n // Check each field has a unique name\n if (uniqueNames[field.name]) {\n logger.throwArgumentError(`duplicate variable name ${JSON.stringify(field.name)} in ${JSON.stringify(name)}`, \"types\", types);\n }\n uniqueNames[field.name] = true;\n // Get the base type (drop any array specifiers)\n const baseType = field.type.match(/^([^\\x5b]*)(\\x5b|$)/)[1];\n if (baseType === name) {\n logger.throwArgumentError(`circular type reference to ${JSON.stringify(baseType)}`, \"types\", types);\n }\n // Is this a base encoding type?\n const encoder = getBaseEncoder(baseType);\n if (encoder) {\n return;\n }\n if (!parents[baseType]) {\n logger.throwArgumentError(`unknown type ${JSON.stringify(baseType)}`, \"types\", types);\n }\n // Add linkage\n parents[baseType].push(name);\n links[name][baseType] = true;\n });\n }\n // Deduce the primary type\n const primaryTypes = Object.keys(parents).filter((n) => (parents[n].length === 0));\n if (primaryTypes.length === 0) {\n logger.throwArgumentError(\"missing primary type\", \"types\", types);\n }\n else if (primaryTypes.length > 1) {\n logger.throwArgumentError(`ambiguous primary types or unused types: ${primaryTypes.map((t) => (JSON.stringify(t))).join(\", \")}`, \"types\", types);\n }\n defineReadOnly(this, \"primaryType\", primaryTypes[0]);\n // Check for circular type references\n function checkCircular(type, found) {\n if (found[type]) {\n logger.throwArgumentError(`circular type reference to ${JSON.stringify(type)}`, \"types\", types);\n }\n found[type] = true;\n Object.keys(links[type]).forEach((child) => {\n if (!parents[child]) {\n return;\n }\n // Recursively check children\n checkCircular(child, found);\n // Mark all ancestors as having this decendant\n Object.keys(found).forEach((subtype) => {\n subtypes[subtype][child] = true;\n });\n });\n delete found[type];\n }\n checkCircular(this.primaryType, {});\n // Compute each fully describe type\n for (const name in subtypes) {\n const st = Object.keys(subtypes[name]);\n st.sort();\n this._types[name] = encodeType(name, types[name]) + st.map((t) => encodeType(t, types[t])).join(\"\");\n }\n }\n getEncoder(type) {\n let encoder = this._encoderCache[type];\n if (!encoder) {\n encoder = this._encoderCache[type] = this._getEncoder(type);\n }\n return encoder;\n }\n _getEncoder(type) {\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) {\n return encoder;\n }\n }\n // Array\n const match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n const subtype = match[1];\n const subEncoder = this.getEncoder(subtype);\n const length = parseInt(match[3]);\n return (value) => {\n if (length >= 0 && value.length !== length) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n let result = value.map(subEncoder);\n if (this._types[subtype]) {\n result = result.map(keccak256);\n }\n return keccak256(hexConcat(result));\n };\n }\n // Struct\n const fields = this.types[type];\n if (fields) {\n const encodedType = id(this._types[type]);\n return (value) => {\n const values = fields.map(({ name, type }) => {\n const result = this.getEncoder(type)(value[name]);\n if (this._types[type]) {\n return keccak256(result);\n }\n return result;\n });\n values.unshift(encodedType);\n return hexConcat(values);\n };\n }\n return logger.throwArgumentError(`unknown type: ${type}`, \"type\", type);\n }\n encodeType(name) {\n const result = this._types[name];\n if (!result) {\n logger.throwArgumentError(`unknown type: ${JSON.stringify(name)}`, \"name\", name);\n }\n return result;\n }\n encodeData(type, value) {\n return this.getEncoder(type)(value);\n }\n hashStruct(name, value) {\n return keccak256(this.encodeData(name, value));\n }\n encode(value) {\n return this.encodeData(this.primaryType, value);\n }\n hash(value) {\n return this.hashStruct(this.primaryType, value);\n }\n _visit(type, value, callback) {\n // Basic encoder type (address, bool, uint256, etc)\n {\n const encoder = getBaseEncoder(type);\n if (encoder) {\n return callback(type, value);\n }\n }\n // Array\n const match = type.match(/^(.*)(\\x5b(\\d*)\\x5d)$/);\n if (match) {\n const subtype = match[1];\n const length = parseInt(match[3]);\n if (length >= 0 && value.length !== length) {\n logger.throwArgumentError(\"array length mismatch; expected length ${ arrayLength }\", \"value\", value);\n }\n return value.map((v) => this._visit(subtype, v, callback));\n }\n // Struct\n const fields = this.types[type];\n if (fields) {\n return fields.reduce((accum, { name, type }) => {\n accum[name] = this._visit(type, value[name], callback);\n return accum;\n }, {});\n }\n return logger.throwArgumentError(`unknown type: ${type}`, \"type\", type);\n }\n visit(value, callback) {\n return this._visit(this.primaryType, value, callback);\n }\n static from(types) {\n return new TypedDataEncoder(types);\n }\n static getPrimaryType(types) {\n return TypedDataEncoder.from(types).primaryType;\n }\n static hashStruct(name, types, value) {\n return TypedDataEncoder.from(types).hashStruct(name, value);\n }\n static hashDomain(domain) {\n const domainFields = [];\n for (const name in domain) {\n const type = domainFieldTypes[name];\n if (!type) {\n logger.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(name)}`, \"domain\", domain);\n }\n domainFields.push({ name, type });\n }\n domainFields.sort((a, b) => {\n return domainFieldNames.indexOf(a.name) - domainFieldNames.indexOf(b.name);\n });\n return TypedDataEncoder.hashStruct(\"EIP712Domain\", { EIP712Domain: domainFields }, domain);\n }\n static encode(domain, types, value) {\n return hexConcat([\n \"0x1901\",\n TypedDataEncoder.hashDomain(domain),\n TypedDataEncoder.from(types).hash(value)\n ]);\n }\n static hash(domain, types, value) {\n return keccak256(TypedDataEncoder.encode(domain, types, value));\n }\n // Replaces all address types with ENS names with their looked up address\n static resolveNames(domain, types, value, resolveName) {\n return __awaiter(this, void 0, void 0, function* () {\n // Make a copy to isolate it from the object passed in\n domain = shallowCopy(domain);\n // Look up all ENS names\n const ensCache = {};\n // Do we need to look up the domain's verifyingContract?\n if (domain.verifyingContract && !isHexString(domain.verifyingContract, 20)) {\n ensCache[domain.verifyingContract] = \"0x\";\n }\n // We are going to use the encoder to visit all the base values\n const encoder = TypedDataEncoder.from(types);\n // Get a list of all the addresses\n encoder.visit(value, (type, value) => {\n if (type === \"address\" && !isHexString(value, 20)) {\n ensCache[value] = \"0x\";\n }\n return value;\n });\n // Lookup each name\n for (const name in ensCache) {\n ensCache[name] = yield resolveName(name);\n }\n // Replace the domain verifyingContract if needed\n if (domain.verifyingContract && ensCache[domain.verifyingContract]) {\n domain.verifyingContract = ensCache[domain.verifyingContract];\n }\n // Replace all ENS names with their address\n value = encoder.visit(value, (type, value) => {\n if (type === \"address\" && ensCache[value]) {\n return ensCache[value];\n }\n return value;\n });\n return { domain, value };\n });\n }\n static getPayload(domain, types, value) {\n // Validate the domain fields\n TypedDataEncoder.hashDomain(domain);\n // Derive the EIP712Domain Struct reference type\n const domainValues = {};\n const domainTypes = [];\n domainFieldNames.forEach((name) => {\n const value = domain[name];\n if (value == null) {\n return;\n }\n domainValues[name] = domainChecks[name](value);\n domainTypes.push({ name, type: domainFieldTypes[name] });\n });\n const encoder = TypedDataEncoder.from(types);\n const typesWithDomain = shallowCopy(types);\n if (typesWithDomain.EIP712Domain) {\n logger.throwArgumentError(\"types must not contain EIP712Domain type\", \"types.EIP712Domain\", types);\n }\n else {\n typesWithDomain.EIP712Domain = domainTypes;\n }\n // Validate the data structures and types\n encoder.encode(value);\n return {\n types: typesWithDomain,\n domain: domainValues,\n primaryType: encoder.primaryType,\n message: encoder.visit(value, (type, value) => {\n // bytes\n if (type.match(/^bytes(\\d*)/)) {\n return hexlify(arrayify(value));\n }\n // uint or int\n if (type.match(/^u?int/)) {\n return BigNumber.from(value).toString();\n }\n switch (type) {\n case \"address\":\n return value.toLowerCase();\n case \"bool\":\n return !!value;\n case \"string\":\n if (typeof (value) !== \"string\") {\n logger.throwArgumentError(`invalid string`, \"value\", value);\n }\n return value;\n }\n return logger.throwArgumentError(\"unsupported type\", \"type\", type);\n })\n };\n }\n}\n//# sourceMappingURL=typed-data.js.map","\"use strict\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexDataSlice, hexlify, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { id } from \"@ethersproject/hash\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { defineReadOnly, Description, getStatic } from \"@ethersproject/properties\";\nimport { defaultAbiCoder } from \"./abi-coder\";\nimport { checkResultErrors } from \"./coders/abstract-coder\";\nimport { ConstructorFragment, EventFragment, FormatTypes, Fragment, FunctionFragment, ParamType } from \"./fragments\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nexport { checkResultErrors };\nexport class LogDescription extends Description {\n}\nexport class TransactionDescription extends Description {\n}\nexport class ErrorDescription extends Description {\n}\nexport class Indexed extends Description {\n static isIndexed(value) {\n return !!(value && value._isIndexed);\n }\n}\nconst BuiltinErrors = {\n \"0x08c379a0\": { signature: \"Error(string)\", name: \"Error\", inputs: [\"string\"], reason: true },\n \"0x4e487b71\": { signature: \"Panic(uint256)\", name: \"Panic\", inputs: [\"uint256\"] }\n};\nfunction wrapAccessError(property, error) {\n const wrap = new Error(`deferred error during ABI decoding triggered accessing ${property}`);\n wrap.error = error;\n return wrap;\n}\n/*\nfunction checkNames(fragment: Fragment, type: \"input\" | \"output\", params: Array): void {\n params.reduce((accum, param) => {\n if (param.name) {\n if (accum[param.name]) {\n logger.throwArgumentError(`duplicate ${ type } parameter ${ JSON.stringify(param.name) } in ${ fragment.format(\"full\") }`, \"fragment\", fragment);\n }\n accum[param.name] = true;\n }\n return accum;\n }, <{ [ name: string ]: boolean }>{ });\n}\n*/\nexport class Interface {\n constructor(fragments) {\n let abi = [];\n if (typeof (fragments) === \"string\") {\n abi = JSON.parse(fragments);\n }\n else {\n abi = fragments;\n }\n defineReadOnly(this, \"fragments\", abi.map((fragment) => {\n return Fragment.from(fragment);\n }).filter((fragment) => (fragment != null)));\n defineReadOnly(this, \"_abiCoder\", getStatic(new.target, \"getAbiCoder\")());\n defineReadOnly(this, \"functions\", {});\n defineReadOnly(this, \"errors\", {});\n defineReadOnly(this, \"events\", {});\n defineReadOnly(this, \"structs\", {});\n // Add all fragments by their signature\n this.fragments.forEach((fragment) => {\n let bucket = null;\n switch (fragment.type) {\n case \"constructor\":\n if (this.deploy) {\n logger.warn(\"duplicate definition - constructor\");\n return;\n }\n //checkNames(fragment, \"input\", fragment.inputs);\n defineReadOnly(this, \"deploy\", fragment);\n return;\n case \"function\":\n //checkNames(fragment, \"input\", fragment.inputs);\n //checkNames(fragment, \"output\", (fragment).outputs);\n bucket = this.functions;\n break;\n case \"event\":\n //checkNames(fragment, \"input\", fragment.inputs);\n bucket = this.events;\n break;\n case \"error\":\n bucket = this.errors;\n break;\n default:\n return;\n }\n let signature = fragment.format();\n if (bucket[signature]) {\n logger.warn(\"duplicate definition - \" + signature);\n return;\n }\n bucket[signature] = fragment;\n });\n // If we do not have a constructor add a default\n if (!this.deploy) {\n defineReadOnly(this, \"deploy\", ConstructorFragment.from({\n payable: false,\n type: \"constructor\"\n }));\n }\n defineReadOnly(this, \"_isInterface\", true);\n }\n format(format) {\n if (!format) {\n format = FormatTypes.full;\n }\n if (format === FormatTypes.sighash) {\n logger.throwArgumentError(\"interface does not support formatting sighash\", \"format\", format);\n }\n const abi = this.fragments.map((fragment) => fragment.format(format));\n // We need to re-bundle the JSON fragments a bit\n if (format === FormatTypes.json) {\n return JSON.stringify(abi.map((j) => JSON.parse(j)));\n }\n return abi;\n }\n // Sub-classes can override these to handle other blockchains\n static getAbiCoder() {\n return defaultAbiCoder;\n }\n static getAddress(address) {\n return getAddress(address);\n }\n static getSighash(fragment) {\n return hexDataSlice(id(fragment.format()), 0, 4);\n }\n static getEventTopic(eventFragment) {\n return id(eventFragment.format());\n }\n // Find a function definition by any means necessary (unless it is ambiguous)\n getFunction(nameOrSignatureOrSighash) {\n if (isHexString(nameOrSignatureOrSighash)) {\n for (const name in this.functions) {\n if (nameOrSignatureOrSighash === this.getSighash(name)) {\n return this.functions[name];\n }\n }\n logger.throwArgumentError(\"no matching function\", \"sighash\", nameOrSignatureOrSighash);\n }\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrSighash.trim();\n const matching = Object.keys(this.functions).filter((f) => (f.split(\"(\" /* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching function\", \"name\", name);\n }\n else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching functions\", \"name\", name);\n }\n return this.functions[matching[0]];\n }\n // Normalize the signature and lookup the function\n const result = this.functions[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching function\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n }\n // Find an event definition by any means necessary (unless it is ambiguous)\n getEvent(nameOrSignatureOrTopic) {\n if (isHexString(nameOrSignatureOrTopic)) {\n const topichash = nameOrSignatureOrTopic.toLowerCase();\n for (const name in this.events) {\n if (topichash === this.getEventTopic(name)) {\n return this.events[name];\n }\n }\n logger.throwArgumentError(\"no matching event\", \"topichash\", topichash);\n }\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrTopic.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrTopic.trim();\n const matching = Object.keys(this.events).filter((f) => (f.split(\"(\" /* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching event\", \"name\", name);\n }\n else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching events\", \"name\", name);\n }\n return this.events[matching[0]];\n }\n // Normalize the signature and lookup the function\n const result = this.events[EventFragment.fromString(nameOrSignatureOrTopic).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching event\", \"signature\", nameOrSignatureOrTopic);\n }\n return result;\n }\n // Find a function definition by any means necessary (unless it is ambiguous)\n getError(nameOrSignatureOrSighash) {\n if (isHexString(nameOrSignatureOrSighash)) {\n const getSighash = getStatic(this.constructor, \"getSighash\");\n for (const name in this.errors) {\n const error = this.errors[name];\n if (nameOrSignatureOrSighash === getSighash(error)) {\n return this.errors[name];\n }\n }\n logger.throwArgumentError(\"no matching error\", \"sighash\", nameOrSignatureOrSighash);\n }\n // It is a bare name, look up the function (will return null if ambiguous)\n if (nameOrSignatureOrSighash.indexOf(\"(\") === -1) {\n const name = nameOrSignatureOrSighash.trim();\n const matching = Object.keys(this.errors).filter((f) => (f.split(\"(\" /* fix:) */)[0] === name));\n if (matching.length === 0) {\n logger.throwArgumentError(\"no matching error\", \"name\", name);\n }\n else if (matching.length > 1) {\n logger.throwArgumentError(\"multiple matching errors\", \"name\", name);\n }\n return this.errors[matching[0]];\n }\n // Normalize the signature and lookup the function\n const result = this.errors[FunctionFragment.fromString(nameOrSignatureOrSighash).format()];\n if (!result) {\n logger.throwArgumentError(\"no matching error\", \"signature\", nameOrSignatureOrSighash);\n }\n return result;\n }\n // Get the sighash (the bytes4 selector) used by Solidity to identify a function\n getSighash(fragment) {\n if (typeof (fragment) === \"string\") {\n try {\n fragment = this.getFunction(fragment);\n }\n catch (error) {\n try {\n fragment = this.getError(fragment);\n }\n catch (_) {\n throw error;\n }\n }\n }\n return getStatic(this.constructor, \"getSighash\")(fragment);\n }\n // Get the topic (the bytes32 hash) used by Solidity to identify an event\n getEventTopic(eventFragment) {\n if (typeof (eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n return getStatic(this.constructor, \"getEventTopic\")(eventFragment);\n }\n _decodeParams(params, data) {\n return this._abiCoder.decode(params, data);\n }\n _encodeParams(params, values) {\n return this._abiCoder.encode(params, values);\n }\n encodeDeploy(values) {\n return this._encodeParams(this.deploy.inputs, values || []);\n }\n decodeErrorResult(fragment, data) {\n if (typeof (fragment) === \"string\") {\n fragment = this.getError(fragment);\n }\n const bytes = arrayify(data);\n if (hexlify(bytes.slice(0, 4)) !== this.getSighash(fragment)) {\n logger.throwArgumentError(`data signature does not match error ${fragment.name}.`, \"data\", hexlify(bytes));\n }\n return this._decodeParams(fragment.inputs, bytes.slice(4));\n }\n encodeErrorResult(fragment, values) {\n if (typeof (fragment) === \"string\") {\n fragment = this.getError(fragment);\n }\n return hexlify(concat([\n this.getSighash(fragment),\n this._encodeParams(fragment.inputs, values || [])\n ]));\n }\n // Decode the data for a function call (e.g. tx.data)\n decodeFunctionData(functionFragment, data) {\n if (typeof (functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n const bytes = arrayify(data);\n if (hexlify(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) {\n logger.throwArgumentError(`data signature does not match function ${functionFragment.name}.`, \"data\", hexlify(bytes));\n }\n return this._decodeParams(functionFragment.inputs, bytes.slice(4));\n }\n // Encode the data for a function call (e.g. tx.data)\n encodeFunctionData(functionFragment, values) {\n if (typeof (functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n return hexlify(concat([\n this.getSighash(functionFragment),\n this._encodeParams(functionFragment.inputs, values || [])\n ]));\n }\n // Decode the result from a function call (e.g. from eth_call)\n decodeFunctionResult(functionFragment, data) {\n if (typeof (functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n let bytes = arrayify(data);\n let reason = null;\n let message = \"\";\n let errorArgs = null;\n let errorName = null;\n let errorSignature = null;\n switch (bytes.length % this._abiCoder._getWordSize()) {\n case 0:\n try {\n return this._abiCoder.decode(functionFragment.outputs, bytes);\n }\n catch (error) { }\n break;\n case 4: {\n const selector = hexlify(bytes.slice(0, 4));\n const builtin = BuiltinErrors[selector];\n if (builtin) {\n errorArgs = this._abiCoder.decode(builtin.inputs, bytes.slice(4));\n errorName = builtin.name;\n errorSignature = builtin.signature;\n if (builtin.reason) {\n reason = errorArgs[0];\n }\n if (errorName === \"Error\") {\n message = `; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(errorArgs[0])}`;\n }\n else if (errorName === \"Panic\") {\n message = `; VM Exception while processing transaction: reverted with panic code ${errorArgs[0]}`;\n }\n }\n else {\n try {\n const error = this.getError(selector);\n errorArgs = this._abiCoder.decode(error.inputs, bytes.slice(4));\n errorName = error.name;\n errorSignature = error.format();\n }\n catch (error) { }\n }\n break;\n }\n }\n return logger.throwError(\"call revert exception\" + message, Logger.errors.CALL_EXCEPTION, {\n method: functionFragment.format(),\n data: hexlify(data), errorArgs, errorName, errorSignature, reason\n });\n }\n // Encode the result for a function call (e.g. for eth_call)\n encodeFunctionResult(functionFragment, values) {\n if (typeof (functionFragment) === \"string\") {\n functionFragment = this.getFunction(functionFragment);\n }\n return hexlify(this._abiCoder.encode(functionFragment.outputs, values || []));\n }\n // Create the filter for the event with search criteria (e.g. for eth_filterLog)\n encodeFilterTopics(eventFragment, values) {\n if (typeof (eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n if (values.length > eventFragment.inputs.length) {\n logger.throwError(\"too many arguments for \" + eventFragment.format(), Logger.errors.UNEXPECTED_ARGUMENT, {\n argument: \"values\",\n value: values\n });\n }\n let topics = [];\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n const encodeTopic = (param, value) => {\n if (param.type === \"string\") {\n return id(value);\n }\n else if (param.type === \"bytes\") {\n return keccak256(hexlify(value));\n }\n if (param.type === \"bool\" && typeof (value) === \"boolean\") {\n value = (value ? \"0x01\" : \"0x00\");\n }\n if (param.type.match(/^u?int/)) {\n value = BigNumber.from(value).toHexString();\n }\n // Check addresses are valid\n if (param.type === \"address\") {\n this._abiCoder.encode([\"address\"], [value]);\n }\n return hexZeroPad(hexlify(value), 32);\n };\n values.forEach((value, index) => {\n let param = eventFragment.inputs[index];\n if (!param.indexed) {\n if (value != null) {\n logger.throwArgumentError(\"cannot filter non-indexed parameters; must be null\", (\"contract.\" + param.name), value);\n }\n return;\n }\n if (value == null) {\n topics.push(null);\n }\n else if (param.baseType === \"array\" || param.baseType === \"tuple\") {\n logger.throwArgumentError(\"filtering with tuples or arrays not supported\", (\"contract.\" + param.name), value);\n }\n else if (Array.isArray(value)) {\n topics.push(value.map((value) => encodeTopic(param, value)));\n }\n else {\n topics.push(encodeTopic(param, value));\n }\n });\n // Trim off trailing nulls\n while (topics.length && topics[topics.length - 1] === null) {\n topics.pop();\n }\n return topics;\n }\n encodeEventLog(eventFragment, values) {\n if (typeof (eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n const topics = [];\n const dataTypes = [];\n const dataValues = [];\n if (!eventFragment.anonymous) {\n topics.push(this.getEventTopic(eventFragment));\n }\n if (values.length !== eventFragment.inputs.length) {\n logger.throwArgumentError(\"event arguments/values mismatch\", \"values\", values);\n }\n eventFragment.inputs.forEach((param, index) => {\n const value = values[index];\n if (param.indexed) {\n if (param.type === \"string\") {\n topics.push(id(value));\n }\n else if (param.type === \"bytes\") {\n topics.push(keccak256(value));\n }\n else if (param.baseType === \"tuple\" || param.baseType === \"array\") {\n // @TODO\n throw new Error(\"not implemented\");\n }\n else {\n topics.push(this._abiCoder.encode([param.type], [value]));\n }\n }\n else {\n dataTypes.push(param);\n dataValues.push(value);\n }\n });\n return {\n data: this._abiCoder.encode(dataTypes, dataValues),\n topics: topics\n };\n }\n // Decode a filter for the event and the search criteria\n decodeEventLog(eventFragment, data, topics) {\n if (typeof (eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n if (topics != null && !eventFragment.anonymous) {\n let topicHash = this.getEventTopic(eventFragment);\n if (!isHexString(topics[0], 32) || topics[0].toLowerCase() !== topicHash) {\n logger.throwError(\"fragment/topic mismatch\", Logger.errors.INVALID_ARGUMENT, { argument: \"topics[0]\", expected: topicHash, value: topics[0] });\n }\n topics = topics.slice(1);\n }\n let indexed = [];\n let nonIndexed = [];\n let dynamic = [];\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(ParamType.fromObject({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n }\n else {\n indexed.push(param);\n dynamic.push(false);\n }\n }\n else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n let resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, concat(topics)) : null;\n let resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true);\n let result = [];\n let nonIndexedIndex = 0, indexedIndex = 0;\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (resultIndexed == null) {\n result[index] = new Indexed({ _isIndexed: true, hash: null });\n }\n else if (dynamic[index]) {\n result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });\n }\n else {\n try {\n result[index] = resultIndexed[indexedIndex++];\n }\n catch (error) {\n result[index] = error;\n }\n }\n }\n else {\n try {\n result[index] = resultNonIndexed[nonIndexedIndex++];\n }\n catch (error) {\n result[index] = error;\n }\n }\n // Add the keyword argument if named and safe\n if (param.name && result[param.name] == null) {\n const value = result[index];\n // Make error named values throw on access\n if (value instanceof Error) {\n Object.defineProperty(result, param.name, {\n enumerable: true,\n get: () => { throw wrapAccessError(`property ${JSON.stringify(param.name)}`, value); }\n });\n }\n else {\n result[param.name] = value;\n }\n }\n });\n // Make all error indexed values throw on access\n for (let i = 0; i < result.length; i++) {\n const value = result[i];\n if (value instanceof Error) {\n Object.defineProperty(result, i, {\n enumerable: true,\n get: () => { throw wrapAccessError(`index ${i}`, value); }\n });\n }\n }\n return Object.freeze(result);\n }\n // Given a transaction, find the matching function fragment (if any) and\n // determine all its properties and call parameters\n parseTransaction(tx) {\n let fragment = this.getFunction(tx.data.substring(0, 10).toLowerCase());\n if (!fragment) {\n return null;\n }\n return new TransactionDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + tx.data.substring(10)),\n functionFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n value: BigNumber.from(tx.value || \"0\"),\n });\n }\n // @TODO\n //parseCallResult(data: BytesLike): ??\n // Given an event log, find the matching event fragment (if any) and\n // determine all its properties and values\n parseLog(log) {\n let fragment = this.getEvent(log.topics[0]);\n if (!fragment || fragment.anonymous) {\n return null;\n }\n // @TODO: If anonymous, and the only method, and the input count matches, should we parse?\n // Probably not, because just because it is the only event in the ABI does\n // not mean we have the full ABI; maybe just a fragment?\n return new LogDescription({\n eventFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n topic: this.getEventTopic(fragment),\n args: this.decodeEventLog(fragment, log.data, log.topics)\n });\n }\n parseError(data) {\n const hexData = hexlify(data);\n let fragment = this.getError(hexData.substring(0, 10).toLowerCase());\n if (!fragment) {\n return null;\n }\n return new ErrorDescription({\n args: this._abiCoder.decode(fragment.inputs, \"0x\" + hexData.substring(10)),\n errorFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n sighash: this.getSighash(fragment),\n });\n }\n /*\n static from(value: Array | string | Interface) {\n if (Interface.isInterface(value)) {\n return value;\n }\n if (typeof(value) === \"string\") {\n return new Interface(JSON.parse(value));\n }\n return new Interface(value);\n }\n */\n static isInterface(value) {\n return !!(value && value._isInterface);\n }\n}\n//# sourceMappingURL=interface.js.map","export const version = \"abstract-provider/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { isHexString } from \"@ethersproject/bytes\";\nimport { Description, defineReadOnly, resolveProperties } from \"@ethersproject/properties\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n;\n;\n//export type CallTransactionable = {\n// call(transaction: TransactionRequest): Promise;\n//};\nexport class ForkEvent extends Description {\n static isForkEvent(value) {\n return !!(value && value._isForkEvent);\n }\n}\nexport class BlockForkEvent extends ForkEvent {\n constructor(blockHash, expiry) {\n if (!isHexString(blockHash, 32)) {\n logger.throwArgumentError(\"invalid blockHash\", \"blockHash\", blockHash);\n }\n super({\n _isForkEvent: true,\n _isBlockForkEvent: true,\n expiry: (expiry || 0),\n blockHash: blockHash\n });\n }\n}\nexport class TransactionForkEvent extends ForkEvent {\n constructor(hash, expiry) {\n if (!isHexString(hash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"hash\", hash);\n }\n super({\n _isForkEvent: true,\n _isTransactionForkEvent: true,\n expiry: (expiry || 0),\n hash: hash\n });\n }\n}\nexport class TransactionOrderForkEvent extends ForkEvent {\n constructor(beforeHash, afterHash, expiry) {\n if (!isHexString(beforeHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"beforeHash\", beforeHash);\n }\n if (!isHexString(afterHash, 32)) {\n logger.throwArgumentError(\"invalid transaction hash\", \"afterHash\", afterHash);\n }\n super({\n _isForkEvent: true,\n _isTransactionOrderForkEvent: true,\n expiry: (expiry || 0),\n beforeHash: beforeHash,\n afterHash: afterHash\n });\n }\n}\n///////////////////////////////\n// Exported Abstracts\nexport class Provider {\n constructor() {\n logger.checkAbstract(new.target, Provider);\n defineReadOnly(this, \"_isProvider\", true);\n }\n getFeeData() {\n return __awaiter(this, void 0, void 0, function* () {\n const { block, gasPrice } = yield resolveProperties({\n block: this.getBlock(\"latest\"),\n gasPrice: this.getGasPrice().catch((error) => {\n // @TODO: Why is this now failing on Calaveras?\n //console.log(error);\n return null;\n })\n });\n let lastBaseFeePerGas = null, maxFeePerGas = null, maxPriorityFeePerGas = null;\n if (block && block.baseFeePerGas) {\n // We may want to compute this more accurately in the future,\n // using the formula \"check if the base fee is correct\".\n // See: https://eips.ethereum.org/EIPS/eip-1559\n lastBaseFeePerGas = block.baseFeePerGas;\n maxPriorityFeePerGas = BigNumber.from(\"1500000000\");\n maxFeePerGas = block.baseFeePerGas.mul(2).add(maxPriorityFeePerGas);\n }\n return { lastBaseFeePerGas, maxFeePerGas, maxPriorityFeePerGas, gasPrice };\n });\n }\n // Alias for \"on\"\n addListener(eventName, listener) {\n return this.on(eventName, listener);\n }\n // Alias for \"off\"\n removeListener(eventName, listener) {\n return this.off(eventName, listener);\n }\n static isProvider(value) {\n return !!(value && value._isProvider);\n }\n}\n//# sourceMappingURL=index.js.map","export const version = \"abstract-signer/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { defineReadOnly, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nconst allowedTransactionKeys = [\n \"accessList\", \"ccipReadEnabled\", \"chainId\", \"customData\", \"data\", \"from\", \"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"to\", \"type\", \"value\"\n];\nconst forwardErrors = [\n Logger.errors.INSUFFICIENT_FUNDS,\n Logger.errors.NONCE_EXPIRED,\n Logger.errors.REPLACEMENT_UNDERPRICED,\n];\n;\n;\nexport class Signer {\n ///////////////////\n // Sub-classes MUST call super\n constructor() {\n logger.checkAbstract(new.target, Signer);\n defineReadOnly(this, \"_isSigner\", true);\n }\n ///////////////////\n // Sub-classes MAY override these\n getBalance(blockTag) {\n return __awaiter(this, void 0, void 0, function* () {\n this._checkProvider(\"getBalance\");\n return yield this.provider.getBalance(this.getAddress(), blockTag);\n });\n }\n getTransactionCount(blockTag) {\n return __awaiter(this, void 0, void 0, function* () {\n this._checkProvider(\"getTransactionCount\");\n return yield this.provider.getTransactionCount(this.getAddress(), blockTag);\n });\n }\n // Populates \"from\" if unspecified, and estimates the gas for the transaction\n estimateGas(transaction) {\n return __awaiter(this, void 0, void 0, function* () {\n this._checkProvider(\"estimateGas\");\n const tx = yield resolveProperties(this.checkTransaction(transaction));\n return yield this.provider.estimateGas(tx);\n });\n }\n // Populates \"from\" if unspecified, and calls with the transaction\n call(transaction, blockTag) {\n return __awaiter(this, void 0, void 0, function* () {\n this._checkProvider(\"call\");\n const tx = yield resolveProperties(this.checkTransaction(transaction));\n return yield this.provider.call(tx, blockTag);\n });\n }\n // Populates all fields in a transaction, signs it and sends it to the network\n sendTransaction(transaction) {\n return __awaiter(this, void 0, void 0, function* () {\n this._checkProvider(\"sendTransaction\");\n const tx = yield this.populateTransaction(transaction);\n const signedTx = yield this.signTransaction(tx);\n return yield this.provider.sendTransaction(signedTx);\n });\n }\n getChainId() {\n return __awaiter(this, void 0, void 0, function* () {\n this._checkProvider(\"getChainId\");\n const network = yield this.provider.getNetwork();\n return network.chainId;\n });\n }\n getGasPrice() {\n return __awaiter(this, void 0, void 0, function* () {\n this._checkProvider(\"getGasPrice\");\n return yield this.provider.getGasPrice();\n });\n }\n getFeeData() {\n return __awaiter(this, void 0, void 0, function* () {\n this._checkProvider(\"getFeeData\");\n return yield this.provider.getFeeData();\n });\n }\n resolveName(name) {\n return __awaiter(this, void 0, void 0, function* () {\n this._checkProvider(\"resolveName\");\n return yield this.provider.resolveName(name);\n });\n }\n // Checks a transaction does not contain invalid keys and if\n // no \"from\" is provided, populates it.\n // - does NOT require a provider\n // - adds \"from\" is not present\n // - returns a COPY (safe to mutate the result)\n // By default called from: (overriding these prevents it)\n // - call\n // - estimateGas\n // - populateTransaction (and therefor sendTransaction)\n checkTransaction(transaction) {\n for (const key in transaction) {\n if (allowedTransactionKeys.indexOf(key) === -1) {\n logger.throwArgumentError(\"invalid transaction key: \" + key, \"transaction\", transaction);\n }\n }\n const tx = shallowCopy(transaction);\n if (tx.from == null) {\n tx.from = this.getAddress();\n }\n else {\n // Make sure any provided address matches this signer\n tx.from = Promise.all([\n Promise.resolve(tx.from),\n this.getAddress()\n ]).then((result) => {\n if (result[0].toLowerCase() !== result[1].toLowerCase()) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n return result[0];\n });\n }\n return tx;\n }\n // Populates ALL keys for a transaction and checks that \"from\" matches\n // this Signer. Should be used by sendTransaction but NOT by signTransaction.\n // By default called from: (overriding these prevents it)\n // - sendTransaction\n //\n // Notes:\n // - We allow gasPrice for EIP-1559 as long as it matches maxFeePerGas\n populateTransaction(transaction) {\n return __awaiter(this, void 0, void 0, function* () {\n const tx = yield resolveProperties(this.checkTransaction(transaction));\n if (tx.to != null) {\n tx.to = Promise.resolve(tx.to).then((to) => __awaiter(this, void 0, void 0, function* () {\n if (to == null) {\n return null;\n }\n const address = yield this.resolveName(to);\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return address;\n }));\n // Prevent this error from causing an UnhandledPromiseException\n tx.to.catch((error) => { });\n }\n // Do not allow mixing pre-eip-1559 and eip-1559 properties\n const hasEip1559 = (tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null);\n if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) {\n logger.throwArgumentError(\"eip-1559 transaction do not support gasPrice\", \"transaction\", transaction);\n }\n else if ((tx.type === 0 || tx.type === 1) && hasEip1559) {\n logger.throwArgumentError(\"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas\", \"transaction\", transaction);\n }\n if ((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null)) {\n // Fully-formed EIP-1559 transaction (skip getFeeData)\n tx.type = 2;\n }\n else if (tx.type === 0 || tx.type === 1) {\n // Explicit Legacy or EIP-2930 transaction\n // Populate missing gasPrice\n if (tx.gasPrice == null) {\n tx.gasPrice = this.getGasPrice();\n }\n }\n else {\n // We need to get fee data to determine things\n const feeData = yield this.getFeeData();\n if (tx.type == null) {\n // We need to auto-detect the intended type of this transaction...\n if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {\n // The network supports EIP-1559!\n // Upgrade transaction from null to eip-1559\n tx.type = 2;\n if (tx.gasPrice != null) {\n // Using legacy gasPrice property on an eip-1559 network,\n // so use gasPrice as both fee properties\n const gasPrice = tx.gasPrice;\n delete tx.gasPrice;\n tx.maxFeePerGas = gasPrice;\n tx.maxPriorityFeePerGas = gasPrice;\n }\n else {\n // Populate missing fee data\n if (tx.maxFeePerGas == null) {\n tx.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (tx.maxPriorityFeePerGas == null) {\n tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n }\n else if (feeData.gasPrice != null) {\n // Network doesn't support EIP-1559...\n // ...but they are trying to use EIP-1559 properties\n if (hasEip1559) {\n logger.throwError(\"network does not support EIP-1559\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"populateTransaction\"\n });\n }\n // Populate missing fee data\n if (tx.gasPrice == null) {\n tx.gasPrice = feeData.gasPrice;\n }\n // Explicitly set untyped transaction to legacy\n tx.type = 0;\n }\n else {\n // getFeeData has failed us.\n logger.throwError(\"failed to get consistent fee data\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signer.getFeeData\"\n });\n }\n }\n else if (tx.type === 2) {\n // Explicitly using EIP-1559\n // Populate missing fee data\n if (tx.maxFeePerGas == null) {\n tx.maxFeePerGas = feeData.maxFeePerGas;\n }\n if (tx.maxPriorityFeePerGas == null) {\n tx.maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;\n }\n }\n }\n if (tx.nonce == null) {\n tx.nonce = this.getTransactionCount(\"pending\");\n }\n if (tx.gasLimit == null) {\n tx.gasLimit = this.estimateGas(tx).catch((error) => {\n if (forwardErrors.indexOf(error.code) >= 0) {\n throw error;\n }\n return logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error: error,\n tx: tx\n });\n });\n }\n if (tx.chainId == null) {\n tx.chainId = this.getChainId();\n }\n else {\n tx.chainId = Promise.all([\n Promise.resolve(tx.chainId),\n this.getChainId()\n ]).then((results) => {\n if (results[1] !== 0 && results[0] !== results[1]) {\n logger.throwArgumentError(\"chainId address mismatch\", \"transaction\", transaction);\n }\n return results[0];\n });\n }\n return yield resolveProperties(tx);\n });\n }\n ///////////////////\n // Sub-classes SHOULD leave these alone\n _checkProvider(operation) {\n if (!this.provider) {\n logger.throwError(\"missing provider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: (operation || \"_checkProvider\")\n });\n }\n }\n static isSigner(value) {\n return !!(value && value._isSigner);\n }\n}\nexport class VoidSigner extends Signer {\n constructor(address, provider) {\n super();\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"provider\", provider || null);\n }\n getAddress() {\n return Promise.resolve(this.address);\n }\n _fail(message, operation) {\n return Promise.resolve().then(() => {\n logger.throwError(message, Logger.errors.UNSUPPORTED_OPERATION, { operation: operation });\n });\n }\n signMessage(message) {\n return this._fail(\"VoidSigner cannot sign messages\", \"signMessage\");\n }\n signTransaction(transaction) {\n return this._fail(\"VoidSigner cannot sign transactions\", \"signTransaction\");\n }\n _signTypedData(domain, types, value) {\n return this._fail(\"VoidSigner cannot sign typed data\", \"signTypedData\");\n }\n connect(provider) {\n return new VoidSigner(this.address, provider);\n }\n}\n//# sourceMappingURL=index.js.map","module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\n\nvar assert = require('minimalistic-assert');\nvar inherits = require('inherits');\n\nexports.inherits = inherits;\n\nfunction isSurrogatePair(msg, i) {\n if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {\n return false;\n }\n if (i < 0 || i + 1 >= msg.length) {\n return false;\n }\n return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;\n}\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg === 'string') {\n if (!enc) {\n // Inspired by stringToUtf8ByteArray() in closure-library by Google\n // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143\n // Apache License 2.0\n // https://github.com/google/closure-library/blob/master/LICENSE\n var p = 0;\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n if (c < 128) {\n res[p++] = c;\n } else if (c < 2048) {\n res[p++] = (c >> 6) | 192;\n res[p++] = (c & 63) | 128;\n } else if (isSurrogatePair(msg, i)) {\n c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);\n res[p++] = (c >> 18) | 240;\n res[p++] = ((c >> 12) & 63) | 128;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n } else {\n res[p++] = (c >> 12) | 224;\n res[p++] = ((c >> 6) & 63) | 128;\n res[p++] = (c & 63) | 128;\n }\n }\n } else if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n }\n } else {\n for (i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n }\n return res;\n}\nexports.toArray = toArray;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nexports.toHex = toHex;\n\nfunction htonl(w) {\n var res = (w >>> 24) |\n ((w >>> 8) & 0xff00) |\n ((w << 8) & 0xff0000) |\n ((w & 0xff) << 24);\n return res >>> 0;\n}\nexports.htonl = htonl;\n\nfunction toHex32(msg, endian) {\n var res = '';\n for (var i = 0; i < msg.length; i++) {\n var w = msg[i];\n if (endian === 'little')\n w = htonl(w);\n res += zero8(w.toString(16));\n }\n return res;\n}\nexports.toHex32 = toHex32;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nexports.zero2 = zero2;\n\nfunction zero8(word) {\n if (word.length === 7)\n return '0' + word;\n else if (word.length === 6)\n return '00' + word;\n else if (word.length === 5)\n return '000' + word;\n else if (word.length === 4)\n return '0000' + word;\n else if (word.length === 3)\n return '00000' + word;\n else if (word.length === 2)\n return '000000' + word;\n else if (word.length === 1)\n return '0000000' + word;\n else\n return word;\n}\nexports.zero8 = zero8;\n\nfunction join32(msg, start, end, endian) {\n var len = end - start;\n assert(len % 4 === 0);\n var res = new Array(len / 4);\n for (var i = 0, k = start; i < res.length; i++, k += 4) {\n var w;\n if (endian === 'big')\n w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];\n else\n w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];\n res[i] = w >>> 0;\n }\n return res;\n}\nexports.join32 = join32;\n\nfunction split32(msg, endian) {\n var res = new Array(msg.length * 4);\n for (var i = 0, k = 0; i < msg.length; i++, k += 4) {\n var m = msg[i];\n if (endian === 'big') {\n res[k] = m >>> 24;\n res[k + 1] = (m >>> 16) & 0xff;\n res[k + 2] = (m >>> 8) & 0xff;\n res[k + 3] = m & 0xff;\n } else {\n res[k + 3] = m >>> 24;\n res[k + 2] = (m >>> 16) & 0xff;\n res[k + 1] = (m >>> 8) & 0xff;\n res[k] = m & 0xff;\n }\n }\n return res;\n}\nexports.split32 = split32;\n\nfunction rotr32(w, b) {\n return (w >>> b) | (w << (32 - b));\n}\nexports.rotr32 = rotr32;\n\nfunction rotl32(w, b) {\n return (w << b) | (w >>> (32 - b));\n}\nexports.rotl32 = rotl32;\n\nfunction sum32(a, b) {\n return (a + b) >>> 0;\n}\nexports.sum32 = sum32;\n\nfunction sum32_3(a, b, c) {\n return (a + b + c) >>> 0;\n}\nexports.sum32_3 = sum32_3;\n\nfunction sum32_4(a, b, c, d) {\n return (a + b + c + d) >>> 0;\n}\nexports.sum32_4 = sum32_4;\n\nfunction sum32_5(a, b, c, d, e) {\n return (a + b + c + d + e) >>> 0;\n}\nexports.sum32_5 = sum32_5;\n\nfunction sum64(buf, pos, ah, al) {\n var bh = buf[pos];\n var bl = buf[pos + 1];\n\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n buf[pos] = hi >>> 0;\n buf[pos + 1] = lo;\n}\nexports.sum64 = sum64;\n\nfunction sum64_hi(ah, al, bh, bl) {\n var lo = (al + bl) >>> 0;\n var hi = (lo < al ? 1 : 0) + ah + bh;\n return hi >>> 0;\n}\nexports.sum64_hi = sum64_hi;\n\nfunction sum64_lo(ah, al, bh, bl) {\n var lo = al + bl;\n return lo >>> 0;\n}\nexports.sum64_lo = sum64_lo;\n\nfunction sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n\n var hi = ah + bh + ch + dh + carry;\n return hi >>> 0;\n}\nexports.sum64_4_hi = sum64_4_hi;\n\nfunction sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {\n var lo = al + bl + cl + dl;\n return lo >>> 0;\n}\nexports.sum64_4_lo = sum64_4_lo;\n\nfunction sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var carry = 0;\n var lo = al;\n lo = (lo + bl) >>> 0;\n carry += lo < al ? 1 : 0;\n lo = (lo + cl) >>> 0;\n carry += lo < cl ? 1 : 0;\n lo = (lo + dl) >>> 0;\n carry += lo < dl ? 1 : 0;\n lo = (lo + el) >>> 0;\n carry += lo < el ? 1 : 0;\n\n var hi = ah + bh + ch + dh + eh + carry;\n return hi >>> 0;\n}\nexports.sum64_5_hi = sum64_5_hi;\n\nfunction sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {\n var lo = al + bl + cl + dl + el;\n\n return lo >>> 0;\n}\nexports.sum64_5_lo = sum64_5_lo;\n\nfunction rotr64_hi(ah, al, num) {\n var r = (al << (32 - num)) | (ah >>> num);\n return r >>> 0;\n}\nexports.rotr64_hi = rotr64_hi;\n\nfunction rotr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.rotr64_lo = rotr64_lo;\n\nfunction shr64_hi(ah, al, num) {\n return ah >>> num;\n}\nexports.shr64_hi = shr64_hi;\n\nfunction shr64_lo(ah, al, num) {\n var r = (ah << (32 - num)) | (al >>> num);\n return r >>> 0;\n}\nexports.shr64_lo = shr64_lo;\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction BlockHash() {\n this.pending = null;\n this.pendingTotal = 0;\n this.blockSize = this.constructor.blockSize;\n this.outSize = this.constructor.outSize;\n this.hmacStrength = this.constructor.hmacStrength;\n this.padLength = this.constructor.padLength / 8;\n this.endian = 'big';\n\n this._delta8 = this.blockSize / 8;\n this._delta32 = this.blockSize / 32;\n}\nexports.BlockHash = BlockHash;\n\nBlockHash.prototype.update = function update(msg, enc) {\n // Convert message to array, pad it, and join into 32bit blocks\n msg = utils.toArray(msg, enc);\n if (!this.pending)\n this.pending = msg;\n else\n this.pending = this.pending.concat(msg);\n this.pendingTotal += msg.length;\n\n // Enough data, try updating\n if (this.pending.length >= this._delta8) {\n msg = this.pending;\n\n // Process pending data in blocks\n var r = msg.length % this._delta8;\n this.pending = msg.slice(msg.length - r, msg.length);\n if (this.pending.length === 0)\n this.pending = null;\n\n msg = utils.join32(msg, 0, msg.length - r, this.endian);\n for (var i = 0; i < msg.length; i += this._delta32)\n this._update(msg, i, i + this._delta32);\n }\n\n return this;\n};\n\nBlockHash.prototype.digest = function digest(enc) {\n this.update(this._pad());\n assert(this.pending === null);\n\n return this._digest(enc);\n};\n\nBlockHash.prototype._pad = function pad() {\n var len = this.pendingTotal;\n var bytes = this._delta8;\n var k = bytes - ((len + this.padLength) % bytes);\n var res = new Array(k + this.padLength);\n res[0] = 0x80;\n for (var i = 1; i < k; i++)\n res[i] = 0;\n\n // Append length\n len <<= 3;\n if (this.endian === 'big') {\n for (var t = 8; t < this.padLength; t++)\n res[i++] = 0;\n\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = len & 0xff;\n } else {\n res[i++] = len & 0xff;\n res[i++] = (len >>> 8) & 0xff;\n res[i++] = (len >>> 16) & 0xff;\n res[i++] = (len >>> 24) & 0xff;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n res[i++] = 0;\n\n for (t = 8; t < this.padLength; t++)\n res[i++] = 0;\n }\n\n return res;\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar rotr32 = utils.rotr32;\n\nfunction ft_1(s, x, y, z) {\n if (s === 0)\n return ch32(x, y, z);\n if (s === 1 || s === 3)\n return p32(x, y, z);\n if (s === 2)\n return maj32(x, y, z);\n}\nexports.ft_1 = ft_1;\n\nfunction ch32(x, y, z) {\n return (x & y) ^ ((~x) & z);\n}\nexports.ch32 = ch32;\n\nfunction maj32(x, y, z) {\n return (x & y) ^ (x & z) ^ (y & z);\n}\nexports.maj32 = maj32;\n\nfunction p32(x, y, z) {\n return x ^ y ^ z;\n}\nexports.p32 = p32;\n\nfunction s0_256(x) {\n return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);\n}\nexports.s0_256 = s0_256;\n\nfunction s1_256(x) {\n return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);\n}\nexports.s1_256 = s1_256;\n\nfunction g0_256(x) {\n return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);\n}\nexports.g0_256 = g0_256;\n\nfunction g1_256(x) {\n return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);\n}\nexports.g1_256 = g1_256;\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_5 = utils.sum32_5;\nvar ft_1 = shaCommon.ft_1;\nvar BlockHash = common.BlockHash;\n\nvar sha1_K = [\n 0x5A827999, 0x6ED9EBA1,\n 0x8F1BBCDC, 0xCA62C1D6\n];\n\nfunction SHA1() {\n if (!(this instanceof SHA1))\n return new SHA1();\n\n BlockHash.call(this);\n this.h = [\n 0x67452301, 0xefcdab89, 0x98badcfe,\n 0x10325476, 0xc3d2e1f0 ];\n this.W = new Array(80);\n}\n\nutils.inherits(SHA1, BlockHash);\nmodule.exports = SHA1;\n\nSHA1.blockSize = 512;\nSHA1.outSize = 160;\nSHA1.hmacStrength = 80;\nSHA1.padLength = 64;\n\nSHA1.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n\n for(; i < W.length; i++)\n W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n\n for (i = 0; i < W.length; i++) {\n var s = ~~(i / 20);\n var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);\n e = d;\n d = c;\n c = rotl32(b, 30);\n b = a;\n a = t;\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n};\n\nSHA1.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar shaCommon = require('./common');\nvar assert = require('minimalistic-assert');\n\nvar sum32 = utils.sum32;\nvar sum32_4 = utils.sum32_4;\nvar sum32_5 = utils.sum32_5;\nvar ch32 = shaCommon.ch32;\nvar maj32 = shaCommon.maj32;\nvar s0_256 = shaCommon.s0_256;\nvar s1_256 = shaCommon.s1_256;\nvar g0_256 = shaCommon.g0_256;\nvar g1_256 = shaCommon.g1_256;\n\nvar BlockHash = common.BlockHash;\n\nvar sha256_K = [\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,\n 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,\n 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,\n 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,\n 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,\n 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,\n 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n];\n\nfunction SHA256() {\n if (!(this instanceof SHA256))\n return new SHA256();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,\n 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n ];\n this.k = sha256_K;\n this.W = new Array(64);\n}\nutils.inherits(SHA256, BlockHash);\nmodule.exports = SHA256;\n\nSHA256.blockSize = 512;\nSHA256.outSize = 256;\nSHA256.hmacStrength = 192;\nSHA256.padLength = 64;\n\nSHA256.prototype._update = function _update(msg, start) {\n var W = this.W;\n\n for (var i = 0; i < 16; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i++)\n W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);\n\n var a = this.h[0];\n var b = this.h[1];\n var c = this.h[2];\n var d = this.h[3];\n var e = this.h[4];\n var f = this.h[5];\n var g = this.h[6];\n var h = this.h[7];\n\n assert(this.k.length === W.length);\n for (i = 0; i < W.length; i++) {\n var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);\n var T2 = sum32(s0_256(a), maj32(a, b, c));\n h = g;\n g = f;\n f = e;\n e = sum32(d, T1);\n d = c;\n c = b;\n b = a;\n a = sum32(T1, T2);\n }\n\n this.h[0] = sum32(this.h[0], a);\n this.h[1] = sum32(this.h[1], b);\n this.h[2] = sum32(this.h[2], c);\n this.h[3] = sum32(this.h[3], d);\n this.h[4] = sum32(this.h[4], e);\n this.h[5] = sum32(this.h[5], f);\n this.h[6] = sum32(this.h[6], g);\n this.h[7] = sum32(this.h[7], h);\n};\n\nSHA256.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n","'use strict';\n\nvar utils = require('../utils');\nvar SHA256 = require('./256');\n\nfunction SHA224() {\n if (!(this instanceof SHA224))\n return new SHA224();\n\n SHA256.call(this);\n this.h = [\n 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];\n}\nutils.inherits(SHA224, SHA256);\nmodule.exports = SHA224;\n\nSHA224.blockSize = 512;\nSHA224.outSize = 224;\nSHA224.hmacStrength = 192;\nSHA224.padLength = 64;\n\nSHA224.prototype._digest = function digest(enc) {\n // Just truncate output\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 7), 'big');\n else\n return utils.split32(this.h.slice(0, 7), 'big');\n};\n\n","'use strict';\n\nvar utils = require('../utils');\nvar common = require('../common');\nvar assert = require('minimalistic-assert');\n\nvar rotr64_hi = utils.rotr64_hi;\nvar rotr64_lo = utils.rotr64_lo;\nvar shr64_hi = utils.shr64_hi;\nvar shr64_lo = utils.shr64_lo;\nvar sum64 = utils.sum64;\nvar sum64_hi = utils.sum64_hi;\nvar sum64_lo = utils.sum64_lo;\nvar sum64_4_hi = utils.sum64_4_hi;\nvar sum64_4_lo = utils.sum64_4_lo;\nvar sum64_5_hi = utils.sum64_5_hi;\nvar sum64_5_lo = utils.sum64_5_lo;\n\nvar BlockHash = common.BlockHash;\n\nvar sha512_K = [\n 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,\n 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,\n 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,\n 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,\n 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,\n 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,\n 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,\n 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,\n 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,\n 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,\n 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,\n 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,\n 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,\n 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,\n 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,\n 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,\n 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,\n 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,\n 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,\n 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,\n 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,\n 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,\n 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,\n 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,\n 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,\n 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,\n 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,\n 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,\n 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,\n 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,\n 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,\n 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,\n 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,\n 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,\n 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,\n 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,\n 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,\n 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,\n 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,\n 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817\n];\n\nfunction SHA512() {\n if (!(this instanceof SHA512))\n return new SHA512();\n\n BlockHash.call(this);\n this.h = [\n 0x6a09e667, 0xf3bcc908,\n 0xbb67ae85, 0x84caa73b,\n 0x3c6ef372, 0xfe94f82b,\n 0xa54ff53a, 0x5f1d36f1,\n 0x510e527f, 0xade682d1,\n 0x9b05688c, 0x2b3e6c1f,\n 0x1f83d9ab, 0xfb41bd6b,\n 0x5be0cd19, 0x137e2179 ];\n this.k = sha512_K;\n this.W = new Array(160);\n}\nutils.inherits(SHA512, BlockHash);\nmodule.exports = SHA512;\n\nSHA512.blockSize = 1024;\nSHA512.outSize = 512;\nSHA512.hmacStrength = 192;\nSHA512.padLength = 128;\n\nSHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {\n var W = this.W;\n\n // 32 x 32bit words\n for (var i = 0; i < 32; i++)\n W[i] = msg[start + i];\n for (; i < W.length; i += 2) {\n var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2\n var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);\n var c1_hi = W[i - 14]; // i - 7\n var c1_lo = W[i - 13];\n var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15\n var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);\n var c3_hi = W[i - 32]; // i - 16\n var c3_lo = W[i - 31];\n\n W[i] = sum64_4_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n W[i + 1] = sum64_4_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo);\n }\n};\n\nSHA512.prototype._update = function _update(msg, start) {\n this._prepareBlock(msg, start);\n\n var W = this.W;\n\n var ah = this.h[0];\n var al = this.h[1];\n var bh = this.h[2];\n var bl = this.h[3];\n var ch = this.h[4];\n var cl = this.h[5];\n var dh = this.h[6];\n var dl = this.h[7];\n var eh = this.h[8];\n var el = this.h[9];\n var fh = this.h[10];\n var fl = this.h[11];\n var gh = this.h[12];\n var gl = this.h[13];\n var hh = this.h[14];\n var hl = this.h[15];\n\n assert(this.k.length === W.length);\n for (var i = 0; i < W.length; i += 2) {\n var c0_hi = hh;\n var c0_lo = hl;\n var c1_hi = s1_512_hi(eh, el);\n var c1_lo = s1_512_lo(eh, el);\n var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);\n var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);\n var c3_hi = this.k[i];\n var c3_lo = this.k[i + 1];\n var c4_hi = W[i];\n var c4_lo = W[i + 1];\n\n var T1_hi = sum64_5_hi(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n var T1_lo = sum64_5_lo(\n c0_hi, c0_lo,\n c1_hi, c1_lo,\n c2_hi, c2_lo,\n c3_hi, c3_lo,\n c4_hi, c4_lo);\n\n c0_hi = s0_512_hi(ah, al);\n c0_lo = s0_512_lo(ah, al);\n c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);\n c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);\n\n var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);\n var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);\n\n hh = gh;\n hl = gl;\n\n gh = fh;\n gl = fl;\n\n fh = eh;\n fl = el;\n\n eh = sum64_hi(dh, dl, T1_hi, T1_lo);\n el = sum64_lo(dl, dl, T1_hi, T1_lo);\n\n dh = ch;\n dl = cl;\n\n ch = bh;\n cl = bl;\n\n bh = ah;\n bl = al;\n\n ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);\n al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);\n }\n\n sum64(this.h, 0, ah, al);\n sum64(this.h, 2, bh, bl);\n sum64(this.h, 4, ch, cl);\n sum64(this.h, 6, dh, dl);\n sum64(this.h, 8, eh, el);\n sum64(this.h, 10, fh, fl);\n sum64(this.h, 12, gh, gl);\n sum64(this.h, 14, hh, hl);\n};\n\nSHA512.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'big');\n else\n return utils.split32(this.h, 'big');\n};\n\nfunction ch64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ ((~xh) & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction ch64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ ((~xl) & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_hi(xh, xl, yh, yl, zh) {\n var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction maj64_lo(xh, xl, yh, yl, zh, zl) {\n var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 28);\n var c1_hi = rotr64_hi(xl, xh, 2); // 34\n var c2_hi = rotr64_hi(xl, xh, 7); // 39\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 28);\n var c1_lo = rotr64_lo(xl, xh, 2); // 34\n var c2_lo = rotr64_lo(xl, xh, 7); // 39\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 14);\n var c1_hi = rotr64_hi(xh, xl, 18);\n var c2_hi = rotr64_hi(xl, xh, 9); // 41\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction s1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 14);\n var c1_lo = rotr64_lo(xh, xl, 18);\n var c2_lo = rotr64_lo(xl, xh, 9); // 41\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 1);\n var c1_hi = rotr64_hi(xh, xl, 8);\n var c2_hi = shr64_hi(xh, xl, 7);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g0_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 1);\n var c1_lo = rotr64_lo(xh, xl, 8);\n var c2_lo = shr64_lo(xh, xl, 7);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_hi(xh, xl) {\n var c0_hi = rotr64_hi(xh, xl, 19);\n var c1_hi = rotr64_hi(xl, xh, 29); // 61\n var c2_hi = shr64_hi(xh, xl, 6);\n\n var r = c0_hi ^ c1_hi ^ c2_hi;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n\nfunction g1_512_lo(xh, xl) {\n var c0_lo = rotr64_lo(xh, xl, 19);\n var c1_lo = rotr64_lo(xl, xh, 29); // 61\n var c2_lo = shr64_lo(xh, xl, 6);\n\n var r = c0_lo ^ c1_lo ^ c2_lo;\n if (r < 0)\n r += 0x100000000;\n return r;\n}\n","'use strict';\n\nvar utils = require('../utils');\n\nvar SHA512 = require('./512');\n\nfunction SHA384() {\n if (!(this instanceof SHA384))\n return new SHA384();\n\n SHA512.call(this);\n this.h = [\n 0xcbbb9d5d, 0xc1059ed8,\n 0x629a292a, 0x367cd507,\n 0x9159015a, 0x3070dd17,\n 0x152fecd8, 0xf70e5939,\n 0x67332667, 0xffc00b31,\n 0x8eb44a87, 0x68581511,\n 0xdb0c2e0d, 0x64f98fa7,\n 0x47b5481d, 0xbefa4fa4 ];\n}\nutils.inherits(SHA384, SHA512);\nmodule.exports = SHA384;\n\nSHA384.blockSize = 1024;\nSHA384.outSize = 384;\nSHA384.hmacStrength = 192;\nSHA384.padLength = 128;\n\nSHA384.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h.slice(0, 12), 'big');\n else\n return utils.split32(this.h.slice(0, 12), 'big');\n};\n","'use strict';\n\nexports.sha1 = require('./sha/1');\nexports.sha224 = require('./sha/224');\nexports.sha256 = require('./sha/256');\nexports.sha384 = require('./sha/384');\nexports.sha512 = require('./sha/512');\n","'use strict';\n\nvar utils = require('./utils');\nvar common = require('./common');\n\nvar rotl32 = utils.rotl32;\nvar sum32 = utils.sum32;\nvar sum32_3 = utils.sum32_3;\nvar sum32_4 = utils.sum32_4;\nvar BlockHash = common.BlockHash;\n\nfunction RIPEMD160() {\n if (!(this instanceof RIPEMD160))\n return new RIPEMD160();\n\n BlockHash.call(this);\n\n this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];\n this.endian = 'little';\n}\nutils.inherits(RIPEMD160, BlockHash);\nexports.ripemd160 = RIPEMD160;\n\nRIPEMD160.blockSize = 512;\nRIPEMD160.outSize = 160;\nRIPEMD160.hmacStrength = 192;\nRIPEMD160.padLength = 64;\n\nRIPEMD160.prototype._update = function update(msg, start) {\n var A = this.h[0];\n var B = this.h[1];\n var C = this.h[2];\n var D = this.h[3];\n var E = this.h[4];\n var Ah = A;\n var Bh = B;\n var Ch = C;\n var Dh = D;\n var Eh = E;\n for (var j = 0; j < 80; j++) {\n var T = sum32(\n rotl32(\n sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),\n s[j]),\n E);\n A = E;\n E = D;\n D = rotl32(C, 10);\n C = B;\n B = T;\n T = sum32(\n rotl32(\n sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),\n sh[j]),\n Eh);\n Ah = Eh;\n Eh = Dh;\n Dh = rotl32(Ch, 10);\n Ch = Bh;\n Bh = T;\n }\n T = sum32_3(this.h[1], C, Dh);\n this.h[1] = sum32_3(this.h[2], D, Eh);\n this.h[2] = sum32_3(this.h[3], E, Ah);\n this.h[3] = sum32_3(this.h[4], A, Bh);\n this.h[4] = sum32_3(this.h[0], B, Ch);\n this.h[0] = T;\n};\n\nRIPEMD160.prototype._digest = function digest(enc) {\n if (enc === 'hex')\n return utils.toHex32(this.h, 'little');\n else\n return utils.split32(this.h, 'little');\n};\n\nfunction f(j, x, y, z) {\n if (j <= 15)\n return x ^ y ^ z;\n else if (j <= 31)\n return (x & y) | ((~x) & z);\n else if (j <= 47)\n return (x | (~y)) ^ z;\n else if (j <= 63)\n return (x & z) | (y & (~z));\n else\n return x ^ (y | (~z));\n}\n\nfunction K(j) {\n if (j <= 15)\n return 0x00000000;\n else if (j <= 31)\n return 0x5a827999;\n else if (j <= 47)\n return 0x6ed9eba1;\n else if (j <= 63)\n return 0x8f1bbcdc;\n else\n return 0xa953fd4e;\n}\n\nfunction Kh(j) {\n if (j <= 15)\n return 0x50a28be6;\n else if (j <= 31)\n return 0x5c4dd124;\n else if (j <= 47)\n return 0x6d703ef3;\n else if (j <= 63)\n return 0x7a6d76e9;\n else\n return 0x00000000;\n}\n\nvar r = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13\n];\n\nvar rh = [\n 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11\n];\n\nvar s = [\n 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6\n];\n\nvar sh = [\n 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11\n];\n","'use strict';\n\nvar utils = require('./utils');\nvar assert = require('minimalistic-assert');\n\nfunction Hmac(hash, key, enc) {\n if (!(this instanceof Hmac))\n return new Hmac(hash, key, enc);\n this.Hash = hash;\n this.blockSize = hash.blockSize / 8;\n this.outSize = hash.outSize / 8;\n this.inner = null;\n this.outer = null;\n\n this._init(utils.toArray(key, enc));\n}\nmodule.exports = Hmac;\n\nHmac.prototype._init = function init(key) {\n // Shorten key, if needed\n if (key.length > this.blockSize)\n key = new this.Hash().update(key).digest();\n assert(key.length <= this.blockSize);\n\n // Add padding to key\n for (var i = key.length; i < this.blockSize; i++)\n key.push(0);\n\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x36;\n this.inner = new this.Hash().update(key);\n\n // 0x36 ^ 0x5c = 0x6a\n for (i = 0; i < key.length; i++)\n key[i] ^= 0x6a;\n this.outer = new this.Hash().update(key);\n};\n\nHmac.prototype.update = function update(msg, enc) {\n this.inner.update(msg, enc);\n return this;\n};\n\nHmac.prototype.digest = function digest(enc) {\n this.outer.update(this.inner.digest());\n return this.outer.digest(enc);\n};\n","var hash = exports;\n\nhash.utils = require('./hash/utils');\nhash.common = require('./hash/common');\nhash.sha = require('./hash/sha');\nhash.ripemd = require('./hash/ripemd');\nhash.hmac = require('./hash/hmac');\n\n// Proxy hash functions to the main object\nhash.sha1 = hash.sha.sha1;\nhash.sha256 = hash.sha.sha256;\nhash.sha224 = hash.sha.sha224;\nhash.sha384 = hash.sha.sha384;\nhash.sha512 = hash.sha.sha512;\nhash.ripemd160 = hash.ripemd.ripemd160;\n","import BN from 'bn.js';\nimport hash from 'hash.js';\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nfunction createCommonjsModule(fn, basedir, module) {\n\treturn module = {\n\t\tpath: basedir,\n\t\texports: {},\n\t\trequire: function (path, base) {\n\t\t\treturn commonjsRequire(path, (base === undefined || base === null) ? module.path : base);\n\t\t}\n\t}, fn(module, module.exports), module.exports;\n}\n\nfunction getDefaultExportFromNamespaceIfPresent (n) {\n\treturn n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;\n}\n\nfunction getDefaultExportFromNamespaceIfNotNamed (n) {\n\treturn n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;\n}\n\nfunction getAugmentedNamespace(n) {\n\tif (n.__esModule) return n;\n\tvar a = Object.defineProperty({}, '__esModule', {value: true});\n\tObject.keys(n).forEach(function (k) {\n\t\tvar d = Object.getOwnPropertyDescriptor(n, k);\n\t\tObject.defineProperty(a, k, d.get ? d : {\n\t\t\tenumerable: true,\n\t\t\tget: function () {\n\t\t\t\treturn n[k];\n\t\t\t}\n\t\t});\n\t});\n\treturn a;\n}\n\nfunction commonjsRequire () {\n\tthrow new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');\n}\n\nvar minimalisticAssert = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n\nvar utils_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nvar utils = exports;\n\nfunction toArray(msg, enc) {\n if (Array.isArray(msg))\n return msg.slice();\n if (!msg)\n return [];\n var res = [];\n if (typeof msg !== 'string') {\n for (var i = 0; i < msg.length; i++)\n res[i] = msg[i] | 0;\n return res;\n }\n if (enc === 'hex') {\n msg = msg.replace(/[^a-z0-9]+/ig, '');\n if (msg.length % 2 !== 0)\n msg = '0' + msg;\n for (var i = 0; i < msg.length; i += 2)\n res.push(parseInt(msg[i] + msg[i + 1], 16));\n } else {\n for (var i = 0; i < msg.length; i++) {\n var c = msg.charCodeAt(i);\n var hi = c >> 8;\n var lo = c & 0xff;\n if (hi)\n res.push(hi, lo);\n else\n res.push(lo);\n }\n }\n return res;\n}\nutils.toArray = toArray;\n\nfunction zero2(word) {\n if (word.length === 1)\n return '0' + word;\n else\n return word;\n}\nutils.zero2 = zero2;\n\nfunction toHex(msg) {\n var res = '';\n for (var i = 0; i < msg.length; i++)\n res += zero2(msg[i].toString(16));\n return res;\n}\nutils.toHex = toHex;\n\nutils.encode = function encode(arr, enc) {\n if (enc === 'hex')\n return toHex(arr);\n else\n return arr;\n};\n});\n\nvar utils_1$1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nvar utils = exports;\n\n\n\n\nutils.assert = minimalisticAssert;\nutils.toArray = utils_1.toArray;\nutils.zero2 = utils_1.zero2;\nutils.toHex = utils_1.toHex;\nutils.encode = utils_1.encode;\n\n// Represent num in a w-NAF form\nfunction getNAF(num, w, bits) {\n var naf = new Array(Math.max(num.bitLength(), bits) + 1);\n naf.fill(0);\n\n var ws = 1 << (w + 1);\n var k = num.clone();\n\n for (var i = 0; i < naf.length; i++) {\n var z;\n var mod = k.andln(ws - 1);\n if (k.isOdd()) {\n if (mod > (ws >> 1) - 1)\n z = (ws >> 1) - mod;\n else\n z = mod;\n k.isubn(z);\n } else {\n z = 0;\n }\n\n naf[i] = z;\n k.iushrn(1);\n }\n\n return naf;\n}\nutils.getNAF = getNAF;\n\n// Represent k1, k2 in a Joint Sparse Form\nfunction getJSF(k1, k2) {\n var jsf = [\n [],\n [],\n ];\n\n k1 = k1.clone();\n k2 = k2.clone();\n var d1 = 0;\n var d2 = 0;\n var m8;\n while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {\n // First phase\n var m14 = (k1.andln(3) + d1) & 3;\n var m24 = (k2.andln(3) + d2) & 3;\n if (m14 === 3)\n m14 = -1;\n if (m24 === 3)\n m24 = -1;\n var u1;\n if ((m14 & 1) === 0) {\n u1 = 0;\n } else {\n m8 = (k1.andln(7) + d1) & 7;\n if ((m8 === 3 || m8 === 5) && m24 === 2)\n u1 = -m14;\n else\n u1 = m14;\n }\n jsf[0].push(u1);\n\n var u2;\n if ((m24 & 1) === 0) {\n u2 = 0;\n } else {\n m8 = (k2.andln(7) + d2) & 7;\n if ((m8 === 3 || m8 === 5) && m14 === 2)\n u2 = -m24;\n else\n u2 = m24;\n }\n jsf[1].push(u2);\n\n // Second phase\n if (2 * d1 === u1 + 1)\n d1 = 1 - d1;\n if (2 * d2 === u2 + 1)\n d2 = 1 - d2;\n k1.iushrn(1);\n k2.iushrn(1);\n }\n\n return jsf;\n}\nutils.getJSF = getJSF;\n\nfunction cachedProperty(obj, name, computer) {\n var key = '_' + name;\n obj.prototype[name] = function cachedProperty() {\n return this[key] !== undefined ? this[key] :\n this[key] = computer.call(this);\n };\n}\nutils.cachedProperty = cachedProperty;\n\nfunction parseBytes(bytes) {\n return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :\n bytes;\n}\nutils.parseBytes = parseBytes;\n\nfunction intFromLE(bytes) {\n return new BN(bytes, 'hex', 'le');\n}\nutils.intFromLE = intFromLE;\n});\n\n'use strict';\n\n\n\nvar getNAF = utils_1$1.getNAF;\nvar getJSF = utils_1$1.getJSF;\nvar assert$1 = utils_1$1.assert;\n\nfunction BaseCurve(type, conf) {\n this.type = type;\n this.p = new BN(conf.p, 16);\n\n // Use Montgomery, when there is no fast reduction for the prime\n this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);\n\n // Useful for many curves\n this.zero = new BN(0).toRed(this.red);\n this.one = new BN(1).toRed(this.red);\n this.two = new BN(2).toRed(this.red);\n\n // Curve configuration, optional\n this.n = conf.n && new BN(conf.n, 16);\n this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);\n\n // Temporary arrays\n this._wnafT1 = new Array(4);\n this._wnafT2 = new Array(4);\n this._wnafT3 = new Array(4);\n this._wnafT4 = new Array(4);\n\n this._bitLength = this.n ? this.n.bitLength() : 0;\n\n // Generalized Greg Maxwell's trick\n var adjustCount = this.n && this.p.div(this.n);\n if (!adjustCount || adjustCount.cmpn(100) > 0) {\n this.redN = null;\n } else {\n this._maxwellTrick = true;\n this.redN = this.n.toRed(this.red);\n }\n}\nvar base = BaseCurve;\n\nBaseCurve.prototype.point = function point() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype.validate = function validate() {\n throw new Error('Not implemented');\n};\n\nBaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {\n assert$1(p.precomputed);\n var doubles = p._getDoubles();\n\n var naf = getNAF(k, 1, this._bitLength);\n var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);\n I /= 3;\n\n // Translate into more windowed form\n var repr = [];\n var j;\n var nafW;\n for (j = 0; j < naf.length; j += doubles.step) {\n nafW = 0;\n for (var l = j + doubles.step - 1; l >= j; l--)\n nafW = (nafW << 1) + naf[l];\n repr.push(nafW);\n }\n\n var a = this.jpoint(null, null, null);\n var b = this.jpoint(null, null, null);\n for (var i = I; i > 0; i--) {\n for (j = 0; j < repr.length; j++) {\n nafW = repr[j];\n if (nafW === i)\n b = b.mixedAdd(doubles.points[j]);\n else if (nafW === -i)\n b = b.mixedAdd(doubles.points[j].neg());\n }\n a = a.add(b);\n }\n return a.toP();\n};\n\nBaseCurve.prototype._wnafMul = function _wnafMul(p, k) {\n var w = 4;\n\n // Precompute window\n var nafPoints = p._getNAFPoints(w);\n w = nafPoints.wnd;\n var wnd = nafPoints.points;\n\n // Get NAF form\n var naf = getNAF(k, w, this._bitLength);\n\n // Add `this`*(N+1) for every w-NAF index\n var acc = this.jpoint(null, null, null);\n for (var i = naf.length - 1; i >= 0; i--) {\n // Count zeroes\n for (var l = 0; i >= 0 && naf[i] === 0; i--)\n l++;\n if (i >= 0)\n l++;\n acc = acc.dblp(l);\n\n if (i < 0)\n break;\n var z = naf[i];\n assert$1(z !== 0);\n if (p.type === 'affine') {\n // J +- P\n if (z > 0)\n acc = acc.mixedAdd(wnd[(z - 1) >> 1]);\n else\n acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());\n } else {\n // J +- J\n if (z > 0)\n acc = acc.add(wnd[(z - 1) >> 1]);\n else\n acc = acc.add(wnd[(-z - 1) >> 1].neg());\n }\n }\n return p.type === 'affine' ? acc.toP() : acc;\n};\n\nBaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,\n points,\n coeffs,\n len,\n jacobianResult) {\n var wndWidth = this._wnafT1;\n var wnd = this._wnafT2;\n var naf = this._wnafT3;\n\n // Fill all arrays\n var max = 0;\n var i;\n var j;\n var p;\n for (i = 0; i < len; i++) {\n p = points[i];\n var nafPoints = p._getNAFPoints(defW);\n wndWidth[i] = nafPoints.wnd;\n wnd[i] = nafPoints.points;\n }\n\n // Comb small window NAFs\n for (i = len - 1; i >= 1; i -= 2) {\n var a = i - 1;\n var b = i;\n if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {\n naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);\n naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);\n max = Math.max(naf[a].length, max);\n max = Math.max(naf[b].length, max);\n continue;\n }\n\n var comb = [\n points[a], /* 1 */\n null, /* 3 */\n null, /* 5 */\n points[b], /* 7 */\n ];\n\n // Try to avoid Projective points, if possible\n if (points[a].y.cmp(points[b].y) === 0) {\n comb[1] = points[a].add(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].add(points[b].neg());\n } else {\n comb[1] = points[a].toJ().mixedAdd(points[b]);\n comb[2] = points[a].toJ().mixedAdd(points[b].neg());\n }\n\n var index = [\n -3, /* -1 -1 */\n -1, /* -1 0 */\n -5, /* -1 1 */\n -7, /* 0 -1 */\n 0, /* 0 0 */\n 7, /* 0 1 */\n 5, /* 1 -1 */\n 1, /* 1 0 */\n 3, /* 1 1 */\n ];\n\n var jsf = getJSF(coeffs[a], coeffs[b]);\n max = Math.max(jsf[0].length, max);\n naf[a] = new Array(max);\n naf[b] = new Array(max);\n for (j = 0; j < max; j++) {\n var ja = jsf[0][j] | 0;\n var jb = jsf[1][j] | 0;\n\n naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];\n naf[b][j] = 0;\n wnd[a] = comb;\n }\n }\n\n var acc = this.jpoint(null, null, null);\n var tmp = this._wnafT4;\n for (i = max; i >= 0; i--) {\n var k = 0;\n\n while (i >= 0) {\n var zero = true;\n for (j = 0; j < len; j++) {\n tmp[j] = naf[j][i] | 0;\n if (tmp[j] !== 0)\n zero = false;\n }\n if (!zero)\n break;\n k++;\n i--;\n }\n if (i >= 0)\n k++;\n acc = acc.dblp(k);\n if (i < 0)\n break;\n\n for (j = 0; j < len; j++) {\n var z = tmp[j];\n p;\n if (z === 0)\n continue;\n else if (z > 0)\n p = wnd[j][(z - 1) >> 1];\n else if (z < 0)\n p = wnd[j][(-z - 1) >> 1].neg();\n\n if (p.type === 'affine')\n acc = acc.mixedAdd(p);\n else\n acc = acc.add(p);\n }\n }\n // Zeroify references\n for (i = 0; i < len; i++)\n wnd[i] = null;\n\n if (jacobianResult)\n return acc;\n else\n return acc.toP();\n};\n\nfunction BasePoint(curve, type) {\n this.curve = curve;\n this.type = type;\n this.precomputed = null;\n}\nBaseCurve.BasePoint = BasePoint;\n\nBasePoint.prototype.eq = function eq(/*other*/) {\n throw new Error('Not implemented');\n};\n\nBasePoint.prototype.validate = function validate() {\n return this.curve.validate(this);\n};\n\nBaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {\n bytes = utils_1$1.toArray(bytes, enc);\n\n var len = this.p.byteLength();\n\n // uncompressed, hybrid-odd, hybrid-even\n if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&\n bytes.length - 1 === 2 * len) {\n if (bytes[0] === 0x06)\n assert$1(bytes[bytes.length - 1] % 2 === 0);\n else if (bytes[0] === 0x07)\n assert$1(bytes[bytes.length - 1] % 2 === 1);\n\n var res = this.point(bytes.slice(1, 1 + len),\n bytes.slice(1 + len, 1 + 2 * len));\n\n return res;\n } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&\n bytes.length - 1 === len) {\n return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);\n }\n throw new Error('Unknown point format');\n};\n\nBasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {\n return this.encode(enc, true);\n};\n\nBasePoint.prototype._encode = function _encode(compact) {\n var len = this.curve.p.byteLength();\n var x = this.getX().toArray('be', len);\n\n if (compact)\n return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);\n\n return [ 0x04 ].concat(x, this.getY().toArray('be', len));\n};\n\nBasePoint.prototype.encode = function encode(enc, compact) {\n return utils_1$1.encode(this._encode(compact), enc);\n};\n\nBasePoint.prototype.precompute = function precompute(power) {\n if (this.precomputed)\n return this;\n\n var precomputed = {\n doubles: null,\n naf: null,\n beta: null,\n };\n precomputed.naf = this._getNAFPoints(8);\n precomputed.doubles = this._getDoubles(4, power);\n precomputed.beta = this._getBeta();\n this.precomputed = precomputed;\n\n return this;\n};\n\nBasePoint.prototype._hasDoubles = function _hasDoubles(k) {\n if (!this.precomputed)\n return false;\n\n var doubles = this.precomputed.doubles;\n if (!doubles)\n return false;\n\n return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);\n};\n\nBasePoint.prototype._getDoubles = function _getDoubles(step, power) {\n if (this.precomputed && this.precomputed.doubles)\n return this.precomputed.doubles;\n\n var doubles = [ this ];\n var acc = this;\n for (var i = 0; i < power; i += step) {\n for (var j = 0; j < step; j++)\n acc = acc.dbl();\n doubles.push(acc);\n }\n return {\n step: step,\n points: doubles,\n };\n};\n\nBasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {\n if (this.precomputed && this.precomputed.naf)\n return this.precomputed.naf;\n\n var res = [ this ];\n var max = (1 << wnd) - 1;\n var dbl = max === 1 ? null : this.dbl();\n for (var i = 1; i < max; i++)\n res[i] = res[i - 1].add(dbl);\n return {\n wnd: wnd,\n points: res,\n };\n};\n\nBasePoint.prototype._getBeta = function _getBeta() {\n return null;\n};\n\nBasePoint.prototype.dblp = function dblp(k) {\n var r = this;\n for (var i = 0; i < k; i++)\n r = r.dbl();\n return r;\n};\n\nvar inherits_browser = createCommonjsModule(function (module) {\nif (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n };\n}\n});\n\n'use strict';\n\n\n\n\n\n\nvar assert$2 = utils_1$1.assert;\n\nfunction ShortCurve(conf) {\n base.call(this, 'short', conf);\n\n this.a = new BN(conf.a, 16).toRed(this.red);\n this.b = new BN(conf.b, 16).toRed(this.red);\n this.tinv = this.two.redInvm();\n\n this.zeroA = this.a.fromRed().cmpn(0) === 0;\n this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;\n\n // If the curve is endomorphic, precalculate beta and lambda\n this.endo = this._getEndomorphism(conf);\n this._endoWnafT1 = new Array(4);\n this._endoWnafT2 = new Array(4);\n}\ninherits_browser(ShortCurve, base);\nvar short_1 = ShortCurve;\n\nShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {\n // No efficient endomorphism\n if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)\n return;\n\n // Compute beta and lambda, that lambda * P = (beta * Px; Py)\n var beta;\n var lambda;\n if (conf.beta) {\n beta = new BN(conf.beta, 16).toRed(this.red);\n } else {\n var betas = this._getEndoRoots(this.p);\n // Choose the smallest beta\n beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];\n beta = beta.toRed(this.red);\n }\n if (conf.lambda) {\n lambda = new BN(conf.lambda, 16);\n } else {\n // Choose the lambda that is matching selected beta\n var lambdas = this._getEndoRoots(this.n);\n if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {\n lambda = lambdas[0];\n } else {\n lambda = lambdas[1];\n assert$2(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);\n }\n }\n\n // Get basis vectors, used for balanced length-two representation\n var basis;\n if (conf.basis) {\n basis = conf.basis.map(function(vec) {\n return {\n a: new BN(vec.a, 16),\n b: new BN(vec.b, 16),\n };\n });\n } else {\n basis = this._getEndoBasis(lambda);\n }\n\n return {\n beta: beta,\n lambda: lambda,\n basis: basis,\n };\n};\n\nShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {\n // Find roots of for x^2 + x + 1 in F\n // Root = (-1 +- Sqrt(-3)) / 2\n //\n var red = num === this.p ? this.red : BN.mont(num);\n var tinv = new BN(2).toRed(red).redInvm();\n var ntinv = tinv.redNeg();\n\n var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);\n\n var l1 = ntinv.redAdd(s).fromRed();\n var l2 = ntinv.redSub(s).fromRed();\n return [ l1, l2 ];\n};\n\nShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {\n // aprxSqrt >= sqrt(this.n)\n var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));\n\n // 3.74\n // Run EGCD, until r(L + 1) < aprxSqrt\n var u = lambda;\n var v = this.n.clone();\n var x1 = new BN(1);\n var y1 = new BN(0);\n var x2 = new BN(0);\n var y2 = new BN(1);\n\n // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)\n var a0;\n var b0;\n // First vector\n var a1;\n var b1;\n // Second vector\n var a2;\n var b2;\n\n var prevR;\n var i = 0;\n var r;\n var x;\n while (u.cmpn(0) !== 0) {\n var q = v.div(u);\n r = v.sub(q.mul(u));\n x = x2.sub(q.mul(x1));\n var y = y2.sub(q.mul(y1));\n\n if (!a1 && r.cmp(aprxSqrt) < 0) {\n a0 = prevR.neg();\n b0 = x1;\n a1 = r.neg();\n b1 = x;\n } else if (a1 && ++i === 2) {\n break;\n }\n prevR = r;\n\n v = u;\n u = r;\n x2 = x1;\n x1 = x;\n y2 = y1;\n y1 = y;\n }\n a2 = r.neg();\n b2 = x;\n\n var len1 = a1.sqr().add(b1.sqr());\n var len2 = a2.sqr().add(b2.sqr());\n if (len2.cmp(len1) >= 0) {\n a2 = a0;\n b2 = b0;\n }\n\n // Normalize signs\n if (a1.negative) {\n a1 = a1.neg();\n b1 = b1.neg();\n }\n if (a2.negative) {\n a2 = a2.neg();\n b2 = b2.neg();\n }\n\n return [\n { a: a1, b: b1 },\n { a: a2, b: b2 },\n ];\n};\n\nShortCurve.prototype._endoSplit = function _endoSplit(k) {\n var basis = this.endo.basis;\n var v1 = basis[0];\n var v2 = basis[1];\n\n var c1 = v2.b.mul(k).divRound(this.n);\n var c2 = v1.b.neg().mul(k).divRound(this.n);\n\n var p1 = c1.mul(v1.a);\n var p2 = c2.mul(v2.a);\n var q1 = c1.mul(v1.b);\n var q2 = c2.mul(v2.b);\n\n // Calculate answer\n var k1 = k.sub(p1).sub(p2);\n var k2 = q1.add(q2).neg();\n return { k1: k1, k2: k2 };\n};\n\nShortCurve.prototype.pointFromX = function pointFromX(x, odd) {\n x = new BN(x, 16);\n if (!x.red)\n x = x.toRed(this.red);\n\n var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);\n var y = y2.redSqrt();\n if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)\n throw new Error('invalid point');\n\n // XXX Is there any way to tell if the number is odd without converting it\n // to non-red form?\n var isOdd = y.fromRed().isOdd();\n if (odd && !isOdd || !odd && isOdd)\n y = y.redNeg();\n\n return this.point(x, y);\n};\n\nShortCurve.prototype.validate = function validate(point) {\n if (point.inf)\n return true;\n\n var x = point.x;\n var y = point.y;\n\n var ax = this.a.redMul(x);\n var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);\n return y.redSqr().redISub(rhs).cmpn(0) === 0;\n};\n\nShortCurve.prototype._endoWnafMulAdd =\n function _endoWnafMulAdd(points, coeffs, jacobianResult) {\n var npoints = this._endoWnafT1;\n var ncoeffs = this._endoWnafT2;\n for (var i = 0; i < points.length; i++) {\n var split = this._endoSplit(coeffs[i]);\n var p = points[i];\n var beta = p._getBeta();\n\n if (split.k1.negative) {\n split.k1.ineg();\n p = p.neg(true);\n }\n if (split.k2.negative) {\n split.k2.ineg();\n beta = beta.neg(true);\n }\n\n npoints[i * 2] = p;\n npoints[i * 2 + 1] = beta;\n ncoeffs[i * 2] = split.k1;\n ncoeffs[i * 2 + 1] = split.k2;\n }\n var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);\n\n // Clean-up references to points and coefficients\n for (var j = 0; j < i * 2; j++) {\n npoints[j] = null;\n ncoeffs[j] = null;\n }\n return res;\n };\n\nfunction Point(curve, x, y, isRed) {\n base.BasePoint.call(this, curve, 'affine');\n if (x === null && y === null) {\n this.x = null;\n this.y = null;\n this.inf = true;\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n // Force redgomery representation when loading from JSON\n if (isRed) {\n this.x.forceRed(this.curve.red);\n this.y.forceRed(this.curve.red);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n this.inf = false;\n }\n}\ninherits_browser(Point, base.BasePoint);\n\nShortCurve.prototype.point = function point(x, y, isRed) {\n return new Point(this, x, y, isRed);\n};\n\nShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {\n return Point.fromJSON(this, obj, red);\n};\n\nPoint.prototype._getBeta = function _getBeta() {\n if (!this.curve.endo)\n return;\n\n var pre = this.precomputed;\n if (pre && pre.beta)\n return pre.beta;\n\n var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);\n if (pre) {\n var curve = this.curve;\n var endoMul = function(p) {\n return curve.point(p.x.redMul(curve.endo.beta), p.y);\n };\n pre.beta = beta;\n beta.precomputed = {\n beta: null,\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(endoMul),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(endoMul),\n },\n };\n }\n return beta;\n};\n\nPoint.prototype.toJSON = function toJSON() {\n if (!this.precomputed)\n return [ this.x, this.y ];\n\n return [ this.x, this.y, this.precomputed && {\n doubles: this.precomputed.doubles && {\n step: this.precomputed.doubles.step,\n points: this.precomputed.doubles.points.slice(1),\n },\n naf: this.precomputed.naf && {\n wnd: this.precomputed.naf.wnd,\n points: this.precomputed.naf.points.slice(1),\n },\n } ];\n};\n\nPoint.fromJSON = function fromJSON(curve, obj, red) {\n if (typeof obj === 'string')\n obj = JSON.parse(obj);\n var res = curve.point(obj[0], obj[1], red);\n if (!obj[2])\n return res;\n\n function obj2point(obj) {\n return curve.point(obj[0], obj[1], red);\n }\n\n var pre = obj[2];\n res.precomputed = {\n beta: null,\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: [ res ].concat(pre.doubles.points.map(obj2point)),\n },\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: [ res ].concat(pre.naf.points.map(obj2point)),\n },\n };\n return res;\n};\n\nPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nPoint.prototype.isInfinity = function isInfinity() {\n return this.inf;\n};\n\nPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.inf)\n return p;\n\n // P + O = P\n if (p.inf)\n return this;\n\n // P + P = 2P\n if (this.eq(p))\n return this.dbl();\n\n // P + (-P) = O\n if (this.neg().eq(p))\n return this.curve.point(null, null);\n\n // P + Q = O\n if (this.x.cmp(p.x) === 0)\n return this.curve.point(null, null);\n\n var c = this.y.redSub(p.y);\n if (c.cmpn(0) !== 0)\n c = c.redMul(this.x.redSub(p.x).redInvm());\n var nx = c.redSqr().redISub(this.x).redISub(p.x);\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.dbl = function dbl() {\n if (this.inf)\n return this;\n\n // 2P = O\n var ys1 = this.y.redAdd(this.y);\n if (ys1.cmpn(0) === 0)\n return this.curve.point(null, null);\n\n var a = this.curve.a;\n\n var x2 = this.x.redSqr();\n var dyinv = ys1.redInvm();\n var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);\n\n var nx = c.redSqr().redISub(this.x.redAdd(this.x));\n var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);\n return this.curve.point(nx, ny);\n};\n\nPoint.prototype.getX = function getX() {\n return this.x.fromRed();\n};\n\nPoint.prototype.getY = function getY() {\n return this.y.fromRed();\n};\n\nPoint.prototype.mul = function mul(k) {\n k = new BN(k, 16);\n if (this.isInfinity())\n return this;\n else if (this._hasDoubles(k))\n return this.curve._fixedNafMul(this, k);\n else if (this.curve.endo)\n return this.curve._endoWnafMulAdd([ this ], [ k ]);\n else\n return this.curve._wnafMul(this, k);\n};\n\nPoint.prototype.mulAdd = function mulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2);\n};\n\nPoint.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {\n var points = [ this, p2 ];\n var coeffs = [ k1, k2 ];\n if (this.curve.endo)\n return this.curve._endoWnafMulAdd(points, coeffs, true);\n else\n return this.curve._wnafMulAdd(1, points, coeffs, 2, true);\n};\n\nPoint.prototype.eq = function eq(p) {\n return this === p ||\n this.inf === p.inf &&\n (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);\n};\n\nPoint.prototype.neg = function neg(_precompute) {\n if (this.inf)\n return this;\n\n var res = this.curve.point(this.x, this.y.redNeg());\n if (_precompute && this.precomputed) {\n var pre = this.precomputed;\n var negate = function(p) {\n return p.neg();\n };\n res.precomputed = {\n naf: pre.naf && {\n wnd: pre.naf.wnd,\n points: pre.naf.points.map(negate),\n },\n doubles: pre.doubles && {\n step: pre.doubles.step,\n points: pre.doubles.points.map(negate),\n },\n };\n }\n return res;\n};\n\nPoint.prototype.toJ = function toJ() {\n if (this.inf)\n return this.curve.jpoint(null, null, null);\n\n var res = this.curve.jpoint(this.x, this.y, this.curve.one);\n return res;\n};\n\nfunction JPoint(curve, x, y, z) {\n base.BasePoint.call(this, curve, 'jacobian');\n if (x === null && y === null && z === null) {\n this.x = this.curve.one;\n this.y = this.curve.one;\n this.z = new BN(0);\n } else {\n this.x = new BN(x, 16);\n this.y = new BN(y, 16);\n this.z = new BN(z, 16);\n }\n if (!this.x.red)\n this.x = this.x.toRed(this.curve.red);\n if (!this.y.red)\n this.y = this.y.toRed(this.curve.red);\n if (!this.z.red)\n this.z = this.z.toRed(this.curve.red);\n\n this.zOne = this.z === this.curve.one;\n}\ninherits_browser(JPoint, base.BasePoint);\n\nShortCurve.prototype.jpoint = function jpoint(x, y, z) {\n return new JPoint(this, x, y, z);\n};\n\nJPoint.prototype.toP = function toP() {\n if (this.isInfinity())\n return this.curve.point(null, null);\n\n var zinv = this.z.redInvm();\n var zinv2 = zinv.redSqr();\n var ax = this.x.redMul(zinv2);\n var ay = this.y.redMul(zinv2).redMul(zinv);\n\n return this.curve.point(ax, ay);\n};\n\nJPoint.prototype.neg = function neg() {\n return this.curve.jpoint(this.x, this.y.redNeg(), this.z);\n};\n\nJPoint.prototype.add = function add(p) {\n // O + P = P\n if (this.isInfinity())\n return p;\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 12M + 4S + 7A\n var pz2 = p.z.redSqr();\n var z2 = this.z.redSqr();\n var u1 = this.x.redMul(pz2);\n var u2 = p.x.redMul(z2);\n var s1 = this.y.redMul(pz2.redMul(p.z));\n var s2 = p.y.redMul(z2.redMul(this.z));\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(p.z).redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mixedAdd = function mixedAdd(p) {\n // O + P = P\n if (this.isInfinity())\n return p.toJ();\n\n // P + O = P\n if (p.isInfinity())\n return this;\n\n // 8M + 3S + 7A\n var z2 = this.z.redSqr();\n var u1 = this.x;\n var u2 = p.x.redMul(z2);\n var s1 = this.y;\n var s2 = p.y.redMul(z2).redMul(this.z);\n\n var h = u1.redSub(u2);\n var r = s1.redSub(s2);\n if (h.cmpn(0) === 0) {\n if (r.cmpn(0) !== 0)\n return this.curve.jpoint(null, null, null);\n else\n return this.dbl();\n }\n\n var h2 = h.redSqr();\n var h3 = h2.redMul(h);\n var v = u1.redMul(h2);\n\n var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);\n var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));\n var nz = this.z.redMul(h);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.dblp = function dblp(pow) {\n if (pow === 0)\n return this;\n if (this.isInfinity())\n return this;\n if (!pow)\n return this.dbl();\n\n var i;\n if (this.curve.zeroA || this.curve.threeA) {\n var r = this;\n for (i = 0; i < pow; i++)\n r = r.dbl();\n return r;\n }\n\n // 1M + 2S + 1A + N * (4S + 5M + 8A)\n // N = 1 => 6M + 6S + 9A\n var a = this.curve.a;\n var tinv = this.curve.tinv;\n\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n // Reuse results\n var jyd = jy.redAdd(jy);\n for (i = 0; i < pow; i++) {\n var jx2 = jx.redSqr();\n var jyd2 = jyd.redSqr();\n var jyd4 = jyd2.redSqr();\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var t1 = jx.redMul(jyd2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n var dny = c.redMul(t2);\n dny = dny.redIAdd(dny).redISub(jyd4);\n var nz = jyd.redMul(jz);\n if (i + 1 < pow)\n jz4 = jz4.redMul(jyd4);\n\n jx = nx;\n jz = nz;\n jyd = dny;\n }\n\n return this.curve.jpoint(jx, jyd.redMul(tinv), jz);\n};\n\nJPoint.prototype.dbl = function dbl() {\n if (this.isInfinity())\n return this;\n\n if (this.curve.zeroA)\n return this._zeroDbl();\n else if (this.curve.threeA)\n return this._threeDbl();\n else\n return this._dbl();\n};\n\nJPoint.prototype._zeroDbl = function _zeroDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 14A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // T = M ^ 2 - 2*S\n var t = m.redSqr().redISub(s).redISub(s);\n\n // 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2*Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html\n // #doubling-dbl-2009-l\n // 2M + 5S + 13A\n\n // A = X1^2\n var a = this.x.redSqr();\n // B = Y1^2\n var b = this.y.redSqr();\n // C = B^2\n var c = b.redSqr();\n // D = 2 * ((X1 + B)^2 - A - C)\n var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);\n d = d.redIAdd(d);\n // E = 3 * A\n var e = a.redAdd(a).redIAdd(a);\n // F = E^2\n var f = e.redSqr();\n\n // 8 * C\n var c8 = c.redIAdd(c);\n c8 = c8.redIAdd(c8);\n c8 = c8.redIAdd(c8);\n\n // X3 = F - 2 * D\n nx = f.redISub(d).redISub(d);\n // Y3 = E * (D - X3) - 8 * C\n ny = e.redMul(d.redISub(nx)).redISub(c8);\n // Z3 = 2 * Y1 * Z1\n nz = this.y.redMul(this.z);\n nz = nz.redIAdd(nz);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._threeDbl = function _threeDbl() {\n var nx;\n var ny;\n var nz;\n // Z = 1\n if (this.zOne) {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html\n // #doubling-mdbl-2007-bl\n // 1M + 5S + 15A\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // S = 2 * ((X1 + YY)^2 - XX - YYYY)\n var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n s = s.redIAdd(s);\n // M = 3 * XX + a\n var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);\n // T = M^2 - 2 * S\n var t = m.redSqr().redISub(s).redISub(s);\n // X3 = T\n nx = t;\n // Y3 = M * (S - T) - 8 * YYYY\n var yyyy8 = yyyy.redIAdd(yyyy);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n yyyy8 = yyyy8.redIAdd(yyyy8);\n ny = m.redMul(s.redISub(t)).redISub(yyyy8);\n // Z3 = 2 * Y1\n nz = this.y.redAdd(this.y);\n } else {\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b\n // 3M + 5S\n\n // delta = Z1^2\n var delta = this.z.redSqr();\n // gamma = Y1^2\n var gamma = this.y.redSqr();\n // beta = X1 * gamma\n var beta = this.x.redMul(gamma);\n // alpha = 3 * (X1 - delta) * (X1 + delta)\n var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));\n alpha = alpha.redAdd(alpha).redIAdd(alpha);\n // X3 = alpha^2 - 8 * beta\n var beta4 = beta.redIAdd(beta);\n beta4 = beta4.redIAdd(beta4);\n var beta8 = beta4.redAdd(beta4);\n nx = alpha.redSqr().redISub(beta8);\n // Z3 = (Y1 + Z1)^2 - gamma - delta\n nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);\n // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2\n var ggamma8 = gamma.redSqr();\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ggamma8 = ggamma8.redIAdd(ggamma8);\n ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);\n }\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype._dbl = function _dbl() {\n var a = this.curve.a;\n\n // 4M + 6S + 10A\n var jx = this.x;\n var jy = this.y;\n var jz = this.z;\n var jz4 = jz.redSqr().redSqr();\n\n var jx2 = jx.redSqr();\n var jy2 = jy.redSqr();\n\n var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));\n\n var jxd4 = jx.redAdd(jx);\n jxd4 = jxd4.redIAdd(jxd4);\n var t1 = jxd4.redMul(jy2);\n var nx = c.redSqr().redISub(t1.redAdd(t1));\n var t2 = t1.redISub(nx);\n\n var jyd8 = jy2.redSqr();\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n jyd8 = jyd8.redIAdd(jyd8);\n var ny = c.redMul(t2).redISub(jyd8);\n var nz = jy.redAdd(jy).redMul(jz);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.trpl = function trpl() {\n if (!this.curve.zeroA)\n return this.dbl().add(this);\n\n // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl\n // 5M + 10S + ...\n\n // XX = X1^2\n var xx = this.x.redSqr();\n // YY = Y1^2\n var yy = this.y.redSqr();\n // ZZ = Z1^2\n var zz = this.z.redSqr();\n // YYYY = YY^2\n var yyyy = yy.redSqr();\n // M = 3 * XX + a * ZZ2; a = 0\n var m = xx.redAdd(xx).redIAdd(xx);\n // MM = M^2\n var mm = m.redSqr();\n // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM\n var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);\n e = e.redIAdd(e);\n e = e.redAdd(e).redIAdd(e);\n e = e.redISub(mm);\n // EE = E^2\n var ee = e.redSqr();\n // T = 16*YYYY\n var t = yyyy.redIAdd(yyyy);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n t = t.redIAdd(t);\n // U = (M + E)^2 - MM - EE - T\n var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);\n // X3 = 4 * (X1 * EE - 4 * YY * U)\n var yyu4 = yy.redMul(u);\n yyu4 = yyu4.redIAdd(yyu4);\n yyu4 = yyu4.redIAdd(yyu4);\n var nx = this.x.redMul(ee).redISub(yyu4);\n nx = nx.redIAdd(nx);\n nx = nx.redIAdd(nx);\n // Y3 = 8 * Y1 * (U * (T - U) - E * EE)\n var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n ny = ny.redIAdd(ny);\n // Z3 = (Z1 + E)^2 - ZZ - EE\n var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);\n\n return this.curve.jpoint(nx, ny, nz);\n};\n\nJPoint.prototype.mul = function mul(k, kbase) {\n k = new BN(k, kbase);\n\n return this.curve._wnafMul(this, k);\n};\n\nJPoint.prototype.eq = function eq(p) {\n if (p.type === 'affine')\n return this.eq(p.toJ());\n\n if (this === p)\n return true;\n\n // x1 * z2^2 == x2 * z1^2\n var z2 = this.z.redSqr();\n var pz2 = p.z.redSqr();\n if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)\n return false;\n\n // y1 * z2^3 == y2 * z1^3\n var z3 = z2.redMul(this.z);\n var pz3 = pz2.redMul(p.z);\n return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;\n};\n\nJPoint.prototype.eqXToP = function eqXToP(x) {\n var zs = this.z.redSqr();\n var rx = x.toRed(this.curve.red).redMul(zs);\n if (this.x.cmp(rx) === 0)\n return true;\n\n var xc = x.clone();\n var t = this.curve.redN.redMul(zs);\n for (;;) {\n xc.iadd(this.curve.n);\n if (xc.cmp(this.curve.p) >= 0)\n return false;\n\n rx.redIAdd(t);\n if (this.x.cmp(rx) === 0)\n return true;\n }\n};\n\nJPoint.prototype.inspect = function inspect() {\n if (this.isInfinity())\n return '';\n return '';\n};\n\nJPoint.prototype.isInfinity = function isInfinity() {\n // XXX This code assumes that zero is always zero in red\n return this.z.cmpn(0) === 0;\n};\n\nvar curve_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nvar curve = exports;\n\ncurve.base = base;\ncurve.short = short_1;\ncurve.mont = /*RicMoo:ethers:require(./mont)*/(null);\ncurve.edwards = /*RicMoo:ethers:require(./edwards)*/(null);\n});\n\nvar curves_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nvar curves = exports;\n\n\n\n\n\nvar assert = utils_1$1.assert;\n\nfunction PresetCurve(options) {\n if (options.type === 'short')\n this.curve = new curve_1.short(options);\n else if (options.type === 'edwards')\n this.curve = new curve_1.edwards(options);\n else\n this.curve = new curve_1.mont(options);\n this.g = this.curve.g;\n this.n = this.curve.n;\n this.hash = options.hash;\n\n assert(this.g.validate(), 'Invalid curve');\n assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');\n}\ncurves.PresetCurve = PresetCurve;\n\nfunction defineCurve(name, options) {\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n get: function() {\n var curve = new PresetCurve(options);\n Object.defineProperty(curves, name, {\n configurable: true,\n enumerable: true,\n value: curve,\n });\n return curve;\n },\n });\n}\n\ndefineCurve('p192', {\n type: 'short',\n prime: 'p192',\n p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',\n b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',\n n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',\n hash: hash.sha256,\n gRed: false,\n g: [\n '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',\n '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811',\n ],\n});\n\ndefineCurve('p224', {\n type: 'short',\n prime: 'p224',\n p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',\n a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',\n b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',\n n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',\n hash: hash.sha256,\n gRed: false,\n g: [\n 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',\n 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34',\n ],\n});\n\ndefineCurve('p256', {\n type: 'short',\n prime: null,\n p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',\n a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',\n b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',\n n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',\n hash: hash.sha256,\n gRed: false,\n g: [\n '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',\n '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5',\n ],\n});\n\ndefineCurve('p384', {\n type: 'short',\n prime: null,\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 ffffffff',\n a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'fffffffe ffffffff 00000000 00000000 fffffffc',\n b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +\n '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',\n n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +\n 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',\n hash: hash.sha384,\n gRed: false,\n g: [\n 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +\n '5502f25d bf55296c 3a545e38 72760ab7',\n '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +\n '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f',\n ],\n});\n\ndefineCurve('p521', {\n type: 'short',\n prime: null,\n p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff',\n a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff ffffffff ffffffff fffffffc',\n b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +\n '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +\n '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',\n n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +\n 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +\n 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',\n hash: hash.sha512,\n gRed: false,\n g: [\n '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +\n '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +\n 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',\n '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +\n '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +\n '3fad0761 353c7086 a272c240 88be9476 9fd16650',\n ],\n});\n\ndefineCurve('curve25519', {\n type: 'mont',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '76d06',\n b: '1',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '9',\n ],\n});\n\ndefineCurve('ed25519', {\n type: 'edwards',\n prime: 'p25519',\n p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',\n a: '-1',\n c: '1',\n // -121665 * (121666^(-1)) (mod P)\n d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',\n n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',\n hash: hash.sha256,\n gRed: false,\n g: [\n '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',\n\n // 4/5\n '6666666666666666666666666666666666666666666666666666666666666658',\n ],\n});\n\nvar pre;\ntry {\n pre = /*RicMoo:ethers:require(./precomputed/secp256k1)*/(null).crash();\n} catch (e) {\n pre = undefined;\n}\n\ndefineCurve('secp256k1', {\n type: 'short',\n prime: 'k256',\n p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',\n a: '0',\n b: '7',\n n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',\n h: '1',\n hash: hash.sha256,\n\n // Precomputed endomorphism\n beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',\n lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',\n basis: [\n {\n a: '3086d221a7d46bcde86c90e49284eb15',\n b: '-e4437ed6010e88286f547fa90abfe4c3',\n },\n {\n a: '114ca50f7a8e2f3f657c1108d9d44cfd8',\n b: '3086d221a7d46bcde86c90e49284eb15',\n },\n ],\n\n gRed: false,\n g: [\n '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',\n '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',\n pre,\n ],\n});\n});\n\n'use strict';\n\n\n\n\n\nfunction HmacDRBG(options) {\n if (!(this instanceof HmacDRBG))\n return new HmacDRBG(options);\n this.hash = options.hash;\n this.predResist = !!options.predResist;\n\n this.outLen = this.hash.outSize;\n this.minEntropy = options.minEntropy || this.hash.hmacStrength;\n\n this._reseed = null;\n this.reseedInterval = null;\n this.K = null;\n this.V = null;\n\n var entropy = utils_1.toArray(options.entropy, options.entropyEnc || 'hex');\n var nonce = utils_1.toArray(options.nonce, options.nonceEnc || 'hex');\n var pers = utils_1.toArray(options.pers, options.persEnc || 'hex');\n minimalisticAssert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n this._init(entropy, nonce, pers);\n}\nvar hmacDrbg = HmacDRBG;\n\nHmacDRBG.prototype._init = function init(entropy, nonce, pers) {\n var seed = entropy.concat(nonce).concat(pers);\n\n this.K = new Array(this.outLen / 8);\n this.V = new Array(this.outLen / 8);\n for (var i = 0; i < this.V.length; i++) {\n this.K[i] = 0x00;\n this.V[i] = 0x01;\n }\n\n this._update(seed);\n this._reseed = 1;\n this.reseedInterval = 0x1000000000000; // 2^48\n};\n\nHmacDRBG.prototype._hmac = function hmac() {\n return new hash.hmac(this.hash, this.K);\n};\n\nHmacDRBG.prototype._update = function update(seed) {\n var kmac = this._hmac()\n .update(this.V)\n .update([ 0x00 ]);\n if (seed)\n kmac = kmac.update(seed);\n this.K = kmac.digest();\n this.V = this._hmac().update(this.V).digest();\n if (!seed)\n return;\n\n this.K = this._hmac()\n .update(this.V)\n .update([ 0x01 ])\n .update(seed)\n .digest();\n this.V = this._hmac().update(this.V).digest();\n};\n\nHmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {\n // Optional entropy enc\n if (typeof entropyEnc !== 'string') {\n addEnc = add;\n add = entropyEnc;\n entropyEnc = null;\n }\n\n entropy = utils_1.toArray(entropy, entropyEnc);\n add = utils_1.toArray(add, addEnc);\n\n minimalisticAssert(entropy.length >= (this.minEntropy / 8),\n 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');\n\n this._update(entropy.concat(add || []));\n this._reseed = 1;\n};\n\nHmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {\n if (this._reseed > this.reseedInterval)\n throw new Error('Reseed is required');\n\n // Optional encoding\n if (typeof enc !== 'string') {\n addEnc = add;\n add = enc;\n enc = null;\n }\n\n // Optional additional data\n if (add) {\n add = utils_1.toArray(add, addEnc || 'hex');\n this._update(add);\n }\n\n var temp = [];\n while (temp.length < len) {\n this.V = this._hmac().update(this.V).digest();\n temp = temp.concat(this.V);\n }\n\n var res = temp.slice(0, len);\n this._update(add);\n this._reseed++;\n return utils_1.encode(res, enc);\n};\n\n'use strict';\n\n\n\nvar assert$3 = utils_1$1.assert;\n\nfunction KeyPair(ec, options) {\n this.ec = ec;\n this.priv = null;\n this.pub = null;\n\n // KeyPair(ec, { priv: ..., pub: ... })\n if (options.priv)\n this._importPrivate(options.priv, options.privEnc);\n if (options.pub)\n this._importPublic(options.pub, options.pubEnc);\n}\nvar key = KeyPair;\n\nKeyPair.fromPublic = function fromPublic(ec, pub, enc) {\n if (pub instanceof KeyPair)\n return pub;\n\n return new KeyPair(ec, {\n pub: pub,\n pubEnc: enc,\n });\n};\n\nKeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {\n if (priv instanceof KeyPair)\n return priv;\n\n return new KeyPair(ec, {\n priv: priv,\n privEnc: enc,\n });\n};\n\nKeyPair.prototype.validate = function validate() {\n var pub = this.getPublic();\n\n if (pub.isInfinity())\n return { result: false, reason: 'Invalid public key' };\n if (!pub.validate())\n return { result: false, reason: 'Public key is not a point' };\n if (!pub.mul(this.ec.curve.n).isInfinity())\n return { result: false, reason: 'Public key * N != O' };\n\n return { result: true, reason: null };\n};\n\nKeyPair.prototype.getPublic = function getPublic(compact, enc) {\n // compact is optional argument\n if (typeof compact === 'string') {\n enc = compact;\n compact = null;\n }\n\n if (!this.pub)\n this.pub = this.ec.g.mul(this.priv);\n\n if (!enc)\n return this.pub;\n\n return this.pub.encode(enc, compact);\n};\n\nKeyPair.prototype.getPrivate = function getPrivate(enc) {\n if (enc === 'hex')\n return this.priv.toString(16, 2);\n else\n return this.priv;\n};\n\nKeyPair.prototype._importPrivate = function _importPrivate(key, enc) {\n this.priv = new BN(key, enc || 16);\n\n // Ensure that the priv won't be bigger than n, otherwise we may fail\n // in fixed multiplication method\n this.priv = this.priv.umod(this.ec.curve.n);\n};\n\nKeyPair.prototype._importPublic = function _importPublic(key, enc) {\n if (key.x || key.y) {\n // Montgomery points only have an `x` coordinate.\n // Weierstrass/Edwards points on the other hand have both `x` and\n // `y` coordinates.\n if (this.ec.curve.type === 'mont') {\n assert$3(key.x, 'Need x coordinate');\n } else if (this.ec.curve.type === 'short' ||\n this.ec.curve.type === 'edwards') {\n assert$3(key.x && key.y, 'Need both x and y coordinate');\n }\n this.pub = this.ec.curve.point(key.x, key.y);\n return;\n }\n this.pub = this.ec.curve.decodePoint(key, enc);\n};\n\n// ECDH\nKeyPair.prototype.derive = function derive(pub) {\n if(!pub.validate()) {\n assert$3(pub.validate(), 'public point not validated');\n }\n return pub.mul(this.priv).getX();\n};\n\n// ECDSA\nKeyPair.prototype.sign = function sign(msg, enc, options) {\n return this.ec.sign(msg, this, enc, options);\n};\n\nKeyPair.prototype.verify = function verify(msg, signature) {\n return this.ec.verify(msg, signature, this);\n};\n\nKeyPair.prototype.inspect = function inspect() {\n return '';\n};\n\n'use strict';\n\n\n\n\nvar assert$4 = utils_1$1.assert;\n\nfunction Signature(options, enc) {\n if (options instanceof Signature)\n return options;\n\n if (this._importDER(options, enc))\n return;\n\n assert$4(options.r && options.s, 'Signature without r or s');\n this.r = new BN(options.r, 16);\n this.s = new BN(options.s, 16);\n if (options.recoveryParam === undefined)\n this.recoveryParam = null;\n else\n this.recoveryParam = options.recoveryParam;\n}\nvar signature = Signature;\n\nfunction Position() {\n this.place = 0;\n}\n\nfunction getLength(buf, p) {\n var initial = buf[p.place++];\n if (!(initial & 0x80)) {\n return initial;\n }\n var octetLen = initial & 0xf;\n\n // Indefinite length or overflow\n if (octetLen === 0 || octetLen > 4) {\n return false;\n }\n\n var val = 0;\n for (var i = 0, off = p.place; i < octetLen; i++, off++) {\n val <<= 8;\n val |= buf[off];\n val >>>= 0;\n }\n\n // Leading zeroes\n if (val <= 0x7f) {\n return false;\n }\n\n p.place = off;\n return val;\n}\n\nfunction rmPadding(buf) {\n var i = 0;\n var len = buf.length - 1;\n while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {\n i++;\n }\n if (i === 0) {\n return buf;\n }\n return buf.slice(i);\n}\n\nSignature.prototype._importDER = function _importDER(data, enc) {\n data = utils_1$1.toArray(data, enc);\n var p = new Position();\n if (data[p.place++] !== 0x30) {\n return false;\n }\n var len = getLength(data, p);\n if (len === false) {\n return false;\n }\n if ((len + p.place) !== data.length) {\n return false;\n }\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var rlen = getLength(data, p);\n if (rlen === false) {\n return false;\n }\n var r = data.slice(p.place, rlen + p.place);\n p.place += rlen;\n if (data[p.place++] !== 0x02) {\n return false;\n }\n var slen = getLength(data, p);\n if (slen === false) {\n return false;\n }\n if (data.length !== slen + p.place) {\n return false;\n }\n var s = data.slice(p.place, slen + p.place);\n if (r[0] === 0) {\n if (r[1] & 0x80) {\n r = r.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n if (s[0] === 0) {\n if (s[1] & 0x80) {\n s = s.slice(1);\n } else {\n // Leading zeroes\n return false;\n }\n }\n\n this.r = new BN(r);\n this.s = new BN(s);\n this.recoveryParam = null;\n\n return true;\n};\n\nfunction constructLength(arr, len) {\n if (len < 0x80) {\n arr.push(len);\n return;\n }\n var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);\n arr.push(octets | 0x80);\n while (--octets) {\n arr.push((len >>> (octets << 3)) & 0xff);\n }\n arr.push(len);\n}\n\nSignature.prototype.toDER = function toDER(enc) {\n var r = this.r.toArray();\n var s = this.s.toArray();\n\n // Pad values\n if (r[0] & 0x80)\n r = [ 0 ].concat(r);\n // Pad values\n if (s[0] & 0x80)\n s = [ 0 ].concat(s);\n\n r = rmPadding(r);\n s = rmPadding(s);\n\n while (!s[0] && !(s[1] & 0x80)) {\n s = s.slice(1);\n }\n var arr = [ 0x02 ];\n constructLength(arr, r.length);\n arr = arr.concat(r);\n arr.push(0x02);\n constructLength(arr, s.length);\n var backHalf = arr.concat(s);\n var res = [ 0x30 ];\n constructLength(res, backHalf.length);\n res = res.concat(backHalf);\n return utils_1$1.encode(res, enc);\n};\n\n'use strict';\n\n\n\n\n\nvar rand = /*RicMoo:ethers:require(brorand)*/(function() { throw new Error('unsupported'); });\nvar assert$5 = utils_1$1.assert;\n\n\n\n\nfunction EC(options) {\n if (!(this instanceof EC))\n return new EC(options);\n\n // Shortcut `elliptic.ec(curve-name)`\n if (typeof options === 'string') {\n assert$5(Object.prototype.hasOwnProperty.call(curves_1, options),\n 'Unknown curve ' + options);\n\n options = curves_1[options];\n }\n\n // Shortcut for `elliptic.ec(elliptic.curves.curveName)`\n if (options instanceof curves_1.PresetCurve)\n options = { curve: options };\n\n this.curve = options.curve.curve;\n this.n = this.curve.n;\n this.nh = this.n.ushrn(1);\n this.g = this.curve.g;\n\n // Point on curve\n this.g = options.curve.g;\n this.g.precompute(options.curve.n.bitLength() + 1);\n\n // Hash for function for DRBG\n this.hash = options.hash || options.curve.hash;\n}\nvar ec = EC;\n\nEC.prototype.keyPair = function keyPair(options) {\n return new key(this, options);\n};\n\nEC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {\n return key.fromPrivate(this, priv, enc);\n};\n\nEC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {\n return key.fromPublic(this, pub, enc);\n};\n\nEC.prototype.genKeyPair = function genKeyPair(options) {\n if (!options)\n options = {};\n\n // Instantiate Hmac_DRBG\n var drbg = new hmacDrbg({\n hash: this.hash,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n entropy: options.entropy || rand(this.hash.hmacStrength),\n entropyEnc: options.entropy && options.entropyEnc || 'utf8',\n nonce: this.n.toArray(),\n });\n\n var bytes = this.n.byteLength();\n var ns2 = this.n.sub(new BN(2));\n for (;;) {\n var priv = new BN(drbg.generate(bytes));\n if (priv.cmp(ns2) > 0)\n continue;\n\n priv.iaddn(1);\n return this.keyFromPrivate(priv);\n }\n};\n\nEC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {\n var delta = msg.byteLength() * 8 - this.n.bitLength();\n if (delta > 0)\n msg = msg.ushrn(delta);\n if (!truncOnly && msg.cmp(this.n) >= 0)\n return msg.sub(this.n);\n else\n return msg;\n};\n\nEC.prototype.sign = function sign(msg, key, enc, options) {\n if (typeof enc === 'object') {\n options = enc;\n enc = null;\n }\n if (!options)\n options = {};\n\n key = this.keyFromPrivate(key, enc);\n msg = this._truncateToN(new BN(msg, 16));\n\n // Zero-extend key to provide enough entropy\n var bytes = this.n.byteLength();\n var bkey = key.getPrivate().toArray('be', bytes);\n\n // Zero-extend nonce to have the same byte size as N\n var nonce = msg.toArray('be', bytes);\n\n // Instantiate Hmac_DRBG\n var drbg = new hmacDrbg({\n hash: this.hash,\n entropy: bkey,\n nonce: nonce,\n pers: options.pers,\n persEnc: options.persEnc || 'utf8',\n });\n\n // Number of bytes to generate\n var ns1 = this.n.sub(new BN(1));\n\n for (var iter = 0; ; iter++) {\n var k = options.k ?\n options.k(iter) :\n new BN(drbg.generate(this.n.byteLength()));\n k = this._truncateToN(k, true);\n if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)\n continue;\n\n var kp = this.g.mul(k);\n if (kp.isInfinity())\n continue;\n\n var kpX = kp.getX();\n var r = kpX.umod(this.n);\n if (r.cmpn(0) === 0)\n continue;\n\n var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));\n s = s.umod(this.n);\n if (s.cmpn(0) === 0)\n continue;\n\n var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |\n (kpX.cmp(r) !== 0 ? 2 : 0);\n\n // Use complement of `s`, if it is > `n / 2`\n if (options.canonical && s.cmp(this.nh) > 0) {\n s = this.n.sub(s);\n recoveryParam ^= 1;\n }\n\n return new signature({ r: r, s: s, recoveryParam: recoveryParam });\n }\n};\n\nEC.prototype.verify = function verify(msg, signature$1, key, enc) {\n msg = this._truncateToN(new BN(msg, 16));\n key = this.keyFromPublic(key, enc);\n signature$1 = new signature(signature$1, 'hex');\n\n // Perform primitive values validation\n var r = signature$1.r;\n var s = signature$1.s;\n if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)\n return false;\n if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)\n return false;\n\n // Validate signature\n var sinv = s.invm(this.n);\n var u1 = sinv.mul(msg).umod(this.n);\n var u2 = sinv.mul(r).umod(this.n);\n var p;\n\n if (!this.curve._maxwellTrick) {\n p = this.g.mulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n return p.getX().umod(this.n).cmp(r) === 0;\n }\n\n // NOTE: Greg Maxwell's trick, inspired by:\n // https://git.io/vad3K\n\n p = this.g.jmulAdd(u1, key.getPublic(), u2);\n if (p.isInfinity())\n return false;\n\n // Compare `p.x` of Jacobian point with `r`,\n // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the\n // inverse of `p.z^2`\n return p.eqXToP(r);\n};\n\nEC.prototype.recoverPubKey = function(msg, signature$1, j, enc) {\n assert$5((3 & j) === j, 'The recovery param is more than two bits');\n signature$1 = new signature(signature$1, enc);\n\n var n = this.n;\n var e = new BN(msg);\n var r = signature$1.r;\n var s = signature$1.s;\n\n // A set LSB signifies that the y-coordinate is odd\n var isYOdd = j & 1;\n var isSecondKey = j >> 1;\n if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)\n throw new Error('Unable to find sencond key candinate');\n\n // 1.1. Let x = r + jn.\n if (isSecondKey)\n r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);\n else\n r = this.curve.pointFromX(r, isYOdd);\n\n var rInv = signature$1.r.invm(n);\n var s1 = n.sub(e).mul(rInv).umod(n);\n var s2 = s.mul(rInv).umod(n);\n\n // 1.6.1 Compute Q = r^-1 (sR - eG)\n // Q = r^-1 (sR + -eG)\n return this.g.mulAdd(s1, r, s2);\n};\n\nEC.prototype.getKeyRecoveryParam = function(e, signature$1, Q, enc) {\n signature$1 = new signature(signature$1, enc);\n if (signature$1.recoveryParam !== null)\n return signature$1.recoveryParam;\n\n for (var i = 0; i < 4; i++) {\n var Qprime;\n try {\n Qprime = this.recoverPubKey(e, signature$1, i);\n } catch (e) {\n continue;\n }\n\n if (Qprime.eq(Q))\n return i;\n }\n throw new Error('Unable to find valid recovery factor');\n};\n\nvar elliptic_1 = createCommonjsModule(function (module, exports) {\n'use strict';\n\nvar elliptic = exports;\n\nelliptic.version = /*RicMoo:ethers*/{ version: \"6.5.4\" }.version;\nelliptic.utils = utils_1$1;\nelliptic.rand = /*RicMoo:ethers:require(brorand)*/(function() { throw new Error('unsupported'); });\nelliptic.curve = curve_1;\nelliptic.curves = curves_1;\n\n// Protocols\nelliptic.ec = ec;\nelliptic.eddsa = /*RicMoo:ethers:require(./elliptic/eddsa)*/(null);\n});\n\nvar EC$1 = elliptic_1.ec;\n\nexport { EC$1 as EC };\n//# sourceMappingURL=elliptic.js.map\n","export const version = \"signing-key/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { EC } from \"./elliptic\";\nimport { arrayify, hexDataLength, hexlify, hexZeroPad, splitSignature } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nlet _curve = null;\nfunction getCurve() {\n if (!_curve) {\n _curve = new EC(\"secp256k1\");\n }\n return _curve;\n}\nexport class SigningKey {\n constructor(privateKey) {\n defineReadOnly(this, \"curve\", \"secp256k1\");\n defineReadOnly(this, \"privateKey\", hexlify(privateKey));\n if (hexDataLength(this.privateKey) !== 32) {\n logger.throwArgumentError(\"invalid private key\", \"privateKey\", \"[[ REDACTED ]]\");\n }\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n defineReadOnly(this, \"publicKey\", \"0x\" + keyPair.getPublic(false, \"hex\"));\n defineReadOnly(this, \"compressedPublicKey\", \"0x\" + keyPair.getPublic(true, \"hex\"));\n defineReadOnly(this, \"_isSigningKey\", true);\n }\n _addPoint(other) {\n const p0 = getCurve().keyFromPublic(arrayify(this.publicKey));\n const p1 = getCurve().keyFromPublic(arrayify(other));\n return \"0x\" + p0.pub.add(p1.pub).encodeCompressed(\"hex\");\n }\n signDigest(digest) {\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n const digestBytes = arrayify(digest);\n if (digestBytes.length !== 32) {\n logger.throwArgumentError(\"bad digest length\", \"digest\", digest);\n }\n const signature = keyPair.sign(digestBytes, { canonical: true });\n return splitSignature({\n recoveryParam: signature.recoveryParam,\n r: hexZeroPad(\"0x\" + signature.r.toString(16), 32),\n s: hexZeroPad(\"0x\" + signature.s.toString(16), 32),\n });\n }\n computeSharedSecret(otherKey) {\n const keyPair = getCurve().keyFromPrivate(arrayify(this.privateKey));\n const otherKeyPair = getCurve().keyFromPublic(arrayify(computePublicKey(otherKey)));\n return hexZeroPad(\"0x\" + keyPair.derive(otherKeyPair.getPublic()).toString(16), 32);\n }\n static isSigningKey(value) {\n return !!(value && value._isSigningKey);\n }\n}\nexport function recoverPublicKey(digest, signature) {\n const sig = splitSignature(signature);\n const rs = { r: arrayify(sig.r), s: arrayify(sig.s) };\n return \"0x\" + getCurve().recoverPubKey(arrayify(digest), rs, sig.recoveryParam).encode(\"hex\", false);\n}\nexport function computePublicKey(key, compressed) {\n const bytes = arrayify(key);\n if (bytes.length === 32) {\n const signingKey = new SigningKey(bytes);\n if (compressed) {\n return \"0x\" + getCurve().keyFromPrivate(bytes).getPublic(true, \"hex\");\n }\n return signingKey.publicKey;\n }\n else if (bytes.length === 33) {\n if (compressed) {\n return hexlify(bytes);\n }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(false, \"hex\");\n }\n else if (bytes.length === 65) {\n if (!compressed) {\n return hexlify(bytes);\n }\n return \"0x\" + getCurve().keyFromPublic(bytes).getPublic(true, \"hex\");\n }\n return logger.throwArgumentError(\"invalid public or private key\", \"key\", \"[REDACTED]\");\n}\n//# sourceMappingURL=index.js.map","export const version = \"transactions/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, hexConcat, hexDataLength, hexDataSlice, hexlify, hexZeroPad, isBytesLike, splitSignature, stripZeros, } from \"@ethersproject/bytes\";\nimport { Zero } from \"@ethersproject/constants\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { checkProperties } from \"@ethersproject/properties\";\nimport * as RLP from \"@ethersproject/rlp\";\nimport { computePublicKey, recoverPublicKey } from \"@ethersproject/signing-key\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nexport var TransactionTypes;\n(function (TransactionTypes) {\n TransactionTypes[TransactionTypes[\"legacy\"] = 0] = \"legacy\";\n TransactionTypes[TransactionTypes[\"eip2930\"] = 1] = \"eip2930\";\n TransactionTypes[TransactionTypes[\"eip1559\"] = 2] = \"eip1559\";\n})(TransactionTypes || (TransactionTypes = {}));\n;\n///////////////////////////////\nfunction handleAddress(value) {\n if (value === \"0x\") {\n return null;\n }\n return getAddress(value);\n}\nfunction handleNumber(value) {\n if (value === \"0x\") {\n return Zero;\n }\n return BigNumber.from(value);\n}\n// Legacy Transaction Fields\nconst transactionFields = [\n { name: \"nonce\", maxLength: 32, numeric: true },\n { name: \"gasPrice\", maxLength: 32, numeric: true },\n { name: \"gasLimit\", maxLength: 32, numeric: true },\n { name: \"to\", length: 20 },\n { name: \"value\", maxLength: 32, numeric: true },\n { name: \"data\" },\n];\nconst allowedTransactionKeys = {\n chainId: true, data: true, gasLimit: true, gasPrice: true, nonce: true, to: true, type: true, value: true\n};\nexport function computeAddress(key) {\n const publicKey = computePublicKey(key);\n return getAddress(hexDataSlice(keccak256(hexDataSlice(publicKey, 1)), 12));\n}\nexport function recoverAddress(digest, signature) {\n return computeAddress(recoverPublicKey(arrayify(digest), signature));\n}\nfunction formatNumber(value, name) {\n const result = stripZeros(BigNumber.from(value).toHexString());\n if (result.length > 32) {\n logger.throwArgumentError(\"invalid length for \" + name, (\"transaction:\" + name), value);\n }\n return result;\n}\nfunction accessSetify(addr, storageKeys) {\n return {\n address: getAddress(addr),\n storageKeys: (storageKeys || []).map((storageKey, index) => {\n if (hexDataLength(storageKey) !== 32) {\n logger.throwArgumentError(\"invalid access list storageKey\", `accessList[${addr}:${index}]`, storageKey);\n }\n return storageKey.toLowerCase();\n })\n };\n}\nexport function accessListify(value) {\n if (Array.isArray(value)) {\n return value.map((set, index) => {\n if (Array.isArray(set)) {\n if (set.length > 2) {\n logger.throwArgumentError(\"access list expected to be [ address, storageKeys[] ]\", `value[${index}]`, set);\n }\n return accessSetify(set[0], set[1]);\n }\n return accessSetify(set.address, set.storageKeys);\n });\n }\n const result = Object.keys(value).map((addr) => {\n const storageKeys = value[addr].reduce((accum, storageKey) => {\n accum[storageKey] = true;\n return accum;\n }, {});\n return accessSetify(addr, Object.keys(storageKeys).sort());\n });\n result.sort((a, b) => (a.address.localeCompare(b.address)));\n return result;\n}\nfunction formatAccessList(value) {\n return accessListify(value).map((set) => [set.address, set.storageKeys]);\n}\nfunction _serializeEip1559(transaction, signature) {\n // If there is an explicit gasPrice, make sure it matches the\n // EIP-1559 fees; otherwise they may not understand what they\n // think they are setting in terms of fee.\n if (transaction.gasPrice != null) {\n const gasPrice = BigNumber.from(transaction.gasPrice);\n const maxFeePerGas = BigNumber.from(transaction.maxFeePerGas || 0);\n if (!gasPrice.eq(maxFeePerGas)) {\n logger.throwArgumentError(\"mismatch EIP-1559 gasPrice != maxFeePerGas\", \"tx\", {\n gasPrice, maxFeePerGas\n });\n }\n }\n const fields = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.maxPriorityFeePerGas || 0, \"maxPriorityFeePerGas\"),\n formatNumber(transaction.maxFeePerGas || 0, \"maxFeePerGas\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n ((transaction.to != null) ? getAddress(transaction.to) : \"0x\"),\n formatNumber(transaction.value || 0, \"value\"),\n (transaction.data || \"0x\"),\n (formatAccessList(transaction.accessList || []))\n ];\n if (signature) {\n const sig = splitSignature(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push(stripZeros(sig.r));\n fields.push(stripZeros(sig.s));\n }\n return hexConcat([\"0x02\", RLP.encode(fields)]);\n}\nfunction _serializeEip2930(transaction, signature) {\n const fields = [\n formatNumber(transaction.chainId || 0, \"chainId\"),\n formatNumber(transaction.nonce || 0, \"nonce\"),\n formatNumber(transaction.gasPrice || 0, \"gasPrice\"),\n formatNumber(transaction.gasLimit || 0, \"gasLimit\"),\n ((transaction.to != null) ? getAddress(transaction.to) : \"0x\"),\n formatNumber(transaction.value || 0, \"value\"),\n (transaction.data || \"0x\"),\n (formatAccessList(transaction.accessList || []))\n ];\n if (signature) {\n const sig = splitSignature(signature);\n fields.push(formatNumber(sig.recoveryParam, \"recoveryParam\"));\n fields.push(stripZeros(sig.r));\n fields.push(stripZeros(sig.s));\n }\n return hexConcat([\"0x01\", RLP.encode(fields)]);\n}\n// Legacy Transactions and EIP-155\nfunction _serialize(transaction, signature) {\n checkProperties(transaction, allowedTransactionKeys);\n const raw = [];\n transactionFields.forEach(function (fieldInfo) {\n let value = transaction[fieldInfo.name] || ([]);\n const options = {};\n if (fieldInfo.numeric) {\n options.hexPad = \"left\";\n }\n value = arrayify(hexlify(value, options));\n // Fixed-width field\n if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, (\"transaction:\" + fieldInfo.name), value);\n }\n // Variable-width (with a maximum)\n if (fieldInfo.maxLength) {\n value = stripZeros(value);\n if (value.length > fieldInfo.maxLength) {\n logger.throwArgumentError(\"invalid length for \" + fieldInfo.name, (\"transaction:\" + fieldInfo.name), value);\n }\n }\n raw.push(hexlify(value));\n });\n let chainId = 0;\n if (transaction.chainId != null) {\n // A chainId was provided; if non-zero we'll use EIP-155\n chainId = transaction.chainId;\n if (typeof (chainId) !== \"number\") {\n logger.throwArgumentError(\"invalid transaction.chainId\", \"transaction\", transaction);\n }\n }\n else if (signature && !isBytesLike(signature) && signature.v > 28) {\n // No chainId provided, but the signature is signing with EIP-155; derive chainId\n chainId = Math.floor((signature.v - 35) / 2);\n }\n // We have an EIP-155 transaction (chainId was specified and non-zero)\n if (chainId !== 0) {\n raw.push(hexlify(chainId)); // @TODO: hexValue?\n raw.push(\"0x\");\n raw.push(\"0x\");\n }\n // Requesting an unsigned transaction\n if (!signature) {\n return RLP.encode(raw);\n }\n // The splitSignature will ensure the transaction has a recoveryParam in the\n // case that the signTransaction function only adds a v.\n const sig = splitSignature(signature);\n // We pushed a chainId and null r, s on for hashing only; remove those\n let v = 27 + sig.recoveryParam;\n if (chainId !== 0) {\n raw.pop();\n raw.pop();\n raw.pop();\n v += chainId * 2 + 8;\n // If an EIP-155 v (directly or indirectly; maybe _vs) was provided, check it!\n if (sig.v > 28 && sig.v !== v) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n }\n else if (sig.v !== v) {\n logger.throwArgumentError(\"transaction.chainId/signature.v mismatch\", \"signature\", signature);\n }\n raw.push(hexlify(v));\n raw.push(stripZeros(arrayify(sig.r)));\n raw.push(stripZeros(arrayify(sig.s)));\n return RLP.encode(raw);\n}\nexport function serialize(transaction, signature) {\n // Legacy and EIP-155 Transactions\n if (transaction.type == null || transaction.type === 0) {\n if (transaction.accessList != null) {\n logger.throwArgumentError(\"untyped transactions do not support accessList; include type: 1\", \"transaction\", transaction);\n }\n return _serialize(transaction, signature);\n }\n // Typed Transactions (EIP-2718)\n switch (transaction.type) {\n case 1:\n return _serializeEip2930(transaction, signature);\n case 2:\n return _serializeEip1559(transaction, signature);\n default:\n break;\n }\n return logger.throwError(`unsupported transaction type: ${transaction.type}`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"serializeTransaction\",\n transactionType: transaction.type\n });\n}\nfunction _parseEipSignature(tx, fields, serialize) {\n try {\n const recid = handleNumber(fields[0]).toNumber();\n if (recid !== 0 && recid !== 1) {\n throw new Error(\"bad recid\");\n }\n tx.v = recid;\n }\n catch (error) {\n logger.throwArgumentError(\"invalid v for transaction type: 1\", \"v\", fields[0]);\n }\n tx.r = hexZeroPad(fields[1], 32);\n tx.s = hexZeroPad(fields[2], 32);\n try {\n const digest = keccak256(serialize(tx));\n tx.from = recoverAddress(digest, { r: tx.r, s: tx.s, recoveryParam: tx.v });\n }\n catch (error) { }\n}\nfunction _parseEip1559(payload) {\n const transaction = RLP.decode(payload.slice(1));\n if (transaction.length !== 9 && transaction.length !== 12) {\n logger.throwArgumentError(\"invalid component count for transaction type: 2\", \"payload\", hexlify(payload));\n }\n const maxPriorityFeePerGas = handleNumber(transaction[2]);\n const maxFeePerGas = handleNumber(transaction[3]);\n const tx = {\n type: 2,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n maxPriorityFeePerGas: maxPriorityFeePerGas,\n maxFeePerGas: maxFeePerGas,\n gasPrice: null,\n gasLimit: handleNumber(transaction[4]),\n to: handleAddress(transaction[5]),\n value: handleNumber(transaction[6]),\n data: transaction[7],\n accessList: accessListify(transaction[8]),\n };\n // Unsigned EIP-1559 Transaction\n if (transaction.length === 9) {\n return tx;\n }\n tx.hash = keccak256(payload);\n _parseEipSignature(tx, transaction.slice(9), _serializeEip1559);\n return tx;\n}\nfunction _parseEip2930(payload) {\n const transaction = RLP.decode(payload.slice(1));\n if (transaction.length !== 8 && transaction.length !== 11) {\n logger.throwArgumentError(\"invalid component count for transaction type: 1\", \"payload\", hexlify(payload));\n }\n const tx = {\n type: 1,\n chainId: handleNumber(transaction[0]).toNumber(),\n nonce: handleNumber(transaction[1]).toNumber(),\n gasPrice: handleNumber(transaction[2]),\n gasLimit: handleNumber(transaction[3]),\n to: handleAddress(transaction[4]),\n value: handleNumber(transaction[5]),\n data: transaction[6],\n accessList: accessListify(transaction[7])\n };\n // Unsigned EIP-2930 Transaction\n if (transaction.length === 8) {\n return tx;\n }\n tx.hash = keccak256(payload);\n _parseEipSignature(tx, transaction.slice(8), _serializeEip2930);\n return tx;\n}\n// Legacy Transactions and EIP-155\nfunction _parse(rawTransaction) {\n const transaction = RLP.decode(rawTransaction);\n if (transaction.length !== 9 && transaction.length !== 6) {\n logger.throwArgumentError(\"invalid raw transaction\", \"rawTransaction\", rawTransaction);\n }\n const tx = {\n nonce: handleNumber(transaction[0]).toNumber(),\n gasPrice: handleNumber(transaction[1]),\n gasLimit: handleNumber(transaction[2]),\n to: handleAddress(transaction[3]),\n value: handleNumber(transaction[4]),\n data: transaction[5],\n chainId: 0\n };\n // Legacy unsigned transaction\n if (transaction.length === 6) {\n return tx;\n }\n try {\n tx.v = BigNumber.from(transaction[6]).toNumber();\n }\n catch (error) {\n // @TODO: What makes snese to do? The v is too big\n return tx;\n }\n tx.r = hexZeroPad(transaction[7], 32);\n tx.s = hexZeroPad(transaction[8], 32);\n if (BigNumber.from(tx.r).isZero() && BigNumber.from(tx.s).isZero()) {\n // EIP-155 unsigned transaction\n tx.chainId = tx.v;\n tx.v = 0;\n }\n else {\n // Signed Transaction\n tx.chainId = Math.floor((tx.v - 35) / 2);\n if (tx.chainId < 0) {\n tx.chainId = 0;\n }\n let recoveryParam = tx.v - 27;\n const raw = transaction.slice(0, 6);\n if (tx.chainId !== 0) {\n raw.push(hexlify(tx.chainId));\n raw.push(\"0x\");\n raw.push(\"0x\");\n recoveryParam -= tx.chainId * 2 + 8;\n }\n const digest = keccak256(RLP.encode(raw));\n try {\n tx.from = recoverAddress(digest, { r: hexlify(tx.r), s: hexlify(tx.s), recoveryParam: recoveryParam });\n }\n catch (error) { }\n tx.hash = keccak256(rawTransaction);\n }\n tx.type = null;\n return tx;\n}\nexport function parse(rawTransaction) {\n const payload = arrayify(rawTransaction);\n // Legacy and EIP-155 Transactions\n if (payload[0] > 0x7f) {\n return _parse(payload);\n }\n // Typed Transaction (EIP-2718)\n switch (payload[0]) {\n case 1:\n return _parseEip2930(payload);\n case 2:\n return _parseEip1559(payload);\n default:\n break;\n }\n return logger.throwError(`unsupported transaction type: ${payload[0]}`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"parseTransaction\",\n transactionType: payload[0]\n });\n}\n//# sourceMappingURL=index.js.map","export const version = \"contracts/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { checkResultErrors, Indexed, Interface } from \"@ethersproject/abi\";\nimport { Provider } from \"@ethersproject/abstract-provider\";\nimport { Signer, VoidSigner } from \"@ethersproject/abstract-signer\";\nimport { getAddress, getContractAddress } from \"@ethersproject/address\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexlify, isBytes, isHexString } from \"@ethersproject/bytes\";\nimport { defineReadOnly, deepCopy, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport { accessListify } from \"@ethersproject/transactions\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n;\n;\n///////////////////////////////\nconst allowedTransactionKeys = {\n chainId: true, data: true, from: true, gasLimit: true, gasPrice: true, nonce: true, to: true, value: true,\n type: true, accessList: true,\n maxFeePerGas: true, maxPriorityFeePerGas: true,\n customData: true,\n ccipReadEnabled: true\n};\nfunction resolveName(resolver, nameOrPromise) {\n return __awaiter(this, void 0, void 0, function* () {\n const name = yield nameOrPromise;\n if (typeof (name) !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", name);\n }\n // If it is already an address, just use it (after adding checksum)\n try {\n return getAddress(name);\n }\n catch (error) { }\n if (!resolver) {\n logger.throwError(\"a provider or signer is needed to resolve ENS names\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\"\n });\n }\n const address = yield resolver.resolveName(name);\n if (address == null) {\n logger.throwArgumentError(\"resolver or addr is not configured for ENS name\", \"name\", name);\n }\n return address;\n });\n}\n// Recursively replaces ENS names with promises to resolve the name and resolves all properties\nfunction resolveAddresses(resolver, value, paramType) {\n return __awaiter(this, void 0, void 0, function* () {\n if (Array.isArray(paramType)) {\n return yield Promise.all(paramType.map((paramType, index) => {\n return resolveAddresses(resolver, ((Array.isArray(value)) ? value[index] : value[paramType.name]), paramType);\n }));\n }\n if (paramType.type === \"address\") {\n return yield resolveName(resolver, value);\n }\n if (paramType.type === \"tuple\") {\n return yield resolveAddresses(resolver, value, paramType.components);\n }\n if (paramType.baseType === \"array\") {\n if (!Array.isArray(value)) {\n return Promise.reject(logger.makeError(\"invalid value for array\", Logger.errors.INVALID_ARGUMENT, {\n argument: \"value\",\n value\n }));\n }\n return yield Promise.all(value.map((v) => resolveAddresses(resolver, v, paramType.arrayChildren)));\n }\n return value;\n });\n}\nfunction populateTransaction(contract, fragment, args) {\n return __awaiter(this, void 0, void 0, function* () {\n // If an extra argument is given, it is overrides\n let overrides = {};\n if (args.length === fragment.inputs.length + 1 && typeof (args[args.length - 1]) === \"object\") {\n overrides = shallowCopy(args.pop());\n }\n // Make sure the parameter count matches\n logger.checkArgumentCount(args.length, fragment.inputs.length, \"passed to contract\");\n // Populate \"from\" override (allow promises)\n if (contract.signer) {\n if (overrides.from) {\n // Contracts with a Signer are from the Signer's frame-of-reference;\n // but we allow overriding \"from\" if it matches the signer\n overrides.from = resolveProperties({\n override: resolveName(contract.signer, overrides.from),\n signer: contract.signer.getAddress()\n }).then((check) => __awaiter(this, void 0, void 0, function* () {\n if (getAddress(check.signer) !== check.override) {\n logger.throwError(\"Contract with a Signer cannot override from\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.from\"\n });\n }\n return check.override;\n }));\n }\n else {\n overrides.from = contract.signer.getAddress();\n }\n }\n else if (overrides.from) {\n overrides.from = resolveName(contract.provider, overrides.from);\n //} else {\n // Contracts without a signer can override \"from\", and if\n // unspecified the zero address is used\n //overrides.from = AddressZero;\n }\n // Wait for all dependencies to be resolved (prefer the signer over the provider)\n const resolved = yield resolveProperties({\n args: resolveAddresses(contract.signer || contract.provider, args, fragment.inputs),\n address: contract.resolvedAddress,\n overrides: (resolveProperties(overrides) || {})\n });\n // The ABI coded transaction\n const data = contract.interface.encodeFunctionData(fragment, resolved.args);\n const tx = {\n data: data,\n to: resolved.address\n };\n // Resolved Overrides\n const ro = resolved.overrides;\n // Populate simple overrides\n if (ro.nonce != null) {\n tx.nonce = BigNumber.from(ro.nonce).toNumber();\n }\n if (ro.gasLimit != null) {\n tx.gasLimit = BigNumber.from(ro.gasLimit);\n }\n if (ro.gasPrice != null) {\n tx.gasPrice = BigNumber.from(ro.gasPrice);\n }\n if (ro.maxFeePerGas != null) {\n tx.maxFeePerGas = BigNumber.from(ro.maxFeePerGas);\n }\n if (ro.maxPriorityFeePerGas != null) {\n tx.maxPriorityFeePerGas = BigNumber.from(ro.maxPriorityFeePerGas);\n }\n if (ro.from != null) {\n tx.from = ro.from;\n }\n if (ro.type != null) {\n tx.type = ro.type;\n }\n if (ro.accessList != null) {\n tx.accessList = accessListify(ro.accessList);\n }\n // If there was no \"gasLimit\" override, but the ABI specifies a default, use it\n if (tx.gasLimit == null && fragment.gas != null) {\n // Compute the intrinsic gas cost for this transaction\n // @TODO: This is based on the yellow paper as of Petersburg; this is something\n // we may wish to parameterize in v6 as part of the Network object. Since this\n // is always a non-nil to address, we can ignore G_create, but may wish to add\n // similar logic to the ContractFactory.\n let intrinsic = 21000;\n const bytes = arrayify(data);\n for (let i = 0; i < bytes.length; i++) {\n intrinsic += 4;\n if (bytes[i]) {\n intrinsic += 64;\n }\n }\n tx.gasLimit = BigNumber.from(fragment.gas).add(intrinsic);\n }\n // Populate \"value\" override\n if (ro.value) {\n const roValue = BigNumber.from(ro.value);\n if (!roValue.isZero() && !fragment.payable) {\n logger.throwError(\"non-payable method cannot override value\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: overrides.value\n });\n }\n tx.value = roValue;\n }\n if (ro.customData) {\n tx.customData = shallowCopy(ro.customData);\n }\n if (ro.ccipReadEnabled) {\n tx.ccipReadEnabled = !!ro.ccipReadEnabled;\n }\n // Remove the overrides\n delete overrides.nonce;\n delete overrides.gasLimit;\n delete overrides.gasPrice;\n delete overrides.from;\n delete overrides.value;\n delete overrides.type;\n delete overrides.accessList;\n delete overrides.maxFeePerGas;\n delete overrides.maxPriorityFeePerGas;\n delete overrides.customData;\n delete overrides.ccipReadEnabled;\n // Make sure there are no stray overrides, which may indicate a\n // typo or using an unsupported key.\n const leftovers = Object.keys(overrides).filter((key) => (overrides[key] != null));\n if (leftovers.length) {\n logger.throwError(`cannot override ${leftovers.map((l) => JSON.stringify(l)).join(\",\")}`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides\",\n overrides: leftovers\n });\n }\n return tx;\n });\n}\nfunction buildPopulate(contract, fragment) {\n return function (...args) {\n return populateTransaction(contract, fragment, args);\n };\n}\nfunction buildEstimate(contract, fragment) {\n const signerOrProvider = (contract.signer || contract.provider);\n return function (...args) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!signerOrProvider) {\n logger.throwError(\"estimate require a provider or signer\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"estimateGas\"\n });\n }\n const tx = yield populateTransaction(contract, fragment, args);\n return yield signerOrProvider.estimateGas(tx);\n });\n };\n}\nfunction addContractWait(contract, tx) {\n const wait = tx.wait.bind(tx);\n tx.wait = (confirmations) => {\n return wait(confirmations).then((receipt) => {\n receipt.events = receipt.logs.map((log) => {\n let event = deepCopy(log);\n let parsed = null;\n try {\n parsed = contract.interface.parseLog(log);\n }\n catch (e) { }\n // Successfully parsed the event log; include it\n if (parsed) {\n event.args = parsed.args;\n event.decode = (data, topics) => {\n return contract.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n }\n // Useful operations\n event.removeListener = () => { return contract.provider; };\n event.getBlock = () => {\n return contract.provider.getBlock(receipt.blockHash);\n };\n event.getTransaction = () => {\n return contract.provider.getTransaction(receipt.transactionHash);\n };\n event.getTransactionReceipt = () => {\n return Promise.resolve(receipt);\n };\n return event;\n });\n return receipt;\n });\n };\n}\nfunction buildCall(contract, fragment, collapseSimple) {\n const signerOrProvider = (contract.signer || contract.provider);\n return function (...args) {\n return __awaiter(this, void 0, void 0, function* () {\n // Extract the \"blockTag\" override if present\n let blockTag = undefined;\n if (args.length === fragment.inputs.length + 1 && typeof (args[args.length - 1]) === \"object\") {\n const overrides = shallowCopy(args.pop());\n if (overrides.blockTag != null) {\n blockTag = yield overrides.blockTag;\n }\n delete overrides.blockTag;\n args.push(overrides);\n }\n // If the contract was just deployed, wait until it is mined\n if (contract.deployTransaction != null) {\n yield contract._deployed(blockTag);\n }\n // Call a node and get the result\n const tx = yield populateTransaction(contract, fragment, args);\n const result = yield signerOrProvider.call(tx, blockTag);\n try {\n let value = contract.interface.decodeFunctionResult(fragment, result);\n if (collapseSimple && fragment.outputs.length === 1) {\n value = value[0];\n }\n return value;\n }\n catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) {\n error.address = contract.address;\n error.args = args;\n error.transaction = tx;\n }\n throw error;\n }\n });\n };\n}\nfunction buildSend(contract, fragment) {\n return function (...args) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!contract.signer) {\n logger.throwError(\"sending a transaction requires a signer\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"sendTransaction\"\n });\n }\n // If the contract was just deployed, wait until it is mined\n if (contract.deployTransaction != null) {\n yield contract._deployed();\n }\n const txRequest = yield populateTransaction(contract, fragment, args);\n const tx = yield contract.signer.sendTransaction(txRequest);\n // Tweak the tx.wait so the receipt has extra properties\n addContractWait(contract, tx);\n return tx;\n });\n };\n}\nfunction buildDefault(contract, fragment, collapseSimple) {\n if (fragment.constant) {\n return buildCall(contract, fragment, collapseSimple);\n }\n return buildSend(contract, fragment);\n}\nfunction getEventTag(filter) {\n if (filter.address && (filter.topics == null || filter.topics.length === 0)) {\n return \"*\";\n }\n return (filter.address || \"*\") + \"@\" + (filter.topics ? filter.topics.map((topic) => {\n if (Array.isArray(topic)) {\n return topic.join(\"|\");\n }\n return topic;\n }).join(\":\") : \"\");\n}\nclass RunningEvent {\n constructor(tag, filter) {\n defineReadOnly(this, \"tag\", tag);\n defineReadOnly(this, \"filter\", filter);\n this._listeners = [];\n }\n addListener(listener, once) {\n this._listeners.push({ listener: listener, once: once });\n }\n removeListener(listener) {\n let done = false;\n this._listeners = this._listeners.filter((item) => {\n if (done || item.listener !== listener) {\n return true;\n }\n done = true;\n return false;\n });\n }\n removeAllListeners() {\n this._listeners = [];\n }\n listeners() {\n return this._listeners.map((i) => i.listener);\n }\n listenerCount() {\n return this._listeners.length;\n }\n run(args) {\n const listenerCount = this.listenerCount();\n this._listeners = this._listeners.filter((item) => {\n const argsCopy = args.slice();\n // Call the callback in the next event loop\n setTimeout(() => {\n item.listener.apply(this, argsCopy);\n }, 0);\n // Reschedule it if it not \"once\"\n return !(item.once);\n });\n return listenerCount;\n }\n prepareEvent(event) {\n }\n // Returns the array that will be applied to an emit\n getEmit(event) {\n return [event];\n }\n}\nclass ErrorRunningEvent extends RunningEvent {\n constructor() {\n super(\"error\", null);\n }\n}\n// @TODO Fragment should inherit Wildcard? and just override getEmit?\n// or have a common abstract super class, with enough constructor\n// options to configure both.\n// A Fragment Event will populate all the properties that Wildcard\n// will, and additionally dereference the arguments when emitting\nclass FragmentRunningEvent extends RunningEvent {\n constructor(address, contractInterface, fragment, topics) {\n const filter = {\n address: address\n };\n let topic = contractInterface.getEventTopic(fragment);\n if (topics) {\n if (topic !== topics[0]) {\n logger.throwArgumentError(\"topic mismatch\", \"topics\", topics);\n }\n filter.topics = topics.slice();\n }\n else {\n filter.topics = [topic];\n }\n super(getEventTag(filter), filter);\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"interface\", contractInterface);\n defineReadOnly(this, \"fragment\", fragment);\n }\n prepareEvent(event) {\n super.prepareEvent(event);\n event.event = this.fragment.name;\n event.eventSignature = this.fragment.format();\n event.decode = (data, topics) => {\n return this.interface.decodeEventLog(this.fragment, data, topics);\n };\n try {\n event.args = this.interface.decodeEventLog(this.fragment, event.data, event.topics);\n }\n catch (error) {\n event.args = null;\n event.decodeError = error;\n }\n }\n getEmit(event) {\n const errors = checkResultErrors(event.args);\n if (errors.length) {\n throw errors[0].error;\n }\n const args = (event.args || []).slice();\n args.push(event);\n return args;\n }\n}\n// A Wildcard Event will attempt to populate:\n// - event The name of the event name\n// - eventSignature The full signature of the event\n// - decode A function to decode data and topics\n// - args The decoded data and topics\nclass WildcardRunningEvent extends RunningEvent {\n constructor(address, contractInterface) {\n super(\"*\", { address: address });\n defineReadOnly(this, \"address\", address);\n defineReadOnly(this, \"interface\", contractInterface);\n }\n prepareEvent(event) {\n super.prepareEvent(event);\n try {\n const parsed = this.interface.parseLog(event);\n event.event = parsed.name;\n event.eventSignature = parsed.signature;\n event.decode = (data, topics) => {\n return this.interface.decodeEventLog(parsed.eventFragment, data, topics);\n };\n event.args = parsed.args;\n }\n catch (error) {\n // No matching event\n }\n }\n}\nexport class BaseContract {\n constructor(addressOrName, contractInterface, signerOrProvider) {\n // @TODO: Maybe still check the addressOrName looks like a valid address or name?\n //address = getAddress(address);\n defineReadOnly(this, \"interface\", getStatic(new.target, \"getInterface\")(contractInterface));\n if (signerOrProvider == null) {\n defineReadOnly(this, \"provider\", null);\n defineReadOnly(this, \"signer\", null);\n }\n else if (Signer.isSigner(signerOrProvider)) {\n defineReadOnly(this, \"provider\", signerOrProvider.provider || null);\n defineReadOnly(this, \"signer\", signerOrProvider);\n }\n else if (Provider.isProvider(signerOrProvider)) {\n defineReadOnly(this, \"provider\", signerOrProvider);\n defineReadOnly(this, \"signer\", null);\n }\n else {\n logger.throwArgumentError(\"invalid signer or provider\", \"signerOrProvider\", signerOrProvider);\n }\n defineReadOnly(this, \"callStatic\", {});\n defineReadOnly(this, \"estimateGas\", {});\n defineReadOnly(this, \"functions\", {});\n defineReadOnly(this, \"populateTransaction\", {});\n defineReadOnly(this, \"filters\", {});\n {\n const uniqueFilters = {};\n Object.keys(this.interface.events).forEach((eventSignature) => {\n const event = this.interface.events[eventSignature];\n defineReadOnly(this.filters, eventSignature, (...args) => {\n return {\n address: this.address,\n topics: this.interface.encodeFilterTopics(event, args)\n };\n });\n if (!uniqueFilters[event.name]) {\n uniqueFilters[event.name] = [];\n }\n uniqueFilters[event.name].push(eventSignature);\n });\n Object.keys(uniqueFilters).forEach((name) => {\n const filters = uniqueFilters[name];\n if (filters.length === 1) {\n defineReadOnly(this.filters, name, this.filters[filters[0]]);\n }\n else {\n logger.warn(`Duplicate definition of ${name} (${filters.join(\", \")})`);\n }\n });\n }\n defineReadOnly(this, \"_runningEvents\", {});\n defineReadOnly(this, \"_wrappedEmits\", {});\n if (addressOrName == null) {\n logger.throwArgumentError(\"invalid contract address or ENS name\", \"addressOrName\", addressOrName);\n }\n defineReadOnly(this, \"address\", addressOrName);\n if (this.provider) {\n defineReadOnly(this, \"resolvedAddress\", resolveName(this.provider, addressOrName));\n }\n else {\n try {\n defineReadOnly(this, \"resolvedAddress\", Promise.resolve(getAddress(addressOrName)));\n }\n catch (error) {\n // Without a provider, we cannot use ENS names\n logger.throwError(\"provider is required to use ENS name as contract address\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"new Contract\"\n });\n }\n }\n // Swallow bad ENS names to prevent Unhandled Exceptions\n this.resolvedAddress.catch((e) => { });\n const uniqueNames = {};\n const uniqueSignatures = {};\n Object.keys(this.interface.functions).forEach((signature) => {\n const fragment = this.interface.functions[signature];\n // Check that the signature is unique; if not the ABI generation has\n // not been cleaned or may be incorrectly generated\n if (uniqueSignatures[signature]) {\n logger.warn(`Duplicate ABI entry for ${JSON.stringify(signature)}`);\n return;\n }\n uniqueSignatures[signature] = true;\n // Track unique names; we only expose bare named functions if they\n // are ambiguous\n {\n const name = fragment.name;\n if (!uniqueNames[`%${name}`]) {\n uniqueNames[`%${name}`] = [];\n }\n uniqueNames[`%${name}`].push(signature);\n }\n if (this[signature] == null) {\n defineReadOnly(this, signature, buildDefault(this, fragment, true));\n }\n // We do not collapse simple calls on this bucket, which allows\n // frameworks to safely use this without introspection as well as\n // allows decoding error recovery.\n if (this.functions[signature] == null) {\n defineReadOnly(this.functions, signature, buildDefault(this, fragment, false));\n }\n if (this.callStatic[signature] == null) {\n defineReadOnly(this.callStatic, signature, buildCall(this, fragment, true));\n }\n if (this.populateTransaction[signature] == null) {\n defineReadOnly(this.populateTransaction, signature, buildPopulate(this, fragment));\n }\n if (this.estimateGas[signature] == null) {\n defineReadOnly(this.estimateGas, signature, buildEstimate(this, fragment));\n }\n });\n Object.keys(uniqueNames).forEach((name) => {\n // Ambiguous names to not get attached as bare names\n const signatures = uniqueNames[name];\n if (signatures.length > 1) {\n return;\n }\n // Strip off the leading \"%\" used for prototype protection\n name = name.substring(1);\n const signature = signatures[0];\n // If overwriting a member property that is null, swallow the error\n try {\n if (this[name] == null) {\n defineReadOnly(this, name, this[signature]);\n }\n }\n catch (e) { }\n if (this.functions[name] == null) {\n defineReadOnly(this.functions, name, this.functions[signature]);\n }\n if (this.callStatic[name] == null) {\n defineReadOnly(this.callStatic, name, this.callStatic[signature]);\n }\n if (this.populateTransaction[name] == null) {\n defineReadOnly(this.populateTransaction, name, this.populateTransaction[signature]);\n }\n if (this.estimateGas[name] == null) {\n defineReadOnly(this.estimateGas, name, this.estimateGas[signature]);\n }\n });\n }\n static getContractAddress(transaction) {\n return getContractAddress(transaction);\n }\n static getInterface(contractInterface) {\n if (Interface.isInterface(contractInterface)) {\n return contractInterface;\n }\n return new Interface(contractInterface);\n }\n // @TODO: Allow timeout?\n deployed() {\n return this._deployed();\n }\n _deployed(blockTag) {\n if (!this._deployedPromise) {\n // If we were just deployed, we know the transaction we should occur in\n if (this.deployTransaction) {\n this._deployedPromise = this.deployTransaction.wait().then(() => {\n return this;\n });\n }\n else {\n // @TODO: Once we allow a timeout to be passed in, we will wait\n // up to that many blocks for getCode\n // Otherwise, poll for our code to be deployed\n this._deployedPromise = this.provider.getCode(this.address, blockTag).then((code) => {\n if (code === \"0x\") {\n logger.throwError(\"contract not deployed\", Logger.errors.UNSUPPORTED_OPERATION, {\n contractAddress: this.address,\n operation: \"getDeployed\"\n });\n }\n return this;\n });\n }\n }\n return this._deployedPromise;\n }\n // @TODO:\n // estimateFallback(overrides?: TransactionRequest): Promise\n // @TODO:\n // estimateDeploy(bytecode: string, ...args): Promise\n fallback(overrides) {\n if (!this.signer) {\n logger.throwError(\"sending a transactions require a signer\", Logger.errors.UNSUPPORTED_OPERATION, { operation: \"sendTransaction(fallback)\" });\n }\n const tx = shallowCopy(overrides || {});\n [\"from\", \"to\"].forEach(function (key) {\n if (tx[key] == null) {\n return;\n }\n logger.throwError(\"cannot override \" + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key });\n });\n tx.to = this.resolvedAddress;\n return this.deployed().then(() => {\n return this.signer.sendTransaction(tx);\n });\n }\n // Reconnect to a different signer or provider\n connect(signerOrProvider) {\n if (typeof (signerOrProvider) === \"string\") {\n signerOrProvider = new VoidSigner(signerOrProvider, this.provider);\n }\n const contract = new (this.constructor)(this.address, this.interface, signerOrProvider);\n if (this.deployTransaction) {\n defineReadOnly(contract, \"deployTransaction\", this.deployTransaction);\n }\n return contract;\n }\n // Re-attach to a different on-chain instance of this contract\n attach(addressOrName) {\n return new (this.constructor)(addressOrName, this.interface, this.signer || this.provider);\n }\n static isIndexed(value) {\n return Indexed.isIndexed(value);\n }\n _normalizeRunningEvent(runningEvent) {\n // Already have an instance of this event running; we can re-use it\n if (this._runningEvents[runningEvent.tag]) {\n return this._runningEvents[runningEvent.tag];\n }\n return runningEvent;\n }\n _getRunningEvent(eventName) {\n if (typeof (eventName) === \"string\") {\n // Listen for \"error\" events (if your contract has an error event, include\n // the full signature to bypass this special event keyword)\n if (eventName === \"error\") {\n return this._normalizeRunningEvent(new ErrorRunningEvent());\n }\n // Listen for any event that is registered\n if (eventName === \"event\") {\n return this._normalizeRunningEvent(new RunningEvent(\"event\", null));\n }\n // Listen for any event\n if (eventName === \"*\") {\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n // Get the event Fragment (throws if ambiguous/unknown event)\n const fragment = this.interface.getEvent(eventName);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment));\n }\n // We have topics to filter by...\n if (eventName.topics && eventName.topics.length > 0) {\n // Is it a known topichash? (throws if no matching topichash)\n try {\n const topic = eventName.topics[0];\n if (typeof (topic) !== \"string\") {\n throw new Error(\"invalid topic\"); // @TODO: May happen for anonymous events\n }\n const fragment = this.interface.getEvent(topic);\n return this._normalizeRunningEvent(new FragmentRunningEvent(this.address, this.interface, fragment, eventName.topics));\n }\n catch (error) { }\n // Filter by the unknown topichash\n const filter = {\n address: this.address,\n topics: eventName.topics\n };\n return this._normalizeRunningEvent(new RunningEvent(getEventTag(filter), filter));\n }\n return this._normalizeRunningEvent(new WildcardRunningEvent(this.address, this.interface));\n }\n _checkRunningEvents(runningEvent) {\n if (runningEvent.listenerCount() === 0) {\n delete this._runningEvents[runningEvent.tag];\n // If we have a poller for this, remove it\n const emit = this._wrappedEmits[runningEvent.tag];\n if (emit && runningEvent.filter) {\n this.provider.off(runningEvent.filter, emit);\n delete this._wrappedEmits[runningEvent.tag];\n }\n }\n }\n // Subclasses can override this to gracefully recover\n // from parse errors if they wish\n _wrapEvent(runningEvent, log, listener) {\n const event = deepCopy(log);\n event.removeListener = () => {\n if (!listener) {\n return;\n }\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n };\n event.getBlock = () => { return this.provider.getBlock(log.blockHash); };\n event.getTransaction = () => { return this.provider.getTransaction(log.transactionHash); };\n event.getTransactionReceipt = () => { return this.provider.getTransactionReceipt(log.transactionHash); };\n // This may throw if the topics and data mismatch the signature\n runningEvent.prepareEvent(event);\n return event;\n }\n _addEventListener(runningEvent, listener, once) {\n if (!this.provider) {\n logger.throwError(\"events require a provider or a signer with a provider\", Logger.errors.UNSUPPORTED_OPERATION, { operation: \"once\" });\n }\n runningEvent.addListener(listener, once);\n // Track this running event and its listeners (may already be there; but no hard in updating)\n this._runningEvents[runningEvent.tag] = runningEvent;\n // If we are not polling the provider, start polling\n if (!this._wrappedEmits[runningEvent.tag]) {\n const wrappedEmit = (log) => {\n let event = this._wrapEvent(runningEvent, log, listener);\n // Try to emit the result for the parameterized event...\n if (event.decodeError == null) {\n try {\n const args = runningEvent.getEmit(event);\n this.emit(runningEvent.filter, ...args);\n }\n catch (error) {\n event.decodeError = error.error;\n }\n }\n // Always emit \"event\" for fragment-base events\n if (runningEvent.filter != null) {\n this.emit(\"event\", event);\n }\n // Emit \"error\" if there was an error\n if (event.decodeError != null) {\n this.emit(\"error\", event.decodeError, event);\n }\n };\n this._wrappedEmits[runningEvent.tag] = wrappedEmit;\n // Special events, like \"error\" do not have a filter\n if (runningEvent.filter != null) {\n this.provider.on(runningEvent.filter, wrappedEmit);\n }\n }\n }\n queryFilter(event, fromBlockOrBlockhash, toBlock) {\n const runningEvent = this._getRunningEvent(event);\n const filter = shallowCopy(runningEvent.filter);\n if (typeof (fromBlockOrBlockhash) === \"string\" && isHexString(fromBlockOrBlockhash, 32)) {\n if (toBlock != null) {\n logger.throwArgumentError(\"cannot specify toBlock with blockhash\", \"toBlock\", toBlock);\n }\n filter.blockHash = fromBlockOrBlockhash;\n }\n else {\n filter.fromBlock = ((fromBlockOrBlockhash != null) ? fromBlockOrBlockhash : 0);\n filter.toBlock = ((toBlock != null) ? toBlock : \"latest\");\n }\n return this.provider.getLogs(filter).then((logs) => {\n return logs.map((log) => this._wrapEvent(runningEvent, log, null));\n });\n }\n on(event, listener) {\n this._addEventListener(this._getRunningEvent(event), listener, false);\n return this;\n }\n once(event, listener) {\n this._addEventListener(this._getRunningEvent(event), listener, true);\n return this;\n }\n emit(eventName, ...args) {\n if (!this.provider) {\n return false;\n }\n const runningEvent = this._getRunningEvent(eventName);\n const result = (runningEvent.run(args) > 0);\n // May have drained all the \"once\" events; check for living events\n this._checkRunningEvents(runningEvent);\n return result;\n }\n listenerCount(eventName) {\n if (!this.provider) {\n return 0;\n }\n if (eventName == null) {\n return Object.keys(this._runningEvents).reduce((accum, key) => {\n return accum + this._runningEvents[key].listenerCount();\n }, 0);\n }\n return this._getRunningEvent(eventName).listenerCount();\n }\n listeners(eventName) {\n if (!this.provider) {\n return [];\n }\n if (eventName == null) {\n const result = [];\n for (let tag in this._runningEvents) {\n this._runningEvents[tag].listeners().forEach((listener) => {\n result.push(listener);\n });\n }\n return result;\n }\n return this._getRunningEvent(eventName).listeners();\n }\n removeAllListeners(eventName) {\n if (!this.provider) {\n return this;\n }\n if (eventName == null) {\n for (const tag in this._runningEvents) {\n const runningEvent = this._runningEvents[tag];\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n }\n return this;\n }\n // Delete any listeners\n const runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeAllListeners();\n this._checkRunningEvents(runningEvent);\n return this;\n }\n off(eventName, listener) {\n if (!this.provider) {\n return this;\n }\n const runningEvent = this._getRunningEvent(eventName);\n runningEvent.removeListener(listener);\n this._checkRunningEvents(runningEvent);\n return this;\n }\n removeListener(eventName, listener) {\n return this.off(eventName, listener);\n }\n}\nexport class Contract extends BaseContract {\n}\nexport class ContractFactory {\n constructor(contractInterface, bytecode, signer) {\n let bytecodeHex = null;\n if (typeof (bytecode) === \"string\") {\n bytecodeHex = bytecode;\n }\n else if (isBytes(bytecode)) {\n bytecodeHex = hexlify(bytecode);\n }\n else if (bytecode && typeof (bytecode.object) === \"string\") {\n // Allow the bytecode object from the Solidity compiler\n bytecodeHex = bytecode.object;\n }\n else {\n // Crash in the next verification step\n bytecodeHex = \"!\";\n }\n // Make sure it is 0x prefixed\n if (bytecodeHex.substring(0, 2) !== \"0x\") {\n bytecodeHex = \"0x\" + bytecodeHex;\n }\n // Make sure the final result is valid bytecode\n if (!isHexString(bytecodeHex) || (bytecodeHex.length % 2)) {\n logger.throwArgumentError(\"invalid bytecode\", \"bytecode\", bytecode);\n }\n // If we have a signer, make sure it is valid\n if (signer && !Signer.isSigner(signer)) {\n logger.throwArgumentError(\"invalid signer\", \"signer\", signer);\n }\n defineReadOnly(this, \"bytecode\", bytecodeHex);\n defineReadOnly(this, \"interface\", getStatic(new.target, \"getInterface\")(contractInterface));\n defineReadOnly(this, \"signer\", signer || null);\n }\n // @TODO: Future; rename to populateTransaction?\n getDeployTransaction(...args) {\n let tx = {};\n // If we have 1 additional argument, we allow transaction overrides\n if (args.length === this.interface.deploy.inputs.length + 1 && typeof (args[args.length - 1]) === \"object\") {\n tx = shallowCopy(args.pop());\n for (const key in tx) {\n if (!allowedTransactionKeys[key]) {\n throw new Error(\"unknown transaction override \" + key);\n }\n }\n }\n // Do not allow these to be overridden in a deployment transaction\n [\"data\", \"from\", \"to\"].forEach((key) => {\n if (tx[key] == null) {\n return;\n }\n logger.throwError(\"cannot override \" + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key });\n });\n if (tx.value) {\n const value = BigNumber.from(tx.value);\n if (!value.isZero() && !this.interface.deploy.payable) {\n logger.throwError(\"non-payable constructor cannot override value\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"overrides.value\",\n value: tx.value\n });\n }\n }\n // Make sure the call matches the constructor signature\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n // Set the data to the bytecode + the encoded constructor arguments\n tx.data = hexlify(concat([\n this.bytecode,\n this.interface.encodeDeploy(args)\n ]));\n return tx;\n }\n deploy(...args) {\n return __awaiter(this, void 0, void 0, function* () {\n let overrides = {};\n // If 1 extra parameter was passed in, it contains overrides\n if (args.length === this.interface.deploy.inputs.length + 1) {\n overrides = args.pop();\n }\n // Make sure the call matches the constructor signature\n logger.checkArgumentCount(args.length, this.interface.deploy.inputs.length, \" in Contract constructor\");\n // Resolve ENS names and promises in the arguments\n const params = yield resolveAddresses(this.signer, args, this.interface.deploy.inputs);\n params.push(overrides);\n // Get the deployment transaction (with optional overrides)\n const unsignedTx = this.getDeployTransaction(...params);\n // Send the deployment transaction\n const tx = yield this.signer.sendTransaction(unsignedTx);\n const address = getStatic(this.constructor, \"getContractAddress\")(tx);\n const contract = getStatic(this.constructor, \"getContract\")(address, this.interface, this.signer);\n // Add the modified wait that wraps events\n addContractWait(contract, tx);\n defineReadOnly(contract, \"deployTransaction\", tx);\n return contract;\n });\n }\n attach(address) {\n return (this.constructor).getContract(address, this.interface, this.signer);\n }\n connect(signer) {\n return new (this.constructor)(this.interface, this.bytecode, signer);\n }\n static fromSolidity(compilerOutput, signer) {\n if (compilerOutput == null) {\n logger.throwError(\"missing compiler output\", Logger.errors.MISSING_ARGUMENT, { argument: \"compilerOutput\" });\n }\n if (typeof (compilerOutput) === \"string\") {\n compilerOutput = JSON.parse(compilerOutput);\n }\n const abi = compilerOutput.abi;\n let bytecode = null;\n if (compilerOutput.bytecode) {\n bytecode = compilerOutput.bytecode;\n }\n else if (compilerOutput.evm && compilerOutput.evm.bytecode) {\n bytecode = compilerOutput.evm.bytecode;\n }\n return new this(abi, bytecode, signer);\n }\n static getInterface(contractInterface) {\n return Contract.getInterface(contractInterface);\n }\n static getContractAddress(tx) {\n return getContractAddress(tx);\n }\n static getContract(address, contractInterface, signer) {\n return new Contract(address, contractInterface, signer);\n }\n}\n//# sourceMappingURL=index.js.map","/**\n * var basex = require(\"base-x\");\n *\n * This implementation is heavily based on base-x. The main reason to\n * deviate was to prevent the dependency of Buffer.\n *\n * Contributors:\n *\n * base-x encoding\n * Forked from https://github.com/cryptocoinjs/bs58\n * Originally written by Mike Hearn for BitcoinJ\n * Copyright (c) 2011 Google Inc\n * Ported to JavaScript by Stefan Thomas\n * Merged Buffer refactorings from base58-native by Stephen Pair\n * Copyright (c) 2013 BitPay Inc\n *\n * The MIT License (MIT)\n *\n * Copyright base-x contributors (c) 2016\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n */\nimport { arrayify } from \"@ethersproject/bytes\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nexport class BaseX {\n constructor(alphabet) {\n defineReadOnly(this, \"alphabet\", alphabet);\n defineReadOnly(this, \"base\", alphabet.length);\n defineReadOnly(this, \"_alphabetMap\", {});\n defineReadOnly(this, \"_leader\", alphabet.charAt(0));\n // pre-compute lookup table\n for (let i = 0; i < alphabet.length; i++) {\n this._alphabetMap[alphabet.charAt(i)] = i;\n }\n }\n encode(value) {\n let source = arrayify(value);\n if (source.length === 0) {\n return \"\";\n }\n let digits = [0];\n for (let i = 0; i < source.length; ++i) {\n let carry = source[i];\n for (let j = 0; j < digits.length; ++j) {\n carry += digits[j] << 8;\n digits[j] = carry % this.base;\n carry = (carry / this.base) | 0;\n }\n while (carry > 0) {\n digits.push(carry % this.base);\n carry = (carry / this.base) | 0;\n }\n }\n let string = \"\";\n // deal with leading zeros\n for (let k = 0; source[k] === 0 && k < source.length - 1; ++k) {\n string += this._leader;\n }\n // convert digits to a string\n for (let q = digits.length - 1; q >= 0; --q) {\n string += this.alphabet[digits[q]];\n }\n return string;\n }\n decode(value) {\n if (typeof (value) !== \"string\") {\n throw new TypeError(\"Expected String\");\n }\n let bytes = [];\n if (value.length === 0) {\n return new Uint8Array(bytes);\n }\n bytes.push(0);\n for (let i = 0; i < value.length; i++) {\n let byte = this._alphabetMap[value[i]];\n if (byte === undefined) {\n throw new Error(\"Non-base\" + this.base + \" character\");\n }\n let carry = byte;\n for (let j = 0; j < bytes.length; ++j) {\n carry += bytes[j] * this.base;\n bytes[j] = carry & 0xff;\n carry >>= 8;\n }\n while (carry > 0) {\n bytes.push(carry & 0xff);\n carry >>= 8;\n }\n }\n // deal with leading zeros\n for (let k = 0; value[k] === this._leader && k < value.length - 1; ++k) {\n bytes.push(0);\n }\n return arrayify(new Uint8Array(bytes.reverse()));\n }\n}\nconst Base32 = new BaseX(\"abcdefghijklmnopqrstuvwxyz234567\");\nconst Base58 = new BaseX(\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\");\nexport { Base32, Base58 };\n//console.log(Base58.decode(\"Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj\"))\n//console.log(Base58.encode(Base58.decode(\"Qmd2V777o5XvJbYMeMb8k2nU5f8d3ciUQ5YpYuWhzv8iDj\")))\n//# sourceMappingURL=index.js.map","export var SupportedAlgorithm;\n(function (SupportedAlgorithm) {\n SupportedAlgorithm[\"sha256\"] = \"sha256\";\n SupportedAlgorithm[\"sha512\"] = \"sha512\";\n})(SupportedAlgorithm || (SupportedAlgorithm = {}));\n;\n//# sourceMappingURL=types.js.map","export const version = \"sha2/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport hash from \"hash.js\";\n//const _ripemd160 = _hash.ripemd160;\nimport { arrayify } from \"@ethersproject/bytes\";\nimport { SupportedAlgorithm } from \"./types\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nexport function ripemd160(data) {\n return \"0x\" + (hash.ripemd160().update(arrayify(data)).digest(\"hex\"));\n}\nexport function sha256(data) {\n return \"0x\" + (hash.sha256().update(arrayify(data)).digest(\"hex\"));\n}\nexport function sha512(data) {\n return \"0x\" + (hash.sha512().update(arrayify(data)).digest(\"hex\"));\n}\nexport function computeHmac(algorithm, key, data) {\n if (!SupportedAlgorithm[algorithm]) {\n logger.throwError(\"unsupported algorithm \" + algorithm, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"hmac\",\n algorithm: algorithm\n });\n }\n return \"0x\" + hash.hmac(hash[algorithm], arrayify(key)).update(arrayify(data)).digest(\"hex\");\n}\n//# sourceMappingURL=sha2.js.map","\"use strict\";\nimport { arrayify, hexlify } from \"@ethersproject/bytes\";\nimport { computeHmac } from \"@ethersproject/sha2\";\nexport function pbkdf2(password, salt, iterations, keylen, hashAlgorithm) {\n password = arrayify(password);\n salt = arrayify(salt);\n let hLen;\n let l = 1;\n const DK = new Uint8Array(keylen);\n const block1 = new Uint8Array(salt.length + 4);\n block1.set(salt);\n //salt.copy(block1, 0, 0, salt.length)\n let r;\n let T;\n for (let i = 1; i <= l; i++) {\n //block1.writeUInt32BE(i, salt.length)\n block1[salt.length] = (i >> 24) & 0xff;\n block1[salt.length + 1] = (i >> 16) & 0xff;\n block1[salt.length + 2] = (i >> 8) & 0xff;\n block1[salt.length + 3] = i & 0xff;\n //let U = createHmac(password).update(block1).digest();\n let U = arrayify(computeHmac(hashAlgorithm, password, block1));\n if (!hLen) {\n hLen = U.length;\n T = new Uint8Array(hLen);\n l = Math.ceil(keylen / hLen);\n r = keylen - (l - 1) * hLen;\n }\n //U.copy(T, 0, 0, hLen)\n T.set(U);\n for (let j = 1; j < iterations; j++) {\n //U = createHmac(password).update(U).digest();\n U = arrayify(computeHmac(hashAlgorithm, password, U));\n for (let k = 0; k < hLen; k++)\n T[k] ^= U[k];\n }\n const destPos = (i - 1) * hLen;\n const len = (i === l ? r : hLen);\n //T.copy(DK, destPos, 0, len)\n DK.set(arrayify(T).slice(0, len), destPos);\n }\n return hexlify(DK);\n}\n//# sourceMappingURL=pbkdf2.js.map","export const version = \"wordlists/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\n// This gets overridden by rollup\nconst exportWordlist = false;\nimport { id } from \"@ethersproject/hash\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nexport const logger = new Logger(version);\nexport class Wordlist {\n constructor(locale) {\n logger.checkAbstract(new.target, Wordlist);\n defineReadOnly(this, \"locale\", locale);\n }\n // Subclasses may override this\n split(mnemonic) {\n return mnemonic.toLowerCase().split(/ +/g);\n }\n // Subclasses may override this\n join(words) {\n return words.join(\" \");\n }\n static check(wordlist) {\n const words = [];\n for (let i = 0; i < 2048; i++) {\n const word = wordlist.getWord(i);\n /* istanbul ignore if */\n if (i !== wordlist.getWordIndex(word)) {\n return \"0x\";\n }\n words.push(word);\n }\n return id(words.join(\"\\n\") + \"\\n\");\n }\n static register(lang, name) {\n if (!name) {\n name = lang.locale;\n }\n /* istanbul ignore if */\n if (exportWordlist) {\n try {\n const anyGlobal = window;\n if (anyGlobal._ethers && anyGlobal._ethers.wordlists) {\n if (!anyGlobal._ethers.wordlists[name]) {\n defineReadOnly(anyGlobal._ethers.wordlists, name, lang);\n }\n }\n }\n catch (error) { }\n }\n }\n}\n//# sourceMappingURL=wordlist.js.map","\"use strict\";\nimport { Wordlist } from \"./wordlist\";\nconst words = \"AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo\";\nlet wordlist = null;\nfunction loadWords(lang) {\n if (wordlist != null) {\n return;\n }\n wordlist = words.replace(/([A-Z])/g, \" $1\").toLowerCase().substring(1).split(\" \");\n // Verify the computed list matches the official list\n /* istanbul ignore if */\n if (Wordlist.check(lang) !== \"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60\") {\n wordlist = null;\n throw new Error(\"BIP39 Wordlist for en (English) FAILED\");\n }\n}\nclass LangEn extends Wordlist {\n constructor() {\n super(\"en\");\n }\n getWord(index) {\n loadWords(this);\n return wordlist[index];\n }\n getWordIndex(word) {\n loadWords(this);\n return wordlist.indexOf(word);\n }\n}\nconst langEn = new LangEn();\nWordlist.register(langEn);\nexport { langEn };\n//# sourceMappingURL=lang-en.js.map","\"use strict\";\nimport { langEn as en } from \"./lang-en\";\nexport const wordlists = {\n en: en\n};\n//# sourceMappingURL=wordlists.js.map","export const version = \"hdnode/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { Base58 } from \"@ethersproject/basex\";\nimport { arrayify, concat, hexDataSlice, hexZeroPad, hexlify } from \"@ethersproject/bytes\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { toUtf8Bytes, UnicodeNormalizationForm } from \"@ethersproject/strings\";\nimport { pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { defineReadOnly } from \"@ethersproject/properties\";\nimport { SigningKey } from \"@ethersproject/signing-key\";\nimport { computeHmac, ripemd160, sha256, SupportedAlgorithm } from \"@ethersproject/sha2\";\nimport { computeAddress } from \"@ethersproject/transactions\";\nimport { wordlists } from \"@ethersproject/wordlists\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nconst N = BigNumber.from(\"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141\");\n// \"Bitcoin seed\"\nconst MasterSecret = toUtf8Bytes(\"Bitcoin seed\");\nconst HardenedBit = 0x80000000;\n// Returns a byte with the MSB bits set\nfunction getUpperMask(bits) {\n return ((1 << bits) - 1) << (8 - bits);\n}\n// Returns a byte with the LSB bits set\nfunction getLowerMask(bits) {\n return (1 << bits) - 1;\n}\nfunction bytes32(value) {\n return hexZeroPad(hexlify(value), 32);\n}\nfunction base58check(data) {\n return Base58.encode(concat([data, hexDataSlice(sha256(sha256(data)), 0, 4)]));\n}\nfunction getWordlist(wordlist) {\n if (wordlist == null) {\n return wordlists[\"en\"];\n }\n if (typeof (wordlist) === \"string\") {\n const words = wordlists[wordlist];\n if (words == null) {\n logger.throwArgumentError(\"unknown locale\", \"wordlist\", wordlist);\n }\n return words;\n }\n return wordlist;\n}\nconst _constructorGuard = {};\nexport const defaultPath = \"m/44'/60'/0'/0/0\";\n;\nexport class HDNode {\n /**\n * This constructor should not be called directly.\n *\n * Please use:\n * - fromMnemonic\n * - fromSeed\n */\n constructor(constructorGuard, privateKey, publicKey, parentFingerprint, chainCode, index, depth, mnemonicOrPath) {\n /* istanbul ignore if */\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"HDNode constructor cannot be called directly\");\n }\n if (privateKey) {\n const signingKey = new SigningKey(privateKey);\n defineReadOnly(this, \"privateKey\", signingKey.privateKey);\n defineReadOnly(this, \"publicKey\", signingKey.compressedPublicKey);\n }\n else {\n defineReadOnly(this, \"privateKey\", null);\n defineReadOnly(this, \"publicKey\", hexlify(publicKey));\n }\n defineReadOnly(this, \"parentFingerprint\", parentFingerprint);\n defineReadOnly(this, \"fingerprint\", hexDataSlice(ripemd160(sha256(this.publicKey)), 0, 4));\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n defineReadOnly(this, \"chainCode\", chainCode);\n defineReadOnly(this, \"index\", index);\n defineReadOnly(this, \"depth\", depth);\n if (mnemonicOrPath == null) {\n // From a source that does not preserve the path (e.g. extended keys)\n defineReadOnly(this, \"mnemonic\", null);\n defineReadOnly(this, \"path\", null);\n }\n else if (typeof (mnemonicOrPath) === \"string\") {\n // From a source that does not preserve the mnemonic (e.g. neutered)\n defineReadOnly(this, \"mnemonic\", null);\n defineReadOnly(this, \"path\", mnemonicOrPath);\n }\n else {\n // From a fully qualified source\n defineReadOnly(this, \"mnemonic\", mnemonicOrPath);\n defineReadOnly(this, \"path\", mnemonicOrPath.path);\n }\n }\n get extendedKey() {\n // We only support the mainnet values for now, but if anyone needs\n // testnet values, let me know. I believe current sentiment is that\n // we should always use mainnet, and use BIP-44 to derive the network\n // - Mainnet: public=0x0488B21E, private=0x0488ADE4\n // - Testnet: public=0x043587CF, private=0x04358394\n if (this.depth >= 256) {\n throw new Error(\"Depth too large!\");\n }\n return base58check(concat([\n ((this.privateKey != null) ? \"0x0488ADE4\" : \"0x0488B21E\"),\n hexlify(this.depth),\n this.parentFingerprint,\n hexZeroPad(hexlify(this.index), 4),\n this.chainCode,\n ((this.privateKey != null) ? concat([\"0x00\", this.privateKey]) : this.publicKey),\n ]));\n }\n neuter() {\n return new HDNode(_constructorGuard, null, this.publicKey, this.parentFingerprint, this.chainCode, this.index, this.depth, this.path);\n }\n _derive(index) {\n if (index > 0xffffffff) {\n throw new Error(\"invalid index - \" + String(index));\n }\n // Base path\n let path = this.path;\n if (path) {\n path += \"/\" + (index & ~HardenedBit);\n }\n const data = new Uint8Array(37);\n if (index & HardenedBit) {\n if (!this.privateKey) {\n throw new Error(\"cannot derive child of neutered node\");\n }\n // Data = 0x00 || ser_256(k_par)\n data.set(arrayify(this.privateKey), 1);\n // Hardened path\n if (path) {\n path += \"'\";\n }\n }\n else {\n // Data = ser_p(point(k_par))\n data.set(arrayify(this.publicKey));\n }\n // Data += ser_32(i)\n for (let i = 24; i >= 0; i -= 8) {\n data[33 + (i >> 3)] = ((index >> (24 - i)) & 0xff);\n }\n const I = arrayify(computeHmac(SupportedAlgorithm.sha512, this.chainCode, data));\n const IL = I.slice(0, 32);\n const IR = I.slice(32);\n // The private key\n let ki = null;\n // The public key\n let Ki = null;\n if (this.privateKey) {\n ki = bytes32(BigNumber.from(IL).add(this.privateKey).mod(N));\n }\n else {\n const ek = new SigningKey(hexlify(IL));\n Ki = ek._addPoint(this.publicKey);\n }\n let mnemonicOrPath = path;\n const srcMnemonic = this.mnemonic;\n if (srcMnemonic) {\n mnemonicOrPath = Object.freeze({\n phrase: srcMnemonic.phrase,\n path: path,\n locale: (srcMnemonic.locale || \"en\")\n });\n }\n return new HDNode(_constructorGuard, ki, Ki, this.fingerprint, bytes32(IR), index, this.depth + 1, mnemonicOrPath);\n }\n derivePath(path) {\n const components = path.split(\"/\");\n if (components.length === 0 || (components[0] === \"m\" && this.depth !== 0)) {\n throw new Error(\"invalid path - \" + path);\n }\n if (components[0] === \"m\") {\n components.shift();\n }\n let result = this;\n for (let i = 0; i < components.length; i++) {\n const component = components[i];\n if (component.match(/^[0-9]+'$/)) {\n const index = parseInt(component.substring(0, component.length - 1));\n if (index >= HardenedBit) {\n throw new Error(\"invalid path index - \" + component);\n }\n result = result._derive(HardenedBit + index);\n }\n else if (component.match(/^[0-9]+$/)) {\n const index = parseInt(component);\n if (index >= HardenedBit) {\n throw new Error(\"invalid path index - \" + component);\n }\n result = result._derive(index);\n }\n else {\n throw new Error(\"invalid path component - \" + component);\n }\n }\n return result;\n }\n static _fromSeed(seed, mnemonic) {\n const seedArray = arrayify(seed);\n if (seedArray.length < 16 || seedArray.length > 64) {\n throw new Error(\"invalid seed\");\n }\n const I = arrayify(computeHmac(SupportedAlgorithm.sha512, MasterSecret, seedArray));\n return new HDNode(_constructorGuard, bytes32(I.slice(0, 32)), null, \"0x00000000\", bytes32(I.slice(32)), 0, 0, mnemonic);\n }\n static fromMnemonic(mnemonic, password, wordlist) {\n // If a locale name was passed in, find the associated wordlist\n wordlist = getWordlist(wordlist);\n // Normalize the case and spacing in the mnemonic (throws if the mnemonic is invalid)\n mnemonic = entropyToMnemonic(mnemonicToEntropy(mnemonic, wordlist), wordlist);\n return HDNode._fromSeed(mnemonicToSeed(mnemonic, password), {\n phrase: mnemonic,\n path: \"m\",\n locale: wordlist.locale\n });\n }\n static fromSeed(seed) {\n return HDNode._fromSeed(seed, null);\n }\n static fromExtendedKey(extendedKey) {\n const bytes = Base58.decode(extendedKey);\n if (bytes.length !== 82 || base58check(bytes.slice(0, 78)) !== extendedKey) {\n logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n const depth = bytes[4];\n const parentFingerprint = hexlify(bytes.slice(5, 9));\n const index = parseInt(hexlify(bytes.slice(9, 13)).substring(2), 16);\n const chainCode = hexlify(bytes.slice(13, 45));\n const key = bytes.slice(45, 78);\n switch (hexlify(bytes.slice(0, 4))) {\n // Public Key\n case \"0x0488b21e\":\n case \"0x043587cf\":\n return new HDNode(_constructorGuard, null, hexlify(key), parentFingerprint, chainCode, index, depth, null);\n // Private Key\n case \"0x0488ade4\":\n case \"0x04358394 \":\n if (key[0] !== 0) {\n break;\n }\n return new HDNode(_constructorGuard, hexlify(key.slice(1)), null, parentFingerprint, chainCode, index, depth, null);\n }\n return logger.throwArgumentError(\"invalid extended key\", \"extendedKey\", \"[REDACTED]\");\n }\n}\nexport function mnemonicToSeed(mnemonic, password) {\n if (!password) {\n password = \"\";\n }\n const salt = toUtf8Bytes(\"mnemonic\" + password, UnicodeNormalizationForm.NFKD);\n return pbkdf2(toUtf8Bytes(mnemonic, UnicodeNormalizationForm.NFKD), salt, 2048, 64, \"sha512\");\n}\nexport function mnemonicToEntropy(mnemonic, wordlist) {\n wordlist = getWordlist(wordlist);\n logger.checkNormalize();\n const words = wordlist.split(mnemonic);\n if ((words.length % 3) !== 0) {\n throw new Error(\"invalid mnemonic\");\n }\n const entropy = arrayify(new Uint8Array(Math.ceil(11 * words.length / 8)));\n let offset = 0;\n for (let i = 0; i < words.length; i++) {\n let index = wordlist.getWordIndex(words[i].normalize(\"NFKD\"));\n if (index === -1) {\n throw new Error(\"invalid mnemonic\");\n }\n for (let bit = 0; bit < 11; bit++) {\n if (index & (1 << (10 - bit))) {\n entropy[offset >> 3] |= (1 << (7 - (offset % 8)));\n }\n offset++;\n }\n }\n const entropyBits = 32 * words.length / 3;\n const checksumBits = words.length / 3;\n const checksumMask = getUpperMask(checksumBits);\n const checksum = arrayify(sha256(entropy.slice(0, entropyBits / 8)))[0] & checksumMask;\n if (checksum !== (entropy[entropy.length - 1] & checksumMask)) {\n throw new Error(\"invalid checksum\");\n }\n return hexlify(entropy.slice(0, entropyBits / 8));\n}\nexport function entropyToMnemonic(entropy, wordlist) {\n wordlist = getWordlist(wordlist);\n entropy = arrayify(entropy);\n if ((entropy.length % 4) !== 0 || entropy.length < 16 || entropy.length > 32) {\n throw new Error(\"invalid entropy\");\n }\n const indices = [0];\n let remainingBits = 11;\n for (let i = 0; i < entropy.length; i++) {\n // Consume the whole byte (with still more to go)\n if (remainingBits > 8) {\n indices[indices.length - 1] <<= 8;\n indices[indices.length - 1] |= entropy[i];\n remainingBits -= 8;\n // This byte will complete an 11-bit index\n }\n else {\n indices[indices.length - 1] <<= remainingBits;\n indices[indices.length - 1] |= entropy[i] >> (8 - remainingBits);\n // Start the next word\n indices.push(entropy[i] & getLowerMask(8 - remainingBits));\n remainingBits += 3;\n }\n }\n // Compute the checksum bits\n const checksumBits = entropy.length / 4;\n const checksum = arrayify(sha256(entropy))[0] & getUpperMask(checksumBits);\n // Shift the checksum into the word indices\n indices[indices.length - 1] <<= checksumBits;\n indices[indices.length - 1] |= (checksum >> (8 - checksumBits));\n return wordlist.join(indices.map((index) => wordlist.getWord(index)));\n}\nexport function isValidMnemonic(mnemonic, wordlist) {\n try {\n mnemonicToEntropy(mnemonic, wordlist);\n return true;\n }\n catch (error) { }\n return false;\n}\nexport function getAccountPath(index) {\n if (typeof (index) !== \"number\" || index < 0 || index >= HardenedBit || index % 1) {\n logger.throwArgumentError(\"invalid account index\", \"index\", index);\n }\n return `m/44'/60'/${index}'/0/0`;\n}\n//# sourceMappingURL=index.js.map","export const version = \"random/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { arrayify } from \"@ethersproject/bytes\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n// Debugging line for testing browser lib in node\n//const window = { crypto: { getRandomValues: () => { } } };\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis\nfunction getGlobal() {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('unable to locate global object');\n}\n;\nconst anyGlobal = getGlobal();\nlet crypto = anyGlobal.crypto || anyGlobal.msCrypto;\nif (!crypto || !crypto.getRandomValues) {\n logger.warn(\"WARNING: Missing strong random number source\");\n crypto = {\n getRandomValues: function (buffer) {\n return logger.throwError(\"no secure random source avaialble\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"crypto.getRandomValues\"\n });\n }\n };\n}\nexport function randomBytes(length) {\n if (length <= 0 || length > 1024 || (length % 1) || length != length) {\n logger.throwArgumentError(\"invalid length\", \"length\", length);\n }\n const result = new Uint8Array(length);\n crypto.getRandomValues(result);\n return arrayify(result);\n}\n;\n//# sourceMappingURL=random.js.map","\"use strict\";\nexport function shuffled(array) {\n array = array.slice();\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const tmp = array[i];\n array[i] = array[j];\n array[j] = tmp;\n }\n return array;\n}\n//# sourceMappingURL=shuffle.js.map","\"use strict\";\n\n(function(root) {\n\n function checkInt(value) {\n return (parseInt(value) === value);\n }\n\n function checkInts(arrayish) {\n if (!checkInt(arrayish.length)) { return false; }\n\n for (var i = 0; i < arrayish.length; i++) {\n if (!checkInt(arrayish[i]) || arrayish[i] < 0 || arrayish[i] > 255) {\n return false;\n }\n }\n\n return true;\n }\n\n function coerceArray(arg, copy) {\n\n // ArrayBuffer view\n if (arg.buffer && ArrayBuffer.isView(arg) && arg.name === 'Uint8Array') {\n\n if (copy) {\n if (arg.slice) {\n arg = arg.slice();\n } else {\n arg = Array.prototype.slice.call(arg);\n }\n }\n\n return arg;\n }\n\n // It's an array; check it is a valid representation of a byte\n if (Array.isArray(arg)) {\n if (!checkInts(arg)) {\n throw new Error('Array contains invalid value: ' + arg);\n }\n\n return new Uint8Array(arg);\n }\n\n // Something else, but behaves like an array (maybe a Buffer? Arguments?)\n if (checkInt(arg.length) && checkInts(arg)) {\n return new Uint8Array(arg);\n }\n\n throw new Error('unsupported array-like object');\n }\n\n function createArray(length) {\n return new Uint8Array(length);\n }\n\n function copyArray(sourceArray, targetArray, targetStart, sourceStart, sourceEnd) {\n if (sourceStart != null || sourceEnd != null) {\n if (sourceArray.slice) {\n sourceArray = sourceArray.slice(sourceStart, sourceEnd);\n } else {\n sourceArray = Array.prototype.slice.call(sourceArray, sourceStart, sourceEnd);\n }\n }\n targetArray.set(sourceArray, targetStart);\n }\n\n\n\n var convertUtf8 = (function() {\n function toBytes(text) {\n var result = [], i = 0;\n text = encodeURI(text);\n while (i < text.length) {\n var c = text.charCodeAt(i++);\n\n // if it is a % sign, encode the following 2 bytes as a hex value\n if (c === 37) {\n result.push(parseInt(text.substr(i, 2), 16))\n i += 2;\n\n // otherwise, just the actual byte\n } else {\n result.push(c)\n }\n }\n\n return coerceArray(result);\n }\n\n function fromBytes(bytes) {\n var result = [], i = 0;\n\n while (i < bytes.length) {\n var c = bytes[i];\n\n if (c < 128) {\n result.push(String.fromCharCode(c));\n i++;\n } else if (c > 191 && c < 224) {\n result.push(String.fromCharCode(((c & 0x1f) << 6) | (bytes[i + 1] & 0x3f)));\n i += 2;\n } else {\n result.push(String.fromCharCode(((c & 0x0f) << 12) | ((bytes[i + 1] & 0x3f) << 6) | (bytes[i + 2] & 0x3f)));\n i += 3;\n }\n }\n\n return result.join('');\n }\n\n return {\n toBytes: toBytes,\n fromBytes: fromBytes,\n }\n })();\n\n var convertHex = (function() {\n function toBytes(text) {\n var result = [];\n for (var i = 0; i < text.length; i += 2) {\n result.push(parseInt(text.substr(i, 2), 16));\n }\n\n return result;\n }\n\n // http://ixti.net/development/javascript/2011/11/11/base64-encodedecode-of-utf8-in-browser-with-js.html\n var Hex = '0123456789abcdef';\n\n function fromBytes(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i++) {\n var v = bytes[i];\n result.push(Hex[(v & 0xf0) >> 4] + Hex[v & 0x0f]);\n }\n return result.join('');\n }\n\n return {\n toBytes: toBytes,\n fromBytes: fromBytes,\n }\n })();\n\n\n // Number of rounds by keysize\n var numberOfRounds = {16: 10, 24: 12, 32: 14}\n\n // Round constant words\n var rcon = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91];\n\n // S-box and Inverse S-box (S is for Substitution)\n var S = [0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf,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xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d];\n\n // Transformations for encryption\n var T1 = [0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a];\n var T2 = [0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616];\n var T3 = [0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16];\n var T4 = [0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c];\n\n // Transformations for decryption\n var T5 = [0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742];\n var T6 = [0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857];\n var T7 = [0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8];\n var T8 = [0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0];\n\n // Transformations for decryption key expansion\n var U1 = [0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3];\n var U2 = [0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697];\n var U3 = [0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46];\n var U4 = [0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d];\n\n function convertToInt32(bytes) {\n var result = [];\n for (var i = 0; i < bytes.length; i += 4) {\n result.push(\n (bytes[i ] << 24) |\n (bytes[i + 1] << 16) |\n (bytes[i + 2] << 8) |\n bytes[i + 3]\n );\n }\n return result;\n }\n\n var AES = function(key) {\n if (!(this instanceof AES)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n Object.defineProperty(this, 'key', {\n value: coerceArray(key, true)\n });\n\n this._prepare();\n }\n\n\n AES.prototype._prepare = function() {\n\n var rounds = numberOfRounds[this.key.length];\n if (rounds == null) {\n throw new Error('invalid key size (must be 16, 24 or 32 bytes)');\n }\n\n // encryption round keys\n this._Ke = [];\n\n // decryption round keys\n this._Kd = [];\n\n for (var i = 0; i <= rounds; i++) {\n this._Ke.push([0, 0, 0, 0]);\n this._Kd.push([0, 0, 0, 0]);\n }\n\n var roundKeyCount = (rounds + 1) * 4;\n var KC = this.key.length / 4;\n\n // convert the key into ints\n var tk = convertToInt32(this.key);\n\n // copy values into round key arrays\n var index;\n for (var i = 0; i < KC; i++) {\n index = i >> 2;\n this._Ke[index][i % 4] = tk[i];\n this._Kd[rounds - index][i % 4] = tk[i];\n }\n\n // key expansion (fips-197 section 5.2)\n var rconpointer = 0;\n var t = KC, tt;\n while (t < roundKeyCount) {\n tt = tk[KC - 1];\n tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^\n (S[(tt >> 8) & 0xFF] << 16) ^\n (S[ tt & 0xFF] << 8) ^\n S[(tt >> 24) & 0xFF] ^\n (rcon[rconpointer] << 24));\n rconpointer += 1;\n\n // key expansion (for non-256 bit)\n if (KC != 8) {\n for (var i = 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n\n // key expansion for 256-bit keys is \"slightly different\" (fips-197)\n } else {\n for (var i = 1; i < (KC / 2); i++) {\n tk[i] ^= tk[i - 1];\n }\n tt = tk[(KC / 2) - 1];\n\n tk[KC / 2] ^= (S[ tt & 0xFF] ^\n (S[(tt >> 8) & 0xFF] << 8) ^\n (S[(tt >> 16) & 0xFF] << 16) ^\n (S[(tt >> 24) & 0xFF] << 24));\n\n for (var i = (KC / 2) + 1; i < KC; i++) {\n tk[i] ^= tk[i - 1];\n }\n }\n\n // copy values into round key arrays\n var i = 0, r, c;\n while (i < KC && t < roundKeyCount) {\n r = t >> 2;\n c = t % 4;\n this._Ke[r][c] = tk[i];\n this._Kd[rounds - r][c] = tk[i++];\n t++;\n }\n }\n\n // inverse-cipher-ify the decryption round key (fips-197 section 5.3)\n for (var r = 1; r < rounds; r++) {\n for (var c = 0; c < 4; c++) {\n tt = this._Kd[r][c];\n this._Kd[r][c] = (U1[(tt >> 24) & 0xFF] ^\n U2[(tt >> 16) & 0xFF] ^\n U3[(tt >> 8) & 0xFF] ^\n U4[ tt & 0xFF]);\n }\n }\n }\n\n AES.prototype.encrypt = function(plaintext) {\n if (plaintext.length != 16) {\n throw new Error('invalid plaintext size (must be 16 bytes)');\n }\n\n var rounds = this._Ke.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(plaintext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Ke[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = (T1[(t[ i ] >> 24) & 0xff] ^\n T2[(t[(i + 1) % 4] >> 16) & 0xff] ^\n T3[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T4[ t[(i + 3) % 4] & 0xff] ^\n this._Ke[r][i]);\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16), tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Ke[rounds][i];\n result[4 * i ] = (S[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (S[(t[(i + 1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (S[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (S[ t[(i + 3) % 4] & 0xff] ^ tt ) & 0xff;\n }\n\n return result;\n }\n\n AES.prototype.decrypt = function(ciphertext) {\n if (ciphertext.length != 16) {\n throw new Error('invalid ciphertext size (must be 16 bytes)');\n }\n\n var rounds = this._Kd.length - 1;\n var a = [0, 0, 0, 0];\n\n // convert plaintext to (ints ^ key)\n var t = convertToInt32(ciphertext);\n for (var i = 0; i < 4; i++) {\n t[i] ^= this._Kd[0][i];\n }\n\n // apply round transforms\n for (var r = 1; r < rounds; r++) {\n for (var i = 0; i < 4; i++) {\n a[i] = (T5[(t[ i ] >> 24) & 0xff] ^\n T6[(t[(i + 3) % 4] >> 16) & 0xff] ^\n T7[(t[(i + 2) % 4] >> 8) & 0xff] ^\n T8[ t[(i + 1) % 4] & 0xff] ^\n this._Kd[r][i]);\n }\n t = a.slice();\n }\n\n // the last round is special\n var result = createArray(16), tt;\n for (var i = 0; i < 4; i++) {\n tt = this._Kd[rounds][i];\n result[4 * i ] = (Si[(t[ i ] >> 24) & 0xff] ^ (tt >> 24)) & 0xff;\n result[4 * i + 1] = (Si[(t[(i + 3) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff;\n result[4 * i + 2] = (Si[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff;\n result[4 * i + 3] = (Si[ t[(i + 1) % 4] & 0xff] ^ tt ) & 0xff;\n }\n\n return result;\n }\n\n\n /**\n * Mode Of Operation - Electonic Codebook (ECB)\n */\n var ModeOfOperationECB = function(key) {\n if (!(this instanceof ModeOfOperationECB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Electronic Code Block\";\n this.name = \"ecb\";\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationECB.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n\n if ((plaintext.length % 16) !== 0) {\n throw new Error('invalid plaintext size (must be multiple of 16 bytes)');\n }\n\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n\n for (var i = 0; i < plaintext.length; i += 16) {\n copyArray(plaintext, block, 0, i, i + 16);\n block = this._aes.encrypt(block);\n copyArray(block, ciphertext, i);\n }\n\n return ciphertext;\n }\n\n ModeOfOperationECB.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n\n if ((ciphertext.length % 16) !== 0) {\n throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');\n }\n\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n\n for (var i = 0; i < ciphertext.length; i += 16) {\n copyArray(ciphertext, block, 0, i, i + 16);\n block = this._aes.decrypt(block);\n copyArray(block, plaintext, i);\n }\n\n return plaintext;\n }\n\n\n /**\n * Mode Of Operation - Cipher Block Chaining (CBC)\n */\n var ModeOfOperationCBC = function(key, iv) {\n if (!(this instanceof ModeOfOperationCBC)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Cipher Block Chaining\";\n this.name = \"cbc\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 bytes)');\n }\n\n this._lastCipherblock = coerceArray(iv, true);\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCBC.prototype.encrypt = function(plaintext) {\n plaintext = coerceArray(plaintext);\n\n if ((plaintext.length % 16) !== 0) {\n throw new Error('invalid plaintext size (must be multiple of 16 bytes)');\n }\n\n var ciphertext = createArray(plaintext.length);\n var block = createArray(16);\n\n for (var i = 0; i < plaintext.length; i += 16) {\n copyArray(plaintext, block, 0, i, i + 16);\n\n for (var j = 0; j < 16; j++) {\n block[j] ^= this._lastCipherblock[j];\n }\n\n this._lastCipherblock = this._aes.encrypt(block);\n copyArray(this._lastCipherblock, ciphertext, i);\n }\n\n return ciphertext;\n }\n\n ModeOfOperationCBC.prototype.decrypt = function(ciphertext) {\n ciphertext = coerceArray(ciphertext);\n\n if ((ciphertext.length % 16) !== 0) {\n throw new Error('invalid ciphertext size (must be multiple of 16 bytes)');\n }\n\n var plaintext = createArray(ciphertext.length);\n var block = createArray(16);\n\n for (var i = 0; i < ciphertext.length; i += 16) {\n copyArray(ciphertext, block, 0, i, i + 16);\n block = this._aes.decrypt(block);\n\n for (var j = 0; j < 16; j++) {\n plaintext[i + j] = block[j] ^ this._lastCipherblock[j];\n }\n\n copyArray(ciphertext, this._lastCipherblock, 0, i, i + 16);\n }\n\n return plaintext;\n }\n\n\n /**\n * Mode Of Operation - Cipher Feedback (CFB)\n */\n var ModeOfOperationCFB = function(key, iv, segmentSize) {\n if (!(this instanceof ModeOfOperationCFB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Cipher Feedback\";\n this.name = \"cfb\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 size)');\n }\n\n if (!segmentSize) { segmentSize = 1; }\n\n this.segmentSize = segmentSize;\n\n this._shiftRegister = coerceArray(iv, true);\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCFB.prototype.encrypt = function(plaintext) {\n if ((plaintext.length % this.segmentSize) != 0) {\n throw new Error('invalid plaintext size (must be segmentSize bytes)');\n }\n\n var encrypted = coerceArray(plaintext, true);\n\n var xorSegment;\n for (var i = 0; i < encrypted.length; i += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n for (var j = 0; j < this.segmentSize; j++) {\n encrypted[i + j] ^= xorSegment[j];\n }\n\n // Shift the register\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(encrypted, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);\n }\n\n return encrypted;\n }\n\n ModeOfOperationCFB.prototype.decrypt = function(ciphertext) {\n if ((ciphertext.length % this.segmentSize) != 0) {\n throw new Error('invalid ciphertext size (must be segmentSize bytes)');\n }\n\n var plaintext = coerceArray(ciphertext, true);\n\n var xorSegment;\n for (var i = 0; i < plaintext.length; i += this.segmentSize) {\n xorSegment = this._aes.encrypt(this._shiftRegister);\n\n for (var j = 0; j < this.segmentSize; j++) {\n plaintext[i + j] ^= xorSegment[j];\n }\n\n // Shift the register\n copyArray(this._shiftRegister, this._shiftRegister, 0, this.segmentSize);\n copyArray(ciphertext, this._shiftRegister, 16 - this.segmentSize, i, i + this.segmentSize);\n }\n\n return plaintext;\n }\n\n /**\n * Mode Of Operation - Output Feedback (OFB)\n */\n var ModeOfOperationOFB = function(key, iv) {\n if (!(this instanceof ModeOfOperationOFB)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Output Feedback\";\n this.name = \"ofb\";\n\n if (!iv) {\n iv = createArray(16);\n\n } else if (iv.length != 16) {\n throw new Error('invalid initialation vector size (must be 16 bytes)');\n }\n\n this._lastPrecipher = coerceArray(iv, true);\n this._lastPrecipherIndex = 16;\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationOFB.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n\n for (var i = 0; i < encrypted.length; i++) {\n if (this._lastPrecipherIndex === 16) {\n this._lastPrecipher = this._aes.encrypt(this._lastPrecipher);\n this._lastPrecipherIndex = 0;\n }\n encrypted[i] ^= this._lastPrecipher[this._lastPrecipherIndex++];\n }\n\n return encrypted;\n }\n\n // Decryption is symetric\n ModeOfOperationOFB.prototype.decrypt = ModeOfOperationOFB.prototype.encrypt;\n\n\n /**\n * Counter object for CTR common mode of operation\n */\n var Counter = function(initialValue) {\n if (!(this instanceof Counter)) {\n throw Error('Counter must be instanitated with `new`');\n }\n\n // We allow 0, but anything false-ish uses the default 1\n if (initialValue !== 0 && !initialValue) { initialValue = 1; }\n\n if (typeof(initialValue) === 'number') {\n this._counter = createArray(16);\n this.setValue(initialValue);\n\n } else {\n this.setBytes(initialValue);\n }\n }\n\n Counter.prototype.setValue = function(value) {\n if (typeof(value) !== 'number' || parseInt(value) != value) {\n throw new Error('invalid counter value (must be an integer)');\n }\n\n for (var index = 15; index >= 0; --index) {\n this._counter[index] = value % 256;\n value = value >> 8;\n }\n }\n\n Counter.prototype.setBytes = function(bytes) {\n bytes = coerceArray(bytes, true);\n\n if (bytes.length != 16) {\n throw new Error('invalid counter bytes size (must be 16 bytes)');\n }\n\n this._counter = bytes;\n };\n\n Counter.prototype.increment = function() {\n for (var i = 15; i >= 0; i--) {\n if (this._counter[i] === 255) {\n this._counter[i] = 0;\n } else {\n this._counter[i]++;\n break;\n }\n }\n }\n\n\n /**\n * Mode Of Operation - Counter (CTR)\n */\n var ModeOfOperationCTR = function(key, counter) {\n if (!(this instanceof ModeOfOperationCTR)) {\n throw Error('AES must be instanitated with `new`');\n }\n\n this.description = \"Counter\";\n this.name = \"ctr\";\n\n if (!(counter instanceof Counter)) {\n counter = new Counter(counter)\n }\n\n this._counter = counter;\n\n this._remainingCounter = null;\n this._remainingCounterIndex = 16;\n\n this._aes = new AES(key);\n }\n\n ModeOfOperationCTR.prototype.encrypt = function(plaintext) {\n var encrypted = coerceArray(plaintext, true);\n\n for (var i = 0; i < encrypted.length; i++) {\n if (this._remainingCounterIndex === 16) {\n this._remainingCounter = this._aes.encrypt(this._counter._counter);\n this._remainingCounterIndex = 0;\n this._counter.increment();\n }\n encrypted[i] ^= this._remainingCounter[this._remainingCounterIndex++];\n }\n\n return encrypted;\n }\n\n // Decryption is symetric\n ModeOfOperationCTR.prototype.decrypt = ModeOfOperationCTR.prototype.encrypt;\n\n\n ///////////////////////\n // Padding\n\n // See:https://tools.ietf.org/html/rfc2315\n function pkcs7pad(data) {\n data = coerceArray(data, true);\n var padder = 16 - (data.length % 16);\n var result = createArray(data.length + padder);\n copyArray(data, result);\n for (var i = data.length; i < result.length; i++) {\n result[i] = padder;\n }\n return result;\n }\n\n function pkcs7strip(data) {\n data = coerceArray(data, true);\n if (data.length < 16) { throw new Error('PKCS#7 invalid length'); }\n\n var padder = data[data.length - 1];\n if (padder > 16) { throw new Error('PKCS#7 padding byte out of range'); }\n\n var length = data.length - padder;\n for (var i = 0; i < padder; i++) {\n if (data[length + i] !== padder) {\n throw new Error('PKCS#7 invalid padding byte');\n }\n }\n\n var result = createArray(length);\n copyArray(data, result, 0, 0, length);\n return result;\n }\n\n ///////////////////////\n // Exporting\n\n\n // The block cipher\n var aesjs = {\n AES: AES,\n Counter: Counter,\n\n ModeOfOperation: {\n ecb: ModeOfOperationECB,\n cbc: ModeOfOperationCBC,\n cfb: ModeOfOperationCFB,\n ofb: ModeOfOperationOFB,\n ctr: ModeOfOperationCTR\n },\n\n utils: {\n hex: convertHex,\n utf8: convertUtf8\n },\n\n padding: {\n pkcs7: {\n pad: pkcs7pad,\n strip: pkcs7strip\n }\n },\n\n _arrayTest: {\n coerceArray: coerceArray,\n createArray: createArray,\n copyArray: copyArray,\n }\n };\n\n\n // node.js\n if (typeof exports !== 'undefined') {\n module.exports = aesjs\n\n // RequireJS/AMD\n // http://www.requirejs.org/docs/api.html\n // https://github.com/amdjs/amdjs-api/wiki/AMD\n } else if (typeof(define) === 'function' && define.amd) {\n define(aesjs);\n\n // Web Browsers\n } else {\n\n // If there was an existing library at \"aesjs\" make sure it's still available\n if (root.aesjs) {\n aesjs._aesjs = root.aesjs;\n }\n\n root.aesjs = aesjs;\n }\n\n\n})(this);\n","export const version = \"json-wallets/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { arrayify, hexlify } from \"@ethersproject/bytes\";\nimport { toUtf8Bytes, UnicodeNormalizationForm } from '@ethersproject/strings';\nexport function looseArrayify(hexString) {\n if (typeof (hexString) === 'string' && hexString.substring(0, 2) !== '0x') {\n hexString = '0x' + hexString;\n }\n return arrayify(hexString);\n}\nexport function zpad(value, length) {\n value = String(value);\n while (value.length < length) {\n value = '0' + value;\n }\n return value;\n}\nexport function getPassword(password) {\n if (typeof (password) === 'string') {\n return toUtf8Bytes(password, UnicodeNormalizationForm.NFKC);\n }\n return arrayify(password);\n}\nexport function searchPath(object, path) {\n let currentChild = object;\n const comps = path.toLowerCase().split('/');\n for (let i = 0; i < comps.length; i++) {\n // Search for a child object with a case-insensitive matching key\n let matchingChild = null;\n for (const key in currentChild) {\n if (key.toLowerCase() === comps[i]) {\n matchingChild = currentChild[key];\n break;\n }\n }\n // Didn't find one. :'(\n if (matchingChild === null) {\n return null;\n }\n // Now check this child...\n currentChild = matchingChild;\n }\n return currentChild;\n}\n// See: https://www.ietf.org/rfc/rfc4122.txt (Section 4.4)\nexport function uuidV4(randomBytes) {\n const bytes = arrayify(randomBytes);\n // Section: 4.1.3:\n // - time_hi_and_version[12:16] = 0b0100\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n // Section 4.4\n // - clock_seq_hi_and_reserved[6] = 0b0\n // - clock_seq_hi_and_reserved[7] = 0b1\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n const value = hexlify(bytes);\n return [\n value.substring(2, 10),\n value.substring(10, 14),\n value.substring(14, 18),\n value.substring(18, 22),\n value.substring(22, 34),\n ].join(\"-\");\n}\n//# sourceMappingURL=utils.js.map","\"use strict\";\nimport aes from \"aes-js\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { arrayify } from \"@ethersproject/bytes\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nimport { Description } from \"@ethersproject/properties\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nimport { getPassword, looseArrayify, searchPath } from \"./utils\";\nexport class CrowdsaleAccount extends Description {\n isCrowdsaleAccount(value) {\n return !!(value && value._isCrowdsaleAccount);\n }\n}\n// See: https://github.com/ethereum/pyethsaletool\nexport function decrypt(json, password) {\n const data = JSON.parse(json);\n password = getPassword(password);\n // Ethereum Address\n const ethaddr = getAddress(searchPath(data, \"ethaddr\"));\n // Encrypted Seed\n const encseed = looseArrayify(searchPath(data, \"encseed\"));\n if (!encseed || (encseed.length % 16) !== 0) {\n logger.throwArgumentError(\"invalid encseed\", \"json\", json);\n }\n const key = arrayify(pbkdf2(password, password, 2000, 32, \"sha256\")).slice(0, 16);\n const iv = encseed.slice(0, 16);\n const encryptedSeed = encseed.slice(16);\n // Decrypt the seed\n const aesCbc = new aes.ModeOfOperation.cbc(key, iv);\n const seed = aes.padding.pkcs7.strip(arrayify(aesCbc.decrypt(encryptedSeed)));\n // This wallet format is weird... Convert the binary encoded hex to a string.\n let seedHex = \"\";\n for (let i = 0; i < seed.length; i++) {\n seedHex += String.fromCharCode(seed[i]);\n }\n const seedHexBytes = toUtf8Bytes(seedHex);\n const privateKey = keccak256(seedHexBytes);\n return new CrowdsaleAccount({\n _isCrowdsaleAccount: true,\n address: ethaddr,\n privateKey: privateKey\n });\n}\n//# sourceMappingURL=crowdsale.js.map","\"use strict\";\nimport { getAddress } from \"@ethersproject/address\";\nexport function isCrowdsaleWallet(json) {\n let data = null;\n try {\n data = JSON.parse(json);\n }\n catch (error) {\n return false;\n }\n return (data.encseed && data.ethaddr);\n}\nexport function isKeystoreWallet(json) {\n let data = null;\n try {\n data = JSON.parse(json);\n }\n catch (error) {\n return false;\n }\n if (!data.version || parseInt(data.version) !== data.version || parseInt(data.version) !== 3) {\n return false;\n }\n // @TODO: Put more checks to make sure it has kdf, iv and all that good stuff\n return true;\n}\n//export function isJsonWallet(json: string): boolean {\n// return (isSecretStorageWallet(json) || isCrowdsaleWallet(json));\n//}\nexport function getJsonWalletAddress(json) {\n if (isCrowdsaleWallet(json)) {\n try {\n return getAddress(JSON.parse(json).ethaddr);\n }\n catch (error) {\n return null;\n }\n }\n if (isKeystoreWallet(json)) {\n try {\n return getAddress(JSON.parse(json).address);\n }\n catch (error) {\n return null;\n }\n }\n return null;\n}\n//# sourceMappingURL=inspect.js.map","\"use strict\";\n\n(function(root) {\n const MAX_VALUE = 0x7fffffff;\n\n // The SHA256 and PBKDF2 implementation are from scrypt-async-js:\n // See: https://github.com/dchest/scrypt-async-js\n function SHA256(m) {\n const K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,\n 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01,\n 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7,\n 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,\n 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152,\n 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,\n 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc,\n 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819,\n 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08,\n 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f,\n 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,\n 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n ]);\n\n let h0 = 0x6a09e667, h1 = 0xbb67ae85, h2 = 0x3c6ef372, h3 = 0xa54ff53a;\n let h4 = 0x510e527f, h5 = 0x9b05688c, h6 = 0x1f83d9ab, h7 = 0x5be0cd19;\n const w = new Uint32Array(64);\n\n function blocks(p) {\n let off = 0, len = p.length;\n while (len >= 64) {\n let a = h0, b = h1, c = h2, d = h3, e = h4, f = h5, g = h6, h = h7, u, i, j, t1, t2;\n\n for (i = 0; i < 16; i++) {\n j = off + i*4;\n w[i] = ((p[j] & 0xff)<<24) | ((p[j+1] & 0xff)<<16) |\n ((p[j+2] & 0xff)<<8) | (p[j+3] & 0xff);\n }\n\n for (i = 16; i < 64; i++) {\n u = w[i-2];\n t1 = ((u>>>17) | (u<<(32-17))) ^ ((u>>>19) | (u<<(32-19))) ^ (u>>>10);\n\n u = w[i-15];\n t2 = ((u>>>7) | (u<<(32-7))) ^ ((u>>>18) | (u<<(32-18))) ^ (u>>>3);\n\n w[i] = (((t1 + w[i-7]) | 0) + ((t2 + w[i-16]) | 0)) | 0;\n }\n\n for (i = 0; i < 64; i++) {\n t1 = ((((((e>>>6) | (e<<(32-6))) ^ ((e>>>11) | (e<<(32-11))) ^\n ((e>>>25) | (e<<(32-25)))) + ((e & f) ^ (~e & g))) | 0) +\n ((h + ((K[i] + w[i]) | 0)) | 0)) | 0;\n\n t2 = ((((a>>>2) | (a<<(32-2))) ^ ((a>>>13) | (a<<(32-13))) ^\n ((a>>>22) | (a<<(32-22)))) + ((a & b) ^ (a & c) ^ (b & c))) | 0;\n\n h = g;\n g = f;\n f = e;\n e = (d + t1) | 0;\n d = c;\n c = b;\n b = a;\n a = (t1 + t2) | 0;\n }\n\n h0 = (h0 + a) | 0;\n h1 = (h1 + b) | 0;\n h2 = (h2 + c) | 0;\n h3 = (h3 + d) | 0;\n h4 = (h4 + e) | 0;\n h5 = (h5 + f) | 0;\n h6 = (h6 + g) | 0;\n h7 = (h7 + h) | 0;\n\n off += 64;\n len -= 64;\n }\n }\n\n blocks(m);\n\n let i, bytesLeft = m.length % 64,\n bitLenHi = (m.length / 0x20000000) | 0,\n bitLenLo = m.length << 3,\n numZeros = (bytesLeft < 56) ? 56 : 120,\n p = m.slice(m.length - bytesLeft, m.length);\n\n p.push(0x80);\n for (i = bytesLeft + 1; i < numZeros; i++) { p.push(0); }\n p.push((bitLenHi >>> 24) & 0xff);\n p.push((bitLenHi >>> 16) & 0xff);\n p.push((bitLenHi >>> 8) & 0xff);\n p.push((bitLenHi >>> 0) & 0xff);\n p.push((bitLenLo >>> 24) & 0xff);\n p.push((bitLenLo >>> 16) & 0xff);\n p.push((bitLenLo >>> 8) & 0xff);\n p.push((bitLenLo >>> 0) & 0xff);\n\n blocks(p);\n\n return [\n (h0 >>> 24) & 0xff, (h0 >>> 16) & 0xff, (h0 >>> 8) & 0xff, (h0 >>> 0) & 0xff,\n (h1 >>> 24) & 0xff, (h1 >>> 16) & 0xff, (h1 >>> 8) & 0xff, (h1 >>> 0) & 0xff,\n (h2 >>> 24) & 0xff, (h2 >>> 16) & 0xff, (h2 >>> 8) & 0xff, (h2 >>> 0) & 0xff,\n (h3 >>> 24) & 0xff, (h3 >>> 16) & 0xff, (h3 >>> 8) & 0xff, (h3 >>> 0) & 0xff,\n (h4 >>> 24) & 0xff, (h4 >>> 16) & 0xff, (h4 >>> 8) & 0xff, (h4 >>> 0) & 0xff,\n (h5 >>> 24) & 0xff, (h5 >>> 16) & 0xff, (h5 >>> 8) & 0xff, (h5 >>> 0) & 0xff,\n (h6 >>> 24) & 0xff, (h6 >>> 16) & 0xff, (h6 >>> 8) & 0xff, (h6 >>> 0) & 0xff,\n (h7 >>> 24) & 0xff, (h7 >>> 16) & 0xff, (h7 >>> 8) & 0xff, (h7 >>> 0) & 0xff\n ];\n }\n\n function PBKDF2_HMAC_SHA256_OneIter(password, salt, dkLen) {\n // compress password if it's longer than hash block length\n password = (password.length <= 64) ? password : SHA256(password);\n\n const innerLen = 64 + salt.length + 4;\n const inner = new Array(innerLen);\n const outerKey = new Array(64);\n\n let i;\n let dk = [];\n\n // inner = (password ^ ipad) || salt || counter\n for (i = 0; i < 64; i++) { inner[i] = 0x36; }\n for (i = 0; i < password.length; i++) { inner[i] ^= password[i]; }\n for (i = 0; i < salt.length; i++) { inner[64 + i] = salt[i]; }\n for (i = innerLen - 4; i < innerLen; i++) { inner[i] = 0; }\n\n // outerKey = password ^ opad\n for (i = 0; i < 64; i++) outerKey[i] = 0x5c;\n for (i = 0; i < password.length; i++) outerKey[i] ^= password[i];\n\n // increments counter inside inner\n function incrementCounter() {\n for (let i = innerLen - 1; i >= innerLen - 4; i--) {\n inner[i]++;\n if (inner[i] <= 0xff) return;\n inner[i] = 0;\n }\n }\n\n // output blocks = SHA256(outerKey || SHA256(inner)) ...\n while (dkLen >= 32) {\n incrementCounter();\n dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))));\n dkLen -= 32;\n }\n if (dkLen > 0) {\n incrementCounter();\n dk = dk.concat(SHA256(outerKey.concat(SHA256(inner))).slice(0, dkLen));\n }\n\n return dk;\n }\n\n // The following is an adaptation of scryptsy\n // See: https://www.npmjs.com/package/scryptsy\n function blockmix_salsa8(BY, Yi, r, x, _X) {\n let i;\n\n arraycopy(BY, (2 * r - 1) * 16, _X, 0, 16);\n for (i = 0; i < 2 * r; i++) {\n blockxor(BY, i * 16, _X, 16);\n salsa20_8(_X, x);\n arraycopy(_X, 0, BY, Yi + (i * 16), 16);\n }\n\n for (i = 0; i < r; i++) {\n arraycopy(BY, Yi + (i * 2) * 16, BY, (i * 16), 16);\n }\n\n for (i = 0; i < r; i++) {\n arraycopy(BY, Yi + (i * 2 + 1) * 16, BY, (i + r) * 16, 16);\n }\n }\n\n function R(a, b) {\n return (a << b) | (a >>> (32 - b));\n }\n\n function salsa20_8(B, x) {\n arraycopy(B, 0, x, 0, 16);\n\n for (let i = 8; i > 0; i -= 2) {\n x[ 4] ^= R(x[ 0] + x[12], 7);\n x[ 8] ^= R(x[ 4] + x[ 0], 9);\n x[12] ^= R(x[ 8] + x[ 4], 13);\n x[ 0] ^= R(x[12] + x[ 8], 18);\n x[ 9] ^= R(x[ 5] + x[ 1], 7);\n x[13] ^= R(x[ 9] + x[ 5], 9);\n x[ 1] ^= R(x[13] + x[ 9], 13);\n x[ 5] ^= R(x[ 1] + x[13], 18);\n x[14] ^= R(x[10] + x[ 6], 7);\n x[ 2] ^= R(x[14] + x[10], 9);\n x[ 6] ^= R(x[ 2] + x[14], 13);\n x[10] ^= R(x[ 6] + x[ 2], 18);\n x[ 3] ^= R(x[15] + x[11], 7);\n x[ 7] ^= R(x[ 3] + x[15], 9);\n x[11] ^= R(x[ 7] + x[ 3], 13);\n x[15] ^= R(x[11] + x[ 7], 18);\n x[ 1] ^= R(x[ 0] + x[ 3], 7);\n x[ 2] ^= R(x[ 1] + x[ 0], 9);\n x[ 3] ^= R(x[ 2] + x[ 1], 13);\n x[ 0] ^= R(x[ 3] + x[ 2], 18);\n x[ 6] ^= R(x[ 5] + x[ 4], 7);\n x[ 7] ^= R(x[ 6] + x[ 5], 9);\n x[ 4] ^= R(x[ 7] + x[ 6], 13);\n x[ 5] ^= R(x[ 4] + x[ 7], 18);\n x[11] ^= R(x[10] + x[ 9], 7);\n x[ 8] ^= R(x[11] + x[10], 9);\n x[ 9] ^= R(x[ 8] + x[11], 13);\n x[10] ^= R(x[ 9] + x[ 8], 18);\n x[12] ^= R(x[15] + x[14], 7);\n x[13] ^= R(x[12] + x[15], 9);\n x[14] ^= R(x[13] + x[12], 13);\n x[15] ^= R(x[14] + x[13], 18);\n }\n\n for (let i = 0; i < 16; ++i) {\n B[i] += x[i];\n }\n }\n\n // naive approach... going back to loop unrolling may yield additional performance\n function blockxor(S, Si, D, len) {\n for (let i = 0; i < len; i++) {\n D[i] ^= S[Si + i]\n }\n }\n\n function arraycopy(src, srcPos, dest, destPos, length) {\n while (length--) {\n dest[destPos++] = src[srcPos++];\n }\n }\n\n function checkBufferish(o) {\n if (!o || typeof(o.length) !== 'number') { return false; }\n\n for (let i = 0; i < o.length; i++) {\n const v = o[i];\n if (typeof(v) !== 'number' || v % 1 || v < 0 || v >= 256) {\n return false;\n }\n }\n\n return true;\n }\n\n function ensureInteger(value, name) {\n if (typeof(value) !== \"number\" || (value % 1)) { throw new Error('invalid ' + name); }\n return value;\n }\n\n // N = Cpu cost, r = Memory cost, p = parallelization cost\n // callback(error, progress, key)\n function _scrypt(password, salt, N, r, p, dkLen, callback) {\n\n N = ensureInteger(N, 'N');\n r = ensureInteger(r, 'r');\n p = ensureInteger(p, 'p');\n\n dkLen = ensureInteger(dkLen, 'dkLen');\n\n if (N === 0 || (N & (N - 1)) !== 0) { throw new Error('N must be power of 2'); }\n\n if (N > MAX_VALUE / 128 / r) { throw new Error('N too large'); }\n if (r > MAX_VALUE / 128 / p) { throw new Error('r too large'); }\n\n if (!checkBufferish(password)) {\n throw new Error('password must be an array or buffer');\n }\n password = Array.prototype.slice.call(password);\n\n if (!checkBufferish(salt)) {\n throw new Error('salt must be an array or buffer');\n }\n salt = Array.prototype.slice.call(salt);\n\n let b = PBKDF2_HMAC_SHA256_OneIter(password, salt, p * 128 * r);\n const B = new Uint32Array(p * 32 * r)\n for (let i = 0; i < B.length; i++) {\n const j = i * 4;\n B[i] = ((b[j + 3] & 0xff) << 24) |\n ((b[j + 2] & 0xff) << 16) |\n ((b[j + 1] & 0xff) << 8) |\n ((b[j + 0] & 0xff) << 0);\n }\n\n const XY = new Uint32Array(64 * r);\n const V = new Uint32Array(32 * r * N);\n\n const Yi = 32 * r;\n\n // scratch space\n const x = new Uint32Array(16); // salsa20_8\n const _X = new Uint32Array(16); // blockmix_salsa8\n\n const totalOps = p * N * 2;\n let currentOp = 0;\n let lastPercent10 = null;\n\n // Set this to true to abandon the scrypt on the next step\n let stop = false;\n\n // State information\n let state = 0;\n let i0 = 0, i1;\n let Bi;\n\n // How many blockmix_salsa8 can we do per step?\n const limit = callback ? parseInt(1000 / r): 0xffffffff;\n\n // Trick from scrypt-async; if there is a setImmediate shim in place, use it\n const nextTick = (typeof(setImmediate) !== 'undefined') ? setImmediate : setTimeout;\n\n // This is really all I changed; making scryptsy a state machine so we occasionally\n // stop and give other evnts on the evnt loop a chance to run. ~RicMoo\n const incrementalSMix = function() {\n if (stop) {\n return callback(new Error('cancelled'), currentOp / totalOps);\n }\n\n let steps;\n\n switch (state) {\n case 0:\n // for (var i = 0; i < p; i++)...\n Bi = i0 * 32 * r;\n\n arraycopy(B, Bi, XY, 0, Yi); // ROMix - 1\n\n state = 1; // Move to ROMix 2\n i1 = 0;\n\n // Fall through\n\n case 1:\n\n // Run up to 1000 steps of the first inner smix loop\n steps = N - i1;\n if (steps > limit) { steps = limit; }\n for (let i = 0; i < steps; i++) { // ROMix - 2\n arraycopy(XY, 0, V, (i1 + i) * Yi, Yi) // ROMix - 3\n blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 4\n }\n\n // for (var i = 0; i < N; i++)\n i1 += steps;\n currentOp += steps;\n\n if (callback) {\n // Call the callback with the progress (optionally stopping us)\n const percent10 = parseInt(1000 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) { break; }\n lastPercent10 = percent10;\n }\n }\n\n if (i1 < N) { break; }\n\n i1 = 0; // Move to ROMix 6\n state = 2;\n\n // Fall through\n\n case 2:\n\n // Run up to 1000 steps of the second inner smix loop\n steps = N - i1;\n if (steps > limit) { steps = limit; }\n for (let i = 0; i < steps; i++) { // ROMix - 6\n const offset = (2 * r - 1) * 16; // ROMix - 7\n const j = XY[offset] & (N - 1);\n blockxor(V, j * Yi, XY, Yi); // ROMix - 8 (inner)\n blockmix_salsa8(XY, Yi, r, x, _X); // ROMix - 9 (outer)\n }\n\n // for (var i = 0; i < N; i++)...\n i1 += steps;\n currentOp += steps;\n\n // Call the callback with the progress (optionally stopping us)\n if (callback) {\n const percent10 = parseInt(1000 * currentOp / totalOps);\n if (percent10 !== lastPercent10) {\n stop = callback(null, currentOp / totalOps);\n if (stop) { break; }\n lastPercent10 = percent10;\n }\n }\n\n if (i1 < N) { break; }\n\n arraycopy(XY, 0, B, Bi, Yi); // ROMix - 10\n\n // for (var i = 0; i < p; i++)...\n i0++;\n if (i0 < p) {\n state = 0;\n break;\n }\n\n b = [];\n for (let i = 0; i < B.length; i++) {\n b.push((B[i] >> 0) & 0xff);\n b.push((B[i] >> 8) & 0xff);\n b.push((B[i] >> 16) & 0xff);\n b.push((B[i] >> 24) & 0xff);\n }\n\n const derivedKey = PBKDF2_HMAC_SHA256_OneIter(password, b, dkLen);\n\n // Send the result to the callback\n if (callback) { callback(null, 1.0, derivedKey); }\n\n // Done; don't break (which would reschedule)\n return derivedKey;\n }\n\n // Schedule the next steps\n if (callback) { nextTick(incrementalSMix); }\n }\n\n // Run the smix state machine until completion\n if (!callback) {\n while (true) {\n const derivedKey = incrementalSMix();\n if (derivedKey != undefined) { return derivedKey; }\n }\n }\n\n // Bootstrap the async incremental smix\n incrementalSMix();\n }\n\n const lib = {\n scrypt: function(password, salt, N, r, p, dkLen, progressCallback) {\n return new Promise(function(resolve, reject) {\n let lastProgress = 0;\n if (progressCallback) { progressCallback(0); }\n _scrypt(password, salt, N, r, p, dkLen, function(error, progress, key) {\n if (error) {\n reject(error);\n } else if (key) {\n if (progressCallback && lastProgress !== 1) {\n progressCallback(1);\n }\n resolve(new Uint8Array(key));\n } else if (progressCallback && progress !== lastProgress) {\n lastProgress = progress;\n return progressCallback(progress);\n }\n });\n });\n },\n syncScrypt: function(password, salt, N, r, p, dkLen) {\n return new Uint8Array(_scrypt(password, salt, N, r, p, dkLen));\n }\n };\n\n // node.js\n if (typeof(exports) !== 'undefined') {\n module.exports = lib;\n\n // RequireJS/AMD\n // http://www.requirejs.org/docs/api.html\n // https://github.com/amdjs/amdjs-api/wiki/AMD\n } else if (typeof(define) === 'function' && define.amd) {\n define(lib);\n\n // Web Browsers\n } else if (root) {\n\n // If there was an existing library \"scrypt\", make sure it is still available\n if (root.scrypt) {\n root._scrypt = root.scrypt;\n }\n\n root.scrypt = lib;\n }\n\n})(this);\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport aes from \"aes-js\";\nimport scrypt from \"scrypt-js\";\nimport { getAddress } from \"@ethersproject/address\";\nimport { arrayify, concat, hexlify } from \"@ethersproject/bytes\";\nimport { defaultPath, entropyToMnemonic, HDNode, mnemonicToEntropy } from \"@ethersproject/hdnode\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { pbkdf2 as _pbkdf2 } from \"@ethersproject/pbkdf2\";\nimport { randomBytes } from \"@ethersproject/random\";\nimport { Description } from \"@ethersproject/properties\";\nimport { computeAddress } from \"@ethersproject/transactions\";\nimport { getPassword, looseArrayify, searchPath, uuidV4, zpad } from \"./utils\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n// Exported Types\nfunction hasMnemonic(value) {\n return (value != null && value.mnemonic && value.mnemonic.phrase);\n}\nexport class KeystoreAccount extends Description {\n isKeystoreAccount(value) {\n return !!(value && value._isKeystoreAccount);\n }\n}\nfunction _decrypt(data, key, ciphertext) {\n const cipher = searchPath(data, \"crypto/cipher\");\n if (cipher === \"aes-128-ctr\") {\n const iv = looseArrayify(searchPath(data, \"crypto/cipherparams/iv\"));\n const counter = new aes.Counter(iv);\n const aesCtr = new aes.ModeOfOperation.ctr(key, counter);\n return arrayify(aesCtr.decrypt(ciphertext));\n }\n return null;\n}\nfunction _getAccount(data, key) {\n const ciphertext = looseArrayify(searchPath(data, \"crypto/ciphertext\"));\n const computedMAC = hexlify(keccak256(concat([key.slice(16, 32), ciphertext]))).substring(2);\n if (computedMAC !== searchPath(data, \"crypto/mac\").toLowerCase()) {\n throw new Error(\"invalid password\");\n }\n const privateKey = _decrypt(data, key.slice(0, 16), ciphertext);\n if (!privateKey) {\n logger.throwError(\"unsupported cipher\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"decrypt\"\n });\n }\n const mnemonicKey = key.slice(32, 64);\n const address = computeAddress(privateKey);\n if (data.address) {\n let check = data.address.toLowerCase();\n if (check.substring(0, 2) !== \"0x\") {\n check = \"0x\" + check;\n }\n if (getAddress(check) !== address) {\n throw new Error(\"address mismatch\");\n }\n }\n const account = {\n _isKeystoreAccount: true,\n address: address,\n privateKey: hexlify(privateKey)\n };\n // Version 0.1 x-ethers metadata must contain an encrypted mnemonic phrase\n if (searchPath(data, \"x-ethers/version\") === \"0.1\") {\n const mnemonicCiphertext = looseArrayify(searchPath(data, \"x-ethers/mnemonicCiphertext\"));\n const mnemonicIv = looseArrayify(searchPath(data, \"x-ethers/mnemonicCounter\"));\n const mnemonicCounter = new aes.Counter(mnemonicIv);\n const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n const path = searchPath(data, \"x-ethers/path\") || defaultPath;\n const locale = searchPath(data, \"x-ethers/locale\") || \"en\";\n const entropy = arrayify(mnemonicAesCtr.decrypt(mnemonicCiphertext));\n try {\n const mnemonic = entropyToMnemonic(entropy, locale);\n const node = HDNode.fromMnemonic(mnemonic, null, locale).derivePath(path);\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n account.mnemonic = node.mnemonic;\n }\n catch (error) {\n // If we don't have the locale wordlist installed to\n // read this mnemonic, just bail and don't set the\n // mnemonic\n if (error.code !== Logger.errors.INVALID_ARGUMENT || error.argument !== \"wordlist\") {\n throw error;\n }\n }\n }\n return new KeystoreAccount(account);\n}\nfunction pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc) {\n return arrayify(_pbkdf2(passwordBytes, salt, count, dkLen, prfFunc));\n}\nfunction pbkdf2(passwordBytes, salt, count, dkLen, prfFunc) {\n return Promise.resolve(pbkdf2Sync(passwordBytes, salt, count, dkLen, prfFunc));\n}\nfunction _computeKdfKey(data, password, pbkdf2Func, scryptFunc, progressCallback) {\n const passwordBytes = getPassword(password);\n const kdf = searchPath(data, \"crypto/kdf\");\n if (kdf && typeof (kdf) === \"string\") {\n const throwError = function (name, value) {\n return logger.throwArgumentError(\"invalid key-derivation function parameters\", name, value);\n };\n if (kdf.toLowerCase() === \"scrypt\") {\n const salt = looseArrayify(searchPath(data, \"crypto/kdfparams/salt\"));\n const N = parseInt(searchPath(data, \"crypto/kdfparams/n\"));\n const r = parseInt(searchPath(data, \"crypto/kdfparams/r\"));\n const p = parseInt(searchPath(data, \"crypto/kdfparams/p\"));\n // Check for all required parameters\n if (!N || !r || !p) {\n throwError(\"kdf\", kdf);\n }\n // Make sure N is a power of 2\n if ((N & (N - 1)) !== 0) {\n throwError(\"N\", N);\n }\n const dkLen = parseInt(searchPath(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) {\n throwError(\"dklen\", dkLen);\n }\n return scryptFunc(passwordBytes, salt, N, r, p, 64, progressCallback);\n }\n else if (kdf.toLowerCase() === \"pbkdf2\") {\n const salt = looseArrayify(searchPath(data, \"crypto/kdfparams/salt\"));\n let prfFunc = null;\n const prf = searchPath(data, \"crypto/kdfparams/prf\");\n if (prf === \"hmac-sha256\") {\n prfFunc = \"sha256\";\n }\n else if (prf === \"hmac-sha512\") {\n prfFunc = \"sha512\";\n }\n else {\n throwError(\"prf\", prf);\n }\n const count = parseInt(searchPath(data, \"crypto/kdfparams/c\"));\n const dkLen = parseInt(searchPath(data, \"crypto/kdfparams/dklen\"));\n if (dkLen !== 32) {\n throwError(\"dklen\", dkLen);\n }\n return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc);\n }\n }\n return logger.throwArgumentError(\"unsupported key-derivation function\", \"kdf\", kdf);\n}\nexport function decryptSync(json, password) {\n const data = JSON.parse(json);\n const key = _computeKdfKey(data, password, pbkdf2Sync, scrypt.syncScrypt);\n return _getAccount(data, key);\n}\nexport function decrypt(json, password, progressCallback) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.parse(json);\n const key = yield _computeKdfKey(data, password, pbkdf2, scrypt.scrypt, progressCallback);\n return _getAccount(data, key);\n });\n}\nexport function encrypt(account, password, options, progressCallback) {\n try {\n // Check the address matches the private key\n if (getAddress(account.address) !== computeAddress(account.privateKey)) {\n throw new Error(\"address/privateKey mismatch\");\n }\n // Check the mnemonic (if any) matches the private key\n if (hasMnemonic(account)) {\n const mnemonic = account.mnemonic;\n const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path || defaultPath);\n if (node.privateKey != account.privateKey) {\n throw new Error(\"mnemonic mismatch\");\n }\n }\n }\n catch (e) {\n return Promise.reject(e);\n }\n // The options are optional, so adjust the call as needed\n if (typeof (options) === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (!options) {\n options = {};\n }\n const privateKey = arrayify(account.privateKey);\n const passwordBytes = getPassword(password);\n let entropy = null;\n let path = null;\n let locale = null;\n if (hasMnemonic(account)) {\n const srcMnemonic = account.mnemonic;\n entropy = arrayify(mnemonicToEntropy(srcMnemonic.phrase, srcMnemonic.locale || \"en\"));\n path = srcMnemonic.path || defaultPath;\n locale = srcMnemonic.locale || \"en\";\n }\n let client = options.client;\n if (!client) {\n client = \"ethers.js\";\n }\n // Check/generate the salt\n let salt = null;\n if (options.salt) {\n salt = arrayify(options.salt);\n }\n else {\n salt = randomBytes(32);\n ;\n }\n // Override initialization vector\n let iv = null;\n if (options.iv) {\n iv = arrayify(options.iv);\n if (iv.length !== 16) {\n throw new Error(\"invalid iv\");\n }\n }\n else {\n iv = randomBytes(16);\n }\n // Override the uuid\n let uuidRandom = null;\n if (options.uuid) {\n uuidRandom = arrayify(options.uuid);\n if (uuidRandom.length !== 16) {\n throw new Error(\"invalid uuid\");\n }\n }\n else {\n uuidRandom = randomBytes(16);\n }\n // Override the scrypt password-based key derivation function parameters\n let N = (1 << 17), r = 8, p = 1;\n if (options.scrypt) {\n if (options.scrypt.N) {\n N = options.scrypt.N;\n }\n if (options.scrypt.r) {\n r = options.scrypt.r;\n }\n if (options.scrypt.p) {\n p = options.scrypt.p;\n }\n }\n // We take 64 bytes:\n // - 32 bytes As normal for the Web3 secret storage (derivedKey, macPrefix)\n // - 32 bytes AES key to encrypt mnemonic with (required here to be Ethers Wallet)\n return scrypt.scrypt(passwordBytes, salt, N, r, p, 64, progressCallback).then((key) => {\n key = arrayify(key);\n // This will be used to encrypt the wallet (as per Web3 secret storage)\n const derivedKey = key.slice(0, 16);\n const macPrefix = key.slice(16, 32);\n // This will be used to encrypt the mnemonic phrase (if any)\n const mnemonicKey = key.slice(32, 64);\n // Encrypt the private key\n const counter = new aes.Counter(iv);\n const aesCtr = new aes.ModeOfOperation.ctr(derivedKey, counter);\n const ciphertext = arrayify(aesCtr.encrypt(privateKey));\n // Compute the message authentication code, used to check the password\n const mac = keccak256(concat([macPrefix, ciphertext]));\n // See: https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition\n const data = {\n address: account.address.substring(2).toLowerCase(),\n id: uuidV4(uuidRandom),\n version: 3,\n crypto: {\n cipher: \"aes-128-ctr\",\n cipherparams: {\n iv: hexlify(iv).substring(2),\n },\n ciphertext: hexlify(ciphertext).substring(2),\n kdf: \"scrypt\",\n kdfparams: {\n salt: hexlify(salt).substring(2),\n n: N,\n dklen: 32,\n p: p,\n r: r\n },\n mac: mac.substring(2)\n }\n };\n // If we have a mnemonic, encrypt it into the JSON wallet\n if (entropy) {\n const mnemonicIv = randomBytes(16);\n const mnemonicCounter = new aes.Counter(mnemonicIv);\n const mnemonicAesCtr = new aes.ModeOfOperation.ctr(mnemonicKey, mnemonicCounter);\n const mnemonicCiphertext = arrayify(mnemonicAesCtr.encrypt(entropy));\n const now = new Date();\n const timestamp = (now.getUTCFullYear() + \"-\" +\n zpad(now.getUTCMonth() + 1, 2) + \"-\" +\n zpad(now.getUTCDate(), 2) + \"T\" +\n zpad(now.getUTCHours(), 2) + \"-\" +\n zpad(now.getUTCMinutes(), 2) + \"-\" +\n zpad(now.getUTCSeconds(), 2) + \".0Z\");\n data[\"x-ethers\"] = {\n client: client,\n gethFilename: (\"UTC--\" + timestamp + \"--\" + data.address),\n mnemonicCounter: hexlify(mnemonicIv).substring(2),\n mnemonicCiphertext: hexlify(mnemonicCiphertext).substring(2),\n path: path,\n locale: locale,\n version: \"0.1\"\n };\n }\n return JSON.stringify(data);\n });\n}\n//# sourceMappingURL=keystore.js.map","\"use strict\";\nimport { decrypt as decryptCrowdsale } from \"./crowdsale\";\nimport { getJsonWalletAddress, isCrowdsaleWallet, isKeystoreWallet } from \"./inspect\";\nimport { decrypt as decryptKeystore, decryptSync as decryptKeystoreSync, encrypt as encryptKeystore } from \"./keystore\";\nfunction decryptJsonWallet(json, password, progressCallback) {\n if (isCrowdsaleWallet(json)) {\n if (progressCallback) {\n progressCallback(0);\n }\n const account = decryptCrowdsale(json, password);\n if (progressCallback) {\n progressCallback(1);\n }\n return Promise.resolve(account);\n }\n if (isKeystoreWallet(json)) {\n return decryptKeystore(json, password, progressCallback);\n }\n return Promise.reject(new Error(\"invalid JSON wallet\"));\n}\nfunction decryptJsonWalletSync(json, password) {\n if (isCrowdsaleWallet(json)) {\n return decryptCrowdsale(json, password);\n }\n if (isKeystoreWallet(json)) {\n return decryptKeystoreSync(json, password);\n }\n throw new Error(\"invalid JSON wallet\");\n}\nexport { decryptCrowdsale, decryptKeystore, decryptKeystoreSync, encryptKeystore, isCrowdsaleWallet, isKeystoreWallet, getJsonWalletAddress, decryptJsonWallet, decryptJsonWalletSync, };\n//# sourceMappingURL=index.js.map","export const version = \"wallet/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { getAddress } from \"@ethersproject/address\";\nimport { Provider } from \"@ethersproject/abstract-provider\";\nimport { Signer } from \"@ethersproject/abstract-signer\";\nimport { arrayify, concat, hexDataSlice, isHexString, joinSignature } from \"@ethersproject/bytes\";\nimport { hashMessage, _TypedDataEncoder } from \"@ethersproject/hash\";\nimport { defaultPath, HDNode, entropyToMnemonic } from \"@ethersproject/hdnode\";\nimport { keccak256 } from \"@ethersproject/keccak256\";\nimport { defineReadOnly, resolveProperties } from \"@ethersproject/properties\";\nimport { randomBytes } from \"@ethersproject/random\";\nimport { SigningKey } from \"@ethersproject/signing-key\";\nimport { decryptJsonWallet, decryptJsonWalletSync, encryptKeystore } from \"@ethersproject/json-wallets\";\nimport { computeAddress, recoverAddress, serialize } from \"@ethersproject/transactions\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nfunction isAccount(value) {\n return (value != null && isHexString(value.privateKey, 32) && value.address != null);\n}\nfunction hasMnemonic(value) {\n const mnemonic = value.mnemonic;\n return (mnemonic && mnemonic.phrase);\n}\nexport class Wallet extends Signer {\n constructor(privateKey, provider) {\n super();\n if (isAccount(privateKey)) {\n const signingKey = new SigningKey(privateKey.privateKey);\n defineReadOnly(this, \"_signingKey\", () => signingKey);\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n if (this.address !== getAddress(privateKey.address)) {\n logger.throwArgumentError(\"privateKey/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n if (hasMnemonic(privateKey)) {\n const srcMnemonic = privateKey.mnemonic;\n defineReadOnly(this, \"_mnemonic\", () => ({\n phrase: srcMnemonic.phrase,\n path: srcMnemonic.path || defaultPath,\n locale: srcMnemonic.locale || \"en\"\n }));\n const mnemonic = this.mnemonic;\n const node = HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path);\n if (computeAddress(node.privateKey) !== this.address) {\n logger.throwArgumentError(\"mnemonic/address mismatch\", \"privateKey\", \"[REDACTED]\");\n }\n }\n else {\n defineReadOnly(this, \"_mnemonic\", () => null);\n }\n }\n else {\n if (SigningKey.isSigningKey(privateKey)) {\n /* istanbul ignore if */\n if (privateKey.curve !== \"secp256k1\") {\n logger.throwArgumentError(\"unsupported curve; must be secp256k1\", \"privateKey\", \"[REDACTED]\");\n }\n defineReadOnly(this, \"_signingKey\", () => privateKey);\n }\n else {\n // A lot of common tools do not prefix private keys with a 0x (see: #1166)\n if (typeof (privateKey) === \"string\") {\n if (privateKey.match(/^[0-9a-f]*$/i) && privateKey.length === 64) {\n privateKey = \"0x\" + privateKey;\n }\n }\n const signingKey = new SigningKey(privateKey);\n defineReadOnly(this, \"_signingKey\", () => signingKey);\n }\n defineReadOnly(this, \"_mnemonic\", () => null);\n defineReadOnly(this, \"address\", computeAddress(this.publicKey));\n }\n /* istanbul ignore if */\n if (provider && !Provider.isProvider(provider)) {\n logger.throwArgumentError(\"invalid provider\", \"provider\", provider);\n }\n defineReadOnly(this, \"provider\", provider || null);\n }\n get mnemonic() { return this._mnemonic(); }\n get privateKey() { return this._signingKey().privateKey; }\n get publicKey() { return this._signingKey().publicKey; }\n getAddress() {\n return Promise.resolve(this.address);\n }\n connect(provider) {\n return new Wallet(this, provider);\n }\n signTransaction(transaction) {\n return resolveProperties(transaction).then((tx) => {\n if (tx.from != null) {\n if (getAddress(tx.from) !== this.address) {\n logger.throwArgumentError(\"transaction from address mismatch\", \"transaction.from\", transaction.from);\n }\n delete tx.from;\n }\n const signature = this._signingKey().signDigest(keccak256(serialize(tx)));\n return serialize(tx, signature);\n });\n }\n signMessage(message) {\n return __awaiter(this, void 0, void 0, function* () {\n return joinSignature(this._signingKey().signDigest(hashMessage(message)));\n });\n }\n _signTypedData(domain, types, value) {\n return __awaiter(this, void 0, void 0, function* () {\n // Populate any ENS names\n const populated = yield _TypedDataEncoder.resolveNames(domain, types, value, (name) => {\n if (this.provider == null) {\n logger.throwError(\"cannot resolve ENS names without a provider\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"resolveName\",\n value: name\n });\n }\n return this.provider.resolveName(name);\n });\n return joinSignature(this._signingKey().signDigest(_TypedDataEncoder.hash(populated.domain, types, populated.value)));\n });\n }\n encrypt(password, options, progressCallback) {\n if (typeof (options) === \"function\" && !progressCallback) {\n progressCallback = options;\n options = {};\n }\n if (progressCallback && typeof (progressCallback) !== \"function\") {\n throw new Error(\"invalid callback\");\n }\n if (!options) {\n options = {};\n }\n return encryptKeystore(this, password, options, progressCallback);\n }\n /**\n * Static methods to create Wallet instances.\n */\n static createRandom(options) {\n let entropy = randomBytes(16);\n if (!options) {\n options = {};\n }\n if (options.extraEntropy) {\n entropy = arrayify(hexDataSlice(keccak256(concat([entropy, options.extraEntropy])), 0, 16));\n }\n const mnemonic = entropyToMnemonic(entropy, options.locale);\n return Wallet.fromMnemonic(mnemonic, options.path, options.locale);\n }\n static fromEncryptedJson(json, password, progressCallback) {\n return decryptJsonWallet(json, password, progressCallback).then((account) => {\n return new Wallet(account);\n });\n }\n static fromEncryptedJsonSync(json, password) {\n return new Wallet(decryptJsonWalletSync(json, password));\n }\n static fromMnemonic(mnemonic, path, wordlist) {\n if (!path) {\n path = defaultPath;\n }\n return new Wallet(HDNode.fromMnemonic(mnemonic, null, wordlist).derivePath(path));\n }\n}\nexport function verifyMessage(message, signature) {\n return recoverAddress(hashMessage(message), signature);\n}\nexport function verifyTypedData(domain, types, value, signature) {\n return recoverAddress(_TypedDataEncoder.hash(domain, types, value), signature);\n}\n//# sourceMappingURL=index.js.map","export const version = \"networks/5.7.1\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\n;\nfunction isRenetworkable(value) {\n return (value && typeof (value.renetwork) === \"function\");\n}\nfunction ethDefaultProvider(network) {\n const func = function (providers, options) {\n if (options == null) {\n options = {};\n }\n const providerList = [];\n if (providers.InfuraProvider && options.infura !== \"-\") {\n try {\n providerList.push(new providers.InfuraProvider(network, options.infura));\n }\n catch (error) { }\n }\n if (providers.EtherscanProvider && options.etherscan !== \"-\") {\n try {\n providerList.push(new providers.EtherscanProvider(network, options.etherscan));\n }\n catch (error) { }\n }\n if (providers.AlchemyProvider && options.alchemy !== \"-\") {\n try {\n providerList.push(new providers.AlchemyProvider(network, options.alchemy));\n }\n catch (error) { }\n }\n if (providers.PocketProvider && options.pocket !== \"-\") {\n // These networks are currently faulty on Pocket as their\n // network does not handle the Berlin hardfork, which is\n // live on these ones.\n // @TODO: This goes away once Pocket has upgraded their nodes\n const skip = [\"goerli\", \"ropsten\", \"rinkeby\", \"sepolia\"];\n try {\n const provider = new providers.PocketProvider(network, options.pocket);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n }\n catch (error) { }\n }\n if (providers.CloudflareProvider && options.cloudflare !== \"-\") {\n try {\n providerList.push(new providers.CloudflareProvider(network));\n }\n catch (error) { }\n }\n if (providers.AnkrProvider && options.ankr !== \"-\") {\n try {\n const skip = [\"ropsten\"];\n const provider = new providers.AnkrProvider(network, options.ankr);\n if (provider.network && skip.indexOf(provider.network.name) === -1) {\n providerList.push(provider);\n }\n }\n catch (error) { }\n }\n if (providerList.length === 0) {\n return null;\n }\n if (providers.FallbackProvider) {\n let quorum = 1;\n if (options.quorum != null) {\n quorum = options.quorum;\n }\n else if (network === \"homestead\") {\n quorum = 2;\n }\n return new providers.FallbackProvider(providerList, quorum);\n }\n return providerList[0];\n };\n func.renetwork = function (network) {\n return ethDefaultProvider(network);\n };\n return func;\n}\nfunction etcDefaultProvider(url, network) {\n const func = function (providers, options) {\n if (providers.JsonRpcProvider) {\n return new providers.JsonRpcProvider(url, network);\n }\n return null;\n };\n func.renetwork = function (network) {\n return etcDefaultProvider(url, network);\n };\n return func;\n}\nconst homestead = {\n chainId: 1,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"homestead\",\n _defaultProvider: ethDefaultProvider(\"homestead\")\n};\nconst ropsten = {\n chainId: 3,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"ropsten\",\n _defaultProvider: ethDefaultProvider(\"ropsten\")\n};\nconst classicMordor = {\n chainId: 63,\n name: \"classicMordor\",\n _defaultProvider: etcDefaultProvider(\"https://www.ethercluster.com/mordor\", \"classicMordor\")\n};\n// See: https://chainlist.org\nconst networks = {\n unspecified: { chainId: 0, name: \"unspecified\" },\n homestead: homestead,\n mainnet: homestead,\n morden: { chainId: 2, name: \"morden\" },\n ropsten: ropsten,\n testnet: ropsten,\n rinkeby: {\n chainId: 4,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"rinkeby\",\n _defaultProvider: ethDefaultProvider(\"rinkeby\")\n },\n kovan: {\n chainId: 42,\n name: \"kovan\",\n _defaultProvider: ethDefaultProvider(\"kovan\")\n },\n goerli: {\n chainId: 5,\n ensAddress: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\",\n name: \"goerli\",\n _defaultProvider: ethDefaultProvider(\"goerli\")\n },\n kintsugi: { chainId: 1337702, name: \"kintsugi\" },\n sepolia: {\n chainId: 11155111,\n name: \"sepolia\",\n _defaultProvider: ethDefaultProvider(\"sepolia\")\n },\n // ETC (See: #351)\n classic: {\n chainId: 61,\n name: \"classic\",\n _defaultProvider: etcDefaultProvider(\"https:/\\/www.ethercluster.com/etc\", \"classic\")\n },\n classicMorden: { chainId: 62, name: \"classicMorden\" },\n classicMordor: classicMordor,\n classicTestnet: classicMordor,\n classicKotti: {\n chainId: 6,\n name: \"classicKotti\",\n _defaultProvider: etcDefaultProvider(\"https:/\\/www.ethercluster.com/kotti\", \"classicKotti\")\n },\n xdai: { chainId: 100, name: \"xdai\" },\n matic: {\n chainId: 137,\n name: \"matic\",\n _defaultProvider: ethDefaultProvider(\"matic\")\n },\n maticmum: { chainId: 80001, name: \"maticmum\" },\n optimism: {\n chainId: 10,\n name: \"optimism\",\n _defaultProvider: ethDefaultProvider(\"optimism\")\n },\n \"optimism-kovan\": { chainId: 69, name: \"optimism-kovan\" },\n \"optimism-goerli\": { chainId: 420, name: \"optimism-goerli\" },\n arbitrum: { chainId: 42161, name: \"arbitrum\" },\n \"arbitrum-rinkeby\": { chainId: 421611, name: \"arbitrum-rinkeby\" },\n \"arbitrum-goerli\": { chainId: 421613, name: \"arbitrum-goerli\" },\n bnb: { chainId: 56, name: \"bnb\" },\n bnbt: { chainId: 97, name: \"bnbt\" },\n};\n/**\n * getNetwork\n *\n * Converts a named common networks or chain ID (network ID) to a Network\n * and verifies a network is a valid Network..\n */\nexport function getNetwork(network) {\n // No network (null)\n if (network == null) {\n return null;\n }\n if (typeof (network) === \"number\") {\n for (const name in networks) {\n const standard = networks[name];\n if (standard.chainId === network) {\n return {\n name: standard.name,\n chainId: standard.chainId,\n ensAddress: (standard.ensAddress || null),\n _defaultProvider: (standard._defaultProvider || null)\n };\n }\n }\n return {\n chainId: network,\n name: \"unknown\"\n };\n }\n if (typeof (network) === \"string\") {\n const standard = networks[network];\n if (standard == null) {\n return null;\n }\n return {\n name: standard.name,\n chainId: standard.chainId,\n ensAddress: standard.ensAddress,\n _defaultProvider: (standard._defaultProvider || null)\n };\n }\n const standard = networks[network.name];\n // Not a standard network; check that it is a valid network in general\n if (!standard) {\n if (typeof (network.chainId) !== \"number\") {\n logger.throwArgumentError(\"invalid network chainId\", \"network\", network);\n }\n return network;\n }\n // Make sure the chainId matches the expected network chainId (or is 0; disable EIP-155)\n if (network.chainId !== 0 && network.chainId !== standard.chainId) {\n logger.throwArgumentError(\"network chainId mismatch\", \"network\", network);\n }\n // @TODO: In the next major version add an attach function to a defaultProvider\n // class and move the _defaultProvider internal to this file (extend Network)\n let defaultProvider = network._defaultProvider || null;\n if (defaultProvider == null && standard._defaultProvider) {\n if (isRenetworkable(standard._defaultProvider)) {\n defaultProvider = standard._defaultProvider.renetwork(network);\n }\n else {\n defaultProvider = standard._defaultProvider;\n }\n }\n // Standard Network (allow overriding the ENS address)\n return {\n name: network.name,\n chainId: standard.chainId,\n ensAddress: (network.ensAddress || standard.ensAddress || null),\n _defaultProvider: defaultProvider\n };\n}\n//# sourceMappingURL=index.js.map","export const version = \"web/5.7.1\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { arrayify } from \"@ethersproject/bytes\";\nexport function getUrl(href, options) {\n return __awaiter(this, void 0, void 0, function* () {\n if (options == null) {\n options = {};\n }\n const request = {\n method: (options.method || \"GET\"),\n headers: (options.headers || {}),\n body: (options.body || undefined),\n };\n if (options.skipFetchSetup !== true) {\n request.mode = \"cors\"; // no-cors, cors, *same-origin\n request.cache = \"no-cache\"; // *default, no-cache, reload, force-cache, only-if-cached\n request.credentials = \"same-origin\"; // include, *same-origin, omit\n request.redirect = \"follow\"; // manual, *follow, error\n request.referrer = \"client\"; // no-referrer, *client\n }\n ;\n if (options.fetchOptions != null) {\n const opts = options.fetchOptions;\n if (opts.mode) {\n request.mode = (opts.mode);\n }\n if (opts.cache) {\n request.cache = (opts.cache);\n }\n if (opts.credentials) {\n request.credentials = (opts.credentials);\n }\n if (opts.redirect) {\n request.redirect = (opts.redirect);\n }\n if (opts.referrer) {\n request.referrer = opts.referrer;\n }\n }\n const response = yield fetch(href, request);\n const body = yield response.arrayBuffer();\n const headers = {};\n if (response.headers.forEach) {\n response.headers.forEach((value, key) => {\n headers[key.toLowerCase()] = value;\n });\n }\n else {\n ((response.headers).keys)().forEach((key) => {\n headers[key.toLowerCase()] = response.headers.get(key);\n });\n }\n return {\n headers: headers,\n statusCode: response.status,\n statusMessage: response.statusText,\n body: arrayify(new Uint8Array(body)),\n };\n });\n}\n//# sourceMappingURL=geturl.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { decode as base64Decode, encode as base64Encode } from \"@ethersproject/base64\";\nimport { hexlify, isBytesLike } from \"@ethersproject/bytes\";\nimport { shallowCopy } from \"@ethersproject/properties\";\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nimport { getUrl } from \"./geturl\";\nfunction staller(duration) {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n}\nfunction bodyify(value, type) {\n if (value == null) {\n return null;\n }\n if (typeof (value) === \"string\") {\n return value;\n }\n if (isBytesLike(value)) {\n if (type && (type.split(\"/\")[0] === \"text\" || type.split(\";\")[0].trim() === \"application/json\")) {\n try {\n return toUtf8String(value);\n }\n catch (error) { }\n ;\n }\n return hexlify(value);\n }\n return value;\n}\nfunction unpercent(value) {\n return toUtf8Bytes(value.replace(/%([0-9a-f][0-9a-f])/gi, (all, code) => {\n return String.fromCharCode(parseInt(code, 16));\n }));\n}\n// This API is still a work in progress; the future changes will likely be:\n// - ConnectionInfo => FetchDataRequest\n// - FetchDataRequest.body? = string | Uint8Array | { contentType: string, data: string | Uint8Array }\n// - If string => text/plain, Uint8Array => application/octet-stream (if content-type unspecified)\n// - FetchDataRequest.processFunc = (body: Uint8Array, response: FetchDataResponse) => T\n// For this reason, it should be considered internal until the API is finalized\nexport function _fetchData(connection, body, processFunc) {\n // How many times to retry in the event of a throttle\n const attemptLimit = (typeof (connection) === \"object\" && connection.throttleLimit != null) ? connection.throttleLimit : 12;\n logger.assertArgument((attemptLimit > 0 && (attemptLimit % 1) === 0), \"invalid connection throttle limit\", \"connection.throttleLimit\", attemptLimit);\n const throttleCallback = ((typeof (connection) === \"object\") ? connection.throttleCallback : null);\n const throttleSlotInterval = ((typeof (connection) === \"object\" && typeof (connection.throttleSlotInterval) === \"number\") ? connection.throttleSlotInterval : 100);\n logger.assertArgument((throttleSlotInterval > 0 && (throttleSlotInterval % 1) === 0), \"invalid connection throttle slot interval\", \"connection.throttleSlotInterval\", throttleSlotInterval);\n const errorPassThrough = ((typeof (connection) === \"object\") ? !!(connection.errorPassThrough) : false);\n const headers = {};\n let url = null;\n // @TODO: Allow ConnectionInfo to override some of these values\n const options = {\n method: \"GET\",\n };\n let allow304 = false;\n let timeout = 2 * 60 * 1000;\n if (typeof (connection) === \"string\") {\n url = connection;\n }\n else if (typeof (connection) === \"object\") {\n if (connection == null || connection.url == null) {\n logger.throwArgumentError(\"missing URL\", \"connection.url\", connection);\n }\n url = connection.url;\n if (typeof (connection.timeout) === \"number\" && connection.timeout > 0) {\n timeout = connection.timeout;\n }\n if (connection.headers) {\n for (const key in connection.headers) {\n headers[key.toLowerCase()] = { key: key, value: String(connection.headers[key]) };\n if ([\"if-none-match\", \"if-modified-since\"].indexOf(key.toLowerCase()) >= 0) {\n allow304 = true;\n }\n }\n }\n options.allowGzip = !!connection.allowGzip;\n if (connection.user != null && connection.password != null) {\n if (url.substring(0, 6) !== \"https:\" && connection.allowInsecureAuthentication !== true) {\n logger.throwError(\"basic authentication requires a secure https url\", Logger.errors.INVALID_ARGUMENT, { argument: \"url\", url: url, user: connection.user, password: \"[REDACTED]\" });\n }\n const authorization = connection.user + \":\" + connection.password;\n headers[\"authorization\"] = {\n key: \"Authorization\",\n value: \"Basic \" + base64Encode(toUtf8Bytes(authorization))\n };\n }\n if (connection.skipFetchSetup != null) {\n options.skipFetchSetup = !!connection.skipFetchSetup;\n }\n if (connection.fetchOptions != null) {\n options.fetchOptions = shallowCopy(connection.fetchOptions);\n }\n }\n const reData = new RegExp(\"^data:([^;:]*)?(;base64)?,(.*)$\", \"i\");\n const dataMatch = ((url) ? url.match(reData) : null);\n if (dataMatch) {\n try {\n const response = {\n statusCode: 200,\n statusMessage: \"OK\",\n headers: { \"content-type\": (dataMatch[1] || \"text/plain\") },\n body: (dataMatch[2] ? base64Decode(dataMatch[3]) : unpercent(dataMatch[3]))\n };\n let result = response.body;\n if (processFunc) {\n result = processFunc(response.body, response);\n }\n return Promise.resolve(result);\n }\n catch (error) {\n logger.throwError(\"processing response error\", Logger.errors.SERVER_ERROR, {\n body: bodyify(dataMatch[1], dataMatch[2]),\n error: error,\n requestBody: null,\n requestMethod: \"GET\",\n url: url\n });\n }\n }\n if (body) {\n options.method = \"POST\";\n options.body = body;\n if (headers[\"content-type\"] == null) {\n headers[\"content-type\"] = { key: \"Content-Type\", value: \"application/octet-stream\" };\n }\n if (headers[\"content-length\"] == null) {\n headers[\"content-length\"] = { key: \"Content-Length\", value: String(body.length) };\n }\n }\n const flatHeaders = {};\n Object.keys(headers).forEach((key) => {\n const header = headers[key];\n flatHeaders[header.key] = header.value;\n });\n options.headers = flatHeaders;\n const runningTimeout = (function () {\n let timer = null;\n const promise = new Promise(function (resolve, reject) {\n if (timeout) {\n timer = setTimeout(() => {\n if (timer == null) {\n return;\n }\n timer = null;\n reject(logger.makeError(\"timeout\", Logger.errors.TIMEOUT, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n timeout: timeout,\n url: url\n }));\n }, timeout);\n }\n });\n const cancel = function () {\n if (timer == null) {\n return;\n }\n clearTimeout(timer);\n timer = null;\n };\n return { promise, cancel };\n })();\n const runningFetch = (function () {\n return __awaiter(this, void 0, void 0, function* () {\n for (let attempt = 0; attempt < attemptLimit; attempt++) {\n let response = null;\n try {\n response = yield getUrl(url, options);\n if (attempt < attemptLimit) {\n if (response.statusCode === 301 || response.statusCode === 302) {\n // Redirection; for now we only support absolute locataions\n const location = response.headers.location || \"\";\n if (options.method === \"GET\" && location.match(/^https:/)) {\n url = response.headers.location;\n continue;\n }\n }\n else if (response.statusCode === 429) {\n // Exponential back-off throttling\n let tryAgain = true;\n if (throttleCallback) {\n tryAgain = yield throttleCallback(attempt, url);\n }\n if (tryAgain) {\n let stall = 0;\n const retryAfter = response.headers[\"retry-after\"];\n if (typeof (retryAfter) === \"string\" && retryAfter.match(/^[1-9][0-9]*$/)) {\n stall = parseInt(retryAfter) * 1000;\n }\n else {\n stall = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n }\n //console.log(\"Stalling 429\");\n yield staller(stall);\n continue;\n }\n }\n }\n }\n catch (error) {\n response = error.response;\n if (response == null) {\n runningTimeout.cancel();\n logger.throwError(\"missing response\", Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n serverError: error,\n url: url\n });\n }\n }\n let body = response.body;\n if (allow304 && response.statusCode === 304) {\n body = null;\n }\n else if (!errorPassThrough && (response.statusCode < 200 || response.statusCode >= 300)) {\n runningTimeout.cancel();\n logger.throwError(\"bad response\", Logger.errors.SERVER_ERROR, {\n status: response.statusCode,\n headers: response.headers,\n body: bodyify(body, ((response.headers) ? response.headers[\"content-type\"] : null)),\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n }\n if (processFunc) {\n try {\n const result = yield processFunc(body, response);\n runningTimeout.cancel();\n return result;\n }\n catch (error) {\n // Allow the processFunc to trigger a throttle\n if (error.throttleRetry && attempt < attemptLimit) {\n let tryAgain = true;\n if (throttleCallback) {\n tryAgain = yield throttleCallback(attempt, url);\n }\n if (tryAgain) {\n const timeout = throttleSlotInterval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n //console.log(\"Stalling callback\");\n yield staller(timeout);\n continue;\n }\n }\n runningTimeout.cancel();\n logger.throwError(\"processing response error\", Logger.errors.SERVER_ERROR, {\n body: bodyify(body, ((response.headers) ? response.headers[\"content-type\"] : null)),\n error: error,\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n }\n }\n runningTimeout.cancel();\n // If we had a processFunc, it either returned a T or threw above.\n // The \"body\" is now a Uint8Array.\n return body;\n }\n return logger.throwError(\"failed response\", Logger.errors.SERVER_ERROR, {\n requestBody: bodyify(options.body, flatHeaders[\"content-type\"]),\n requestMethod: options.method,\n url: url\n });\n });\n })();\n return Promise.race([runningTimeout.promise, runningFetch]);\n}\nexport function fetchJson(connection, json, processFunc) {\n let processJsonFunc = (value, response) => {\n let result = null;\n if (value != null) {\n try {\n result = JSON.parse(toUtf8String(value));\n }\n catch (error) {\n logger.throwError(\"invalid JSON\", Logger.errors.SERVER_ERROR, {\n body: value,\n error: error\n });\n }\n }\n if (processFunc) {\n result = processFunc(result, response);\n }\n return result;\n };\n // If we have json to send, we must\n // - add content-type of application/json (unless already overridden)\n // - convert the json to bytes\n let body = null;\n if (json != null) {\n body = toUtf8Bytes(json);\n // Create a connection with the content-type set for JSON\n const updated = (typeof (connection) === \"string\") ? ({ url: connection }) : shallowCopy(connection);\n if (updated.headers) {\n const hasContentType = (Object.keys(updated.headers).filter((k) => (k.toLowerCase() === \"content-type\")).length) !== 0;\n if (!hasContentType) {\n updated.headers = shallowCopy(updated.headers);\n updated.headers[\"content-type\"] = \"application/json\";\n }\n }\n else {\n updated.headers = { \"content-type\": \"application/json\" };\n }\n connection = updated;\n }\n return _fetchData(connection, body, processJsonFunc);\n}\nexport function poll(func, options) {\n if (!options) {\n options = {};\n }\n options = shallowCopy(options);\n if (options.floor == null) {\n options.floor = 0;\n }\n if (options.ceiling == null) {\n options.ceiling = 10000;\n }\n if (options.interval == null) {\n options.interval = 250;\n }\n return new Promise(function (resolve, reject) {\n let timer = null;\n let done = false;\n // Returns true if cancel was successful. Unsuccessful cancel means we're already done.\n const cancel = () => {\n if (done) {\n return false;\n }\n done = true;\n if (timer) {\n clearTimeout(timer);\n }\n return true;\n };\n if (options.timeout) {\n timer = setTimeout(() => {\n if (cancel()) {\n reject(new Error(\"timeout\"));\n }\n }, options.timeout);\n }\n const retryLimit = options.retryLimit;\n let attempt = 0;\n function check() {\n return func().then(function (result) {\n // If we have a result, or are allowed null then we're done\n if (result !== undefined) {\n if (cancel()) {\n resolve(result);\n }\n }\n else if (options.oncePoll) {\n options.oncePoll.once(\"poll\", check);\n }\n else if (options.onceBlock) {\n options.onceBlock.once(\"block\", check);\n // Otherwise, exponential back-off (up to 10s) our next request\n }\n else if (!done) {\n attempt++;\n if (attempt > retryLimit) {\n if (cancel()) {\n reject(new Error(\"retry limit reached\"));\n }\n return;\n }\n let timeout = options.interval * parseInt(String(Math.random() * Math.pow(2, attempt)));\n if (timeout < options.floor) {\n timeout = options.floor;\n }\n if (timeout > options.ceiling) {\n timeout = options.ceiling;\n }\n setTimeout(check, timeout);\n }\n return null;\n }, function (error) {\n if (cancel()) {\n reject(error);\n }\n });\n }\n check();\n });\n}\n//# sourceMappingURL=index.js.map","'use strict'\nvar ALPHABET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'\n\n// pre-compute lookup table\nvar ALPHABET_MAP = {}\nfor (var z = 0; z < ALPHABET.length; z++) {\n var x = ALPHABET.charAt(z)\n\n if (ALPHABET_MAP[x] !== undefined) throw new TypeError(x + ' is ambiguous')\n ALPHABET_MAP[x] = z\n}\n\nfunction polymodStep (pre) {\n var b = pre >> 25\n return ((pre & 0x1FFFFFF) << 5) ^\n (-((b >> 0) & 1) & 0x3b6a57b2) ^\n (-((b >> 1) & 1) & 0x26508e6d) ^\n (-((b >> 2) & 1) & 0x1ea119fa) ^\n (-((b >> 3) & 1) & 0x3d4233dd) ^\n (-((b >> 4) & 1) & 0x2a1462b3)\n}\n\nfunction prefixChk (prefix) {\n var chk = 1\n for (var i = 0; i < prefix.length; ++i) {\n var c = prefix.charCodeAt(i)\n if (c < 33 || c > 126) return 'Invalid prefix (' + prefix + ')'\n\n chk = polymodStep(chk) ^ (c >> 5)\n }\n chk = polymodStep(chk)\n\n for (i = 0; i < prefix.length; ++i) {\n var v = prefix.charCodeAt(i)\n chk = polymodStep(chk) ^ (v & 0x1f)\n }\n return chk\n}\n\nfunction encode (prefix, words, LIMIT) {\n LIMIT = LIMIT || 90\n if ((prefix.length + 7 + words.length) > LIMIT) throw new TypeError('Exceeds length limit')\n\n prefix = prefix.toLowerCase()\n\n // determine chk mod\n var chk = prefixChk(prefix)\n if (typeof chk === 'string') throw new Error(chk)\n\n var result = prefix + '1'\n for (var i = 0; i < words.length; ++i) {\n var x = words[i]\n if ((x >> 5) !== 0) throw new Error('Non 5-bit word')\n\n chk = polymodStep(chk) ^ x\n result += ALPHABET.charAt(x)\n }\n\n for (i = 0; i < 6; ++i) {\n chk = polymodStep(chk)\n }\n chk ^= 1\n\n for (i = 0; i < 6; ++i) {\n var v = (chk >> ((5 - i) * 5)) & 0x1f\n result += ALPHABET.charAt(v)\n }\n\n return result\n}\n\nfunction __decode (str, LIMIT) {\n LIMIT = LIMIT || 90\n if (str.length < 8) return str + ' too short'\n if (str.length > LIMIT) return 'Exceeds length limit'\n\n // don't allow mixed case\n var lowered = str.toLowerCase()\n var uppered = str.toUpperCase()\n if (str !== lowered && str !== uppered) return 'Mixed-case string ' + str\n str = lowered\n\n var split = str.lastIndexOf('1')\n if (split === -1) return 'No separator character for ' + str\n if (split === 0) return 'Missing prefix for ' + str\n\n var prefix = str.slice(0, split)\n var wordChars = str.slice(split + 1)\n if (wordChars.length < 6) return 'Data too short'\n\n var chk = prefixChk(prefix)\n if (typeof chk === 'string') return chk\n\n var words = []\n for (var i = 0; i < wordChars.length; ++i) {\n var c = wordChars.charAt(i)\n var v = ALPHABET_MAP[c]\n if (v === undefined) return 'Unknown character ' + c\n chk = polymodStep(chk) ^ v\n\n // not in the checksum?\n if (i + 6 >= wordChars.length) continue\n words.push(v)\n }\n\n if (chk !== 1) return 'Invalid checksum for ' + str\n return { prefix: prefix, words: words }\n}\n\nfunction decodeUnsafe () {\n var res = __decode.apply(null, arguments)\n if (typeof res === 'object') return res\n}\n\nfunction decode (str) {\n var res = __decode.apply(null, arguments)\n if (typeof res === 'object') return res\n\n throw new Error(res)\n}\n\nfunction convert (data, inBits, outBits, pad) {\n var value = 0\n var bits = 0\n var maxV = (1 << outBits) - 1\n\n var result = []\n for (var i = 0; i < data.length; ++i) {\n value = (value << inBits) | data[i]\n bits += inBits\n\n while (bits >= outBits) {\n bits -= outBits\n result.push((value >> bits) & maxV)\n }\n }\n\n if (pad) {\n if (bits > 0) {\n result.push((value << (outBits - bits)) & maxV)\n }\n } else {\n if (bits >= inBits) return 'Excess padding'\n if ((value << (outBits - bits)) & maxV) return 'Non-zero padding'\n }\n\n return result\n}\n\nfunction toWordsUnsafe (bytes) {\n var res = convert(bytes, 8, 5, true)\n if (Array.isArray(res)) return res\n}\n\nfunction toWords (bytes) {\n var res = convert(bytes, 8, 5, true)\n if (Array.isArray(res)) return res\n\n throw new Error(res)\n}\n\nfunction fromWordsUnsafe (words) {\n var res = convert(words, 5, 8, false)\n if (Array.isArray(res)) return res\n}\n\nfunction fromWords (words) {\n var res = convert(words, 5, 8, false)\n if (Array.isArray(res)) return res\n\n throw new Error(res)\n}\n\nmodule.exports = {\n decodeUnsafe: decodeUnsafe,\n decode: decode,\n encode: encode,\n toWordsUnsafe: toWordsUnsafe,\n toWords: toWords,\n fromWordsUnsafe: fromWordsUnsafe,\n fromWords: fromWords\n}\n","export const version = \"providers/5.7.2\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { getAddress, getContractAddress } from \"@ethersproject/address\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { hexDataLength, hexDataSlice, hexValue, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { AddressZero } from \"@ethersproject/constants\";\nimport { shallowCopy } from \"@ethersproject/properties\";\nimport { accessListify, parse as parseTransaction } from \"@ethersproject/transactions\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nexport class Formatter {\n constructor() {\n this.formats = this.getDefaultFormats();\n }\n getDefaultFormats() {\n const formats = ({});\n const address = this.address.bind(this);\n const bigNumber = this.bigNumber.bind(this);\n const blockTag = this.blockTag.bind(this);\n const data = this.data.bind(this);\n const hash = this.hash.bind(this);\n const hex = this.hex.bind(this);\n const number = this.number.bind(this);\n const type = this.type.bind(this);\n const strictData = (v) => { return this.data(v, true); };\n formats.transaction = {\n hash: hash,\n type: type,\n accessList: Formatter.allowNull(this.accessList.bind(this), null),\n blockHash: Formatter.allowNull(hash, null),\n blockNumber: Formatter.allowNull(number, null),\n transactionIndex: Formatter.allowNull(number, null),\n confirmations: Formatter.allowNull(number, null),\n from: address,\n // either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas)\n // must be set\n gasPrice: Formatter.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter.allowNull(bigNumber),\n maxFeePerGas: Formatter.allowNull(bigNumber),\n gasLimit: bigNumber,\n to: Formatter.allowNull(address, null),\n value: bigNumber,\n nonce: number,\n data: data,\n r: Formatter.allowNull(this.uint256),\n s: Formatter.allowNull(this.uint256),\n v: Formatter.allowNull(number),\n creates: Formatter.allowNull(address, null),\n raw: Formatter.allowNull(data),\n };\n formats.transactionRequest = {\n from: Formatter.allowNull(address),\n nonce: Formatter.allowNull(number),\n gasLimit: Formatter.allowNull(bigNumber),\n gasPrice: Formatter.allowNull(bigNumber),\n maxPriorityFeePerGas: Formatter.allowNull(bigNumber),\n maxFeePerGas: Formatter.allowNull(bigNumber),\n to: Formatter.allowNull(address),\n value: Formatter.allowNull(bigNumber),\n data: Formatter.allowNull(strictData),\n type: Formatter.allowNull(number),\n accessList: Formatter.allowNull(this.accessList.bind(this), null),\n };\n formats.receiptLog = {\n transactionIndex: number,\n blockNumber: number,\n transactionHash: hash,\n address: address,\n topics: Formatter.arrayOf(hash),\n data: data,\n logIndex: number,\n blockHash: hash,\n };\n formats.receipt = {\n to: Formatter.allowNull(this.address, null),\n from: Formatter.allowNull(this.address, null),\n contractAddress: Formatter.allowNull(address, null),\n transactionIndex: number,\n // should be allowNull(hash), but broken-EIP-658 support is handled in receipt\n root: Formatter.allowNull(hex),\n gasUsed: bigNumber,\n logsBloom: Formatter.allowNull(data),\n blockHash: hash,\n transactionHash: hash,\n logs: Formatter.arrayOf(this.receiptLog.bind(this)),\n blockNumber: number,\n confirmations: Formatter.allowNull(number, null),\n cumulativeGasUsed: bigNumber,\n effectiveGasPrice: Formatter.allowNull(bigNumber),\n status: Formatter.allowNull(number),\n type: type\n };\n formats.block = {\n hash: Formatter.allowNull(hash),\n parentHash: hash,\n number: number,\n timestamp: number,\n nonce: Formatter.allowNull(hex),\n difficulty: this.difficulty.bind(this),\n gasLimit: bigNumber,\n gasUsed: bigNumber,\n miner: Formatter.allowNull(address),\n extraData: data,\n transactions: Formatter.allowNull(Formatter.arrayOf(hash)),\n baseFeePerGas: Formatter.allowNull(bigNumber)\n };\n formats.blockWithTransactions = shallowCopy(formats.block);\n formats.blockWithTransactions.transactions = Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this)));\n formats.filter = {\n fromBlock: Formatter.allowNull(blockTag, undefined),\n toBlock: Formatter.allowNull(blockTag, undefined),\n blockHash: Formatter.allowNull(hash, undefined),\n address: Formatter.allowNull(address, undefined),\n topics: Formatter.allowNull(this.topics.bind(this), undefined),\n };\n formats.filterLog = {\n blockNumber: Formatter.allowNull(number),\n blockHash: Formatter.allowNull(hash),\n transactionIndex: number,\n removed: Formatter.allowNull(this.boolean.bind(this)),\n address: address,\n data: Formatter.allowFalsish(data, \"0x\"),\n topics: Formatter.arrayOf(hash),\n transactionHash: hash,\n logIndex: number,\n };\n return formats;\n }\n accessList(accessList) {\n return accessListify(accessList || []);\n }\n // Requires a BigNumberish that is within the IEEE754 safe integer range; returns a number\n // Strict! Used on input.\n number(number) {\n if (number === \"0x\") {\n return 0;\n }\n return BigNumber.from(number).toNumber();\n }\n type(number) {\n if (number === \"0x\" || number == null) {\n return 0;\n }\n return BigNumber.from(number).toNumber();\n }\n // Strict! Used on input.\n bigNumber(value) {\n return BigNumber.from(value);\n }\n // Requires a boolean, \"true\" or \"false\"; returns a boolean\n boolean(value) {\n if (typeof (value) === \"boolean\") {\n return value;\n }\n if (typeof (value) === \"string\") {\n value = value.toLowerCase();\n if (value === \"true\") {\n return true;\n }\n if (value === \"false\") {\n return false;\n }\n }\n throw new Error(\"invalid boolean - \" + value);\n }\n hex(value, strict) {\n if (typeof (value) === \"string\") {\n if (!strict && value.substring(0, 2) !== \"0x\") {\n value = \"0x\" + value;\n }\n if (isHexString(value)) {\n return value.toLowerCase();\n }\n }\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n data(value, strict) {\n const result = this.hex(value, strict);\n if ((result.length % 2) !== 0) {\n throw new Error(\"invalid data; odd-length - \" + value);\n }\n return result;\n }\n // Requires an address\n // Strict! Used on input.\n address(value) {\n return getAddress(value);\n }\n callAddress(value) {\n if (!isHexString(value, 32)) {\n return null;\n }\n const address = getAddress(hexDataSlice(value, 12));\n return (address === AddressZero) ? null : address;\n }\n contractAddress(value) {\n return getContractAddress(value);\n }\n // Strict! Used on input.\n blockTag(blockTag) {\n if (blockTag == null) {\n return \"latest\";\n }\n if (blockTag === \"earliest\") {\n return \"0x0\";\n }\n switch (blockTag) {\n case \"earliest\": return \"0x0\";\n case \"latest\":\n case \"pending\":\n case \"safe\":\n case \"finalized\":\n return blockTag;\n }\n if (typeof (blockTag) === \"number\" || isHexString(blockTag)) {\n return hexValue(blockTag);\n }\n throw new Error(\"invalid blockTag\");\n }\n // Requires a hash, optionally requires 0x prefix; returns prefixed lowercase hash.\n hash(value, strict) {\n const result = this.hex(value, strict);\n if (hexDataLength(result) !== 32) {\n return logger.throwArgumentError(\"invalid hash\", \"value\", value);\n }\n return result;\n }\n // Returns the difficulty as a number, or if too large (i.e. PoA network) null\n difficulty(value) {\n if (value == null) {\n return null;\n }\n const v = BigNumber.from(value);\n try {\n return v.toNumber();\n }\n catch (error) { }\n return null;\n }\n uint256(value) {\n if (!isHexString(value)) {\n throw new Error(\"invalid uint256\");\n }\n return hexZeroPad(value, 32);\n }\n _block(value, format) {\n if (value.author != null && value.miner == null) {\n value.miner = value.author;\n }\n // The difficulty may need to come from _difficulty in recursed blocks\n const difficulty = (value._difficulty != null) ? value._difficulty : value.difficulty;\n const result = Formatter.check(format, value);\n result._difficulty = ((difficulty == null) ? null : BigNumber.from(difficulty));\n return result;\n }\n block(value) {\n return this._block(value, this.formats.block);\n }\n blockWithTransactions(value) {\n return this._block(value, this.formats.blockWithTransactions);\n }\n // Strict! Used on input.\n transactionRequest(value) {\n return Formatter.check(this.formats.transactionRequest, value);\n }\n transactionResponse(transaction) {\n // Rename gas to gasLimit\n if (transaction.gas != null && transaction.gasLimit == null) {\n transaction.gasLimit = transaction.gas;\n }\n // Some clients (TestRPC) do strange things like return 0x0 for the\n // 0 address; correct this to be a real address\n if (transaction.to && BigNumber.from(transaction.to).isZero()) {\n transaction.to = \"0x0000000000000000000000000000000000000000\";\n }\n // Rename input to data\n if (transaction.input != null && transaction.data == null) {\n transaction.data = transaction.input;\n }\n // If to and creates are empty, populate the creates from the transaction\n if (transaction.to == null && transaction.creates == null) {\n transaction.creates = this.contractAddress(transaction);\n }\n if ((transaction.type === 1 || transaction.type === 2) && transaction.accessList == null) {\n transaction.accessList = [];\n }\n const result = Formatter.check(this.formats.transaction, transaction);\n if (transaction.chainId != null) {\n let chainId = transaction.chainId;\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n result.chainId = chainId;\n }\n else {\n let chainId = transaction.networkId;\n // geth-etc returns chainId\n if (chainId == null && result.v == null) {\n chainId = transaction.chainId;\n }\n if (isHexString(chainId)) {\n chainId = BigNumber.from(chainId).toNumber();\n }\n if (typeof (chainId) !== \"number\" && result.v != null) {\n chainId = (result.v - 35) / 2;\n if (chainId < 0) {\n chainId = 0;\n }\n chainId = parseInt(chainId);\n }\n if (typeof (chainId) !== \"number\") {\n chainId = 0;\n }\n result.chainId = chainId;\n }\n // 0x0000... should actually be null\n if (result.blockHash && result.blockHash.replace(/0/g, \"\") === \"x\") {\n result.blockHash = null;\n }\n return result;\n }\n transaction(value) {\n return parseTransaction(value);\n }\n receiptLog(value) {\n return Formatter.check(this.formats.receiptLog, value);\n }\n receipt(value) {\n const result = Formatter.check(this.formats.receipt, value);\n // RSK incorrectly implemented EIP-658, so we munge things a bit here for it\n if (result.root != null) {\n if (result.root.length <= 4) {\n // Could be 0x00, 0x0, 0x01 or 0x1\n const value = BigNumber.from(result.root).toNumber();\n if (value === 0 || value === 1) {\n // Make sure if both are specified, they match\n if (result.status != null && (result.status !== value)) {\n logger.throwArgumentError(\"alt-root-status/status mismatch\", \"value\", { root: result.root, status: result.status });\n }\n result.status = value;\n delete result.root;\n }\n else {\n logger.throwArgumentError(\"invalid alt-root-status\", \"value.root\", result.root);\n }\n }\n else if (result.root.length !== 66) {\n // Must be a valid bytes32\n logger.throwArgumentError(\"invalid root hash\", \"value.root\", result.root);\n }\n }\n if (result.status != null) {\n result.byzantium = true;\n }\n return result;\n }\n topics(value) {\n if (Array.isArray(value)) {\n return value.map((v) => this.topics(v));\n }\n else if (value != null) {\n return this.hash(value, true);\n }\n return null;\n }\n filter(value) {\n return Formatter.check(this.formats.filter, value);\n }\n filterLog(value) {\n return Formatter.check(this.formats.filterLog, value);\n }\n static check(format, object) {\n const result = {};\n for (const key in format) {\n try {\n const value = format[key](object[key]);\n if (value !== undefined) {\n result[key] = value;\n }\n }\n catch (error) {\n error.checkKey = key;\n error.checkValue = object[key];\n throw error;\n }\n }\n return result;\n }\n // if value is null-ish, nullValue is returned\n static allowNull(format, nullValue) {\n return (function (value) {\n if (value == null) {\n return nullValue;\n }\n return format(value);\n });\n }\n // If value is false-ish, replaceValue is returned\n static allowFalsish(format, replaceValue) {\n return (function (value) {\n if (!value) {\n return replaceValue;\n }\n return format(value);\n });\n }\n // Requires an Array satisfying check\n static arrayOf(format) {\n return (function (array) {\n if (!Array.isArray(array)) {\n throw new Error(\"not an array\");\n }\n const result = [];\n array.forEach(function (value) {\n result.push(format(value));\n });\n return result;\n });\n }\n}\nexport function isCommunityResourcable(value) {\n return (value && typeof (value.isCommunityResource) === \"function\");\n}\nexport function isCommunityResource(value) {\n return (isCommunityResourcable(value) && value.isCommunityResource());\n}\n// Show the throttle message only once\nlet throttleMessage = false;\nexport function showThrottleMessage() {\n if (throttleMessage) {\n return;\n }\n throttleMessage = true;\n console.log(\"========= NOTICE =========\");\n console.log(\"Request-Rate Exceeded (this message will not be repeated)\");\n console.log(\"\");\n console.log(\"The default API keys for each service are provided as a highly-throttled,\");\n console.log(\"community resource for low-traffic projects and early prototyping.\");\n console.log(\"\");\n console.log(\"While your application will continue to function, we highly recommended\");\n console.log(\"signing up for your own API keys to improve performance, increase your\");\n console.log(\"request rate/limit and enable other perks, such as metrics and advanced APIs.\");\n console.log(\"\");\n console.log(\"For more details: https:/\\/docs.ethers.io/api-keys/\");\n console.log(\"==========================\");\n}\n//# sourceMappingURL=formatter.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { ForkEvent, Provider } from \"@ethersproject/abstract-provider\";\nimport { encode as base64Encode } from \"@ethersproject/base64\";\nimport { Base58 } from \"@ethersproject/basex\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexConcat, hexDataLength, hexDataSlice, hexlify, hexValue, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { HashZero } from \"@ethersproject/constants\";\nimport { dnsEncode, namehash } from \"@ethersproject/hash\";\nimport { getNetwork } from \"@ethersproject/networks\";\nimport { defineReadOnly, getStatic, resolveProperties } from \"@ethersproject/properties\";\nimport { sha256 } from \"@ethersproject/sha2\";\nimport { toUtf8Bytes, toUtf8String } from \"@ethersproject/strings\";\nimport { fetchJson, poll } from \"@ethersproject/web\";\nimport bech32 from \"bech32\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nimport { Formatter } from \"./formatter\";\nconst MAX_CCIP_REDIRECTS = 10;\n//////////////////////////////\n// Event Serializeing\nfunction checkTopic(topic) {\n if (topic == null) {\n return \"null\";\n }\n if (hexDataLength(topic) !== 32) {\n logger.throwArgumentError(\"invalid topic\", \"topic\", topic);\n }\n return topic.toLowerCase();\n}\nfunction serializeTopics(topics) {\n // Remove trailing null AND-topics; they are redundant\n topics = topics.slice();\n while (topics.length > 0 && topics[topics.length - 1] == null) {\n topics.pop();\n }\n return topics.map((topic) => {\n if (Array.isArray(topic)) {\n // Only track unique OR-topics\n const unique = {};\n topic.forEach((topic) => {\n unique[checkTopic(topic)] = true;\n });\n // The order of OR-topics does not matter\n const sorted = Object.keys(unique);\n sorted.sort();\n return sorted.join(\"|\");\n }\n else {\n return checkTopic(topic);\n }\n }).join(\"&\");\n}\nfunction deserializeTopics(data) {\n if (data === \"\") {\n return [];\n }\n return data.split(/&/g).map((topic) => {\n if (topic === \"\") {\n return [];\n }\n const comps = topic.split(\"|\").map((topic) => {\n return ((topic === \"null\") ? null : topic);\n });\n return ((comps.length === 1) ? comps[0] : comps);\n });\n}\nfunction getEventTag(eventName) {\n if (typeof (eventName) === \"string\") {\n eventName = eventName.toLowerCase();\n if (hexDataLength(eventName) === 32) {\n return \"tx:\" + eventName;\n }\n if (eventName.indexOf(\":\") === -1) {\n return eventName;\n }\n }\n else if (Array.isArray(eventName)) {\n return \"filter:*:\" + serializeTopics(eventName);\n }\n else if (ForkEvent.isForkEvent(eventName)) {\n logger.warn(\"not implemented\");\n throw new Error(\"not implemented\");\n }\n else if (eventName && typeof (eventName) === \"object\") {\n return \"filter:\" + (eventName.address || \"*\") + \":\" + serializeTopics(eventName.topics || []);\n }\n throw new Error(\"invalid event - \" + eventName);\n}\n//////////////////////////////\n// Helper Object\nfunction getTime() {\n return (new Date()).getTime();\n}\nfunction stall(duration) {\n return new Promise((resolve) => {\n setTimeout(resolve, duration);\n });\n}\n//////////////////////////////\n// Provider Object\n/**\n * EventType\n * - \"block\"\n * - \"poll\"\n * - \"didPoll\"\n * - \"pending\"\n * - \"error\"\n * - \"network\"\n * - filter\n * - topics array\n * - transaction hash\n */\nconst PollableEvents = [\"block\", \"network\", \"pending\", \"poll\"];\nexport class Event {\n constructor(tag, listener, once) {\n defineReadOnly(this, \"tag\", tag);\n defineReadOnly(this, \"listener\", listener);\n defineReadOnly(this, \"once\", once);\n this._lastBlockNumber = -2;\n this._inflight = false;\n }\n get event() {\n switch (this.type) {\n case \"tx\":\n return this.hash;\n case \"filter\":\n return this.filter;\n }\n return this.tag;\n }\n get type() {\n return this.tag.split(\":\")[0];\n }\n get hash() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"tx\") {\n return null;\n }\n return comps[1];\n }\n get filter() {\n const comps = this.tag.split(\":\");\n if (comps[0] !== \"filter\") {\n return null;\n }\n const address = comps[1];\n const topics = deserializeTopics(comps[2]);\n const filter = {};\n if (topics.length > 0) {\n filter.topics = topics;\n }\n if (address && address !== \"*\") {\n filter.address = address;\n }\n return filter;\n }\n pollable() {\n return (this.tag.indexOf(\":\") >= 0 || PollableEvents.indexOf(this.tag) >= 0);\n }\n}\n;\n// https://github.com/satoshilabs/slips/blob/master/slip-0044.md\nconst coinInfos = {\n \"0\": { symbol: \"btc\", p2pkh: 0x00, p2sh: 0x05, prefix: \"bc\" },\n \"2\": { symbol: \"ltc\", p2pkh: 0x30, p2sh: 0x32, prefix: \"ltc\" },\n \"3\": { symbol: \"doge\", p2pkh: 0x1e, p2sh: 0x16 },\n \"60\": { symbol: \"eth\", ilk: \"eth\" },\n \"61\": { symbol: \"etc\", ilk: \"eth\" },\n \"700\": { symbol: \"xdai\", ilk: \"eth\" },\n};\nfunction bytes32ify(value) {\n return hexZeroPad(BigNumber.from(value).toHexString(), 32);\n}\n// Compute the Base58Check encoded data (checksum is first 4 bytes of sha256d)\nfunction base58Encode(data) {\n return Base58.encode(concat([data, hexDataSlice(sha256(sha256(data)), 0, 4)]));\n}\nconst matcherIpfs = new RegExp(\"^(ipfs):/\\/(.*)$\", \"i\");\nconst matchers = [\n new RegExp(\"^(https):/\\/(.*)$\", \"i\"),\n new RegExp(\"^(data):(.*)$\", \"i\"),\n matcherIpfs,\n new RegExp(\"^eip155:[0-9]+/(erc[0-9]+):(.*)$\", \"i\"),\n];\nfunction _parseString(result, start) {\n try {\n return toUtf8String(_parseBytes(result, start));\n }\n catch (error) { }\n return null;\n}\nfunction _parseBytes(result, start) {\n if (result === \"0x\") {\n return null;\n }\n const offset = BigNumber.from(hexDataSlice(result, start, start + 32)).toNumber();\n const length = BigNumber.from(hexDataSlice(result, offset, offset + 32)).toNumber();\n return hexDataSlice(result, offset + 32, offset + 32 + length);\n}\n// Trim off the ipfs:// prefix and return the default gateway URL\nfunction getIpfsLink(link) {\n if (link.match(/^ipfs:\\/\\/ipfs\\//i)) {\n link = link.substring(12);\n }\n else if (link.match(/^ipfs:\\/\\//i)) {\n link = link.substring(7);\n }\n else {\n logger.throwArgumentError(\"unsupported IPFS format\", \"link\", link);\n }\n return `https:/\\/gateway.ipfs.io/ipfs/${link}`;\n}\nfunction numPad(value) {\n const result = arrayify(value);\n if (result.length > 32) {\n throw new Error(\"internal; should not happen\");\n }\n const padded = new Uint8Array(32);\n padded.set(result, 32 - result.length);\n return padded;\n}\nfunction bytesPad(value) {\n if ((value.length % 32) === 0) {\n return value;\n }\n const result = new Uint8Array(Math.ceil(value.length / 32) * 32);\n result.set(value);\n return result;\n}\n// ABI Encodes a series of (bytes, bytes, ...)\nfunction encodeBytes(datas) {\n const result = [];\n let byteCount = 0;\n // Add place-holders for pointers as we add items\n for (let i = 0; i < datas.length; i++) {\n result.push(null);\n byteCount += 32;\n }\n for (let i = 0; i < datas.length; i++) {\n const data = arrayify(datas[i]);\n // Update the bytes offset\n result[i] = numPad(byteCount);\n // The length and padded value of data\n result.push(numPad(data.length));\n result.push(bytesPad(data));\n byteCount += 32 + Math.ceil(data.length / 32) * 32;\n }\n return hexConcat(result);\n}\nexport class Resolver {\n // The resolvedAddress is only for creating a ReverseLookup resolver\n constructor(provider, address, name, resolvedAddress) {\n defineReadOnly(this, \"provider\", provider);\n defineReadOnly(this, \"name\", name);\n defineReadOnly(this, \"address\", provider.formatter.address(address));\n defineReadOnly(this, \"_resolvedAddress\", resolvedAddress);\n }\n supportsWildcard() {\n if (!this._supportsEip2544) {\n // supportsInterface(bytes4 = selector(\"resolve(bytes,bytes)\"))\n this._supportsEip2544 = this.provider.call({\n to: this.address,\n data: \"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000\"\n }).then((result) => {\n return BigNumber.from(result).eq(1);\n }).catch((error) => {\n if (error.code === Logger.errors.CALL_EXCEPTION) {\n return false;\n }\n // Rethrow the error: link is down, etc. Let future attempts retry.\n this._supportsEip2544 = null;\n throw error;\n });\n }\n return this._supportsEip2544;\n }\n _fetch(selector, parameters) {\n return __awaiter(this, void 0, void 0, function* () {\n // e.g. keccak256(\"addr(bytes32,uint256)\")\n const tx = {\n to: this.address,\n ccipReadEnabled: true,\n data: hexConcat([selector, namehash(this.name), (parameters || \"0x\")])\n };\n // Wildcard support; use EIP-2544 to resolve the request\n let parseBytes = false;\n if (yield this.supportsWildcard()) {\n parseBytes = true;\n // selector(\"resolve(bytes,bytes)\")\n tx.data = hexConcat([\"0x9061b923\", encodeBytes([dnsEncode(this.name), tx.data])]);\n }\n try {\n let result = yield this.provider.call(tx);\n if ((arrayify(result).length % 32) === 4) {\n logger.throwError(\"resolver threw error\", Logger.errors.CALL_EXCEPTION, {\n transaction: tx, data: result\n });\n }\n if (parseBytes) {\n result = _parseBytes(result, 0);\n }\n return result;\n }\n catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) {\n return null;\n }\n throw error;\n }\n });\n }\n _fetchBytes(selector, parameters) {\n return __awaiter(this, void 0, void 0, function* () {\n const result = yield this._fetch(selector, parameters);\n if (result != null) {\n return _parseBytes(result, 0);\n }\n return null;\n });\n }\n _getAddress(coinType, hexBytes) {\n const coinInfo = coinInfos[String(coinType)];\n if (coinInfo == null) {\n logger.throwError(`unsupported coin type: ${coinType}`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `getAddress(${coinType})`\n });\n }\n if (coinInfo.ilk === \"eth\") {\n return this.provider.formatter.address(hexBytes);\n }\n const bytes = arrayify(hexBytes);\n // P2PKH: OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG\n if (coinInfo.p2pkh != null) {\n const p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);\n if (p2pkh) {\n const length = parseInt(p2pkh[1], 16);\n if (p2pkh[2].length === length * 2 && length >= 1 && length <= 75) {\n return base58Encode(concat([[coinInfo.p2pkh], (\"0x\" + p2pkh[2])]));\n }\n }\n }\n // P2SH: OP_HASH160 OP_EQUAL\n if (coinInfo.p2sh != null) {\n const p2sh = hexBytes.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);\n if (p2sh) {\n const length = parseInt(p2sh[1], 16);\n if (p2sh[2].length === length * 2 && length >= 1 && length <= 75) {\n return base58Encode(concat([[coinInfo.p2sh], (\"0x\" + p2sh[2])]));\n }\n }\n }\n // Bech32\n if (coinInfo.prefix != null) {\n const length = bytes[1];\n // https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#witness-program\n let version = bytes[0];\n if (version === 0x00) {\n if (length !== 20 && length !== 32) {\n version = -1;\n }\n }\n else {\n version = -1;\n }\n if (version >= 0 && bytes.length === 2 + length && length >= 1 && length <= 75) {\n const words = bech32.toWords(bytes.slice(2));\n words.unshift(version);\n return bech32.encode(coinInfo.prefix, words);\n }\n }\n return null;\n }\n getAddress(coinType) {\n return __awaiter(this, void 0, void 0, function* () {\n if (coinType == null) {\n coinType = 60;\n }\n // If Ethereum, use the standard `addr(bytes32)`\n if (coinType === 60) {\n try {\n // keccak256(\"addr(bytes32)\")\n const result = yield this._fetch(\"0x3b3b57de\");\n // No address\n if (result === \"0x\" || result === HashZero) {\n return null;\n }\n return this.provider.formatter.callAddress(result);\n }\n catch (error) {\n if (error.code === Logger.errors.CALL_EXCEPTION) {\n return null;\n }\n throw error;\n }\n }\n // keccak256(\"addr(bytes32,uint256\")\n const hexBytes = yield this._fetchBytes(\"0xf1cb7e06\", bytes32ify(coinType));\n // No address\n if (hexBytes == null || hexBytes === \"0x\") {\n return null;\n }\n // Compute the address\n const address = this._getAddress(coinType, hexBytes);\n if (address == null) {\n logger.throwError(`invalid or unsupported coin data`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `getAddress(${coinType})`,\n coinType: coinType,\n data: hexBytes\n });\n }\n return address;\n });\n }\n getAvatar() {\n return __awaiter(this, void 0, void 0, function* () {\n const linkage = [{ type: \"name\", content: this.name }];\n try {\n // test data for ricmoo.eth\n //const avatar = \"eip155:1/erc721:0x265385c7f4132228A0d54EB1A9e7460b91c0cC68/29233\";\n const avatar = yield this.getText(\"avatar\");\n if (avatar == null) {\n return null;\n }\n for (let i = 0; i < matchers.length; i++) {\n const match = avatar.match(matchers[i]);\n if (match == null) {\n continue;\n }\n const scheme = match[1].toLowerCase();\n switch (scheme) {\n case \"https\":\n linkage.push({ type: \"url\", content: avatar });\n return { linkage, url: avatar };\n case \"data\":\n linkage.push({ type: \"data\", content: avatar });\n return { linkage, url: avatar };\n case \"ipfs\":\n linkage.push({ type: \"ipfs\", content: avatar });\n return { linkage, url: getIpfsLink(avatar) };\n case \"erc721\":\n case \"erc1155\": {\n // Depending on the ERC type, use tokenURI(uint256) or url(uint256)\n const selector = (scheme === \"erc721\") ? \"0xc87b56dd\" : \"0x0e89341c\";\n linkage.push({ type: scheme, content: avatar });\n // The owner of this name\n const owner = (this._resolvedAddress || (yield this.getAddress()));\n const comps = (match[2] || \"\").split(\"/\");\n if (comps.length !== 2) {\n return null;\n }\n const addr = yield this.provider.formatter.address(comps[0]);\n const tokenId = hexZeroPad(BigNumber.from(comps[1]).toHexString(), 32);\n // Check that this account owns the token\n if (scheme === \"erc721\") {\n // ownerOf(uint256 tokenId)\n const tokenOwner = this.provider.formatter.callAddress(yield this.provider.call({\n to: addr, data: hexConcat([\"0x6352211e\", tokenId])\n }));\n if (owner !== tokenOwner) {\n return null;\n }\n linkage.push({ type: \"owner\", content: tokenOwner });\n }\n else if (scheme === \"erc1155\") {\n // balanceOf(address owner, uint256 tokenId)\n const balance = BigNumber.from(yield this.provider.call({\n to: addr, data: hexConcat([\"0x00fdd58e\", hexZeroPad(owner, 32), tokenId])\n }));\n if (balance.isZero()) {\n return null;\n }\n linkage.push({ type: \"balance\", content: balance.toString() });\n }\n // Call the token contract for the metadata URL\n const tx = {\n to: this.provider.formatter.address(comps[0]),\n data: hexConcat([selector, tokenId])\n };\n let metadataUrl = _parseString(yield this.provider.call(tx), 0);\n if (metadataUrl == null) {\n return null;\n }\n linkage.push({ type: \"metadata-url-base\", content: metadataUrl });\n // ERC-1155 allows a generic {id} in the URL\n if (scheme === \"erc1155\") {\n metadataUrl = metadataUrl.replace(\"{id}\", tokenId.substring(2));\n linkage.push({ type: \"metadata-url-expanded\", content: metadataUrl });\n }\n // Transform IPFS metadata links\n if (metadataUrl.match(/^ipfs:/i)) {\n metadataUrl = getIpfsLink(metadataUrl);\n }\n linkage.push({ type: \"metadata-url\", content: metadataUrl });\n // Get the token metadata\n const metadata = yield fetchJson(metadataUrl);\n if (!metadata) {\n return null;\n }\n linkage.push({ type: \"metadata\", content: JSON.stringify(metadata) });\n // Pull the image URL out\n let imageUrl = metadata.image;\n if (typeof (imageUrl) !== \"string\") {\n return null;\n }\n if (imageUrl.match(/^(https:\\/\\/|data:)/i)) {\n // Allow\n }\n else {\n // Transform IPFS link to gateway\n const ipfs = imageUrl.match(matcherIpfs);\n if (ipfs == null) {\n return null;\n }\n linkage.push({ type: \"url-ipfs\", content: imageUrl });\n imageUrl = getIpfsLink(imageUrl);\n }\n linkage.push({ type: \"url\", content: imageUrl });\n return { linkage, url: imageUrl };\n }\n }\n }\n }\n catch (error) { }\n return null;\n });\n }\n getContentHash() {\n return __awaiter(this, void 0, void 0, function* () {\n // keccak256(\"contenthash()\")\n const hexBytes = yield this._fetchBytes(\"0xbc1c58d1\");\n // No contenthash\n if (hexBytes == null || hexBytes === \"0x\") {\n return null;\n }\n // IPFS (CID: 1, Type: DAG-PB)\n const ipfs = hexBytes.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipfs) {\n const length = parseInt(ipfs[3], 16);\n if (ipfs[4].length === length * 2) {\n return \"ipfs:/\\/\" + Base58.encode(\"0x\" + ipfs[1]);\n }\n }\n // IPNS (CID: 1, Type: libp2p-key)\n const ipns = hexBytes.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);\n if (ipns) {\n const length = parseInt(ipns[3], 16);\n if (ipns[4].length === length * 2) {\n return \"ipns:/\\/\" + Base58.encode(\"0x\" + ipns[1]);\n }\n }\n // Swarm (CID: 1, Type: swarm-manifest; hash/length hard-coded to keccak256/32)\n const swarm = hexBytes.match(/^0xe40101fa011b20([0-9a-f]*)$/);\n if (swarm) {\n if (swarm[1].length === (32 * 2)) {\n return \"bzz:/\\/\" + swarm[1];\n }\n }\n const skynet = hexBytes.match(/^0x90b2c605([0-9a-f]*)$/);\n if (skynet) {\n if (skynet[1].length === (34 * 2)) {\n // URL Safe base64; https://datatracker.ietf.org/doc/html/rfc4648#section-5\n const urlSafe = { \"=\": \"\", \"+\": \"-\", \"/\": \"_\" };\n const hash = base64Encode(\"0x\" + skynet[1]).replace(/[=+\\/]/g, (a) => (urlSafe[a]));\n return \"sia:/\\/\" + hash;\n }\n }\n return logger.throwError(`invalid or unsupported content hash data`, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getContentHash()\",\n data: hexBytes\n });\n });\n }\n getText(key) {\n return __awaiter(this, void 0, void 0, function* () {\n // The key encoded as parameter to fetchBytes\n let keyBytes = toUtf8Bytes(key);\n // The nodehash consumes the first slot, so the string pointer targets\n // offset 64, with the length at offset 64 and data starting at offset 96\n keyBytes = concat([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]);\n // Pad to word-size (32 bytes)\n if ((keyBytes.length % 32) !== 0) {\n keyBytes = concat([keyBytes, hexZeroPad(\"0x\", 32 - (key.length % 32))]);\n }\n const hexBytes = yield this._fetchBytes(\"0x59d1d43c\", hexlify(keyBytes));\n if (hexBytes == null || hexBytes === \"0x\") {\n return null;\n }\n return toUtf8String(hexBytes);\n });\n }\n}\nlet defaultFormatter = null;\nlet nextPollId = 1;\nexport class BaseProvider extends Provider {\n /**\n * ready\n *\n * A Promise that resolves only once the provider is ready.\n *\n * Sub-classes that call the super with a network without a chainId\n * MUST set this. Standard named networks have a known chainId.\n *\n */\n constructor(network) {\n super();\n // Events being listened to\n this._events = [];\n this._emitted = { block: -2 };\n this.disableCcipRead = false;\n this.formatter = new.target.getFormatter();\n // If network is any, this Provider allows the underlying\n // network to change dynamically, and we auto-detect the\n // current network\n defineReadOnly(this, \"anyNetwork\", (network === \"any\"));\n if (this.anyNetwork) {\n network = this.detectNetwork();\n }\n if (network instanceof Promise) {\n this._networkPromise = network;\n // Squash any \"unhandled promise\" errors; that do not need to be handled\n network.catch((error) => { });\n // Trigger initial network setting (async)\n this._ready().catch((error) => { });\n }\n else {\n const knownNetwork = getStatic(new.target, \"getNetwork\")(network);\n if (knownNetwork) {\n defineReadOnly(this, \"_network\", knownNetwork);\n this.emit(\"network\", knownNetwork, null);\n }\n else {\n logger.throwArgumentError(\"invalid network\", \"network\", network);\n }\n }\n this._maxInternalBlockNumber = -1024;\n this._lastBlockNumber = -2;\n this._maxFilterBlockRange = 10;\n this._pollingInterval = 4000;\n this._fastQueryDate = 0;\n }\n _ready() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._network == null) {\n let network = null;\n if (this._networkPromise) {\n try {\n network = yield this._networkPromise;\n }\n catch (error) { }\n }\n // Try the Provider's network detection (this MUST throw if it cannot)\n if (network == null) {\n network = yield this.detectNetwork();\n }\n // This should never happen; every Provider sub-class should have\n // suggested a network by here (or have thrown).\n if (!network) {\n logger.throwError(\"no network detected\", Logger.errors.UNKNOWN_ERROR, {});\n }\n // Possible this call stacked so do not call defineReadOnly again\n if (this._network == null) {\n if (this.anyNetwork) {\n this._network = network;\n }\n else {\n defineReadOnly(this, \"_network\", network);\n }\n this.emit(\"network\", network, null);\n }\n }\n return this._network;\n });\n }\n // This will always return the most recently established network.\n // For \"any\", this can change (a \"network\" event is emitted before\n // any change is reflected); otherwise this cannot change\n get ready() {\n return poll(() => {\n return this._ready().then((network) => {\n return network;\n }, (error) => {\n // If the network isn't running yet, we will wait\n if (error.code === Logger.errors.NETWORK_ERROR && error.event === \"noNetwork\") {\n return undefined;\n }\n throw error;\n });\n });\n }\n // @TODO: Remove this and just create a singleton formatter\n static getFormatter() {\n if (defaultFormatter == null) {\n defaultFormatter = new Formatter();\n }\n return defaultFormatter;\n }\n // @TODO: Remove this and just use getNetwork\n static getNetwork(network) {\n return getNetwork((network == null) ? \"homestead\" : network);\n }\n ccipReadFetch(tx, calldata, urls) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this.disableCcipRead || urls.length === 0) {\n return null;\n }\n const sender = tx.to.toLowerCase();\n const data = calldata.toLowerCase();\n const errorMessages = [];\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i];\n // URL expansion\n const href = url.replace(\"{sender}\", sender).replace(\"{data}\", data);\n // If no {data} is present, use POST; otherwise GET\n const json = (url.indexOf(\"{data}\") >= 0) ? null : JSON.stringify({ data, sender });\n const result = yield fetchJson({ url: href, errorPassThrough: true }, json, (value, response) => {\n value.status = response.statusCode;\n return value;\n });\n if (result.data) {\n return result.data;\n }\n const errorMessage = (result.message || \"unknown error\");\n // 4xx indicates the result is not present; stop\n if (result.status >= 400 && result.status < 500) {\n return logger.throwError(`response not found during CCIP fetch: ${errorMessage}`, Logger.errors.SERVER_ERROR, { url, errorMessage });\n }\n // 5xx indicates server issue; try the next url\n errorMessages.push(errorMessage);\n }\n return logger.throwError(`error encountered during CCIP fetch: ${errorMessages.map((m) => JSON.stringify(m)).join(\", \")}`, Logger.errors.SERVER_ERROR, {\n urls, errorMessages\n });\n });\n }\n // Fetches the blockNumber, but will reuse any result that is less\n // than maxAge old or has been requested since the last request\n _getInternalBlockNumber(maxAge) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this._ready();\n // Allowing stale data up to maxAge old\n if (maxAge > 0) {\n // While there are pending internal block requests...\n while (this._internalBlockNumber) {\n // ...\"remember\" which fetch we started with\n const internalBlockNumber = this._internalBlockNumber;\n try {\n // Check the result is not too stale\n const result = yield internalBlockNumber;\n if ((getTime() - result.respTime) <= maxAge) {\n return result.blockNumber;\n }\n // Too old; fetch a new value\n break;\n }\n catch (error) {\n // The fetch rejected; if we are the first to get the\n // rejection, drop through so we replace it with a new\n // fetch; all others blocked will then get that fetch\n // which won't match the one they \"remembered\" and loop\n if (this._internalBlockNumber === internalBlockNumber) {\n break;\n }\n }\n }\n }\n const reqTime = getTime();\n const checkInternalBlockNumber = resolveProperties({\n blockNumber: this.perform(\"getBlockNumber\", {}),\n networkError: this.getNetwork().then((network) => (null), (error) => (error))\n }).then(({ blockNumber, networkError }) => {\n if (networkError) {\n // Unremember this bad internal block number\n if (this._internalBlockNumber === checkInternalBlockNumber) {\n this._internalBlockNumber = null;\n }\n throw networkError;\n }\n const respTime = getTime();\n blockNumber = BigNumber.from(blockNumber).toNumber();\n if (blockNumber < this._maxInternalBlockNumber) {\n blockNumber = this._maxInternalBlockNumber;\n }\n this._maxInternalBlockNumber = blockNumber;\n this._setFastBlockNumber(blockNumber); // @TODO: Still need this?\n return { blockNumber, reqTime, respTime };\n });\n this._internalBlockNumber = checkInternalBlockNumber;\n // Swallow unhandled exceptions; if needed they are handled else where\n checkInternalBlockNumber.catch((error) => {\n // Don't null the dead (rejected) fetch, if it has already been updated\n if (this._internalBlockNumber === checkInternalBlockNumber) {\n this._internalBlockNumber = null;\n }\n });\n return (yield checkInternalBlockNumber).blockNumber;\n });\n }\n poll() {\n return __awaiter(this, void 0, void 0, function* () {\n const pollId = nextPollId++;\n // Track all running promises, so we can trigger a post-poll once they are complete\n const runners = [];\n let blockNumber = null;\n try {\n blockNumber = yield this._getInternalBlockNumber(100 + this.pollingInterval / 2);\n }\n catch (error) {\n this.emit(\"error\", error);\n return;\n }\n this._setFastBlockNumber(blockNumber);\n // Emit a poll event after we have the latest (fast) block number\n this.emit(\"poll\", pollId, blockNumber);\n // If the block has not changed, meh.\n if (blockNumber === this._lastBlockNumber) {\n this.emit(\"didPoll\", pollId);\n return;\n }\n // First polling cycle, trigger a \"block\" events\n if (this._emitted.block === -2) {\n this._emitted.block = blockNumber - 1;\n }\n if (Math.abs((this._emitted.block) - blockNumber) > 1000) {\n logger.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${blockNumber})`);\n this.emit(\"error\", logger.makeError(\"network block skew detected\", Logger.errors.NETWORK_ERROR, {\n blockNumber: blockNumber,\n event: \"blockSkew\",\n previousBlockNumber: this._emitted.block\n }));\n this.emit(\"block\", blockNumber);\n }\n else {\n // Notify all listener for each block that has passed\n for (let i = this._emitted.block + 1; i <= blockNumber; i++) {\n this.emit(\"block\", i);\n }\n }\n // The emitted block was updated, check for obsolete events\n if (this._emitted.block !== blockNumber) {\n this._emitted.block = blockNumber;\n Object.keys(this._emitted).forEach((key) => {\n // The block event does not expire\n if (key === \"block\") {\n return;\n }\n // The block we were at when we emitted this event\n const eventBlockNumber = this._emitted[key];\n // We cannot garbage collect pending transactions or blocks here\n // They should be garbage collected by the Provider when setting\n // \"pending\" events\n if (eventBlockNumber === \"pending\") {\n return;\n }\n // Evict any transaction hashes or block hashes over 12 blocks\n // old, since they should not return null anyways\n if (blockNumber - eventBlockNumber > 12) {\n delete this._emitted[key];\n }\n });\n }\n // First polling cycle\n if (this._lastBlockNumber === -2) {\n this._lastBlockNumber = blockNumber - 1;\n }\n // Find all transaction hashes we are waiting on\n this._events.forEach((event) => {\n switch (event.type) {\n case \"tx\": {\n const hash = event.hash;\n let runner = this.getTransactionReceipt(hash).then((receipt) => {\n if (!receipt || receipt.blockNumber == null) {\n return null;\n }\n this._emitted[\"t:\" + hash] = receipt.blockNumber;\n this.emit(hash, receipt);\n return null;\n }).catch((error) => { this.emit(\"error\", error); });\n runners.push(runner);\n break;\n }\n case \"filter\": {\n // We only allow a single getLogs to be in-flight at a time\n if (!event._inflight) {\n event._inflight = true;\n // This is the first filter for this event, so we want to\n // restrict events to events that happened no earlier than now\n if (event._lastBlockNumber === -2) {\n event._lastBlockNumber = blockNumber - 1;\n }\n // Filter from the last *known* event; due to load-balancing\n // and some nodes returning updated block numbers before\n // indexing events, a logs result with 0 entries cannot be\n // trusted and we must retry a range which includes it again\n const filter = event.filter;\n filter.fromBlock = event._lastBlockNumber + 1;\n filter.toBlock = blockNumber;\n // Prevent fitler ranges from growing too wild, since it is quite\n // likely there just haven't been any events to move the lastBlockNumber.\n const minFromBlock = filter.toBlock - this._maxFilterBlockRange;\n if (minFromBlock > filter.fromBlock) {\n filter.fromBlock = minFromBlock;\n }\n if (filter.fromBlock < 0) {\n filter.fromBlock = 0;\n }\n const runner = this.getLogs(filter).then((logs) => {\n // Allow the next getLogs\n event._inflight = false;\n if (logs.length === 0) {\n return;\n }\n logs.forEach((log) => {\n // Only when we get an event for a given block number\n // can we trust the events are indexed\n if (log.blockNumber > event._lastBlockNumber) {\n event._lastBlockNumber = log.blockNumber;\n }\n // Make sure we stall requests to fetch blocks and txs\n this._emitted[\"b:\" + log.blockHash] = log.blockNumber;\n this._emitted[\"t:\" + log.transactionHash] = log.blockNumber;\n this.emit(filter, log);\n });\n }).catch((error) => {\n this.emit(\"error\", error);\n // Allow another getLogs (the range was not updated)\n event._inflight = false;\n });\n runners.push(runner);\n }\n break;\n }\n }\n });\n this._lastBlockNumber = blockNumber;\n // Once all events for this loop have been processed, emit \"didPoll\"\n Promise.all(runners).then(() => {\n this.emit(\"didPoll\", pollId);\n }).catch((error) => { this.emit(\"error\", error); });\n return;\n });\n }\n // Deprecated; do not use this\n resetEventsBlock(blockNumber) {\n this._lastBlockNumber = blockNumber - 1;\n if (this.polling) {\n this.poll();\n }\n }\n get network() {\n return this._network;\n }\n // This method should query the network if the underlying network\n // can change, such as when connected to a JSON-RPC backend\n detectNetwork() {\n return __awaiter(this, void 0, void 0, function* () {\n return logger.throwError(\"provider does not support network detection\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"provider.detectNetwork\"\n });\n });\n }\n getNetwork() {\n return __awaiter(this, void 0, void 0, function* () {\n const network = yield this._ready();\n // Make sure we are still connected to the same network; this is\n // only an external call for backends which can have the underlying\n // network change spontaneously\n const currentNetwork = yield this.detectNetwork();\n if (network.chainId !== currentNetwork.chainId) {\n // We are allowing network changes, things can get complex fast;\n // make sure you know what you are doing if you use \"any\"\n if (this.anyNetwork) {\n this._network = currentNetwork;\n // Reset all internal block number guards and caches\n this._lastBlockNumber = -2;\n this._fastBlockNumber = null;\n this._fastBlockNumberPromise = null;\n this._fastQueryDate = 0;\n this._emitted.block = -2;\n this._maxInternalBlockNumber = -1024;\n this._internalBlockNumber = null;\n // The \"network\" event MUST happen before this method resolves\n // so any events have a chance to unregister, so we stall an\n // additional event loop before returning from /this/ call\n this.emit(\"network\", currentNetwork, network);\n yield stall(0);\n return this._network;\n }\n const error = logger.makeError(\"underlying network changed\", Logger.errors.NETWORK_ERROR, {\n event: \"changed\",\n network: network,\n detectedNetwork: currentNetwork\n });\n this.emit(\"error\", error);\n throw error;\n }\n return network;\n });\n }\n get blockNumber() {\n this._getInternalBlockNumber(100 + this.pollingInterval / 2).then((blockNumber) => {\n this._setFastBlockNumber(blockNumber);\n }, (error) => { });\n return (this._fastBlockNumber != null) ? this._fastBlockNumber : -1;\n }\n get polling() {\n return (this._poller != null);\n }\n set polling(value) {\n if (value && !this._poller) {\n this._poller = setInterval(() => { this.poll(); }, this.pollingInterval);\n if (!this._bootstrapPoll) {\n this._bootstrapPoll = setTimeout(() => {\n this.poll();\n // We block additional polls until the polling interval\n // is done, to prevent overwhelming the poll function\n this._bootstrapPoll = setTimeout(() => {\n // If polling was disabled, something may require a poke\n // since starting the bootstrap poll and it was disabled\n if (!this._poller) {\n this.poll();\n }\n // Clear out the bootstrap so we can do another\n this._bootstrapPoll = null;\n }, this.pollingInterval);\n }, 0);\n }\n }\n else if (!value && this._poller) {\n clearInterval(this._poller);\n this._poller = null;\n }\n }\n get pollingInterval() {\n return this._pollingInterval;\n }\n set pollingInterval(value) {\n if (typeof (value) !== \"number\" || value <= 0 || parseInt(String(value)) != value) {\n throw new Error(\"invalid polling interval\");\n }\n this._pollingInterval = value;\n if (this._poller) {\n clearInterval(this._poller);\n this._poller = setInterval(() => { this.poll(); }, this._pollingInterval);\n }\n }\n _getFastBlockNumber() {\n const now = getTime();\n // Stale block number, request a newer value\n if ((now - this._fastQueryDate) > 2 * this._pollingInterval) {\n this._fastQueryDate = now;\n this._fastBlockNumberPromise = this.getBlockNumber().then((blockNumber) => {\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n }\n return this._fastBlockNumber;\n });\n }\n return this._fastBlockNumberPromise;\n }\n _setFastBlockNumber(blockNumber) {\n // Older block, maybe a stale request\n if (this._fastBlockNumber != null && blockNumber < this._fastBlockNumber) {\n return;\n }\n // Update the time we updated the blocknumber\n this._fastQueryDate = getTime();\n // Newer block number, use it\n if (this._fastBlockNumber == null || blockNumber > this._fastBlockNumber) {\n this._fastBlockNumber = blockNumber;\n this._fastBlockNumberPromise = Promise.resolve(blockNumber);\n }\n }\n waitForTransaction(transactionHash, confirmations, timeout) {\n return __awaiter(this, void 0, void 0, function* () {\n return this._waitForTransaction(transactionHash, (confirmations == null) ? 1 : confirmations, timeout || 0, null);\n });\n }\n _waitForTransaction(transactionHash, confirmations, timeout, replaceable) {\n return __awaiter(this, void 0, void 0, function* () {\n const receipt = yield this.getTransactionReceipt(transactionHash);\n // Receipt is already good\n if ((receipt ? receipt.confirmations : 0) >= confirmations) {\n return receipt;\n }\n // Poll until the receipt is good...\n return new Promise((resolve, reject) => {\n const cancelFuncs = [];\n let done = false;\n const alreadyDone = function () {\n if (done) {\n return true;\n }\n done = true;\n cancelFuncs.forEach((func) => { func(); });\n return false;\n };\n const minedHandler = (receipt) => {\n if (receipt.confirmations < confirmations) {\n return;\n }\n if (alreadyDone()) {\n return;\n }\n resolve(receipt);\n };\n this.on(transactionHash, minedHandler);\n cancelFuncs.push(() => { this.removeListener(transactionHash, minedHandler); });\n if (replaceable) {\n let lastBlockNumber = replaceable.startBlock;\n let scannedBlock = null;\n const replaceHandler = (blockNumber) => __awaiter(this, void 0, void 0, function* () {\n if (done) {\n return;\n }\n // Wait 1 second; this is only used in the case of a fault, so\n // we will trade off a little bit of latency for more consistent\n // results and fewer JSON-RPC calls\n yield stall(1000);\n this.getTransactionCount(replaceable.from).then((nonce) => __awaiter(this, void 0, void 0, function* () {\n if (done) {\n return;\n }\n if (nonce <= replaceable.nonce) {\n lastBlockNumber = blockNumber;\n }\n else {\n // First check if the transaction was mined\n {\n const mined = yield this.getTransaction(transactionHash);\n if (mined && mined.blockNumber != null) {\n return;\n }\n }\n // First time scanning. We start a little earlier for some\n // wiggle room here to handle the eventually consistent nature\n // of blockchain (e.g. the getTransactionCount was for a\n // different block)\n if (scannedBlock == null) {\n scannedBlock = lastBlockNumber - 3;\n if (scannedBlock < replaceable.startBlock) {\n scannedBlock = replaceable.startBlock;\n }\n }\n while (scannedBlock <= blockNumber) {\n if (done) {\n return;\n }\n const block = yield this.getBlockWithTransactions(scannedBlock);\n for (let ti = 0; ti < block.transactions.length; ti++) {\n const tx = block.transactions[ti];\n // Successfully mined!\n if (tx.hash === transactionHash) {\n return;\n }\n // Matches our transaction from and nonce; its a replacement\n if (tx.from === replaceable.from && tx.nonce === replaceable.nonce) {\n if (done) {\n return;\n }\n // Get the receipt of the replacement\n const receipt = yield this.waitForTransaction(tx.hash, confirmations);\n // Already resolved or rejected (prolly a timeout)\n if (alreadyDone()) {\n return;\n }\n // The reason we were replaced\n let reason = \"replaced\";\n if (tx.data === replaceable.data && tx.to === replaceable.to && tx.value.eq(replaceable.value)) {\n reason = \"repriced\";\n }\n else if (tx.data === \"0x\" && tx.from === tx.to && tx.value.isZero()) {\n reason = \"cancelled\";\n }\n // Explain why we were replaced\n reject(logger.makeError(\"transaction was replaced\", Logger.errors.TRANSACTION_REPLACED, {\n cancelled: (reason === \"replaced\" || reason === \"cancelled\"),\n reason,\n replacement: this._wrapTransaction(tx),\n hash: transactionHash,\n receipt\n }));\n return;\n }\n }\n scannedBlock++;\n }\n }\n if (done) {\n return;\n }\n this.once(\"block\", replaceHandler);\n }), (error) => {\n if (done) {\n return;\n }\n this.once(\"block\", replaceHandler);\n });\n });\n if (done) {\n return;\n }\n this.once(\"block\", replaceHandler);\n cancelFuncs.push(() => {\n this.removeListener(\"block\", replaceHandler);\n });\n }\n if (typeof (timeout) === \"number\" && timeout > 0) {\n const timer = setTimeout(() => {\n if (alreadyDone()) {\n return;\n }\n reject(logger.makeError(\"timeout exceeded\", Logger.errors.TIMEOUT, { timeout: timeout }));\n }, timeout);\n if (timer.unref) {\n timer.unref();\n }\n cancelFuncs.push(() => { clearTimeout(timer); });\n }\n });\n });\n }\n getBlockNumber() {\n return __awaiter(this, void 0, void 0, function* () {\n return this._getInternalBlockNumber(0);\n });\n }\n getGasPrice() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.getNetwork();\n const result = yield this.perform(\"getGasPrice\", {});\n try {\n return BigNumber.from(result);\n }\n catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getGasPrice\",\n result, error\n });\n }\n });\n }\n getBalance(addressOrName, blockTag) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.getNetwork();\n const params = yield resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n const result = yield this.perform(\"getBalance\", params);\n try {\n return BigNumber.from(result);\n }\n catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getBalance\",\n params, result, error\n });\n }\n });\n }\n getTransactionCount(addressOrName, blockTag) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.getNetwork();\n const params = yield resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n const result = yield this.perform(\"getTransactionCount\", params);\n try {\n return BigNumber.from(result).toNumber();\n }\n catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getTransactionCount\",\n params, result, error\n });\n }\n });\n }\n getCode(addressOrName, blockTag) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.getNetwork();\n const params = yield resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag)\n });\n const result = yield this.perform(\"getCode\", params);\n try {\n return hexlify(result);\n }\n catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getCode\",\n params, result, error\n });\n }\n });\n }\n getStorageAt(addressOrName, position, blockTag) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.getNetwork();\n const params = yield resolveProperties({\n address: this._getAddress(addressOrName),\n blockTag: this._getBlockTag(blockTag),\n position: Promise.resolve(position).then((p) => hexValue(p))\n });\n const result = yield this.perform(\"getStorageAt\", params);\n try {\n return hexlify(result);\n }\n catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"getStorageAt\",\n params, result, error\n });\n }\n });\n }\n // This should be called by any subclass wrapping a TransactionResponse\n _wrapTransaction(tx, hash, startBlock) {\n if (hash != null && hexDataLength(hash) !== 32) {\n throw new Error(\"invalid response - sendTransaction\");\n }\n const result = tx;\n // Check the hash we expect is the same as the hash the server reported\n if (hash != null && tx.hash !== hash) {\n logger.throwError(\"Transaction hash mismatch from Provider.sendTransaction.\", Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash });\n }\n result.wait = (confirms, timeout) => __awaiter(this, void 0, void 0, function* () {\n if (confirms == null) {\n confirms = 1;\n }\n if (timeout == null) {\n timeout = 0;\n }\n // Get the details to detect replacement\n let replacement = undefined;\n if (confirms !== 0 && startBlock != null) {\n replacement = {\n data: tx.data,\n from: tx.from,\n nonce: tx.nonce,\n to: tx.to,\n value: tx.value,\n startBlock\n };\n }\n const receipt = yield this._waitForTransaction(tx.hash, confirms, timeout, replacement);\n if (receipt == null && confirms === 0) {\n return null;\n }\n // No longer pending, allow the polling loop to garbage collect this\n this._emitted[\"t:\" + tx.hash] = receipt.blockNumber;\n if (receipt.status === 0) {\n logger.throwError(\"transaction failed\", Logger.errors.CALL_EXCEPTION, {\n transactionHash: tx.hash,\n transaction: tx,\n receipt: receipt\n });\n }\n return receipt;\n });\n return result;\n }\n sendTransaction(signedTransaction) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.getNetwork();\n const hexTx = yield Promise.resolve(signedTransaction).then(t => hexlify(t));\n const tx = this.formatter.transaction(signedTransaction);\n if (tx.confirmations == null) {\n tx.confirmations = 0;\n }\n const blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n try {\n const hash = yield this.perform(\"sendTransaction\", { signedTransaction: hexTx });\n return this._wrapTransaction(tx, hash, blockNumber);\n }\n catch (error) {\n error.transaction = tx;\n error.transactionHash = tx.hash;\n throw error;\n }\n });\n }\n _getTransactionRequest(transaction) {\n return __awaiter(this, void 0, void 0, function* () {\n const values = yield transaction;\n const tx = {};\n [\"from\", \"to\"].forEach((key) => {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? this._getAddress(v) : null));\n });\n [\"gasLimit\", \"gasPrice\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"value\"].forEach((key) => {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? BigNumber.from(v) : null));\n });\n [\"type\"].forEach((key) => {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then((v) => ((v != null) ? v : null));\n });\n if (values.accessList) {\n tx.accessList = this.formatter.accessList(values.accessList);\n }\n [\"data\"].forEach((key) => {\n if (values[key] == null) {\n return;\n }\n tx[key] = Promise.resolve(values[key]).then((v) => (v ? hexlify(v) : null));\n });\n return this.formatter.transactionRequest(yield resolveProperties(tx));\n });\n }\n _getFilter(filter) {\n return __awaiter(this, void 0, void 0, function* () {\n filter = yield filter;\n const result = {};\n if (filter.address != null) {\n result.address = this._getAddress(filter.address);\n }\n [\"blockHash\", \"topics\"].forEach((key) => {\n if (filter[key] == null) {\n return;\n }\n result[key] = filter[key];\n });\n [\"fromBlock\", \"toBlock\"].forEach((key) => {\n if (filter[key] == null) {\n return;\n }\n result[key] = this._getBlockTag(filter[key]);\n });\n return this.formatter.filter(yield resolveProperties(result));\n });\n }\n _call(transaction, blockTag, attempt) {\n return __awaiter(this, void 0, void 0, function* () {\n if (attempt >= MAX_CCIP_REDIRECTS) {\n logger.throwError(\"CCIP read exceeded maximum redirections\", Logger.errors.SERVER_ERROR, {\n redirects: attempt, transaction\n });\n }\n const txSender = transaction.to;\n const result = yield this.perform(\"call\", { transaction, blockTag });\n // CCIP Read request via OffchainLookup(address,string[],bytes,bytes4,bytes)\n if (attempt >= 0 && blockTag === \"latest\" && txSender != null && result.substring(0, 10) === \"0x556f1830\" && (hexDataLength(result) % 32 === 4)) {\n try {\n const data = hexDataSlice(result, 4);\n // Check the sender of the OffchainLookup matches the transaction\n const sender = hexDataSlice(data, 0, 32);\n if (!BigNumber.from(sender).eq(txSender)) {\n logger.throwError(\"CCIP Read sender did not match\", Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction, data: result\n });\n }\n // Read the URLs from the response\n const urls = [];\n const urlsOffset = BigNumber.from(hexDataSlice(data, 32, 64)).toNumber();\n const urlsLength = BigNumber.from(hexDataSlice(data, urlsOffset, urlsOffset + 32)).toNumber();\n const urlsData = hexDataSlice(data, urlsOffset + 32);\n for (let u = 0; u < urlsLength; u++) {\n const url = _parseString(urlsData, u * 32);\n if (url == null) {\n logger.throwError(\"CCIP Read contained corrupt URL string\", Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction, data: result\n });\n }\n urls.push(url);\n }\n // Get the CCIP calldata to forward\n const calldata = _parseBytes(data, 64);\n // Get the callbackSelector (bytes4)\n if (!BigNumber.from(hexDataSlice(data, 100, 128)).isZero()) {\n logger.throwError(\"CCIP Read callback selector included junk\", Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction, data: result\n });\n }\n const callbackSelector = hexDataSlice(data, 96, 100);\n // Get the extra data to send back to the contract as context\n const extraData = _parseBytes(data, 128);\n const ccipResult = yield this.ccipReadFetch(transaction, calldata, urls);\n if (ccipResult == null) {\n logger.throwError(\"CCIP Read disabled or provided no URLs\", Logger.errors.CALL_EXCEPTION, {\n name: \"OffchainLookup\",\n signature: \"OffchainLookup(address,string[],bytes,bytes4,bytes)\",\n transaction, data: result\n });\n }\n const tx = {\n to: txSender,\n data: hexConcat([callbackSelector, encodeBytes([ccipResult, extraData])])\n };\n return this._call(tx, blockTag, attempt + 1);\n }\n catch (error) {\n if (error.code === Logger.errors.SERVER_ERROR) {\n throw error;\n }\n }\n }\n try {\n return hexlify(result);\n }\n catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"call\",\n params: { transaction, blockTag }, result, error\n });\n }\n });\n }\n call(transaction, blockTag) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.getNetwork();\n const resolved = yield resolveProperties({\n transaction: this._getTransactionRequest(transaction),\n blockTag: this._getBlockTag(blockTag),\n ccipReadEnabled: Promise.resolve(transaction.ccipReadEnabled)\n });\n return this._call(resolved.transaction, resolved.blockTag, resolved.ccipReadEnabled ? 0 : -1);\n });\n }\n estimateGas(transaction) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.getNetwork();\n const params = yield resolveProperties({\n transaction: this._getTransactionRequest(transaction)\n });\n const result = yield this.perform(\"estimateGas\", params);\n try {\n return BigNumber.from(result);\n }\n catch (error) {\n return logger.throwError(\"bad result from backend\", Logger.errors.SERVER_ERROR, {\n method: \"estimateGas\",\n params, result, error\n });\n }\n });\n }\n _getAddress(addressOrName) {\n return __awaiter(this, void 0, void 0, function* () {\n addressOrName = yield addressOrName;\n if (typeof (addressOrName) !== \"string\") {\n logger.throwArgumentError(\"invalid address or ENS name\", \"name\", addressOrName);\n }\n const address = yield this.resolveName(addressOrName);\n if (address == null) {\n logger.throwError(\"ENS name not configured\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: `resolveName(${JSON.stringify(addressOrName)})`\n });\n }\n return address;\n });\n }\n _getBlock(blockHashOrBlockTag, includeTransactions) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.getNetwork();\n blockHashOrBlockTag = yield blockHashOrBlockTag;\n // If blockTag is a number (not \"latest\", etc), this is the block number\n let blockNumber = -128;\n const params = {\n includeTransactions: !!includeTransactions\n };\n if (isHexString(blockHashOrBlockTag, 32)) {\n params.blockHash = blockHashOrBlockTag;\n }\n else {\n try {\n params.blockTag = yield this._getBlockTag(blockHashOrBlockTag);\n if (isHexString(params.blockTag)) {\n blockNumber = parseInt(params.blockTag.substring(2), 16);\n }\n }\n catch (error) {\n logger.throwArgumentError(\"invalid block hash or block tag\", \"blockHashOrBlockTag\", blockHashOrBlockTag);\n }\n }\n return poll(() => __awaiter(this, void 0, void 0, function* () {\n const block = yield this.perform(\"getBlock\", params);\n // Block was not found\n if (block == null) {\n // For blockhashes, if we didn't say it existed, that blockhash may\n // not exist. If we did see it though, perhaps from a log, we know\n // it exists, and this node is just not caught up yet.\n if (params.blockHash != null) {\n if (this._emitted[\"b:\" + params.blockHash] == null) {\n return null;\n }\n }\n // For block tags, if we are asking for a future block, we return null\n if (params.blockTag != null) {\n if (blockNumber > this._emitted.block) {\n return null;\n }\n }\n // Retry on the next block\n return undefined;\n }\n // Add transactions\n if (includeTransactions) {\n let blockNumber = null;\n for (let i = 0; i < block.transactions.length; i++) {\n const tx = block.transactions[i];\n if (tx.blockNumber == null) {\n tx.confirmations = 0;\n }\n else if (tx.confirmations == null) {\n if (blockNumber == null) {\n blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n }\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - tx.blockNumber) + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n }\n }\n const blockWithTxs = this.formatter.blockWithTransactions(block);\n blockWithTxs.transactions = blockWithTxs.transactions.map((tx) => this._wrapTransaction(tx));\n return blockWithTxs;\n }\n return this.formatter.block(block);\n }), { oncePoll: this });\n });\n }\n getBlock(blockHashOrBlockTag) {\n return (this._getBlock(blockHashOrBlockTag, false));\n }\n getBlockWithTransactions(blockHashOrBlockTag) {\n return (this._getBlock(blockHashOrBlockTag, true));\n }\n getTransaction(transactionHash) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.getNetwork();\n transactionHash = yield transactionHash;\n const params = { transactionHash: this.formatter.hash(transactionHash, true) };\n return poll(() => __awaiter(this, void 0, void 0, function* () {\n const result = yield this.perform(\"getTransaction\", params);\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return null;\n }\n return undefined;\n }\n const tx = this.formatter.transactionResponse(result);\n if (tx.blockNumber == null) {\n tx.confirmations = 0;\n }\n else if (tx.confirmations == null) {\n const blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - tx.blockNumber) + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n tx.confirmations = confirmations;\n }\n return this._wrapTransaction(tx);\n }), { oncePoll: this });\n });\n }\n getTransactionReceipt(transactionHash) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.getNetwork();\n transactionHash = yield transactionHash;\n const params = { transactionHash: this.formatter.hash(transactionHash, true) };\n return poll(() => __awaiter(this, void 0, void 0, function* () {\n const result = yield this.perform(\"getTransactionReceipt\", params);\n if (result == null) {\n if (this._emitted[\"t:\" + transactionHash] == null) {\n return null;\n }\n return undefined;\n }\n // \"geth-etc\" returns receipts before they are ready\n if (result.blockHash == null) {\n return undefined;\n }\n const receipt = this.formatter.receipt(result);\n if (receipt.blockNumber == null) {\n receipt.confirmations = 0;\n }\n else if (receipt.confirmations == null) {\n const blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n // Add the confirmations using the fast block number (pessimistic)\n let confirmations = (blockNumber - receipt.blockNumber) + 1;\n if (confirmations <= 0) {\n confirmations = 1;\n }\n receipt.confirmations = confirmations;\n }\n return receipt;\n }), { oncePoll: this });\n });\n }\n getLogs(filter) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.getNetwork();\n const params = yield resolveProperties({ filter: this._getFilter(filter) });\n const logs = yield this.perform(\"getLogs\", params);\n logs.forEach((log) => {\n if (log.removed == null) {\n log.removed = false;\n }\n });\n return Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))(logs);\n });\n }\n getEtherPrice() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.getNetwork();\n return this.perform(\"getEtherPrice\", {});\n });\n }\n _getBlockTag(blockTag) {\n return __awaiter(this, void 0, void 0, function* () {\n blockTag = yield blockTag;\n if (typeof (blockTag) === \"number\" && blockTag < 0) {\n if (blockTag % 1) {\n logger.throwArgumentError(\"invalid BlockTag\", \"blockTag\", blockTag);\n }\n let blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval);\n blockNumber += blockTag;\n if (blockNumber < 0) {\n blockNumber = 0;\n }\n return this.formatter.blockTag(blockNumber);\n }\n return this.formatter.blockTag(blockTag);\n });\n }\n getResolver(name) {\n return __awaiter(this, void 0, void 0, function* () {\n let currentName = name;\n while (true) {\n if (currentName === \"\" || currentName === \".\") {\n return null;\n }\n // Optimization since the eth node cannot change and does\n // not have a wildcard resolver\n if (name !== \"eth\" && currentName === \"eth\") {\n return null;\n }\n // Check the current node for a resolver\n const addr = yield this._getResolver(currentName, \"getResolver\");\n // Found a resolver!\n if (addr != null) {\n const resolver = new Resolver(this, addr, name);\n // Legacy resolver found, using EIP-2544 so it isn't safe to use\n if (currentName !== name && !(yield resolver.supportsWildcard())) {\n return null;\n }\n return resolver;\n }\n // Get the parent node\n currentName = currentName.split(\".\").slice(1).join(\".\");\n }\n });\n }\n _getResolver(name, operation) {\n return __awaiter(this, void 0, void 0, function* () {\n if (operation == null) {\n operation = \"ENS\";\n }\n const network = yield this.getNetwork();\n // No ENS...\n if (!network.ensAddress) {\n logger.throwError(\"network does not support ENS\", Logger.errors.UNSUPPORTED_OPERATION, { operation, network: network.name });\n }\n try {\n // keccak256(\"resolver(bytes32)\")\n const addrData = yield this.call({\n to: network.ensAddress,\n data: (\"0x0178b8bf\" + namehash(name).substring(2))\n });\n return this.formatter.callAddress(addrData);\n }\n catch (error) {\n // ENS registry cannot throw errors on resolver(bytes32)\n }\n return null;\n });\n }\n resolveName(name) {\n return __awaiter(this, void 0, void 0, function* () {\n name = yield name;\n // If it is already an address, nothing to resolve\n try {\n return Promise.resolve(this.formatter.address(name));\n }\n catch (error) {\n // If is is a hexstring, the address is bad (See #694)\n if (isHexString(name)) {\n throw error;\n }\n }\n if (typeof (name) !== \"string\") {\n logger.throwArgumentError(\"invalid ENS name\", \"name\", name);\n }\n // Get the addr from the resolver\n const resolver = yield this.getResolver(name);\n if (!resolver) {\n return null;\n }\n return yield resolver.getAddress();\n });\n }\n lookupAddress(address) {\n return __awaiter(this, void 0, void 0, function* () {\n address = yield address;\n address = this.formatter.address(address);\n const node = address.substring(2).toLowerCase() + \".addr.reverse\";\n const resolverAddr = yield this._getResolver(node, \"lookupAddress\");\n if (resolverAddr == null) {\n return null;\n }\n // keccak(\"name(bytes32)\")\n const name = _parseString(yield this.call({\n to: resolverAddr,\n data: (\"0x691f3431\" + namehash(node).substring(2))\n }), 0);\n const addr = yield this.resolveName(name);\n if (addr != address) {\n return null;\n }\n return name;\n });\n }\n getAvatar(nameOrAddress) {\n return __awaiter(this, void 0, void 0, function* () {\n let resolver = null;\n if (isHexString(nameOrAddress)) {\n // Address; reverse lookup\n const address = this.formatter.address(nameOrAddress);\n const node = address.substring(2).toLowerCase() + \".addr.reverse\";\n const resolverAddress = yield this._getResolver(node, \"getAvatar\");\n if (!resolverAddress) {\n return null;\n }\n // Try resolving the avatar against the addr.reverse resolver\n resolver = new Resolver(this, resolverAddress, node);\n try {\n const avatar = yield resolver.getAvatar();\n if (avatar) {\n return avatar.url;\n }\n }\n catch (error) {\n if (error.code !== Logger.errors.CALL_EXCEPTION) {\n throw error;\n }\n }\n // Try getting the name and performing forward lookup; allowing wildcards\n try {\n // keccak(\"name(bytes32)\")\n const name = _parseString(yield this.call({\n to: resolverAddress,\n data: (\"0x691f3431\" + namehash(node).substring(2))\n }), 0);\n resolver = yield this.getResolver(name);\n }\n catch (error) {\n if (error.code !== Logger.errors.CALL_EXCEPTION) {\n throw error;\n }\n return null;\n }\n }\n else {\n // ENS name; forward lookup with wildcard\n resolver = yield this.getResolver(nameOrAddress);\n if (!resolver) {\n return null;\n }\n }\n const avatar = yield resolver.getAvatar();\n if (avatar == null) {\n return null;\n }\n return avatar.url;\n });\n }\n perform(method, params) {\n return logger.throwError(method + \" not implemented\", Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n _startEvent(event) {\n this.polling = (this._events.filter((e) => e.pollable()).length > 0);\n }\n _stopEvent(event) {\n this.polling = (this._events.filter((e) => e.pollable()).length > 0);\n }\n _addEventListener(eventName, listener, once) {\n const event = new Event(getEventTag(eventName), listener, once);\n this._events.push(event);\n this._startEvent(event);\n return this;\n }\n on(eventName, listener) {\n return this._addEventListener(eventName, listener, false);\n }\n once(eventName, listener) {\n return this._addEventListener(eventName, listener, true);\n }\n emit(eventName, ...args) {\n let result = false;\n let stopped = [];\n let eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) {\n return true;\n }\n setTimeout(() => {\n event.listener.apply(this, args);\n }, 0);\n result = true;\n if (event.once) {\n stopped.push(event);\n return false;\n }\n return true;\n });\n stopped.forEach((event) => { this._stopEvent(event); });\n return result;\n }\n listenerCount(eventName) {\n if (!eventName) {\n return this._events.length;\n }\n let eventTag = getEventTag(eventName);\n return this._events.filter((event) => {\n return (event.tag === eventTag);\n }).length;\n }\n listeners(eventName) {\n if (eventName == null) {\n return this._events.map((event) => event.listener);\n }\n let eventTag = getEventTag(eventName);\n return this._events\n .filter((event) => (event.tag === eventTag))\n .map((event) => event.listener);\n }\n off(eventName, listener) {\n if (listener == null) {\n return this.removeAllListeners(eventName);\n }\n const stopped = [];\n let found = false;\n let eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag || event.listener != listener) {\n return true;\n }\n if (found) {\n return true;\n }\n found = true;\n stopped.push(event);\n return false;\n });\n stopped.forEach((event) => { this._stopEvent(event); });\n return this;\n }\n removeAllListeners(eventName) {\n let stopped = [];\n if (eventName == null) {\n stopped = this._events;\n this._events = [];\n }\n else {\n const eventTag = getEventTag(eventName);\n this._events = this._events.filter((event) => {\n if (event.tag !== eventTag) {\n return true;\n }\n stopped.push(event);\n return false;\n });\n }\n stopped.forEach((event) => { this._stopEvent(event); });\n return this;\n }\n}\n//# sourceMappingURL=base-provider.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { Signer } from \"@ethersproject/abstract-signer\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { hexlify, hexValue, hexZeroPad, isHexString } from \"@ethersproject/bytes\";\nimport { _TypedDataEncoder } from \"@ethersproject/hash\";\nimport { checkProperties, deepCopy, defineReadOnly, getStatic, resolveProperties, shallowCopy } from \"@ethersproject/properties\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nimport { accessListify } from \"@ethersproject/transactions\";\nimport { fetchJson, poll } from \"@ethersproject/web\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nimport { BaseProvider } from \"./base-provider\";\nconst errorGas = [\"call\", \"estimateGas\"];\nfunction spelunk(value, requireData) {\n if (value == null) {\n return null;\n }\n // These *are* the droids we're looking for.\n if (typeof (value.message) === \"string\" && value.message.match(\"reverted\")) {\n const data = isHexString(value.data) ? value.data : null;\n if (!requireData || data) {\n return { message: value.message, data };\n }\n }\n // Spelunk further...\n if (typeof (value) === \"object\") {\n for (const key in value) {\n const result = spelunk(value[key], requireData);\n if (result) {\n return result;\n }\n }\n return null;\n }\n // Might be a JSON string we can further descend...\n if (typeof (value) === \"string\") {\n try {\n return spelunk(JSON.parse(value), requireData);\n }\n catch (error) { }\n }\n return null;\n}\nfunction checkError(method, error, params) {\n const transaction = params.transaction || params.signedTransaction;\n // Undo the \"convenience\" some nodes are attempting to prevent backwards\n // incompatibility; maybe for v6 consider forwarding reverts as errors\n if (method === \"call\") {\n const result = spelunk(error, true);\n if (result) {\n return result.data;\n }\n // Nothing descriptive..\n logger.throwError(\"missing revert data in call exception; Transaction reverted without a reason string\", Logger.errors.CALL_EXCEPTION, {\n data: \"0x\", transaction, error\n });\n }\n if (method === \"estimateGas\") {\n // Try to find something, with a preference on SERVER_ERROR body\n let result = spelunk(error.body, false);\n if (result == null) {\n result = spelunk(error, false);\n }\n // Found \"reverted\", this is a CALL_EXCEPTION\n if (result) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n reason: result.message, method, transaction, error\n });\n }\n }\n // @TODO: Should we spelunk for message too?\n let message = error.message;\n if (error.code === Logger.errors.SERVER_ERROR && error.error && typeof (error.error.message) === \"string\") {\n message = error.error.message;\n }\n else if (typeof (error.body) === \"string\") {\n message = error.body;\n }\n else if (typeof (error.responseText) === \"string\") {\n message = error.responseText;\n }\n message = (message || \"\").toLowerCase();\n // \"insufficient funds for gas * price + value + cost(data)\"\n if (message.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)) {\n logger.throwError(\"insufficient funds for intrinsic transaction cost\", Logger.errors.INSUFFICIENT_FUNDS, {\n error, method, transaction\n });\n }\n // \"nonce too low\"\n if (message.match(/nonce (is )?too low/i)) {\n logger.throwError(\"nonce has already been used\", Logger.errors.NONCE_EXPIRED, {\n error, method, transaction\n });\n }\n // \"replacement transaction underpriced\"\n if (message.match(/replacement transaction underpriced|transaction gas price.*too low/i)) {\n logger.throwError(\"replacement fee too low\", Logger.errors.REPLACEMENT_UNDERPRICED, {\n error, method, transaction\n });\n }\n // \"replacement transaction underpriced\"\n if (message.match(/only replay-protected/i)) {\n logger.throwError(\"legacy pre-eip-155 transactions not supported\", Logger.errors.UNSUPPORTED_OPERATION, {\n error, method, transaction\n });\n }\n if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)) {\n logger.throwError(\"cannot estimate gas; transaction may fail or may require manual gas limit\", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {\n error, method, transaction\n });\n }\n throw error;\n}\nfunction timer(timeout) {\n return new Promise(function (resolve) {\n setTimeout(resolve, timeout);\n });\n}\nfunction getResult(payload) {\n if (payload.error) {\n // @TODO: not any\n const error = new Error(payload.error.message);\n error.code = payload.error.code;\n error.data = payload.error.data;\n throw error;\n }\n return payload.result;\n}\nfunction getLowerCase(value) {\n if (value) {\n return value.toLowerCase();\n }\n return value;\n}\nconst _constructorGuard = {};\nexport class JsonRpcSigner extends Signer {\n constructor(constructorGuard, provider, addressOrIndex) {\n super();\n if (constructorGuard !== _constructorGuard) {\n throw new Error(\"do not call the JsonRpcSigner constructor directly; use provider.getSigner\");\n }\n defineReadOnly(this, \"provider\", provider);\n if (addressOrIndex == null) {\n addressOrIndex = 0;\n }\n if (typeof (addressOrIndex) === \"string\") {\n defineReadOnly(this, \"_address\", this.provider.formatter.address(addressOrIndex));\n defineReadOnly(this, \"_index\", null);\n }\n else if (typeof (addressOrIndex) === \"number\") {\n defineReadOnly(this, \"_index\", addressOrIndex);\n defineReadOnly(this, \"_address\", null);\n }\n else {\n logger.throwArgumentError(\"invalid address or index\", \"addressOrIndex\", addressOrIndex);\n }\n }\n connect(provider) {\n return logger.throwError(\"cannot alter JSON-RPC Signer connection\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"connect\"\n });\n }\n connectUnchecked() {\n return new UncheckedJsonRpcSigner(_constructorGuard, this.provider, this._address || this._index);\n }\n getAddress() {\n if (this._address) {\n return Promise.resolve(this._address);\n }\n return this.provider.send(\"eth_accounts\", []).then((accounts) => {\n if (accounts.length <= this._index) {\n logger.throwError(\"unknown account #\" + this._index, Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"getAddress\"\n });\n }\n return this.provider.formatter.address(accounts[this._index]);\n });\n }\n sendUncheckedTransaction(transaction) {\n transaction = shallowCopy(transaction);\n const fromAddress = this.getAddress().then((address) => {\n if (address) {\n address = address.toLowerCase();\n }\n return address;\n });\n // The JSON-RPC for eth_sendTransaction uses 90000 gas; if the user\n // wishes to use this, it is easy to specify explicitly, otherwise\n // we look it up for them.\n if (transaction.gasLimit == null) {\n const estimate = shallowCopy(transaction);\n estimate.from = fromAddress;\n transaction.gasLimit = this.provider.estimateGas(estimate);\n }\n if (transaction.to != null) {\n transaction.to = Promise.resolve(transaction.to).then((to) => __awaiter(this, void 0, void 0, function* () {\n if (to == null) {\n return null;\n }\n const address = yield this.provider.resolveName(to);\n if (address == null) {\n logger.throwArgumentError(\"provided ENS name resolves to null\", \"tx.to\", to);\n }\n return address;\n }));\n }\n return resolveProperties({\n tx: resolveProperties(transaction),\n sender: fromAddress\n }).then(({ tx, sender }) => {\n if (tx.from != null) {\n if (tx.from.toLowerCase() !== sender) {\n logger.throwArgumentError(\"from address mismatch\", \"transaction\", transaction);\n }\n }\n else {\n tx.from = sender;\n }\n const hexTx = this.provider.constructor.hexlifyTransaction(tx, { from: true });\n return this.provider.send(\"eth_sendTransaction\", [hexTx]).then((hash) => {\n return hash;\n }, (error) => {\n if (typeof (error.message) === \"string\" && error.message.match(/user denied/i)) {\n logger.throwError(\"user rejected transaction\", Logger.errors.ACTION_REJECTED, {\n action: \"sendTransaction\",\n transaction: tx\n });\n }\n return checkError(\"sendTransaction\", error, hexTx);\n });\n });\n }\n signTransaction(transaction) {\n return logger.throwError(\"signing transactions is unsupported\", Logger.errors.UNSUPPORTED_OPERATION, {\n operation: \"signTransaction\"\n });\n }\n sendTransaction(transaction) {\n return __awaiter(this, void 0, void 0, function* () {\n // This cannot be mined any earlier than any recent block\n const blockNumber = yield this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval);\n // Send the transaction\n const hash = yield this.sendUncheckedTransaction(transaction);\n try {\n // Unfortunately, JSON-RPC only provides and opaque transaction hash\n // for a response, and we need the actual transaction, so we poll\n // for it; it should show up very quickly\n return yield poll(() => __awaiter(this, void 0, void 0, function* () {\n const tx = yield this.provider.getTransaction(hash);\n if (tx === null) {\n return undefined;\n }\n return this.provider._wrapTransaction(tx, hash, blockNumber);\n }), { oncePoll: this.provider });\n }\n catch (error) {\n error.transactionHash = hash;\n throw error;\n }\n });\n }\n signMessage(message) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = ((typeof (message) === \"string\") ? toUtf8Bytes(message) : message);\n const address = yield this.getAddress();\n try {\n return yield this.provider.send(\"personal_sign\", [hexlify(data), address.toLowerCase()]);\n }\n catch (error) {\n if (typeof (error.message) === \"string\" && error.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", Logger.errors.ACTION_REJECTED, {\n action: \"signMessage\",\n from: address,\n messageData: message\n });\n }\n throw error;\n }\n });\n }\n _legacySignMessage(message) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = ((typeof (message) === \"string\") ? toUtf8Bytes(message) : message);\n const address = yield this.getAddress();\n try {\n // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign\n return yield this.provider.send(\"eth_sign\", [address.toLowerCase(), hexlify(data)]);\n }\n catch (error) {\n if (typeof (error.message) === \"string\" && error.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", Logger.errors.ACTION_REJECTED, {\n action: \"_legacySignMessage\",\n from: address,\n messageData: message\n });\n }\n throw error;\n }\n });\n }\n _signTypedData(domain, types, value) {\n return __awaiter(this, void 0, void 0, function* () {\n // Populate any ENS names (in-place)\n const populated = yield _TypedDataEncoder.resolveNames(domain, types, value, (name) => {\n return this.provider.resolveName(name);\n });\n const address = yield this.getAddress();\n try {\n return yield this.provider.send(\"eth_signTypedData_v4\", [\n address.toLowerCase(),\n JSON.stringify(_TypedDataEncoder.getPayload(populated.domain, types, populated.value))\n ]);\n }\n catch (error) {\n if (typeof (error.message) === \"string\" && error.message.match(/user denied/i)) {\n logger.throwError(\"user rejected signing\", Logger.errors.ACTION_REJECTED, {\n action: \"_signTypedData\",\n from: address,\n messageData: { domain: populated.domain, types, value: populated.value }\n });\n }\n throw error;\n }\n });\n }\n unlock(password) {\n return __awaiter(this, void 0, void 0, function* () {\n const provider = this.provider;\n const address = yield this.getAddress();\n return provider.send(\"personal_unlockAccount\", [address.toLowerCase(), password, null]);\n });\n }\n}\nclass UncheckedJsonRpcSigner extends JsonRpcSigner {\n sendTransaction(transaction) {\n return this.sendUncheckedTransaction(transaction).then((hash) => {\n return {\n hash: hash,\n nonce: null,\n gasLimit: null,\n gasPrice: null,\n data: null,\n value: null,\n chainId: null,\n confirmations: 0,\n from: null,\n wait: (confirmations) => { return this.provider.waitForTransaction(hash, confirmations); }\n };\n });\n }\n}\nconst allowedTransactionKeys = {\n chainId: true, data: true, gasLimit: true, gasPrice: true, nonce: true, to: true, value: true,\n type: true, accessList: true,\n maxFeePerGas: true, maxPriorityFeePerGas: true\n};\nexport class JsonRpcProvider extends BaseProvider {\n constructor(url, network) {\n let networkOrReady = network;\n // The network is unknown, query the JSON-RPC for it\n if (networkOrReady == null) {\n networkOrReady = new Promise((resolve, reject) => {\n setTimeout(() => {\n this.detectNetwork().then((network) => {\n resolve(network);\n }, (error) => {\n reject(error);\n });\n }, 0);\n });\n }\n super(networkOrReady);\n // Default URL\n if (!url) {\n url = getStatic(this.constructor, \"defaultUrl\")();\n }\n if (typeof (url) === \"string\") {\n defineReadOnly(this, \"connection\", Object.freeze({\n url: url\n }));\n }\n else {\n defineReadOnly(this, \"connection\", Object.freeze(shallowCopy(url)));\n }\n this._nextId = 42;\n }\n get _cache() {\n if (this._eventLoopCache == null) {\n this._eventLoopCache = {};\n }\n return this._eventLoopCache;\n }\n static defaultUrl() {\n return \"http:/\\/localhost:8545\";\n }\n detectNetwork() {\n if (!this._cache[\"detectNetwork\"]) {\n this._cache[\"detectNetwork\"] = this._uncachedDetectNetwork();\n // Clear this cache at the beginning of the next event loop\n setTimeout(() => {\n this._cache[\"detectNetwork\"] = null;\n }, 0);\n }\n return this._cache[\"detectNetwork\"];\n }\n _uncachedDetectNetwork() {\n return __awaiter(this, void 0, void 0, function* () {\n yield timer(0);\n let chainId = null;\n try {\n chainId = yield this.send(\"eth_chainId\", []);\n }\n catch (error) {\n try {\n chainId = yield this.send(\"net_version\", []);\n }\n catch (error) { }\n }\n if (chainId != null) {\n const getNetwork = getStatic(this.constructor, \"getNetwork\");\n try {\n return getNetwork(BigNumber.from(chainId).toNumber());\n }\n catch (error) {\n return logger.throwError(\"could not detect network\", Logger.errors.NETWORK_ERROR, {\n chainId: chainId,\n event: \"invalidNetwork\",\n serverError: error\n });\n }\n }\n return logger.throwError(\"could not detect network\", Logger.errors.NETWORK_ERROR, {\n event: \"noNetwork\"\n });\n });\n }\n getSigner(addressOrIndex) {\n return new JsonRpcSigner(_constructorGuard, this, addressOrIndex);\n }\n getUncheckedSigner(addressOrIndex) {\n return this.getSigner(addressOrIndex).connectUnchecked();\n }\n listAccounts() {\n return this.send(\"eth_accounts\", []).then((accounts) => {\n return accounts.map((a) => this.formatter.address(a));\n });\n }\n send(method, params) {\n const request = {\n method: method,\n params: params,\n id: (this._nextId++),\n jsonrpc: \"2.0\"\n };\n this.emit(\"debug\", {\n action: \"request\",\n request: deepCopy(request),\n provider: this\n });\n // We can expand this in the future to any call, but for now these\n // are the biggest wins and do not require any serializing parameters.\n const cache = ([\"eth_chainId\", \"eth_blockNumber\"].indexOf(method) >= 0);\n if (cache && this._cache[method]) {\n return this._cache[method];\n }\n const result = fetchJson(this.connection, JSON.stringify(request), getResult).then((result) => {\n this.emit(\"debug\", {\n action: \"response\",\n request: request,\n response: result,\n provider: this\n });\n return result;\n }, (error) => {\n this.emit(\"debug\", {\n action: \"response\",\n error: error,\n request: request,\n provider: this\n });\n throw error;\n });\n // Cache the fetch, but clear it on the next event loop\n if (cache) {\n this._cache[method] = result;\n setTimeout(() => {\n this._cache[method] = null;\n }, 0);\n }\n return result;\n }\n prepareRequest(method, params) {\n switch (method) {\n case \"getBlockNumber\":\n return [\"eth_blockNumber\", []];\n case \"getGasPrice\":\n return [\"eth_gasPrice\", []];\n case \"getBalance\":\n return [\"eth_getBalance\", [getLowerCase(params.address), params.blockTag]];\n case \"getTransactionCount\":\n return [\"eth_getTransactionCount\", [getLowerCase(params.address), params.blockTag]];\n case \"getCode\":\n return [\"eth_getCode\", [getLowerCase(params.address), params.blockTag]];\n case \"getStorageAt\":\n return [\"eth_getStorageAt\", [getLowerCase(params.address), hexZeroPad(params.position, 32), params.blockTag]];\n case \"sendTransaction\":\n return [\"eth_sendRawTransaction\", [params.signedTransaction]];\n case \"getBlock\":\n if (params.blockTag) {\n return [\"eth_getBlockByNumber\", [params.blockTag, !!params.includeTransactions]];\n }\n else if (params.blockHash) {\n return [\"eth_getBlockByHash\", [params.blockHash, !!params.includeTransactions]];\n }\n return null;\n case \"getTransaction\":\n return [\"eth_getTransactionByHash\", [params.transactionHash]];\n case \"getTransactionReceipt\":\n return [\"eth_getTransactionReceipt\", [params.transactionHash]];\n case \"call\": {\n const hexlifyTransaction = getStatic(this.constructor, \"hexlifyTransaction\");\n return [\"eth_call\", [hexlifyTransaction(params.transaction, { from: true }), params.blockTag]];\n }\n case \"estimateGas\": {\n const hexlifyTransaction = getStatic(this.constructor, \"hexlifyTransaction\");\n return [\"eth_estimateGas\", [hexlifyTransaction(params.transaction, { from: true })]];\n }\n case \"getLogs\":\n if (params.filter && params.filter.address != null) {\n params.filter.address = getLowerCase(params.filter.address);\n }\n return [\"eth_getLogs\", [params.filter]];\n default:\n break;\n }\n return null;\n }\n perform(method, params) {\n return __awaiter(this, void 0, void 0, function* () {\n // Legacy networks do not like the type field being passed along (which\n // is fair), so we delete type if it is 0 and a non-EIP-1559 network\n if (method === \"call\" || method === \"estimateGas\") {\n const tx = params.transaction;\n if (tx && tx.type != null && BigNumber.from(tx.type).isZero()) {\n // If there are no EIP-1559 properties, it might be non-EIP-1559\n if (tx.maxFeePerGas == null && tx.maxPriorityFeePerGas == null) {\n const feeData = yield this.getFeeData();\n if (feeData.maxFeePerGas == null && feeData.maxPriorityFeePerGas == null) {\n // Network doesn't know about EIP-1559 (and hence type)\n params = shallowCopy(params);\n params.transaction = shallowCopy(tx);\n delete params.transaction.type;\n }\n }\n }\n }\n const args = this.prepareRequest(method, params);\n if (args == null) {\n logger.throwError(method + \" not implemented\", Logger.errors.NOT_IMPLEMENTED, { operation: method });\n }\n try {\n return yield this.send(args[0], args[1]);\n }\n catch (error) {\n return checkError(method, error, params);\n }\n });\n }\n _startEvent(event) {\n if (event.tag === \"pending\") {\n this._startPending();\n }\n super._startEvent(event);\n }\n _startPending() {\n if (this._pendingFilter != null) {\n return;\n }\n const self = this;\n const pendingFilter = this.send(\"eth_newPendingTransactionFilter\", []);\n this._pendingFilter = pendingFilter;\n pendingFilter.then(function (filterId) {\n function poll() {\n self.send(\"eth_getFilterChanges\", [filterId]).then(function (hashes) {\n if (self._pendingFilter != pendingFilter) {\n return null;\n }\n let seq = Promise.resolve();\n hashes.forEach(function (hash) {\n // @TODO: This should be garbage collected at some point... How? When?\n self._emitted[\"t:\" + hash.toLowerCase()] = \"pending\";\n seq = seq.then(function () {\n return self.getTransaction(hash).then(function (tx) {\n self.emit(\"pending\", tx);\n return null;\n });\n });\n });\n return seq.then(function () {\n return timer(1000);\n });\n }).then(function () {\n if (self._pendingFilter != pendingFilter) {\n self.send(\"eth_uninstallFilter\", [filterId]);\n return;\n }\n setTimeout(function () { poll(); }, 0);\n return null;\n }).catch((error) => { });\n }\n poll();\n return filterId;\n }).catch((error) => { });\n }\n _stopEvent(event) {\n if (event.tag === \"pending\" && this.listenerCount(\"pending\") === 0) {\n this._pendingFilter = null;\n }\n super._stopEvent(event);\n }\n // Convert an ethers.js transaction into a JSON-RPC transaction\n // - gasLimit => gas\n // - All values hexlified\n // - All numeric values zero-striped\n // - All addresses are lowercased\n // NOTE: This allows a TransactionRequest, but all values should be resolved\n // before this is called\n // @TODO: This will likely be removed in future versions and prepareRequest\n // will be the preferred method for this.\n static hexlifyTransaction(transaction, allowExtra) {\n // Check only allowed properties are given\n const allowed = shallowCopy(allowedTransactionKeys);\n if (allowExtra) {\n for (const key in allowExtra) {\n if (allowExtra[key]) {\n allowed[key] = true;\n }\n }\n }\n checkProperties(transaction, allowed);\n const result = {};\n // JSON-RPC now requires numeric values to be \"quantity\" values\n [\"chainId\", \"gasLimit\", \"gasPrice\", \"type\", \"maxFeePerGas\", \"maxPriorityFeePerGas\", \"nonce\", \"value\"].forEach(function (key) {\n if (transaction[key] == null) {\n return;\n }\n const value = hexValue(BigNumber.from(transaction[key]));\n if (key === \"gasLimit\") {\n key = \"gas\";\n }\n result[key] = value;\n });\n [\"from\", \"to\", \"data\"].forEach(function (key) {\n if (transaction[key] == null) {\n return;\n }\n result[key] = hexlify(transaction[key]);\n });\n if (transaction.accessList) {\n result[\"accessList\"] = accessListify(transaction.accessList);\n }\n return result;\n }\n}\n//# sourceMappingURL=json-rpc-provider.js.map","export const version = \"solidity/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { BigNumber } from \"@ethersproject/bignumber\";\nimport { arrayify, concat, hexlify, zeroPad } from \"@ethersproject/bytes\";\nimport { keccak256 as hashKeccak256 } from \"@ethersproject/keccak256\";\nimport { sha256 as hashSha256 } from \"@ethersproject/sha2\";\nimport { toUtf8Bytes } from \"@ethersproject/strings\";\nconst regexBytes = new RegExp(\"^bytes([0-9]+)$\");\nconst regexNumber = new RegExp(\"^(u?int)([0-9]*)$\");\nconst regexArray = new RegExp(\"^(.*)\\\\[([0-9]*)\\\\]$\");\nconst Zeros = \"0000000000000000000000000000000000000000000000000000000000000000\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nfunction _pack(type, value, isArray) {\n switch (type) {\n case \"address\":\n if (isArray) {\n return zeroPad(value, 32);\n }\n return arrayify(value);\n case \"string\":\n return toUtf8Bytes(value);\n case \"bytes\":\n return arrayify(value);\n case \"bool\":\n value = (value ? \"0x01\" : \"0x00\");\n if (isArray) {\n return zeroPad(value, 32);\n }\n return arrayify(value);\n }\n let match = type.match(regexNumber);\n if (match) {\n //let signed = (match[1] === \"int\")\n let size = parseInt(match[2] || \"256\");\n if ((match[2] && String(size) !== match[2]) || (size % 8 !== 0) || size === 0 || size > 256) {\n logger.throwArgumentError(\"invalid number type\", \"type\", type);\n }\n if (isArray) {\n size = 256;\n }\n value = BigNumber.from(value).toTwos(size);\n return zeroPad(value, size / 8);\n }\n match = type.match(regexBytes);\n if (match) {\n const size = parseInt(match[1]);\n if (String(size) !== match[1] || size === 0 || size > 32) {\n logger.throwArgumentError(\"invalid bytes type\", \"type\", type);\n }\n if (arrayify(value).byteLength !== size) {\n logger.throwArgumentError(`invalid value for ${type}`, \"value\", value);\n }\n if (isArray) {\n return arrayify((value + Zeros).substring(0, 66));\n }\n return value;\n }\n match = type.match(regexArray);\n if (match && Array.isArray(value)) {\n const baseType = match[1];\n const count = parseInt(match[2] || String(value.length));\n if (count != value.length) {\n logger.throwArgumentError(`invalid array length for ${type}`, \"value\", value);\n }\n const result = [];\n value.forEach(function (value) {\n result.push(_pack(baseType, value, true));\n });\n return concat(result);\n }\n return logger.throwArgumentError(\"invalid type\", \"type\", type);\n}\n// @TODO: Array Enum\nexport function pack(types, values) {\n if (types.length != values.length) {\n logger.throwArgumentError(\"wrong number of values; expected ${ types.length }\", \"values\", values);\n }\n const tight = [];\n types.forEach(function (type, index) {\n tight.push(_pack(type, values[index]));\n });\n return hexlify(concat(tight));\n}\nexport function keccak256(types, values) {\n return hashKeccak256(pack(types, values));\n}\nexport function sha256(types, values) {\n return hashSha256(pack(types, values));\n}\n//# sourceMappingURL=index.js.map","export const version = \"units/5.7.0\";\n//# sourceMappingURL=_version.js.map","\"use strict\";\nimport { formatFixed, parseFixed } from \"@ethersproject/bignumber\";\nimport { Logger } from \"@ethersproject/logger\";\nimport { version } from \"./_version\";\nconst logger = new Logger(version);\nconst names = [\n \"wei\",\n \"kwei\",\n \"mwei\",\n \"gwei\",\n \"szabo\",\n \"finney\",\n \"ether\",\n];\n// Some environments have issues with RegEx that contain back-tracking, so we cannot\n// use them.\nexport function commify(value) {\n const comps = String(value).split(\".\");\n if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === \".\" || value === \"-.\") {\n logger.throwArgumentError(\"invalid value\", \"value\", value);\n }\n // Make sure we have at least one whole digit (0 if none)\n let whole = comps[0];\n let negative = \"\";\n if (whole.substring(0, 1) === \"-\") {\n negative = \"-\";\n whole = whole.substring(1);\n }\n // Make sure we have at least 1 whole digit with no leading zeros\n while (whole.substring(0, 1) === \"0\") {\n whole = whole.substring(1);\n }\n if (whole === \"\") {\n whole = \"0\";\n }\n let suffix = \"\";\n if (comps.length === 2) {\n suffix = \".\" + (comps[1] || \"0\");\n }\n while (suffix.length > 2 && suffix[suffix.length - 1] === \"0\") {\n suffix = suffix.substring(0, suffix.length - 1);\n }\n const formatted = [];\n while (whole.length) {\n if (whole.length <= 3) {\n formatted.unshift(whole);\n break;\n }\n else {\n const index = whole.length - 3;\n formatted.unshift(whole.substring(index));\n whole = whole.substring(0, index);\n }\n }\n return negative + formatted.join(\",\") + suffix;\n}\nexport function formatUnits(value, unitName) {\n if (typeof (unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) {\n unitName = 3 * index;\n }\n }\n return formatFixed(value, (unitName != null) ? unitName : 18);\n}\nexport function parseUnits(value, unitName) {\n if (typeof (value) !== \"string\") {\n logger.throwArgumentError(\"value must be a string\", \"value\", value);\n }\n if (typeof (unitName) === \"string\") {\n const index = names.indexOf(unitName);\n if (index !== -1) {\n unitName = 3 * index;\n }\n }\n return parseFixed(value, (unitName != null) ? unitName : 18);\n}\nexport function formatEther(wei) {\n return formatUnits(wei, 18);\n}\nexport function parseEther(ether) {\n return parseUnits(ether, 18);\n}\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatBytes32String = exports.Utf8ErrorFuncs = exports.toUtf8String = exports.toUtf8CodePoints = exports.toUtf8Bytes = exports._toEscapedUtf8String = exports.nameprep = exports.hexDataSlice = exports.hexDataLength = exports.hexZeroPad = exports.hexValue = exports.hexStripZeros = exports.hexConcat = exports.isHexString = exports.hexlify = exports.base64 = exports.base58 = exports.TransactionDescription = exports.LogDescription = exports.Interface = exports.SigningKey = exports.HDNode = exports.defaultPath = exports.isBytesLike = exports.isBytes = exports.zeroPad = exports.stripZeros = exports.concat = exports.arrayify = exports.shallowCopy = exports.resolveProperties = exports.getStatic = exports.defineReadOnly = exports.deepCopy = exports.checkProperties = exports.poll = exports.fetchJson = exports._fetchData = exports.RLP = exports.Logger = exports.checkResultErrors = exports.FormatTypes = exports.ParamType = exports.FunctionFragment = exports.EventFragment = exports.ErrorFragment = exports.ConstructorFragment = exports.Fragment = exports.defaultAbiCoder = exports.AbiCoder = void 0;\nexports.Indexed = exports.Utf8ErrorReason = exports.UnicodeNormalizationForm = exports.SupportedAlgorithm = exports.mnemonicToSeed = exports.isValidMnemonic = exports.entropyToMnemonic = exports.mnemonicToEntropy = exports.getAccountPath = exports.verifyTypedData = exports.verifyMessage = exports.recoverPublicKey = exports.computePublicKey = exports.recoverAddress = exports.computeAddress = exports.getJsonWalletAddress = exports.TransactionTypes = exports.serializeTransaction = exports.parseTransaction = exports.accessListify = exports.joinSignature = exports.splitSignature = exports.soliditySha256 = exports.solidityKeccak256 = exports.solidityPack = exports.shuffled = exports.randomBytes = exports.sha512 = exports.sha256 = exports.ripemd160 = exports.keccak256 = exports.computeHmac = exports.commify = exports.parseUnits = exports.formatUnits = exports.parseEther = exports.formatEther = exports.isAddress = exports.getCreate2Address = exports.getContractAddress = exports.getIcapAddress = exports.getAddress = exports._TypedDataEncoder = exports.id = exports.isValidName = exports.namehash = exports.hashMessage = exports.dnsEncode = exports.parseBytes32String = void 0;\nvar abi_1 = require(\"@ethersproject/abi\");\nObject.defineProperty(exports, \"AbiCoder\", { enumerable: true, get: function () { return abi_1.AbiCoder; } });\nObject.defineProperty(exports, \"checkResultErrors\", { enumerable: true, get: function () { return abi_1.checkResultErrors; } });\nObject.defineProperty(exports, \"ConstructorFragment\", { enumerable: true, get: function () { return abi_1.ConstructorFragment; } });\nObject.defineProperty(exports, \"defaultAbiCoder\", { enumerable: true, get: function () { return abi_1.defaultAbiCoder; } });\nObject.defineProperty(exports, \"ErrorFragment\", { enumerable: true, get: function () { return abi_1.ErrorFragment; } });\nObject.defineProperty(exports, \"EventFragment\", { enumerable: true, get: function () { return abi_1.EventFragment; } });\nObject.defineProperty(exports, \"FormatTypes\", { enumerable: true, get: function () { return abi_1.FormatTypes; } });\nObject.defineProperty(exports, \"Fragment\", { enumerable: true, get: function () { return abi_1.Fragment; } });\nObject.defineProperty(exports, \"FunctionFragment\", { enumerable: true, get: function () { return abi_1.FunctionFragment; } });\nObject.defineProperty(exports, \"Indexed\", { enumerable: true, get: function () { return abi_1.Indexed; } });\nObject.defineProperty(exports, \"Interface\", { enumerable: true, get: function () { return abi_1.Interface; } });\nObject.defineProperty(exports, \"LogDescription\", { enumerable: true, get: function () { return abi_1.LogDescription; } });\nObject.defineProperty(exports, \"ParamType\", { enumerable: true, get: function () { return abi_1.ParamType; } });\nObject.defineProperty(exports, \"TransactionDescription\", { enumerable: true, get: function () { return abi_1.TransactionDescription; } });\nvar address_1 = require(\"@ethersproject/address\");\nObject.defineProperty(exports, \"getAddress\", { enumerable: true, get: function () { return address_1.getAddress; } });\nObject.defineProperty(exports, \"getCreate2Address\", { enumerable: true, get: function () { return address_1.getCreate2Address; } });\nObject.defineProperty(exports, \"getContractAddress\", { enumerable: true, get: function () { return address_1.getContractAddress; } });\nObject.defineProperty(exports, \"getIcapAddress\", { enumerable: true, get: function () { return address_1.getIcapAddress; } });\nObject.defineProperty(exports, \"isAddress\", { enumerable: true, get: function () { return address_1.isAddress; } });\nvar base64 = __importStar(require(\"@ethersproject/base64\"));\nexports.base64 = base64;\nvar basex_1 = require(\"@ethersproject/basex\");\nObject.defineProperty(exports, \"base58\", { enumerable: true, get: function () { return basex_1.Base58; } });\nvar bytes_1 = require(\"@ethersproject/bytes\");\nObject.defineProperty(exports, \"arrayify\", { enumerable: true, get: function () { return bytes_1.arrayify; } });\nObject.defineProperty(exports, \"concat\", { enumerable: true, get: function () { return bytes_1.concat; } });\nObject.defineProperty(exports, \"hexConcat\", { enumerable: true, get: function () { return bytes_1.hexConcat; } });\nObject.defineProperty(exports, \"hexDataSlice\", { enumerable: true, get: function () { return bytes_1.hexDataSlice; } });\nObject.defineProperty(exports, \"hexDataLength\", { enumerable: true, get: function () { return bytes_1.hexDataLength; } });\nObject.defineProperty(exports, \"hexlify\", { enumerable: true, get: function () { return bytes_1.hexlify; } });\nObject.defineProperty(exports, \"hexStripZeros\", { enumerable: true, get: function () { return bytes_1.hexStripZeros; } });\nObject.defineProperty(exports, \"hexValue\", { enumerable: true, get: function () { return bytes_1.hexValue; } });\nObject.defineProperty(exports, \"hexZeroPad\", { enumerable: true, get: function () { return bytes_1.hexZeroPad; } });\nObject.defineProperty(exports, \"isBytes\", { enumerable: true, get: function () { return bytes_1.isBytes; } });\nObject.defineProperty(exports, \"isBytesLike\", { enumerable: true, get: function () { return bytes_1.isBytesLike; } });\nObject.defineProperty(exports, \"isHexString\", { enumerable: true, get: function () { return bytes_1.isHexString; } });\nObject.defineProperty(exports, \"joinSignature\", { enumerable: true, get: function () { return bytes_1.joinSignature; } });\nObject.defineProperty(exports, \"zeroPad\", { enumerable: true, get: function () { return bytes_1.zeroPad; } });\nObject.defineProperty(exports, \"splitSignature\", { enumerable: true, get: function () { return bytes_1.splitSignature; } });\nObject.defineProperty(exports, \"stripZeros\", { enumerable: true, get: function () { return bytes_1.stripZeros; } });\nvar hash_1 = require(\"@ethersproject/hash\");\nObject.defineProperty(exports, \"_TypedDataEncoder\", { enumerable: true, get: function () { return hash_1._TypedDataEncoder; } });\nObject.defineProperty(exports, \"dnsEncode\", { enumerable: true, get: function () { return hash_1.dnsEncode; } });\nObject.defineProperty(exports, \"hashMessage\", { enumerable: true, get: function () { return hash_1.hashMessage; } });\nObject.defineProperty(exports, \"id\", { enumerable: true, get: function () { return hash_1.id; } });\nObject.defineProperty(exports, \"isValidName\", { enumerable: true, get: function () { return hash_1.isValidName; } });\nObject.defineProperty(exports, \"namehash\", { enumerable: true, get: function () { return hash_1.namehash; } });\nvar hdnode_1 = require(\"@ethersproject/hdnode\");\nObject.defineProperty(exports, \"defaultPath\", { enumerable: true, get: function () { return hdnode_1.defaultPath; } });\nObject.defineProperty(exports, \"entropyToMnemonic\", { enumerable: true, get: function () { return hdnode_1.entropyToMnemonic; } });\nObject.defineProperty(exports, \"getAccountPath\", { enumerable: true, get: function () { return hdnode_1.getAccountPath; } });\nObject.defineProperty(exports, \"HDNode\", { enumerable: true, get: function () { return hdnode_1.HDNode; } });\nObject.defineProperty(exports, \"isValidMnemonic\", { enumerable: true, get: function () { return hdnode_1.isValidMnemonic; } });\nObject.defineProperty(exports, \"mnemonicToEntropy\", { enumerable: true, get: function () { return hdnode_1.mnemonicToEntropy; } });\nObject.defineProperty(exports, \"mnemonicToSeed\", { enumerable: true, get: function () { return hdnode_1.mnemonicToSeed; } });\nvar json_wallets_1 = require(\"@ethersproject/json-wallets\");\nObject.defineProperty(exports, \"getJsonWalletAddress\", { enumerable: true, get: function () { return json_wallets_1.getJsonWalletAddress; } });\nvar keccak256_1 = require(\"@ethersproject/keccak256\");\nObject.defineProperty(exports, \"keccak256\", { enumerable: true, get: function () { return keccak256_1.keccak256; } });\nvar logger_1 = require(\"@ethersproject/logger\");\nObject.defineProperty(exports, \"Logger\", { enumerable: true, get: function () { return logger_1.Logger; } });\nvar sha2_1 = require(\"@ethersproject/sha2\");\nObject.defineProperty(exports, \"computeHmac\", { enumerable: true, get: function () { return sha2_1.computeHmac; } });\nObject.defineProperty(exports, \"ripemd160\", { enumerable: true, get: function () { return sha2_1.ripemd160; } });\nObject.defineProperty(exports, \"sha256\", { enumerable: true, get: function () { return sha2_1.sha256; } });\nObject.defineProperty(exports, \"sha512\", { enumerable: true, get: function () { return sha2_1.sha512; } });\nvar solidity_1 = require(\"@ethersproject/solidity\");\nObject.defineProperty(exports, \"solidityKeccak256\", { enumerable: true, get: function () { return solidity_1.keccak256; } });\nObject.defineProperty(exports, \"solidityPack\", { enumerable: true, get: function () { return solidity_1.pack; } });\nObject.defineProperty(exports, \"soliditySha256\", { enumerable: true, get: function () { return solidity_1.sha256; } });\nvar random_1 = require(\"@ethersproject/random\");\nObject.defineProperty(exports, \"randomBytes\", { enumerable: true, get: function () { return random_1.randomBytes; } });\nObject.defineProperty(exports, \"shuffled\", { enumerable: true, get: function () { return random_1.shuffled; } });\nvar properties_1 = require(\"@ethersproject/properties\");\nObject.defineProperty(exports, \"checkProperties\", { enumerable: true, get: function () { return properties_1.checkProperties; } });\nObject.defineProperty(exports, \"deepCopy\", { enumerable: true, get: function () { return properties_1.deepCopy; } });\nObject.defineProperty(exports, \"defineReadOnly\", { enumerable: true, get: function () { return properties_1.defineReadOnly; } });\nObject.defineProperty(exports, \"getStatic\", { enumerable: true, get: function () { return properties_1.getStatic; } });\nObject.defineProperty(exports, \"resolveProperties\", { enumerable: true, get: function () { return properties_1.resolveProperties; } });\nObject.defineProperty(exports, \"shallowCopy\", { enumerable: true, get: function () { return properties_1.shallowCopy; } });\nvar RLP = __importStar(require(\"@ethersproject/rlp\"));\nexports.RLP = RLP;\nvar signing_key_1 = require(\"@ethersproject/signing-key\");\nObject.defineProperty(exports, \"computePublicKey\", { enumerable: true, get: function () { return signing_key_1.computePublicKey; } });\nObject.defineProperty(exports, \"recoverPublicKey\", { enumerable: true, get: function () { return signing_key_1.recoverPublicKey; } });\nObject.defineProperty(exports, \"SigningKey\", { enumerable: true, get: function () { return signing_key_1.SigningKey; } });\nvar strings_1 = require(\"@ethersproject/strings\");\nObject.defineProperty(exports, \"formatBytes32String\", { enumerable: true, get: function () { return strings_1.formatBytes32String; } });\nObject.defineProperty(exports, \"nameprep\", { enumerable: true, get: function () { return strings_1.nameprep; } });\nObject.defineProperty(exports, \"parseBytes32String\", { enumerable: true, get: function () { return strings_1.parseBytes32String; } });\nObject.defineProperty(exports, \"_toEscapedUtf8String\", { enumerable: true, get: function () { return strings_1._toEscapedUtf8String; } });\nObject.defineProperty(exports, \"toUtf8Bytes\", { enumerable: true, get: function () { return strings_1.toUtf8Bytes; } });\nObject.defineProperty(exports, \"toUtf8CodePoints\", { enumerable: true, get: function () { return strings_1.toUtf8CodePoints; } });\nObject.defineProperty(exports, \"toUtf8String\", { enumerable: true, get: function () { return strings_1.toUtf8String; } });\nObject.defineProperty(exports, \"Utf8ErrorFuncs\", { enumerable: true, get: function () { return strings_1.Utf8ErrorFuncs; } });\nvar transactions_1 = require(\"@ethersproject/transactions\");\nObject.defineProperty(exports, \"accessListify\", { enumerable: true, get: function () { return transactions_1.accessListify; } });\nObject.defineProperty(exports, \"computeAddress\", { enumerable: true, get: function () { return transactions_1.computeAddress; } });\nObject.defineProperty(exports, \"parseTransaction\", { enumerable: true, get: function () { return transactions_1.parse; } });\nObject.defineProperty(exports, \"recoverAddress\", { enumerable: true, get: function () { return transactions_1.recoverAddress; } });\nObject.defineProperty(exports, \"serializeTransaction\", { enumerable: true, get: function () { return transactions_1.serialize; } });\nObject.defineProperty(exports, \"TransactionTypes\", { enumerable: true, get: function () { return transactions_1.TransactionTypes; } });\nvar units_1 = require(\"@ethersproject/units\");\nObject.defineProperty(exports, \"commify\", { enumerable: true, get: function () { return units_1.commify; } });\nObject.defineProperty(exports, \"formatEther\", { enumerable: true, get: function () { return units_1.formatEther; } });\nObject.defineProperty(exports, \"parseEther\", { enumerable: true, get: function () { return units_1.parseEther; } });\nObject.defineProperty(exports, \"formatUnits\", { enumerable: true, get: function () { return units_1.formatUnits; } });\nObject.defineProperty(exports, \"parseUnits\", { enumerable: true, get: function () { return units_1.parseUnits; } });\nvar wallet_1 = require(\"@ethersproject/wallet\");\nObject.defineProperty(exports, \"verifyMessage\", { enumerable: true, get: function () { return wallet_1.verifyMessage; } });\nObject.defineProperty(exports, \"verifyTypedData\", { enumerable: true, get: function () { return wallet_1.verifyTypedData; } });\nvar web_1 = require(\"@ethersproject/web\");\nObject.defineProperty(exports, \"_fetchData\", { enumerable: true, get: function () { return web_1._fetchData; } });\nObject.defineProperty(exports, \"fetchJson\", { enumerable: true, get: function () { return web_1.fetchJson; } });\nObject.defineProperty(exports, \"poll\", { enumerable: true, get: function () { return web_1.poll; } });\n////////////////////////\n// Enums\nvar sha2_2 = require(\"@ethersproject/sha2\");\nObject.defineProperty(exports, \"SupportedAlgorithm\", { enumerable: true, get: function () { return sha2_2.SupportedAlgorithm; } });\nvar strings_2 = require(\"@ethersproject/strings\");\nObject.defineProperty(exports, \"UnicodeNormalizationForm\", { enumerable: true, get: function () { return strings_2.UnicodeNormalizationForm; } });\nObject.defineProperty(exports, \"Utf8ErrorReason\", { enumerable: true, get: function () { return strings_2.Utf8ErrorReason; } });\n//# sourceMappingURL=utils.js.map","function Ir(r){return r.length!==0}function vr(r){return r.filter(e=>e!=null)}function p(){let r=null,e=null,t=new Promise((o,n)=>{r=i=>o(i),e=i=>n(i)});return[r,e,t]}import{reaction as G}from\"mobx\";async function R(r){let[e,,t]=p(),o=G(()=>r.get(),i=>{i&&e(i)},{fireImmediately:!0}),n=await t;return o(),n}function B(r){return typeof r==\"object\"&&!Array.isArray(r)&&r!==null}function O(r){return r instanceof Function}import{reaction as q}from\"mobx\";import Q from\"proxy-deep\";function S(r,e){if(e.length===0)return r;if(e.length===1)return r[e[0]];let[t,...o]=e,n=r[t];if(!B(n))throw new Error(\"Path does not exist on the target\");return S(n,o)}function $r(r){let e=[],t=new Q({},{get(o,n){let i=r.get();return i?n===\"proxied\"?!1:Reflect.get(i,n):n===\"proxied\"?!0:n===\"name\"?\"ProxiedTarget\":n===\"toJSON\"?()=>({proxied:!0}):this.nest(()=>{})},apply(o,n,i){let s=r.get();if(s){let a=S(s,this.path);if(!O(a))throw new Error(\"Target is not callable\");return Reflect.apply(a,n,i)}else{let[a,l,u]=p();return e.push({path:this.path,args:i,resolve:a,reject:l}),u}}});return q(()=>r.get(),o=>{if(!o)return;let n=e.splice(0);for(let{path:i,args:s,resolve:a,reject:l}of n){let u=S(o,i);s&&O(u)?(async()=>{try{a(await u(...s))}catch(f){l(f)}})():a(u)}}),t}function Yr(r){let e=[];for(let t of Object.values(r))isNaN(Number(t))||e.push(Number(t));return e}function Jr(r,e){let t={};for(let o in r)t[o]=e(r[o],o);return t}function Z(r,e=0){return Math.floor(Math.random()*(r-e+1))+e}function Xr(r){return r[Z(r.length-1)]}import{concatMap as rr,delay as er,filter as tr,first as or,mergeMap as nr,of as ir,pipe as E,ReplaySubject as F,scan as ar,timestamp as sr}from\"rxjs\";import{computed as U,observable as P,reaction as _,runInAction as j,toJS as ur}from\"mobx\";function lr(){return E(tr(r=>r!=null))}function oe(){return E(rr(r=>r))}function ne(r){return E(sr(),ar((e,t)=>{let o=0;if(e!==null){let n=t.timestamp-e.timestamp;o=n>r?0:r-n}return{timestamp:t.timestamp,delay:o,value:t.value}},null),lr(),nr(e=>ir(e.value).pipe(er(e.delay)),1))}function ie(r){return U(()=>r.get())}function ae(r){let e=new F(1);return _(()=>r.get(),t=>{t!=null&&e.next(t)},{fireImmediately:!0}),e}function se(r){let e=new F(1);return _(()=>ur(r),t=>{t!=null&&e.next(t)},{fireImmediately:!0}),e}function ue(r){let e=P.box();return r.subscribe(t=>j(()=>e.set(t))),U(()=>e.get())}async function le(r){let e=P.box();r.subscribe(o=>j(()=>e.set(o)));let t=U(()=>e.get());return await R(t),t}async function cr(r,e=t=>t!=null){let[t,,o]=p();return r.pipe(or(e)).subscribe(t),o}async function ce(r){let e={};return r.subscribe(t=>e.current=t),e.current=await cr(r),e}var fe=function(){let r=mr,e=fr;return e(r(32),8)+\"-\"+e(r(16),4)+\"-\"+e(16384|r(12),4)+\"-\"+e(32768|r(14),4)+\"-\"+e(r(48),12)},mr=function(r){if(r<0||r>53)return NaN;let e=0|Math.random()*1073741824;return r>30?e+(0|Math.random()*(1<>>30-r},fr=function(r,e){let t=r.toString(16),o=e-t.length,n=\"0\";for(;o>0;o>>>=1,n+=n)o&1&&(t=n+t);return t};function M(r,e){return new Promise(t=>setTimeout(()=>t(e),r))}var be=function*(r=0,e=1,t=0){for(let o=0;oPromise.race([r,pr(e,t)]),ye=(r,e=[],t=10,o=1e3)=>{let[n,i,s]=p();return(async()=>{let l;for(let u=0;u=r.length;return o?{done:o,value:null}:{value:r[e++]}}})}function ve(r,e){return e.x>=r.x&&e.y>=r.y&&e.xr.postMessage(t)),D(r,\"message\").pipe(Y(t=>t.data))}function Pe(r){let e=D(self,\"message\");r.work(e.pipe(Y(o=>o.data))).subscribe(o=>self.postMessage(o))}function br(r,e){return r&2**e-1}function gr(r,e){if(e.reduce((o,n)=>o+n,0)>32)throw new Error(\"JS pretends integers are 32 bit when bitshifts are involved\");if(r.length!==e.length)throw new Error(\"Arrays' lengths must match\");for(let o=0;o2**e[o]-1){let n=`Overflow: ${r[o]} does not fit in ${e[o]} bits`;throw new Error(n)}}let t=0;for(let o=0;o=0;n--)t.unshift(br(o,e[n])),o=o>>>e[n];return t}function je(r){return gr(r,[8,24])}function $e(r){return yr(r,[8,24])}var hr=2**16-1,h=2**15-1;function We(r,e){let t=new A;for(let o of r.coords())e.get(o)||t.set(o,!0);return t}function v(r){return r.x<<16|r.y&hr}function W(r){let e=r>>16,t=r<<16>>16;return{x:e,y:t}}var A=class{map;defaultValue;constructor(e){this.map=new Map,this.defaultValue=e?.defaultValue}static from(e){let t=new A;return t.map=e.map,t.defaultValue=e.defaultValue,t}set(e,t){if(e.x>h||e.x<-1*h||e.y>h||e.y<-1*h)throw new Error(`CoordMap only supports coords up to ${h}`);return this.map.set(v(e),t)}get(e){return this.map.get(v(e))??this.defaultValue}keys(){return this.map.keys()}coords(){return I(this.map.keys(),e=>W(e))}entries(){return this.map.entries()}toArray(){return Array.from(this.map.entries()).map(([t,o])=>[W(t),o])}values(){return this.map.values()}delete(e){return this.map.delete(v(e))}has(e){return this.map.has(v(e))}clear(){for(let e of this.map.keys())this.map.delete(e)}get size(){return this.map.size}};function k(r){return`${r.x}/${r.y}/${r.z}`}function J(r){let e=r.split(\"/\");return{x:Number(e[0]),y:Number(e[1]),z:Number(e[2])}}var V=class{map;defaultValue;constructor(e){this.map=new Map,this.defaultValue=e?.defaultValue}static from(e){let t=new V;return t.map=e.map,t.defaultValue=e.defaultValue,t}set(e,t){return this.map.set(k(e),t)}get(e){return this.map.get(k(e))??this.defaultValue}keys(){return this.map.keys()}coords(){return I(this.map.keys(),e=>J(e))}entries(){return this.map.entries()}toArray(){return Array.from(this.map.entries()).map(([t,o])=>[J(t),o])}values(){return this.map.values()}delete(e){return this.map.delete(k(e))}has(e){return this.map.has(k(e))}clear(){for(let e of this.map.keys())this.map.delete(e)}get size(){return this.map.size}};function H(r,e){r.substring(0,2)==\"0x\"&&(r=r.substring(2));let t=e/4;return r=r.padStart(t,\"0\"),r=r.substring(r.length-t),`0x${r}`}function X(r){return H(r,160)}function ze(r){return H(r,256)}function Ke(r){if(r[0]!==\"0\"&&r[1]!==\"x\")throw new Error(\"Invalid hex string\");return\"0x\"+r.substring(10)}function d(r,e,t){return(((e^t)*134775813^r+e)*(1103515245*e<<16^1103515245*t-134775813)>>>0)/4294967295}function m(r,e){if(r<0)for(;r<0;)r+=e;return r%e}function N(r,e,t,o,n,i,s){let a=o-t-(r-e);return(e*Math.pow(i,3)+n*(t*Math.pow(i,2)+r*i*(-i+n)+n*(-(e+a)*i+a*n)))*s}function Ge(r,e,t,o=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return{seed:Math.floor(r*Number.MAX_SAFE_INTEGER),periodX:o,periodY:n,octave:e,scale:t}}function qe(r,e){let t=Math.floor(e),o=e-t;return N(d(r.seed,m(t-1,r.periodX),0),d(r.seed,m(t,r.periodX),0),d(r.seed,m(t+1,r.periodX),0),d(r.seed,m(t+2,r.periodX),0),o,1,1)*.666666+.166666}function Qe({octave:r,periodX:e,periodY:t,seed:o,scale:n},i,s){let a=Math.floor(i/r),l=Math.floor(i*1e3/r)-a*1e3,u=Math.floor(s/r),f=Math.floor(s*1e3/r)-u*1e3,T=m(a-1,e),c=m(a,e),b=m(a+1,e),L=m(a+2,e),g=new Array(4);for(let w=0;w<4;++w){let C=m(u-1+w,t);g[w]=N(d(o,T,C),d(o,c,C),d(o,b,C),d(o,L,C),l,1e3,1)}return Math.floor(N(g[0],g[1],g[2],g[3],f,1e3,n)/Math.pow(1e3,6))}var x=\"mud-logger-topics\";function rt(){let r=window.console,e=!!localStorage.getItem(x),t=localStorage.getItem(x),o=t?JSON.parse(t):[];function n(...c){e||r.log(...c)}function i(c,...b){(!e||o.includes(c))&&(r.log(`--- BETTER CONSOLE / TOPIC ${c} ---`),r.log(...b))}function s(){localStorage.setItem(x,JSON.stringify([])),e=!0}function a(){localStorage.removeItem(x),e=!1}function l(c){o.push(c),localStorage.setItem(x,JSON.stringify(o))}function u(c){o=o.filter(b=>b!==c),localStorage.setItem(x,JSON.stringify(o))}function f(){o=[],localStorage.setItem(x,JSON.stringify(o))}let T={...r,log:n,logWithTopic:i,enableFilters:s,disableFilters:a,addTopic:l,removeTopic:u,resetTopics:f};return window.logger=T,window.console=T,T}function tt(r,e){if(r.length!==e.length)throw new Error(\"points must have same dimension\");return Math.sqrt(r.reduce((t,o,n)=>t+Math.pow(r[n]-e[n],2),0))}function nt(r){return(r<0?-1:1)*Math.floor(Math.abs(r))}var at=r=>`0x${[...new Uint8Array(r)].map(e=>e.toString(16).padStart(2,\"0\")).join(\"\")}`;var ut=r=>[...r].map(e=>String.fromCharCode(e)).join(\"\");function z(r){return/^(0x)?([\\da-f]{2})*$/i.test(r)}var K=r=>{if(!z(r))throw console.error(\"Invalid hex string\",r),new Error(\"Invalid hex string\");let e=r.match(/[\\da-f]{2}/gi);return e?new Uint8Array(e.map(t=>parseInt(t,16))):new Uint8Array([])};var pt=r=>{if(r.length>16)throw new Error(\"string too long\");return new Uint8Array(16).map((e,t)=>r.charCodeAt(t))},dt=r=>{if(r.length>32)throw new Error(\"string too long\");return new Uint8Array(32).map((e,t)=>r.charCodeAt(t))};function Ar(r){return r.substring(0,2)==\"0x\"&&(r=r.substring(2)),(r.length%2!==0?\"0x0\":\"0x\")+r}function wr(r){return K(r)}function It(r){return r.length===0?\"0x00\":Ar(r.reduce((e,t)=>e+t.toString(16).padStart(2,\"0\"),\"\"))}function vt(...r){return Uint8Array.from(r.reduce((e,t)=>[...e,...t],[]))}function kt(r,e){let t=[],o=0;for(let n of e){let i=new Uint8Array(n);t.push(i);for(let s=0;s64)throw new Error(\"Maximum size is 64\");let e=2**(r-1)-1,t=-e-1;return o=>{if(o=o<<0,o>e||oe,o(o[o.Boolean=0]=\"Boolean\",o[o.Number=1]=\"Number\",o[o.OptionalNumber=2]=\"OptionalNumber\",o[o.BigInt=3]=\"BigInt\",o[o.OptionalBigInt=4]=\"OptionalBigInt\",o[o.String=5]=\"String\",o[o.OptionalString=6]=\"OptionalString\",o[o.NumberArray=7]=\"NumberArray\",o[o.OptionalNumberArray=8]=\"OptionalNumberArray\",o[o.BigIntArray=9]=\"BigIntArray\",o[o.OptionalBigIntArray=10]=\"OptionalBigIntArray\",o[o.StringArray=11]=\"StringArray\",o[o.OptionalStringArray=12]=\"OptionalStringArray\",o[o.Entity=13]=\"Entity\",o[o.OptionalEntity=14]=\"OptionalEntity\",o[o.EntityArray=15]=\"EntityArray\",o[o.OptionalEntityArray=16]=\"OptionalEntityArray\",o[o.T=17]=\"T\",o[o.OptionalT=18]=\"OptionalT\",o))(P||{}),w=(i=>(i[i.Enter=0]=\"Enter\",i[i.Exit=1]=\"Exit\",i[i.Update=2]=\"Update\",i[i.Noop=3]=\"Noop\",i))(w||{}),k=[14,16,2,8,4,10,6,12,18];import{transformIterator as j,uuid as L}from\"@latticexyz/utils\";import{mapObject as N}from\"@latticexyz/utils\";import{filter as D,map as K,Subject as $}from\"rxjs\";function M(e){let t=new Map;function n(l){let s=t.get(a(l));return s?new Set([...s].map(x)):new Set}function a(l){return Object.values(l).join(\"/\")}function i(l,s){if(!s)return;let v=a(s),f=t.get(v);f||(f=new Set,t.set(v,f)),f.add(l)}function d(l,s){if(!s)return;let v=a(s),f=t.get(v);f&&f.delete(l)}for(let l of O(e)){let s=g(e,l);i(p(l),s)}let c=e.update$.subscribe(({entity:l,value:s})=>{d(p(l),s[1]),i(p(l),s[0])});return e.world.registerDisposer(()=>c?.unsubscribe()),{...e,getEntitiesWithValue:n}}import{map as W,pipe as B}from\"rxjs\";function X(e,t){return e.component===t}function F(e,t){let n=g(t,e);return{entity:e,component:t,value:[n,void 0],type:n==null?3:0}}function Y(e){return B(W(t=>F(t,e)))}function I(e){return\"getEntitiesWithValue\"in e}function T(e,t){return Object.keys(e.schema).every(n=>n in t)}function b(e){return e.metadata?.componentName??e.metadata?.tableName??e.metadata?.tableId??e.metadata?.contractId??e.id}function ie(e,t,n){if(Object.keys(t).length===0)throw new Error(\"Component schema must have at least one key\");let a=n?.id??L(),i=N(t,()=>new Map),d=new $,c=n?.metadata,s={values:i,schema:t,id:a,update$:d,metadata:c,entities:()=>j(Object.values(i)[0].keys(),x),world:e};return n?.indexed&&(s=M(s)),e.registerComponent(s),s}function E(e,t,n){let a=p(t),i=g(e,t);for(let[d,c]of Object.entries(n))e.values[d]?e.values[d].set(a,c):e.metadata?.tableId&&/^\\d+$/.test(d)||console.warn(\"Component definition for\",b(e),\"is missing key\",d,\", ignoring value\",c,\"for entity\",t,\". Existing keys: \",Object.keys(e.values));e.update$.next({entity:t,value:[n,i],component:e})}function ue(e,t,n,a){let i=g(e,t);if(i===void 0){if(a===void 0)throw new Error(`Can't update component ${b(e)} without a current value or initial value`);E(e,t,{...a,...n})}else E(e,t,{...i,...n})}function se(e,t){let n=p(t),a=g(e,t);for(let i of Object.keys(e.values))e.values[i].delete(n);e.update$.next({entity:t,value:[void 0,a],component:e})}function le(e,t){let n=p(t);return Object.values(e.values)[0].has(n)}function g(e,t){let n={},a=p(t),i=Object.keys(e.schema);for(let d of i){let c=e.values[d].get(a);if(c===void 0&&!k.includes(e.schema[d]))return;n[d]=c}return n}function de(e,t){let n=g(e,t);if(!n)throw new Error(`No value for component ${b(e)} on entity ${t}`);return n}function q(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;let n=!0;for(let a of Object.keys(e))if(n=e[a]===t[a],!n)return!1;return n}function me(e,t){return[e,t]}function ce(e,t){if(I(e)&&T(e,t))return e.getEntitiesWithValue(t);let n=new Set;for(let a of O(e)){let i=g(e,a);q(t,i)&&n.add(a)}return n}function O(e){return e.entities()}function Se(e){let t=0,n=new Map,a=new Map,i=new $;function d(u,r){n.set(u,{update:r,nonce:t++}),C(r.entity,r.value)}function c(u){let r=n.get(u)?.update.entity;if(n.delete(u),r==null)return;let S=[...n.values()].filter(m=>m.update.entity===r).sort((m,h)=>m.nonce0){let m=S[S.length-1];C(r,m.update.value)}else C(r,void 0)}function l(u){let r=g(e,u),S=p(u),m=a.get(S);return(r||m)&&m!==null?{...r,...m}:void 0}let s=u=>({get(r,S){return S===\"get\"?m=>{let h=r.get(m),V=a.get(m);return V&&V[u]!=null?V[u]:h}:S===\"has\"?m=>r.has(m)||a.has(m):S===\"keys\"?()=>new Set([...r.keys(),...a.keys()]).values():Reflect.get(r,S,r)}}),v={};for(let u of Object.keys(e.values))v[u]=new Proxy(e.values[u],s(u));let f=v,y=new Proxy(e,{get(u,r){return r===\"addOverride\"?d:r===\"removeOverride\"?c:r===\"values\"?f:r===\"update$\"?i:r===\"entities\"?()=>new Set([...j(a.keys(),x),...u.entities()]).values():Reflect.get(u,r)},has(u,r){return r===\"addOverride\"||r===\"removeOverride\"?!0:r in u}});function C(u,r){let S=p(u),m=l(u);r!==void 0?a.set(S,r):a.delete(S),i.next({entity:u,value:[l(u),m],component:y})}return e.update$.pipe(D(u=>!a.get(p(u.entity))),K(u=>({...u,component:y}))).subscribe(i),y}function A(e,t){return`localcache-${t}-${e.id}`}function fe(e,t){localStorage.removeItem(A(e,t))}function pe(e,t){let{world:n,update$:a,values:i}=e,d=A(e,t),c=0,l=Date.now(),s=localStorage.getItem(d);if(s){let f=JSON.parse(s),y={};for(let[C,u]of f)for(let[r,S]of u)y[r]=y[r]||{},y[r][C]=S;for(let[C,u]of Object.entries(y)){let r=n.registerEntity({id:C});E(e,r,u)}console.info(\"Loading component\",b(e),\"from local cache.\")}let v=a.subscribe(()=>{c++;let f=JSON.stringify(Object.entries(N(i,y=>[...y.entries()].map(C=>[x(C[0]),C[1]]))));localStorage.setItem(d,f),c>200&&console.warn(\"Component\",b(e),\"was locally cached\",c,\"times since\",new Date(l).toLocaleTimeString(),\"- the local cache is in an alpha state and should not be used with components that update frequently yet\")});return e.world.registerDisposer(()=>v?.unsubscribe()),e}function ge(e,t,n){let a=e.registerEntity(n??{});if(t)for(let[i,d]of t)E(i,a,d);return a}function p(e){return Symbol.for(e)}function x(e){return Symbol.keyFor(e)}export{P as a,w as b,k as c,ge as d,p as e,x as f,M as g,X as h,F as i,Y as j,I as k,T as l,ie as m,E as n,ue as o,se as p,le as q,g as r,de as s,q as t,me as u,ce as v,O as w,Se as x,fe as y,pe as z};\n//# sourceMappingURL=chunk-EL5Z72NP.js.map","import{a as W,b as v,c as te,d as ne,e as S,f as V,g as re,h as oe,i as ie,j as g,k as pe,l as ae,m as ye,n as C,o as ue,p as E,q as s,r as l,s as me,t as h,u as de,v as O,w as b,x as se,y as le,z as ce}from\"./chunk-EL5Z72NP.js\";import{concat as K,EMPTY as X,from as Z}from\"rxjs\";import{filterNullish as R}from\"@latticexyz/utils\";import{observable as B}from\"mobx\";import{concat as $,concatMap as q,filter as F,from as D,map as j,merge as L,of as z,share as Y}from\"rxjs\";var N=(o=>(o[o.Has=0]=\"Has\",o[o.HasValue=1]=\"HasValue\",o[o.Not=2]=\"Not\",o[o.NotValue=3]=\"NotValue\",o[o.ProxyRead=4]=\"ProxyRead\",o[o.ProxyExpand=5]=\"ProxyExpand\",o))(N||{});function xe(e){return[2,4,6,14,16,8,10,12].includes(e)}function Te(e){return[7,8,9,10,11,12,15,16].includes(e)}function Se(e){return[1,2].includes(e)}function ge(e){return[13,14].includes(e)}function Ye(e){return{type:0,component:e}}function Ge(e){return{type:2,component:e}}function Je(e,t){return{type:1,component:e,value:t}}function Ke(e,t){return{type:3,component:e,value:t}}function Xe(e,t){return{type:4,component:e,depth:t}}function Ze(e,t){return{type:5,component:e,depth:t}}function c(e,t){if(t.type===0)return s(t.component,e);if(t.type===1)return h(t.value,l(t.component,e));if(t.type===2)return!s(t.component,e);if(t.type===3)return!h(t.value,l(t.component,e));throw new Error(\"Unknown query fragment\")}function G(e){return e.type===0||e.type==1}function P(e){return e.type===2||e.type==3}function J(e){return e.type===5||e.type==4}function U(e,t){return e&&G(t)||!e&&P(t)}function I(e,t,n){let r=e,a=!1;for(let y=0;y[...Q(y,t,n-1)]).flat();return new Set([...r,...a])}function A(e,t){let n=t?new Set([...t]):void 0,r,a;for(let y=0;y0&&!U(m,o)&&(m=I(p,o,r)??m),m||n.delete(p),a&&a.depth>0){let d=Q(p,a.component,a.depth);for(let i of d)(c(i,o)||r&&r.depth>0&&I(i,o,r))&&n.add(i)}}else{if(P(o))throw new Error(\"First EntityQueryFragment must be Has or HasValue\");if(n=o.type===0?new Set([...b(o.component)]):O(o.component,o.value),a&&a.depth>0)for(let p of[...n])for(let m of Q(p,a.component,a.depth))n.add(m)}}return n??new Set}function f(e,t){let n=t?.runOnInit||t?.initialSet?A(e,t.initialSet):new Set,r=B(n),a=D(r).pipe(g(e[0].component)),y=e.findIndex(p=>[5,4].includes(p.type))!==-1,o=L(...e.map(p=>p.component.update$)).pipe(y?q(p=>{let m=A(e,t?.initialSet),d=[];for(let i of r)m.has(i)||(r.delete(i),d.push({entity:i,type:1,component:p.component,value:[void 0,void 0]}));for(let i of m)r.has(i)?d.push({entity:i,type:2,component:p.component,value:[l(p.component,i),void 0]}):(r.add(i),d.push({entity:i,type:0,component:p.component,value:[l(p.component,i),void 0]}));return z(...d)}):j(p=>{if(r.has(p.entity))return e.filter(u=>u.component.id===p.component.id).every(u=>c(p.entity,u))?{...p,type:2}:(r.delete(p.entity),{...p,type:1});if(e.every(d=>c(p.entity,d)))return r.add(p.entity),{...p,type:0}}),R());return{matching:r,update$:$(a,o).pipe(Y())}}function H(e,t){return f(e,t).update$.pipe(F(n=>n.type===2))}function w(e,t){return f(e,t).update$.pipe(F(n=>n.type===0))}function k(e,t){return f(e,t).update$.pipe(F(n=>n.type===1))}function x(e,t,n){let r=t.subscribe(n);e.registerDisposer(()=>r?.unsubscribe())}function pt(e,t,n,r={runOnInit:!0}){x(e,H(t,r),n)}function at(e,t,n,r={runOnInit:!0}){x(e,w(t,r),n)}function yt(e,t,n,r={runOnInit:!0}){x(e,k(t,r),n)}function _(e,t,n,r={runOnInit:!0}){x(e,f(t,r).update$,n)}function ut(e,t,n,r={runOnInit:!0}){let a=r?.runOnInit?Z(b(t)).pipe(g(t)):X;x(e,K(a,t.update$),n)}function mt(e,t,n,r,a={update:!1,runOnInit:!0}){_(e,t,({entity:y,type:o})=>{o===0&&C(n(y),y,r(y)),o===1&&E(n(y),y),a?.update&&o===2&&C(n(y),y,r(y))},a)}import{transformIterator as ee}from\"@latticexyz/utils\";function ft(){let e=new Set,t=[],n=[];function r({id:i,idSuffix:u}={}){let T=i||e.size+(u?\"-\"+u:\"\"),M=S(T);return e.add(M),T}function a(){return ee(e.values(),V)}function y(i){t.push(i)}function o(i){for(let[,u]of n.filter(T=>!i||T[0]===i))u();n=n.filter(u=>i&&u[0]!==i)}function p(i,u=\"\"){n.push([u,i])}function m(i){let u=S(i);return e.has(u)}function d(i){for(let u of t)s(u,i)&&E(u,i);e.delete(S(i))}return{registerEntity:r,components:t,registerComponent:y,dispose:o,registerDisposer:p,hasEntity:m,getEntities:a,entitySymbols:e,deleteEntity:d}}function xt(e,t){return{...e,registerDisposer:n=>e.registerDisposer(n,t),dispose:()=>e.dispose(t)}}function Tt(e,t){return e.components.filter(n=>s(n,t))}export{Ye as Has,Je as HasValue,Ge as Not,Ke as NotValue,te as OptionalTypes,Ze as ProxyExpand,Xe as ProxyRead,N as QueryFragmentType,W as Type,v as UpdateType,le as clearLocalCache,h as componentValueEquals,ne as createEntity,re as createIndexer,ce as createLocalCache,ft as createWorld,ye as defineComponent,ut as defineComponentSystem,w as defineEnterQuery,at as defineEnterSystem,k as defineExitQuery,yt as defineExitSystem,f as defineQuery,x as defineRxSystem,mt as defineSyncSystem,_ as defineSystem,H as defineUpdateQuery,pt as defineUpdateSystem,Q as getChildEntities,b as getComponentEntities,l as getComponentValue,me as getComponentValueStrict,O as getEntitiesWithValue,Tt as getEntityComponents,V as getEntityString,S as getEntitySymbol,s as hasComponent,Te as isArrayType,oe as isComponentUpdate,ge as isEntityType,ae as isFullComponentValue,pe as isIndexer,Se as isNumberType,xe as isOptionalType,xt as namespaceWorld,se as overridableComponent,E as removeComponent,A as runQuery,C as setComponent,ie as toUpdate,g as toUpdateStream,ue as updateComponent,de as withValue};\n//# sourceMappingURL=index.js.map","var i=/\\[\\]$/;function b(t){return i.test(t)}function r(t){return t.replace(i,\"\")}var n=[\"uint8\",\"uint16\",\"uint24\",\"uint32\",\"uint40\",\"uint48\",\"uint56\",\"uint64\",\"uint72\",\"uint80\",\"uint88\",\"uint96\",\"uint104\",\"uint112\",\"uint120\",\"uint128\",\"uint136\",\"uint144\",\"uint152\",\"uint160\",\"uint168\",\"uint176\",\"uint184\",\"uint192\",\"uint200\",\"uint208\",\"uint216\",\"uint224\",\"uint232\",\"uint240\",\"uint248\",\"uint256\",\"int8\",\"int16\",\"int24\",\"int32\",\"int40\",\"int48\",\"int56\",\"int64\",\"int72\",\"int80\",\"int88\",\"int96\",\"int104\",\"int112\",\"int120\",\"int128\",\"int136\",\"int144\",\"int152\",\"int160\",\"int168\",\"int176\",\"int184\",\"int192\",\"int200\",\"int208\",\"int216\",\"int224\",\"int232\",\"int240\",\"int248\",\"int256\",\"bytes1\",\"bytes2\",\"bytes3\",\"bytes4\",\"bytes5\",\"bytes6\",\"bytes7\",\"bytes8\",\"bytes9\",\"bytes10\",\"bytes11\",\"bytes12\",\"bytes13\",\"bytes14\",\"bytes15\",\"bytes16\",\"bytes17\",\"bytes18\",\"bytes19\",\"bytes20\",\"bytes21\",\"bytes22\",\"bytes23\",\"bytes24\",\"bytes25\",\"bytes26\",\"bytes27\",\"bytes28\",\"bytes29\",\"bytes30\",\"bytes31\",\"bytes32\",\"bool\",\"address\",\"uint8[]\",\"uint16[]\",\"uint24[]\",\"uint32[]\",\"uint40[]\",\"uint48[]\",\"uint56[]\",\"uint64[]\",\"uint72[]\",\"uint80[]\",\"uint88[]\",\"uint96[]\",\"uint104[]\",\"uint112[]\",\"uint120[]\",\"uint128[]\",\"uint136[]\",\"uint144[]\",\"uint152[]\",\"uint160[]\",\"uint168[]\",\"uint176[]\",\"uint184[]\",\"uint192[]\",\"uint200[]\",\"uint208[]\",\"uint216[]\",\"uint224[]\",\"uint232[]\",\"uint240[]\",\"uint248[]\",\"uint256[]\",\"int8[]\",\"int16[]\",\"int24[]\",\"int32[]\",\"int40[]\",\"int48[]\",\"int56[]\",\"int64[]\",\"int72[]\",\"int80[]\",\"int88[]\",\"int96[]\",\"int104[]\",\"int112[]\",\"int120[]\",\"int128[]\",\"int136[]\",\"int144[]\",\"int152[]\",\"int160[]\",\"int168[]\",\"int176[]\",\"int184[]\",\"int192[]\",\"int200[]\",\"int208[]\",\"int216[]\",\"int224[]\",\"int232[]\",\"int240[]\",\"int248[]\",\"int256[]\",\"bytes1[]\",\"bytes2[]\",\"bytes3[]\",\"bytes4[]\",\"bytes5[]\",\"bytes6[]\",\"bytes7[]\",\"bytes8[]\",\"bytes9[]\",\"bytes10[]\",\"bytes11[]\",\"bytes12[]\",\"bytes13[]\",\"bytes14[]\",\"bytes15[]\",\"bytes16[]\",\"bytes17[]\",\"bytes18[]\",\"bytes19[]\",\"bytes20[]\",\"bytes21[]\",\"bytes22[]\",\"bytes23[]\",\"bytes24[]\",\"bytes25[]\",\"bytes26[]\",\"bytes27[]\",\"bytes28[]\",\"bytes29[]\",\"bytes30[]\",\"bytes31[]\",\"bytes32[]\",\"bool[]\",\"address[]\",\"bytes\",\"string\"],e=n.slice(0,98),y=n.slice(98);var s={\"uint8[]\":[],\"uint16[]\":[],\"uint24[]\":[],\"uint32[]\":[],\"uint40[]\":[],\"uint48[]\":[],\"uint56[]\":[],\"uint64[]\":[],\"uint72[]\":[],\"uint80[]\":[],\"uint88[]\":[],\"uint96[]\":[],\"uint104[]\":[],\"uint112[]\":[],\"uint120[]\":[],\"uint128[]\":[],\"uint136[]\":[],\"uint144[]\":[],\"uint152[]\":[],\"uint160[]\":[],\"uint168[]\":[],\"uint176[]\":[],\"uint184[]\":[],\"uint192[]\":[],\"uint200[]\":[],\"uint208[]\":[],\"uint216[]\":[],\"uint224[]\":[],\"uint232[]\":[],\"uint240[]\":[],\"uint248[]\":[],\"uint256[]\":[],\"int8[]\":[],\"int16[]\":[],\"int24[]\":[],\"int32[]\":[],\"int40[]\":[],\"int48[]\":[],\"int56[]\":[],\"int64[]\":[],\"int72[]\":[],\"int80[]\":[],\"int88[]\":[],\"int96[]\":[],\"int104[]\":[],\"int112[]\":[],\"int120[]\":[],\"int128[]\":[],\"int136[]\":[],\"int144[]\":[],\"int152[]\":[],\"int160[]\":[],\"int168[]\":[],\"int176[]\":[],\"int184[]\":[],\"int192[]\":[],\"int200[]\":[],\"int208[]\":[],\"int216[]\":[],\"int224[]\":[],\"int232[]\":[],\"int240[]\":[],\"int248[]\":[],\"int256[]\":[],\"bytes1[]\":[],\"bytes2[]\":[],\"bytes3[]\":[],\"bytes4[]\":[],\"bytes5[]\":[],\"bytes6[]\":[],\"bytes7[]\":[],\"bytes8[]\":[],\"bytes9[]\":[],\"bytes10[]\":[],\"bytes11[]\":[],\"bytes12[]\":[],\"bytes13[]\":[],\"bytes14[]\":[],\"bytes15[]\":[],\"bytes16[]\":[],\"bytes17[]\":[],\"bytes18[]\":[],\"bytes19[]\":[],\"bytes20[]\":[],\"bytes21[]\":[],\"bytes22[]\":[],\"bytes23[]\":[],\"bytes24[]\":[],\"bytes25[]\":[],\"bytes26[]\":[],\"bytes27[]\":[],\"bytes28[]\":[],\"bytes29[]\":[],\"bytes30[]\":[],\"bytes31[]\":[],\"bytes32[]\":[],\"bool[]\":[],\"address[]\":[],bytes:\"0x\",string:\"\"};function T(t){return y.includes(t)}var a={uint8:0,uint16:0,uint24:0,uint32:0,uint40:0,uint48:0,uint56:0n,uint64:0n,uint72:0n,uint80:0n,uint88:0n,uint96:0n,uint104:0n,uint112:0n,uint120:0n,uint128:0n,uint136:0n,uint144:0n,uint152:0n,uint160:0n,uint168:0n,uint176:0n,uint184:0n,uint192:0n,uint200:0n,uint208:0n,uint216:0n,uint224:0n,uint232:0n,uint240:0n,uint248:0n,uint256:0n,int8:0,int16:0,int24:0,int32:0,int40:0,int48:0,int56:0n,int64:0n,int72:0n,int80:0n,int88:0n,int96:0n,int104:0n,int112:0n,int120:0n,int128:0n,int136:0n,int144:0n,int152:0n,int160:0n,int168:0n,int176:0n,int184:0n,int192:0n,int200:0n,int208:0n,int216:0n,int224:0n,int232:0n,int240:0n,int248:0n,int256:0n,bytes1:\"0x00\",bytes2:\"0x0000\",bytes3:\"0x000000\",bytes4:\"0x00000000\",bytes5:\"0x0000000000\",bytes6:\"0x000000000000\",bytes7:\"0x00000000000000\",bytes8:\"0x0000000000000000\",bytes9:\"0x000000000000000000\",bytes10:\"0x00000000000000000000\",bytes11:\"0x0000000000000000000000\",bytes12:\"0x000000000000000000000000\",bytes13:\"0x00000000000000000000000000\",bytes14:\"0x0000000000000000000000000000\",bytes15:\"0x000000000000000000000000000000\",bytes16:\"0x00000000000000000000000000000000\",bytes17:\"0x0000000000000000000000000000000000\",bytes18:\"0x000000000000000000000000000000000000\",bytes19:\"0x00000000000000000000000000000000000000\",bytes20:\"0x0000000000000000000000000000000000000000\",bytes21:\"0x000000000000000000000000000000000000000000\",bytes22:\"0x00000000000000000000000000000000000000000000\",bytes23:\"0x0000000000000000000000000000000000000000000000\",bytes24:\"0x000000000000000000000000000000000000000000000000\",bytes25:\"0x00000000000000000000000000000000000000000000000000\",bytes26:\"0x0000000000000000000000000000000000000000000000000000\",bytes27:\"0x000000000000000000000000000000000000000000000000000000\",bytes28:\"0x00000000000000000000000000000000000000000000000000000000\",bytes29:\"0x0000000000000000000000000000000000000000000000000000000000\",bytes30:\"0x000000000000000000000000000000000000000000000000000000000000\",bytes31:\"0x00000000000000000000000000000000000000000000000000000000000000\",bytes32:\"0x0000000000000000000000000000000000000000000000000000000000000000\",bool:!1,address:\"0x0000000000000000000000000000000000000000\"},A={uint8:1,uint16:2,uint24:3,uint32:4,uint40:5,uint48:6,uint56:7,uint64:8,uint72:9,uint80:10,uint88:11,uint96:12,uint104:13,uint112:14,uint120:15,uint128:16,uint136:17,uint144:18,uint152:19,uint160:20,uint168:21,uint176:22,uint184:23,uint192:24,uint200:25,uint208:26,uint216:27,uint224:28,uint232:29,uint240:30,uint248:31,uint256:32,int8:1,int16:2,int24:3,int32:4,int40:5,int48:6,int56:7,int64:8,int72:9,int80:10,int88:11,int96:12,int104:13,int112:14,int120:15,int128:16,int136:17,int144:18,int152:19,int160:20,int168:21,int176:22,int184:23,int192:24,int200:25,int208:26,int216:27,int224:28,int232:29,int240:30,int248:31,int256:32,bytes1:1,bytes2:2,bytes3:3,bytes4:4,bytes5:5,bytes6:6,bytes7:7,bytes8:8,bytes9:9,bytes10:10,bytes11:11,bytes12:12,bytes13:13,bytes14:14,bytes15:15,bytes16:16,bytes17:17,bytes18:18,bytes19:19,bytes20:20,bytes21:21,bytes22:22,bytes23:23,bytes24:24,bytes25:25,bytes26:26,bytes27:27,bytes28:28,bytes29:29,bytes30:30,bytes31:31,bytes32:32,bool:1,address:20};function g(t){return e.includes(t)}var P={...a,...s};export{r as arrayAbiTypeToStaticAbiType,s as dynamicAbiTypeToDefaultValue,y as dynamicAbiTypes,b as isArrayAbiType,T as isDynamicAbiType,g as isStaticAbiType,P as schemaAbiTypeToDefaultValue,n as schemaAbiTypes,A as staticAbiTypeToByteLength,a as staticAbiTypeToDefaultValue,e as staticAbiTypes};\n//# sourceMappingURL=index.js.map","export const version = '0.9.3';\n//# sourceMappingURL=version.js.map","import { version } from './version.js';\nexport class BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = args.cause instanceof BaseError\n ? args.cause.details\n : args.cause?.message\n ? args.cause.message\n : args.details;\n const docsPath = args.cause instanceof BaseError\n ? args.cause.docsPath || args.docsPath\n : args.docsPath;\n const message = [\n shortMessage || 'An error occurred.',\n '',\n ...(args.metaMessages ? [...args.metaMessages, ''] : []),\n ...(docsPath ? [`Docs: https://abitype.dev${docsPath}`] : []),\n ...(details ? [`Details: ${details}`] : []),\n `Version: abitype@${version}`,\n ].join('\\n');\n super(message);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiTypeError'\n });\n if (args.cause)\n this.cause = args.cause;\n this.details = details;\n this.docsPath = docsPath;\n this.metaMessages = args.metaMessages;\n this.shortMessage = shortMessage;\n }\n}\n//# sourceMappingURL=errors.js.map","export function execTyped(regex, string) {\n const match = regex.exec(string);\n return match?.groups;\n}\nexport const bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\nexport const integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\nexport const isTupleRegex = /^\\(.+?\\).*?$/;\n//# sourceMappingURL=regex.js.map","import { execTyped } from '../../regex.js';\nconst errorSignatureRegex = /^error (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)$/;\nexport function isErrorSignature(signature) {\n return errorSignatureRegex.test(signature);\n}\nexport function execErrorSignature(signature) {\n return execTyped(errorSignatureRegex, signature);\n}\nconst eventSignatureRegex = /^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)$/;\nexport function isEventSignature(signature) {\n return eventSignatureRegex.test(signature);\n}\nexport function execEventSignature(signature) {\n return execTyped(eventSignatureRegex, signature);\n}\nconst functionSignatureRegex = /^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?.*?)\\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\\s?\\((?.*?)\\))?$/;\nexport function isFunctionSignature(signature) {\n return functionSignatureRegex.test(signature);\n}\nexport function execFunctionSignature(signature) {\n return execTyped(functionSignatureRegex, signature);\n}\nconst structSignatureRegex = /^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \\{(?.*?)\\}$/;\nexport function isStructSignature(signature) {\n return structSignatureRegex.test(signature);\n}\nexport function execStructSignature(signature) {\n return execTyped(structSignatureRegex, signature);\n}\nconst constructorSignatureRegex = /^constructor\\((?.*?)\\)(?:\\s(?payable{1}))?$/;\nexport function isConstructorSignature(signature) {\n return constructorSignatureRegex.test(signature);\n}\nexport function execConstructorSignature(signature) {\n return execTyped(constructorSignatureRegex, signature);\n}\nconst fallbackSignatureRegex = /^fallback\\(\\)$/;\nexport function isFallbackSignature(signature) {\n return fallbackSignatureRegex.test(signature);\n}\nconst receiveSignatureRegex = /^receive\\(\\) external payable$/;\nexport function isReceiveSignature(signature) {\n return receiveSignatureRegex.test(signature);\n}\nexport const modifiers = new Set([\n 'memory',\n 'indexed',\n 'storage',\n 'calldata',\n]);\nexport const eventModifiers = new Set(['indexed']);\nexport const functionModifiers = new Set([\n 'calldata',\n 'memory',\n 'storage',\n]);\n//# sourceMappingURL=signatures.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidAbiItemError extends BaseError {\n constructor({ signature }) {\n super('Failed to parse ABI item.', {\n details: `parseAbiItem(${JSON.stringify(signature, null, 2)})`,\n docsPath: '/api/human.html#parseabiitem-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiItemError'\n });\n }\n}\nexport class UnknownTypeError extends BaseError {\n constructor({ type }) {\n super('Unknown type.', {\n metaMessages: [\n `Type \"${type}\" is not a valid ABI type. Perhaps you forgot to include a struct signature?`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownTypeError'\n });\n }\n}\nexport class UnknownSolidityTypeError extends BaseError {\n constructor({ type }) {\n super('Unknown type.', {\n metaMessages: [`Type \"${type}\" is not a valid ABI type.`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownSolidityTypeError'\n });\n }\n}\n//# sourceMappingURL=abiItem.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidAbiParameterError extends BaseError {\n constructor({ param }) {\n super('Failed to parse ABI parameter.', {\n details: `parseAbiParameter(${JSON.stringify(param, null, 2)})`,\n docsPath: '/api/human.html#parseabiparameter-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiParameterError'\n });\n }\n}\nexport class InvalidAbiParametersError extends BaseError {\n constructor({ params }) {\n super('Failed to parse ABI parameters.', {\n details: `parseAbiParameters(${JSON.stringify(params, null, 2)})`,\n docsPath: '/api/human.html#parseabiparameters-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiParametersError'\n });\n }\n}\nexport class InvalidParameterError extends BaseError {\n constructor({ param }) {\n super('Invalid ABI parameter.', {\n details: param,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidParameterError'\n });\n }\n}\nexport class SolidityProtectedKeywordError extends BaseError {\n constructor({ param, name }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `\"${name}\" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SolidityProtectedKeywordError'\n });\n }\n}\nexport class InvalidModifierError extends BaseError {\n constructor({ param, type, modifier, }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : ''}.`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidModifierError'\n });\n }\n}\nexport class InvalidFunctionModifierError extends BaseError {\n constructor({ param, type, modifier, }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : ''}.`,\n `Data location can only be specified for array, struct, or mapping types, but \"${modifier}\" was given.`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidFunctionModifierError'\n });\n }\n}\nexport class InvalidAbiTypeParameterError extends BaseError {\n constructor({ abiParameter, }) {\n super('Invalid ABI parameter.', {\n details: JSON.stringify(abiParameter, null, 2),\n metaMessages: ['ABI parameter type is invalid.'],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiTypeParameterError'\n });\n }\n}\n//# sourceMappingURL=abiParameter.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidSignatureError extends BaseError {\n constructor({ signature, type, }) {\n super(`Invalid ${type} signature.`, {\n details: signature,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidSignatureError'\n });\n }\n}\nexport class UnknownSignatureError extends BaseError {\n constructor({ signature }) {\n super('Unknown signature.', {\n details: signature,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownSignatureError'\n });\n }\n}\nexport class InvalidStructSignatureError extends BaseError {\n constructor({ signature }) {\n super('Invalid struct signature.', {\n details: signature,\n metaMessages: ['No properties exist.'],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidStructSignatureError'\n });\n }\n}\n//# sourceMappingURL=signature.js.map","import { BaseError } from '../../errors.js';\nexport class CircularReferenceError extends BaseError {\n constructor({ type }) {\n super('Circular reference detected.', {\n metaMessages: [`Struct \"${type}\" is a circular reference.`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'CircularReferenceError'\n });\n }\n}\n//# sourceMappingURL=struct.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidParenthesisError extends BaseError {\n constructor({ current, depth }) {\n super('Unbalanced parentheses.', {\n metaMessages: [\n `\"${current.trim()}\" has too many ${depth > 0 ? 'opening' : 'closing'} parentheses.`,\n ],\n details: `Depth \"${depth}\"`,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidParenthesisError'\n });\n }\n}\n//# sourceMappingURL=splitParameters.js.map","export function getParameterCacheKey(param, type) {\n if (type)\n return `${type}:${param}`;\n return param;\n}\nexport const parameterCache = new Map([\n ['address', { type: 'address' }],\n ['bool', { type: 'bool' }],\n ['bytes', { type: 'bytes' }],\n ['bytes32', { type: 'bytes32' }],\n ['int', { type: 'int256' }],\n ['int256', { type: 'int256' }],\n ['string', { type: 'string' }],\n ['uint', { type: 'uint256' }],\n ['uint8', { type: 'uint8' }],\n ['uint16', { type: 'uint16' }],\n ['uint24', { type: 'uint24' }],\n ['uint32', { type: 'uint32' }],\n ['uint64', { type: 'uint64' }],\n ['uint96', { type: 'uint96' }],\n ['uint112', { type: 'uint112' }],\n ['uint160', { type: 'uint160' }],\n ['uint192', { type: 'uint192' }],\n ['uint256', { type: 'uint256' }],\n ['address owner', { type: 'address', name: 'owner' }],\n ['address to', { type: 'address', name: 'to' }],\n ['bool approved', { type: 'bool', name: 'approved' }],\n ['bytes _data', { type: 'bytes', name: '_data' }],\n ['bytes data', { type: 'bytes', name: 'data' }],\n ['bytes signature', { type: 'bytes', name: 'signature' }],\n ['bytes32 hash', { type: 'bytes32', name: 'hash' }],\n ['bytes32 r', { type: 'bytes32', name: 'r' }],\n ['bytes32 root', { type: 'bytes32', name: 'root' }],\n ['bytes32 s', { type: 'bytes32', name: 's' }],\n ['string name', { type: 'string', name: 'name' }],\n ['string symbol', { type: 'string', name: 'symbol' }],\n ['string tokenURI', { type: 'string', name: 'tokenURI' }],\n ['uint tokenId', { type: 'uint256', name: 'tokenId' }],\n ['uint8 v', { type: 'uint8', name: 'v' }],\n ['uint256 balance', { type: 'uint256', name: 'balance' }],\n ['uint256 tokenId', { type: 'uint256', name: 'tokenId' }],\n ['uint256 value', { type: 'uint256', name: 'value' }],\n [\n 'event:address indexed from',\n { type: 'address', name: 'from', indexed: true },\n ],\n ['event:address indexed to', { type: 'address', name: 'to', indexed: true }],\n [\n 'event:uint indexed tokenId',\n { type: 'uint256', name: 'tokenId', indexed: true },\n ],\n [\n 'event:uint256 indexed tokenId',\n { type: 'uint256', name: 'tokenId', indexed: true },\n ],\n]);\n//# sourceMappingURL=cache.js.map","import { bytesRegex, execTyped, integerRegex, isTupleRegex, } from '../../regex.js';\nimport { UnknownSolidityTypeError } from '../errors/abiItem.js';\nimport { InvalidFunctionModifierError, InvalidModifierError, InvalidParameterError, SolidityProtectedKeywordError, } from '../errors/abiParameter.js';\nimport { InvalidSignatureError, UnknownSignatureError, } from '../errors/signature.js';\nimport { InvalidParenthesisError } from '../errors/splitParameters.js';\nimport { getParameterCacheKey, parameterCache } from './cache.js';\nimport { eventModifiers, execConstructorSignature, execErrorSignature, execEventSignature, execFunctionSignature, functionModifiers, isConstructorSignature, isErrorSignature, isEventSignature, isFallbackSignature, isFunctionSignature, isReceiveSignature, } from './signatures.js';\nexport function parseSignature(signature, structs = {}) {\n if (isFunctionSignature(signature)) {\n const match = execFunctionSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'function' });\n const inputParams = splitParameters(match.parameters);\n const inputs = [];\n const inputLength = inputParams.length;\n for (let i = 0; i < inputLength; i++) {\n inputs.push(parseAbiParameter(inputParams[i], {\n modifiers: functionModifiers,\n structs,\n type: 'function',\n }));\n }\n const outputs = [];\n if (match.returns) {\n const outputParams = splitParameters(match.returns);\n const outputLength = outputParams.length;\n for (let i = 0; i < outputLength; i++) {\n outputs.push(parseAbiParameter(outputParams[i], {\n modifiers: functionModifiers,\n structs,\n type: 'function',\n }));\n }\n }\n return {\n name: match.name,\n type: 'function',\n stateMutability: match.stateMutability ?? 'nonpayable',\n inputs,\n outputs,\n };\n }\n if (isEventSignature(signature)) {\n const match = execEventSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'event' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++) {\n abiParameters.push(parseAbiParameter(params[i], {\n modifiers: eventModifiers,\n structs,\n type: 'event',\n }));\n }\n return { name: match.name, type: 'event', inputs: abiParameters };\n }\n if (isErrorSignature(signature)) {\n const match = execErrorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'error' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++) {\n abiParameters.push(parseAbiParameter(params[i], { structs, type: 'error' }));\n }\n return { name: match.name, type: 'error', inputs: abiParameters };\n }\n if (isConstructorSignature(signature)) {\n const match = execConstructorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'constructor' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++) {\n abiParameters.push(parseAbiParameter(params[i], { structs, type: 'constructor' }));\n }\n return {\n type: 'constructor',\n stateMutability: match.stateMutability ?? 'nonpayable',\n inputs: abiParameters,\n };\n }\n if (isFallbackSignature(signature))\n return { type: 'fallback' };\n if (isReceiveSignature(signature))\n return {\n type: 'receive',\n stateMutability: 'payable',\n };\n throw new UnknownSignatureError({ signature });\n}\nconst abiParameterWithoutTupleRegex = /^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\\[\\d*?\\])+?)?(?:\\s(?calldata|indexed|memory|storage{1}))?(?:\\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\nconst abiParameterWithTupleRegex = /^\\((?.+?)\\)(?(?:\\[\\d*?\\])+?)?(?:\\s(?calldata|indexed|memory|storage{1}))?(?:\\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\nconst dynamicIntegerRegex = /^u?int$/;\nexport function parseAbiParameter(param, options) {\n const parameterCacheKey = getParameterCacheKey(param, options?.type);\n if (parameterCache.has(parameterCacheKey))\n return parameterCache.get(parameterCacheKey);\n const isTuple = isTupleRegex.test(param);\n const match = execTyped(isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex, param);\n if (!match)\n throw new InvalidParameterError({ param });\n if (match.name && isSolidityKeyword(match.name))\n throw new SolidityProtectedKeywordError({ param, name: match.name });\n const name = match.name ? { name: match.name } : {};\n const indexed = match.modifier === 'indexed' ? { indexed: true } : {};\n const structs = options?.structs ?? {};\n let type;\n let components = {};\n if (isTuple) {\n type = 'tuple';\n const params = splitParameters(match.type);\n const components_ = [];\n const length = params.length;\n for (let i = 0; i < length; i++) {\n components_.push(parseAbiParameter(params[i], { structs }));\n }\n components = { components: components_ };\n }\n else if (match.type in structs) {\n type = 'tuple';\n components = { components: structs[match.type] };\n }\n else if (dynamicIntegerRegex.test(match.type)) {\n type = `${match.type}256`;\n }\n else {\n type = match.type;\n if (!(options?.type === 'struct') && !isSolidityType(type))\n throw new UnknownSolidityTypeError({ type });\n }\n if (match.modifier) {\n if (!options?.modifiers?.has?.(match.modifier))\n throw new InvalidModifierError({\n param,\n type: options?.type,\n modifier: match.modifier,\n });\n if (functionModifiers.has(match.modifier) &&\n !isValidDataLocation(type, !!match.array))\n throw new InvalidFunctionModifierError({\n param,\n type: options?.type,\n modifier: match.modifier,\n });\n }\n const abiParameter = {\n type: `${type}${match.array ?? ''}`,\n ...name,\n ...indexed,\n ...components,\n };\n parameterCache.set(parameterCacheKey, abiParameter);\n return abiParameter;\n}\nexport function splitParameters(params, result = [], current = '', depth = 0) {\n if (params === '') {\n if (current === '')\n return result;\n if (depth !== 0)\n throw new InvalidParenthesisError({ current, depth });\n result.push(current.trim());\n return result;\n }\n const length = params.length;\n for (let i = 0; i < length; i++) {\n const char = params[i];\n const tail = params.slice(i + 1);\n switch (char) {\n case ',':\n return depth === 0\n ? splitParameters(tail, [...result, current.trim()])\n : splitParameters(tail, result, `${current}${char}`, depth);\n case '(':\n return splitParameters(tail, result, `${current}${char}`, depth + 1);\n case ')':\n return splitParameters(tail, result, `${current}${char}`, depth - 1);\n default:\n return splitParameters(tail, result, `${current}${char}`, depth);\n }\n }\n return [];\n}\nexport function isSolidityType(type) {\n return (type === 'address' ||\n type === 'bool' ||\n type === 'function' ||\n type === 'string' ||\n bytesRegex.test(type) ||\n integerRegex.test(type));\n}\nconst protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;\nexport function isSolidityKeyword(name) {\n return (name === 'address' ||\n name === 'bool' ||\n name === 'function' ||\n name === 'string' ||\n name === 'tuple' ||\n bytesRegex.test(name) ||\n integerRegex.test(name) ||\n protectedKeywordsRegex.test(name));\n}\nexport function isValidDataLocation(type, isArray) {\n return isArray || type === 'bytes' || type === 'string' || type === 'tuple';\n}\n//# sourceMappingURL=utils.js.map","import { execTyped, isTupleRegex } from '../../regex.js';\nimport { UnknownTypeError } from '../errors/abiItem.js';\nimport { InvalidAbiTypeParameterError } from '../errors/abiParameter.js';\nimport { InvalidSignatureError, InvalidStructSignatureError, } from '../errors/signature.js';\nimport { CircularReferenceError } from '../errors/struct.js';\nimport { execStructSignature, isStructSignature } from './signatures.js';\nimport { isSolidityType, parseAbiParameter } from './utils.js';\nexport function parseStructs(signatures) {\n const shallowStructs = {};\n const signaturesLength = signatures.length;\n for (let i = 0; i < signaturesLength; i++) {\n const signature = signatures[i];\n if (!isStructSignature(signature))\n continue;\n const match = execStructSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'struct' });\n const properties = match.properties.split(';');\n const components = [];\n const propertiesLength = properties.length;\n for (let k = 0; k < propertiesLength; k++) {\n const property = properties[k];\n const trimmed = property.trim();\n if (!trimmed)\n continue;\n const abiParameter = parseAbiParameter(trimmed, {\n type: 'struct',\n });\n components.push(abiParameter);\n }\n if (!components.length)\n throw new InvalidStructSignatureError({ signature });\n shallowStructs[match.name] = components;\n }\n const resolvedStructs = {};\n const entries = Object.entries(shallowStructs);\n const entriesLength = entries.length;\n for (let i = 0; i < entriesLength; i++) {\n const [name, parameters] = entries[i];\n resolvedStructs[name] = resolveStructs(parameters, shallowStructs);\n }\n return resolvedStructs;\n}\nconst typeWithoutTupleRegex = /^(?[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\\[\\d*?\\])+?)?$/;\nfunction resolveStructs(abiParameters, structs, ancestors = new Set()) {\n const components = [];\n const length = abiParameters.length;\n for (let i = 0; i < length; i++) {\n const abiParameter = abiParameters[i];\n const isTuple = isTupleRegex.test(abiParameter.type);\n if (isTuple)\n components.push(abiParameter);\n else {\n const match = execTyped(typeWithoutTupleRegex, abiParameter.type);\n if (!match?.type)\n throw new InvalidAbiTypeParameterError({ abiParameter });\n const { array, type } = match;\n if (type in structs) {\n if (ancestors.has(type))\n throw new CircularReferenceError({ type });\n components.push({\n ...abiParameter,\n type: `tuple${array ?? ''}`,\n components: resolveStructs(structs[type] ?? [], structs, new Set([...ancestors, type])),\n });\n }\n else {\n if (isSolidityType(type))\n components.push(abiParameter);\n else\n throw new UnknownTypeError({ type });\n }\n }\n }\n return components;\n}\n//# sourceMappingURL=structs.js.map","import { isStructSignature } from './runtime/signatures.js';\nimport { parseStructs } from './runtime/structs.js';\nimport { parseSignature } from './runtime/utils.js';\nexport function parseAbi(signatures) {\n const structs = parseStructs(signatures);\n const abi = [];\n const length = signatures.length;\n for (let i = 0; i < length; i++) {\n const signature = signatures[i];\n if (isStructSignature(signature))\n continue;\n abi.push(parseSignature(signature, structs));\n }\n return abi;\n}\n//# sourceMappingURL=parseAbi.js.map","import { InvalidAbiParametersError } from '../index.js';\nimport { isStructSignature, modifiers } from './runtime/signatures.js';\nimport { parseStructs } from './runtime/structs.js';\nimport { splitParameters } from './runtime/utils.js';\nimport { parseAbiParameter as parseAbiParameter_ } from './runtime/utils.js';\nexport function parseAbiParameters(params) {\n const abiParameters = [];\n if (typeof params === 'string') {\n const parameters = splitParameters(params);\n const length = parameters.length;\n for (let i = 0; i < length; i++) {\n abiParameters.push(parseAbiParameter_(parameters[i], { modifiers }));\n }\n }\n else {\n const structs = parseStructs(params);\n const length = params.length;\n for (let i = 0; i < length; i++) {\n const signature = params[i];\n if (isStructSignature(signature))\n continue;\n const parameters = splitParameters(signature);\n const length = parameters.length;\n for (let k = 0; k < length; k++) {\n abiParameters.push(parseAbiParameter_(parameters[k], { modifiers, structs }));\n }\n }\n }\n if (abiParameters.length === 0)\n throw new InvalidAbiParametersError({ params });\n return abiParameters;\n}\n//# sourceMappingURL=parseAbiParameters.js.map","import { InvalidDefinitionTypeError } from '../../errors/abi.js';\nexport function formatAbiItem(abiItem, { includeName = false } = {}) {\n if (abiItem.type !== 'function' &&\n abiItem.type !== 'event' &&\n abiItem.type !== 'error')\n throw new InvalidDefinitionTypeError(abiItem.type);\n return `${abiItem.name}(${formatAbiParams(abiItem.inputs, { includeName })})`;\n}\nexport function formatAbiParams(params, { includeName = false } = {}) {\n if (!params)\n return '';\n return params\n .map((param) => formatAbiParam(param, { includeName }))\n .join(includeName ? ', ' : ',');\n}\nfunction formatAbiParam(param, { includeName }) {\n if (param.type.startsWith('tuple')) {\n return `(${formatAbiParams(param.components, { includeName })})${param.type.slice('tuple'.length)}`;\n }\n return param.type + (includeName && param.name ? ` ${param.name}` : '');\n}\n//# sourceMappingURL=formatAbiItem.js.map","export function isHex(value, { strict = true } = {}) {\n if (!value)\n return false;\n if (typeof value !== 'string')\n return false;\n return strict ? /^0x[0-9a-fA-F]*$/.test(value) : value.startsWith('0x');\n}\n//# sourceMappingURL=isHex.js.map","import { isHex } from './isHex.js';\n/**\n * @description Retrieves the size of the value (in bytes).\n *\n * @param value The value (hex or byte array) to retrieve the size of.\n * @returns The size of the value (in bytes).\n */\nexport function size(value) {\n if (isHex(value, { strict: false }))\n return Math.ceil((value.length - 2) / 2);\n return value.length;\n}\n//# sourceMappingURL=size.js.map","export const version = '1.5.4';\n//# sourceMappingURL=version.js.map","import { version } from './version.js';\nexport const getContractAddress = (address) => address;\nexport const getUrl = (url) => url;\nexport const getVersion = () => `viem@${version}`;\n//# sourceMappingURL=utils.js.map","import { getVersion } from './utils.js';\nexport class BaseError extends Error {\n constructor(shortMessage, args = {}) {\n super();\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ViemError'\n });\n Object.defineProperty(this, \"version\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: getVersion()\n });\n const details = args.cause instanceof BaseError\n ? args.cause.details\n : args.cause?.message\n ? args.cause.message\n : args.details;\n const docsPath = args.cause instanceof BaseError\n ? args.cause.docsPath || args.docsPath\n : args.docsPath;\n this.message = [\n shortMessage || 'An error occurred.',\n '',\n ...(args.metaMessages ? [...args.metaMessages, ''] : []),\n ...(docsPath\n ? [\n `Docs: https://viem.sh${docsPath}.html${args.docsSlug ? `#${args.docsSlug}` : ''}`,\n ]\n : []),\n ...(details ? [`Details: ${details}`] : []),\n `Version: ${this.version}`,\n ].join('\\n');\n if (args.cause)\n this.cause = args.cause;\n this.details = details;\n this.docsPath = docsPath;\n this.metaMessages = args.metaMessages;\n this.shortMessage = shortMessage;\n }\n walk(fn) {\n return walk(this, fn);\n }\n}\nfunction walk(err, fn) {\n if (fn?.(err))\n return err;\n if (err && typeof err === 'object' && 'cause' in err)\n return walk(err.cause, fn);\n return fn ? null : err;\n}\n//# sourceMappingURL=base.js.map","import { formatAbiItem, formatAbiParams } from '../utils/abi/formatAbiItem.js';\nimport { size } from '../utils/data/size.js';\nimport { BaseError } from './base.js';\nexport class AbiConstructorNotFoundError extends BaseError {\n constructor({ docsPath }) {\n super([\n 'A constructor was not found on the ABI.',\n 'Make sure you are using the correct ABI and that the constructor exists on it.',\n ].join('\\n'), {\n docsPath,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiConstructorNotFoundError'\n });\n }\n}\nexport class AbiConstructorParamsNotFoundError extends BaseError {\n constructor({ docsPath }) {\n super([\n 'Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.',\n 'Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.',\n ].join('\\n'), {\n docsPath,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiConstructorParamsNotFoundError'\n });\n }\n}\nexport class AbiDecodingDataSizeInvalidError extends BaseError {\n constructor({ data, size }) {\n super([\n `Data size of ${size} bytes is invalid.`,\n 'Size must be in increments of 32 bytes (size % 32 === 0).',\n ].join('\\n'), { metaMessages: [`Data: ${data} (${size} bytes)`] });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiDecodingDataSizeInvalidError'\n });\n }\n}\nexport class AbiDecodingDataSizeTooSmallError extends BaseError {\n constructor({ data, params, size, }) {\n super([`Data size of ${size} bytes is too small for given parameters.`].join('\\n'), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size} bytes)`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiDecodingDataSizeTooSmallError'\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n this.params = params;\n this.size = size;\n }\n}\nexport class AbiDecodingZeroDataError extends BaseError {\n constructor() {\n super('Cannot decode zero data (\"0x\") with ABI parameters.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiDecodingZeroDataError'\n });\n }\n}\nexport class AbiEncodingArrayLengthMismatchError extends BaseError {\n constructor({ expectedLength, givenLength, type, }) {\n super([\n `ABI encoding array length mismatch for type ${type}.`,\n `Expected length: ${expectedLength}`,\n `Given length: ${givenLength}`,\n ].join('\\n'));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiEncodingArrayLengthMismatchError'\n });\n }\n}\nexport class AbiEncodingBytesSizeMismatchError extends BaseError {\n constructor({ expectedSize, value }) {\n super(`Size of bytes \"${value}\" (bytes${size(value)}) does not match expected size (bytes${expectedSize}).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiEncodingBytesSizeMismatchError'\n });\n }\n}\nexport class AbiEncodingLengthMismatchError extends BaseError {\n constructor({ expectedLength, givenLength, }) {\n super([\n 'ABI encoding params/values length mismatch.',\n `Expected length (params): ${expectedLength}`,\n `Given length (values): ${givenLength}`,\n ].join('\\n'));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiEncodingLengthMismatchError'\n });\n }\n}\nexport class AbiErrorInputsNotFoundError extends BaseError {\n constructor(errorName, { docsPath }) {\n super([\n `Arguments (\\`args\\`) were provided to \"${errorName}\", but \"${errorName}\" on the ABI does not contain any parameters (\\`inputs\\`).`,\n 'Cannot encode error result without knowing what the parameter types are.',\n 'Make sure you are using the correct ABI and that the inputs exist on it.',\n ].join('\\n'), {\n docsPath,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiErrorInputsNotFoundError'\n });\n }\n}\nexport class AbiErrorNotFoundError extends BaseError {\n constructor(errorName, { docsPath } = {}) {\n super([\n `Error ${errorName ? `\"${errorName}\" ` : ''}not found on ABI.`,\n 'Make sure you are using the correct ABI and that the error exists on it.',\n ].join('\\n'), {\n docsPath,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiErrorNotFoundError'\n });\n }\n}\nexport class AbiErrorSignatureNotFoundError extends BaseError {\n constructor(signature, { docsPath }) {\n super([\n `Encoded error signature \"${signature}\" not found on ABI.`,\n 'Make sure you are using the correct ABI and that the error exists on it.',\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`,\n ].join('\\n'), {\n docsPath,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiErrorSignatureNotFoundError'\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.signature = signature;\n }\n}\nexport class AbiEventSignatureEmptyTopicsError extends BaseError {\n constructor({ docsPath }) {\n super('Cannot extract event signature from empty topics.', {\n docsPath,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiEventSignatureEmptyTopicsError'\n });\n }\n}\nexport class AbiEventSignatureNotFoundError extends BaseError {\n constructor(signature, { docsPath }) {\n super([\n `Encoded event signature \"${signature}\" not found on ABI.`,\n 'Make sure you are using the correct ABI and that the event exists on it.',\n `You can look up the signature here: https://openchain.xyz/signatures?query=${signature}.`,\n ].join('\\n'), {\n docsPath,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiEventSignatureNotFoundError'\n });\n }\n}\nexport class AbiEventNotFoundError extends BaseError {\n constructor(eventName, { docsPath } = {}) {\n super([\n `Event ${eventName ? `\"${eventName}\" ` : ''}not found on ABI.`,\n 'Make sure you are using the correct ABI and that the event exists on it.',\n ].join('\\n'), {\n docsPath,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiEventNotFoundError'\n });\n }\n}\nexport class AbiFunctionNotFoundError extends BaseError {\n constructor(functionName, { docsPath } = {}) {\n super([\n `Function ${functionName ? `\"${functionName}\" ` : ''}not found on ABI.`,\n 'Make sure you are using the correct ABI and that the function exists on it.',\n ].join('\\n'), {\n docsPath,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiFunctionNotFoundError'\n });\n }\n}\nexport class AbiFunctionOutputsNotFoundError extends BaseError {\n constructor(functionName, { docsPath }) {\n super([\n `Function \"${functionName}\" does not contain any \\`outputs\\` on ABI.`,\n 'Cannot decode function result without knowing what the parameter types are.',\n 'Make sure you are using the correct ABI and that the function exists on it.',\n ].join('\\n'), {\n docsPath,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiFunctionOutputsNotFoundError'\n });\n }\n}\nexport class AbiFunctionSignatureNotFoundError extends BaseError {\n constructor(signature, { docsPath }) {\n super([\n `Encoded function signature \"${signature}\" not found on ABI.`,\n 'Make sure you are using the correct ABI and that the function exists on it.',\n `You can look up the signature here: https://openchain.xyz/signatures?query=${signature}.`,\n ].join('\\n'), {\n docsPath,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiFunctionSignatureNotFoundError'\n });\n }\n}\nexport class BytesSizeMismatchError extends BaseError {\n constructor({ expectedSize, givenSize, }) {\n super(`Expected bytes${expectedSize}, got bytes${givenSize}.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'BytesSizeMismatchError'\n });\n }\n}\nexport class DecodeLogDataMismatch extends BaseError {\n constructor({ abiItem, data, params, size, }) {\n super([\n `Data size of ${size} bytes is too small for non-indexed event parameters.`,\n ].join('\\n'), {\n metaMessages: [\n `Params: (${formatAbiParams(params, { includeName: true })})`,\n `Data: ${data} (${size} bytes)`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'DecodeLogDataMismatch'\n });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"params\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"size\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n this.data = data;\n this.params = params;\n this.size = size;\n }\n}\nexport class DecodeLogTopicsMismatch extends BaseError {\n constructor({ abiItem, param, }) {\n super([\n `Expected a topic for indexed event parameter${param.name ? ` \"${param.name}\"` : ''} on event \"${formatAbiItem(abiItem, { includeName: true })}\".`,\n ].join('\\n'));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'DecodeLogTopicsMismatch'\n });\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = abiItem;\n }\n}\nexport class InvalidAbiEncodingTypeError extends BaseError {\n constructor(type, { docsPath }) {\n super([\n `Type \"${type}\" is not a valid encoding type.`,\n 'Please provide a valid ABI type.',\n ].join('\\n'), { docsPath });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiEncodingType'\n });\n }\n}\nexport class InvalidAbiDecodingTypeError extends BaseError {\n constructor(type, { docsPath }) {\n super([\n `Type \"${type}\" is not a valid decoding type.`,\n 'Please provide a valid ABI type.',\n ].join('\\n'), { docsPath });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiDecodingType'\n });\n }\n}\nexport class InvalidArrayError extends BaseError {\n constructor(value) {\n super([`Value \"${value}\" is not a valid array.`].join('\\n'));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidArrayError'\n });\n }\n}\nexport class InvalidDefinitionTypeError extends BaseError {\n constructor(type) {\n super([\n `\"${type}\" is not a valid definition type.`,\n 'Valid types: \"function\", \"event\", \"error\"',\n ].join('\\n'));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidDefinitionTypeError'\n });\n }\n}\nexport class UnsupportedPackedAbiType extends BaseError {\n constructor(type) {\n super(`Type \"${type}\" is not supported for packed encoding.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnsupportedPackedAbiType'\n });\n }\n}\n//# sourceMappingURL=abi.js.map","import { BaseError } from './base.js';\nexport class FilterTypeNotSupportedError extends BaseError {\n constructor(type) {\n super(`Filter type \"${type}\" is not supported.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'FilterTypeNotSupportedError'\n });\n }\n}\n//# sourceMappingURL=log.js.map","import { BaseError } from './base.js';\nexport class SliceOffsetOutOfBoundsError extends BaseError {\n constructor({ offset, position, size, }) {\n super(`Slice ${position === 'start' ? 'starting' : 'ending'} at offset \"${offset}\" is out-of-bounds (size: ${size}).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SliceOffsetOutOfBoundsError'\n });\n }\n}\nexport class SizeExceedsPaddingSizeError extends BaseError {\n constructor({ size, targetSize, type, }) {\n super(`${type.charAt(0).toUpperCase()}${type\n .slice(1)\n .toLowerCase()} size (${size}) exceeds padding size (${targetSize}).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SizeExceedsPaddingSizeError'\n });\n }\n}\n//# sourceMappingURL=data.js.map","import { SizeExceedsPaddingSizeError } from '../../errors/data.js';\nexport function pad(hexOrBytes, { dir, size = 32 } = {}) {\n if (typeof hexOrBytes === 'string')\n return padHex(hexOrBytes, { dir, size });\n return padBytes(hexOrBytes, { dir, size });\n}\nexport function padHex(hex_, { dir, size = 32 } = {}) {\n if (size === null)\n return hex_;\n const hex = hex_.replace('0x', '');\n if (hex.length > size * 2)\n throw new SizeExceedsPaddingSizeError({\n size: Math.ceil(hex.length / 2),\n targetSize: size,\n type: 'hex',\n });\n return `0x${hex[dir === 'right' ? 'padEnd' : 'padStart'](size * 2, '0')}`;\n}\nexport function padBytes(bytes, { dir, size = 32 } = {}) {\n if (size === null)\n return bytes;\n if (bytes.length > size)\n throw new SizeExceedsPaddingSizeError({\n size: bytes.length,\n targetSize: size,\n type: 'bytes',\n });\n const paddedBytes = new Uint8Array(size);\n for (let i = 0; i < size; i++) {\n const padEnd = dir === 'right';\n paddedBytes[padEnd ? i : size - i - 1] =\n bytes[padEnd ? i : bytes.length - i - 1];\n }\n return paddedBytes;\n}\n//# sourceMappingURL=pad.js.map","import { BaseError } from './base.js';\nexport class DataLengthTooLongError extends BaseError {\n constructor({ consumed, length }) {\n super(`Consumed bytes (${consumed}) is shorter than data length (${length - 1}).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'DataLengthTooLongError'\n });\n }\n}\nexport class DataLengthTooShortError extends BaseError {\n constructor({ length, dataLength }) {\n super(`Data length (${dataLength - 1}) is shorter than prefix length (${length - 1}).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'DataLengthTooShortError'\n });\n }\n}\nexport class IntegerOutOfRangeError extends BaseError {\n constructor({ max, min, signed, size, value, }) {\n super(`Number \"${value}\" is not in safe ${size ? `${size * 8}-bit ${signed ? 'signed' : 'unsigned'} ` : ''}integer range ${max ? `(${min} to ${max})` : `(above ${min})`}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'IntegerOutOfRangeError'\n });\n }\n}\nexport class InvalidBytesBooleanError extends BaseError {\n constructor(bytes) {\n super(`Bytes value \"${bytes}\" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidBytesBooleanError'\n });\n }\n}\nexport class InvalidHexBooleanError extends BaseError {\n constructor(hex) {\n super(`Hex value \"${hex}\" is not a valid boolean. The hex value must be \"0x0\" (false) or \"0x1\" (true).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidHexBooleanError'\n });\n }\n}\nexport class InvalidHexValueError extends BaseError {\n constructor(value) {\n super(`Hex value \"${value}\" is an odd length (${value.length}). It must be an even length.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidHexValueError'\n });\n }\n}\nexport class OffsetOutOfBoundsError extends BaseError {\n constructor({ nextOffset, offset }) {\n super(`Next offset (${nextOffset}) is greater than previous offset + consumed bytes (${offset})`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'OffsetOutOfBoundsError'\n });\n }\n}\nexport class SizeOverflowError extends BaseError {\n constructor({ givenSize, maxSize }) {\n super(`Size cannot exceed ${maxSize} bytes. Given size: ${givenSize} bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SizeOverflowError'\n });\n }\n}\n//# sourceMappingURL=encoding.js.map","export function trim(hexOrBytes, { dir = 'left' } = {}) {\n let data = typeof hexOrBytes === 'string' ? hexOrBytes.replace('0x', '') : hexOrBytes;\n let sliceLength = 0;\n for (let i = 0; i < data.length - 1; i++) {\n if (data[dir === 'left' ? i : data.length - i - 1].toString() === '0')\n sliceLength++;\n else\n break;\n }\n data =\n dir === 'left'\n ? data.slice(sliceLength)\n : data.slice(0, data.length - sliceLength);\n if (typeof hexOrBytes === 'string') {\n if (data.length === 1 && dir === 'right')\n data = `${data}0`;\n return `0x${data.length % 2 === 1 ? `0${data}` : data}`;\n }\n return data;\n}\n//# sourceMappingURL=trim.js.map","import { InvalidHexBooleanError, SizeOverflowError, } from '../../errors/encoding.js';\nimport { size as size_ } from '../data/size.js';\nimport { trim } from '../data/trim.js';\nimport { hexToBytes } from './toBytes.js';\nexport function assertSize(hexOrBytes, { size }) {\n if (size_(hexOrBytes) > size)\n throw new SizeOverflowError({\n givenSize: size_(hexOrBytes),\n maxSize: size,\n });\n}\n/**\n * Decodes a hex string into a string, number, bigint, boolean, or byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex.html\n * - Example: https://viem.sh/docs/utilities/fromHex.html#usage\n *\n * @param hex Hex string to decode.\n * @param toOrOpts Type to convert to or options.\n * @returns Decoded value.\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x1a4', 'number')\n * // 420\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x48656c6c6f20576f726c6421', 'string')\n * // 'Hello world'\n *\n * @example\n * import { fromHex } from 'viem'\n * const data = fromHex('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {\n * size: 32,\n * to: 'string'\n * })\n * // 'Hello world'\n */\nexport function fromHex(hex, toOrOpts) {\n const opts = typeof toOrOpts === 'string' ? { to: toOrOpts } : toOrOpts;\n const to = opts.to;\n if (to === 'number')\n return hexToNumber(hex, opts);\n if (to === 'bigint')\n return hexToBigInt(hex, opts);\n if (to === 'string')\n return hexToString(hex, opts);\n if (to === 'boolean')\n return hexToBool(hex, opts);\n return hexToBytes(hex, opts);\n}\n/**\n * Decodes a hex value into a bigint.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex.html#hextobigint\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns BigInt value.\n *\n * @example\n * import { hexToBigInt } from 'viem'\n * const data = hexToBigInt('0x1a4', { signed: true })\n * // 420n\n *\n * @example\n * import { hexToBigInt } from 'viem'\n * const data = hexToBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // 420n\n */\nexport function hexToBigInt(hex, opts = {}) {\n const { signed } = opts;\n if (opts.size)\n assertSize(hex, { size: opts.size });\n const value = BigInt(hex);\n if (!signed)\n return value;\n const size = (hex.length - 2) / 2;\n const max = (1n << (BigInt(size) * 8n - 1n)) - 1n;\n if (value <= max)\n return value;\n return value - BigInt(`0x${'f'.padStart(size * 2, 'f')}`) - 1n;\n}\n/**\n * Decodes a hex value into a boolean.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex.html#hextobool\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns Boolean value.\n *\n * @example\n * import { hexToBool } from 'viem'\n * const data = hexToBool('0x01')\n * // true\n *\n * @example\n * import { hexToBool } from 'viem'\n * const data = hexToBool('0x0000000000000000000000000000000000000000000000000000000000000001', { size: 32 })\n * // true\n */\nexport function hexToBool(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = trim(hex);\n }\n if (trim(hex) === '0x00')\n return false;\n if (trim(hex) === '0x01')\n return true;\n throw new InvalidHexBooleanError(hex);\n}\n/**\n * Decodes a hex string into a number.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex.html#hextonumber\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns Number value.\n *\n * @example\n * import { hexToNumber } from 'viem'\n * const data = hexToNumber('0x1a4')\n * // 420\n *\n * @example\n * import { hexToNumber } from 'viem'\n * const data = hexToBigInt('0x00000000000000000000000000000000000000000000000000000000000001a4', { size: 32 })\n * // 420\n */\nexport function hexToNumber(hex, opts = {}) {\n return Number(hexToBigInt(hex, opts));\n}\n/**\n * Decodes a hex value into a UTF-8 string.\n *\n * - Docs: https://viem.sh/docs/utilities/fromHex.html#hextostring\n *\n * @param hex Hex value to decode.\n * @param opts Options.\n * @returns String value.\n *\n * @example\n * import { hexToString } from 'viem'\n * const data = hexToString('0x48656c6c6f20576f726c6421')\n * // 'Hello world!'\n *\n * @example\n * import { hexToString } from 'viem'\n * const data = hexToString('0x48656c6c6f20576f726c64210000000000000000000000000000000000000000', {\n * size: 32,\n * })\n * // 'Hello world'\n */\nexport function hexToString(hex, opts = {}) {\n let bytes = hexToBytes(hex);\n if (opts.size) {\n assertSize(bytes, { size: opts.size });\n bytes = trim(bytes, { dir: 'right' });\n }\n return new TextDecoder().decode(bytes);\n}\n//# sourceMappingURL=fromHex.js.map","import { IntegerOutOfRangeError } from '../../errors/encoding.js';\nimport { pad } from '../data/pad.js';\nimport { assertSize } from './fromHex.js';\nconst hexes = /*#__PURE__*/ Array.from({ length: 256 }, (_v, i) => i.toString(16).padStart(2, '0'));\n/**\n * Encodes a string, number, bigint, or ByteArray into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex.html\n * - Example: https://viem.sh/docs/utilities/toHex.html#usage\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex('Hello world')\n * // '0x48656c6c6f20776f726c6421'\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex(420)\n * // '0x1a4'\n *\n * @example\n * import { toHex } from 'viem'\n * const data = toHex('Hello world', { size: 32 })\n * // '0x48656c6c6f20776f726c64210000000000000000000000000000000000000000'\n */\nexport function toHex(value, opts = {}) {\n if (typeof value === 'number' || typeof value === 'bigint')\n return numberToHex(value, opts);\n if (typeof value === 'string') {\n return stringToHex(value, opts);\n }\n if (typeof value === 'boolean')\n return boolToHex(value, opts);\n return bytesToHex(value, opts);\n}\n/**\n * Encodes a boolean into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex.html#booltohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(true)\n * // '0x1'\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(false)\n * // '0x0'\n *\n * @example\n * import { boolToHex } from 'viem'\n * const data = boolToHex(true, { size: 32 })\n * // '0x0000000000000000000000000000000000000000000000000000000000000001'\n */\nexport function boolToHex(value, opts = {}) {\n const hex = `0x${Number(value)}`;\n if (typeof opts.size === 'number') {\n assertSize(hex, { size: opts.size });\n return pad(hex, { size: opts.size });\n }\n return hex;\n}\n/**\n * Encodes a bytes array into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex.html#bytestohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { bytesToHex } from 'viem'\n * const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n * // '0x48656c6c6f20576f726c6421'\n *\n * @example\n * import { bytesToHex } from 'viem'\n * const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]), { size: 32 })\n * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'\n */\nexport function bytesToHex(value, opts = {}) {\n let hexString = '';\n for (let i = 0; i < value.length; i++) {\n hexString += hexes[value[i]];\n }\n const hex = `0x${hexString}`;\n if (typeof opts.size === 'number') {\n assertSize(hex, { size: opts.size });\n return pad(hex, { dir: 'right', size: opts.size });\n }\n return hex;\n}\n/**\n * Encodes a number or bigint into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex.html#numbertohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { numberToHex } from 'viem'\n * const data = numberToHex(420)\n * // '0x1a4'\n *\n * @example\n * import { numberToHex } from 'viem'\n * const data = numberToHex(420, { size: 32 })\n * // '0x00000000000000000000000000000000000000000000000000000000000001a4'\n */\nexport function numberToHex(value_, opts = {}) {\n const { signed, size } = opts;\n const value = BigInt(value_);\n let maxValue;\n if (size) {\n if (signed)\n maxValue = (1n << (BigInt(size) * 8n - 1n)) - 1n;\n else\n maxValue = 2n ** (BigInt(size) * 8n) - 1n;\n }\n else if (typeof value_ === 'number') {\n maxValue = BigInt(Number.MAX_SAFE_INTEGER);\n }\n const minValue = typeof maxValue === 'bigint' && signed ? -maxValue - 1n : 0;\n if ((maxValue && value > maxValue) || value < minValue) {\n const suffix = typeof value_ === 'bigint' ? 'n' : '';\n throw new IntegerOutOfRangeError({\n max: maxValue ? `${maxValue}${suffix}` : undefined,\n min: `${minValue}${suffix}`,\n signed,\n size,\n value: `${value_}${suffix}`,\n });\n }\n const hex = `0x${(signed && value < 0\n ? (1n << BigInt(size * 8)) + BigInt(value)\n : value).toString(16)}`;\n if (size)\n return pad(hex, { size });\n return hex;\n}\nconst encoder = /*#__PURE__*/ new TextEncoder();\n/**\n * Encodes a UTF-8 string into a hex string\n *\n * - Docs: https://viem.sh/docs/utilities/toHex.html#stringtohex\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Hex value.\n *\n * @example\n * import { stringToHex } from 'viem'\n * const data = stringToHex('Hello World!')\n * // '0x48656c6c6f20576f726c6421'\n *\n * @example\n * import { stringToHex } from 'viem'\n * const data = stringToHex('Hello World!', { size: 32 })\n * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'\n */\nexport function stringToHex(value_, opts = {}) {\n const value = encoder.encode(value_);\n return bytesToHex(value, opts);\n}\n//# sourceMappingURL=toHex.js.map","import { BaseError } from '../../errors/base.js';\nimport { isHex } from '../data/isHex.js';\nimport { pad } from '../data/pad.js';\nimport { assertSize } from './fromHex.js';\nimport { numberToHex } from './toHex.js';\nconst encoder = /*#__PURE__*/ new TextEncoder();\n/**\n * Encodes a UTF-8 string, hex value, bigint, number or boolean to a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes.html\n * - Example: https://viem.sh/docs/utilities/toBytes.html#usage\n *\n * @param value Value to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes('Hello world')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes(420)\n * // Uint8Array([1, 164])\n *\n * @example\n * import { toBytes } from 'viem'\n * const data = toBytes(420, { size: 4 })\n * // Uint8Array([0, 0, 1, 164])\n */\nexport function toBytes(value, opts = {}) {\n if (typeof value === 'number' || typeof value === 'bigint')\n return numberToBytes(value, opts);\n if (typeof value === 'boolean')\n return boolToBytes(value, opts);\n if (isHex(value))\n return hexToBytes(value, opts);\n return stringToBytes(value, opts);\n}\n/**\n * Encodes a boolean into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes.html#booltobytes\n *\n * @param value Boolean value to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { boolToBytes } from 'viem'\n * const data = boolToBytes(true)\n * // Uint8Array([1])\n *\n * @example\n * import { boolToBytes } from 'viem'\n * const data = boolToBytes(true, { size: 32 })\n * // Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])\n */\nexport function boolToBytes(value, opts = {}) {\n const bytes = new Uint8Array(1);\n bytes[0] = Number(value);\n if (typeof opts.size === 'number') {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { size: opts.size });\n }\n return bytes;\n}\n/**\n * Encodes a hex string into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes.html#hextobytes\n *\n * @param hex Hex string to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { hexToBytes } from 'viem'\n * const data = hexToBytes('0x48656c6c6f20776f726c6421')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33])\n *\n * @example\n * import { hexToBytes } from 'viem'\n * const data = hexToBytes('0x48656c6c6f20776f726c6421', { size: 32 })\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n */\nexport function hexToBytes(hex_, opts = {}) {\n let hex = hex_;\n if (opts.size) {\n assertSize(hex, { size: opts.size });\n hex = pad(hex, { dir: 'right', size: opts.size });\n }\n let hexString = hex.slice(2);\n if (hexString.length % 2)\n hexString = `0${hexString}`;\n const bytes = new Uint8Array(hexString.length / 2);\n for (let index = 0; index < bytes.length; index++) {\n const start = index * 2;\n const hexByte = hexString.slice(start, start + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new BaseError(`Invalid byte sequence (\"${hexByte}\" in \"${hexString}\").`);\n bytes[index] = byte;\n }\n return bytes;\n}\n/**\n * Encodes a number into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes.html#numbertobytes\n *\n * @param value Number to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { numberToBytes } from 'viem'\n * const data = numberToBytes(420)\n * // Uint8Array([1, 164])\n *\n * @example\n * import { numberToBytes } from 'viem'\n * const data = numberToBytes(420, { size: 4 })\n * // Uint8Array([0, 0, 1, 164])\n */\nexport function numberToBytes(value, opts) {\n const hex = numberToHex(value, opts);\n return hexToBytes(hex);\n}\n/**\n * Encodes a UTF-8 string into a byte array.\n *\n * - Docs: https://viem.sh/docs/utilities/toBytes.html#stringtobytes\n *\n * @param value String to encode.\n * @param opts Options.\n * @returns Byte array value.\n *\n * @example\n * import { stringToBytes } from 'viem'\n * const data = stringToBytes('Hello world!')\n * // Uint8Array([72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33])\n *\n * @example\n * import { stringToBytes } from 'viem'\n * const data = stringToBytes('Hello world!', { size: 32 })\n * // Uint8Array([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n */\nexport function stringToBytes(value, opts = {}) {\n const bytes = encoder.encode(value);\n if (typeof opts.size === 'number') {\n assertSize(bytes, { size: opts.size });\n return pad(bytes, { dir: 'right', size: opts.size });\n }\n return bytes;\n}\n//# sourceMappingURL=toBytes.js.map","const paramsRegex = /((function|event)\\s)?(.*)(\\((.*)\\))/;\nexport function extractFunctionParts(def) {\n const parts = def.match(paramsRegex);\n const type = parts?.[2] || undefined;\n const name = parts?.[3];\n const params = parts?.[5] || undefined;\n return { type, name, params };\n}\nexport function extractFunctionName(def) {\n return extractFunctionParts(def).name;\n}\nexport function extractFunctionParams(def) {\n const params = extractFunctionParts(def).params;\n const splitParams = params?.split(',').map((x) => x.trim().split(' '));\n return splitParams?.map((param) => ({\n type: param[0],\n name: param[1] === 'indexed' ? param[2] : param[1],\n ...(param[1] === 'indexed' ? { indexed: true } : {}),\n }));\n}\nexport function extractFunctionType(def) {\n return extractFunctionParts(def).type;\n}\n//# sourceMappingURL=extractFunctionParts.js.map","export function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nexport function bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nexport function bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new TypeError('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new TypeError(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nexport function hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nexport function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nexport function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\nexport default assert;\n//# sourceMappingURL=_assert.js.map","const U32_MASK64 = BigInt(2 ** 32 - 1);\nconst _32n = BigInt(32);\n// We are not using BigUint64Array, because they are extremely slow as per 2022\nexport function fromBig(n, le = false) {\n if (le)\n return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\nexport function split(lst, le = false) {\n let Ah = new Uint32Array(lst.length);\n let Al = new Uint32Array(lst.length);\n for (let i = 0; i < lst.length; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\nexport const toBig = (h, l) => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h, l, s) => h >>> s;\nconst shrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h, l, s) => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h, l, s) => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h, l, s) => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h, l, s) => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (h, l) => l;\nconst rotr32L = (h, l) => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h, l, s) => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h, l, s) => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h, l, s) => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h, l, s) => (h << (s - 32)) | (l >>> (64 - s));\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\n// Removing \"export\" has 5% perf penalty -_-\nexport function add(Ah, Al, Bh, Bl) {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low, Ah, Bh, Ch) => (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low, Ah, Bh, Ch, Dh) => (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low, Ah, Bh, Ch, Dh, Eh) => (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n// prettier-ignore\nconst u64 = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n//# sourceMappingURL=_u64.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use `globalThis.crypto`, but node.js versions earlier than v19 don't\n// declare it in global scope. For node.js, package.json#exports field mapping\n// rewrites import from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xde, 0xad, 0xbe, 0xef])) // 'deadbeef'\n */\nexport function bytesToHex(uint8a) {\n // pre-caching improves the speed 6x\n if (!(uint8a instanceof Uint8Array))\n throw new Error('Uint8Array expected');\n let hex = '';\n for (let i = 0; i < uint8a.length; i++) {\n hex += hexes[uint8a[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('deadbeef') // Uint8Array.from([0xde, 0xad, 0xbe, 0xef])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string') {\n throw new TypeError('hexToBytes: expected string, got ' + typeof hex);\n }\n if (hex.length % 2)\n throw new Error('hexToBytes: received invalid unpadded hex');\n const array = new Uint8Array(hex.length / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string') {\n throw new TypeError(`utf8ToBytes expected string, got ${typeof str}`);\n }\n return new TextEncoder().encode(str);\n}\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!(data instanceof Uint8Array))\n throw new TypeError(`Expected input type is Uint8Array (got ${typeof data})`);\n return data;\n}\n/**\n * Concats Uint8Array-s into one; like `Buffer.concat([buf1, buf2])`\n * @example concatBytes(buf1, buf2)\n */\nexport function concatBytes(...arrays) {\n if (!arrays.every((a) => a instanceof Uint8Array))\n throw new Error('Uint8Array list expected');\n if (arrays.length === 1)\n return arrays[0];\n const length = arrays.reduce((a, arr) => a + arr.length, 0);\n const result = new Uint8Array(length);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const arr = arrays[i];\n result.set(arr, pad);\n pad += arr.length;\n }\n return result;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\n// Check if object doens't have custom constructor (like Uint8Array/Array)\nconst isPlainObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && (typeof opts !== 'object' || !isPlainObject(opts)))\n throw new TypeError('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashConstructor) {\n const hashC = (message) => hashConstructor().update(toBytes(message)).digest();\n const tmp = hashConstructor();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashConstructor();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `globalThis.crypto` or node.js crypto module.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import assert from './_assert.js';\nimport u64 from './_u64.js';\nimport { Hash, u32, toBytes, wrapConstructor, wrapConstructorWithOpts, } from './utils.js';\n// Various per round constants calculations\nconst [SHA3_PI, SHA3_ROTL, _SHA3_IOTA] = [[], [], []];\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst _7n = BigInt(7);\nconst _256n = BigInt(256);\nconst _0x71n = BigInt(0x71);\nfor (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {\n // Pi\n [x, y] = [y, (2 * x + 3 * y) % 5];\n SHA3_PI.push(2 * (5 * y + x));\n // Rotational\n SHA3_ROTL.push((((round + 1) * (round + 2)) / 2) % 64);\n // Iota\n let t = _0n;\n for (let j = 0; j < 7; j++) {\n R = ((R << _1n) ^ ((R >> _7n) * _0x71n)) % _256n;\n if (R & _2n)\n t ^= _1n << ((_1n << BigInt(j)) - _1n);\n }\n _SHA3_IOTA.push(t);\n}\nconst [SHA3_IOTA_H, SHA3_IOTA_L] = u64.split(_SHA3_IOTA, true);\n// Left rotation (without 0, 32, 64)\nconst rotlH = (h, l, s) => s > 32 ? u64.rotlBH(h, l, s) : u64.rotlSH(h, l, s);\nconst rotlL = (h, l, s) => s > 32 ? u64.rotlBL(h, l, s) : u64.rotlSL(h, l, s);\n// Same as keccakf1600, but allows to skip some rounds\nexport function keccakP(s, rounds = 24) {\n const B = new Uint32Array(5 * 2);\n // NOTE: all indices are x2 since we store state as u32 instead of u64 (bigints to slow in js)\n for (let round = 24 - rounds; round < 24; round++) {\n // Theta θ\n for (let x = 0; x < 10; x++)\n B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];\n for (let x = 0; x < 10; x += 2) {\n const idx1 = (x + 8) % 10;\n const idx0 = (x + 2) % 10;\n const B0 = B[idx0];\n const B1 = B[idx0 + 1];\n const Th = rotlH(B0, B1, 1) ^ B[idx1];\n const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];\n for (let y = 0; y < 50; y += 10) {\n s[x + y] ^= Th;\n s[x + y + 1] ^= Tl;\n }\n }\n // Rho (ρ) and Pi (π)\n let curH = s[2];\n let curL = s[3];\n for (let t = 0; t < 24; t++) {\n const shift = SHA3_ROTL[t];\n const Th = rotlH(curH, curL, shift);\n const Tl = rotlL(curH, curL, shift);\n const PI = SHA3_PI[t];\n curH = s[PI];\n curL = s[PI + 1];\n s[PI] = Th;\n s[PI + 1] = Tl;\n }\n // Chi (χ)\n for (let y = 0; y < 50; y += 10) {\n for (let x = 0; x < 10; x++)\n B[x] = s[y + x];\n for (let x = 0; x < 10; x++)\n s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];\n }\n // Iota (ι)\n s[0] ^= SHA3_IOTA_H[round];\n s[1] ^= SHA3_IOTA_L[round];\n }\n B.fill(0);\n}\nexport class Keccak extends Hash {\n // NOTE: we accept arguments in bytes instead of bits here.\n constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {\n super();\n this.blockLen = blockLen;\n this.suffix = suffix;\n this.outputLen = outputLen;\n this.enableXOF = enableXOF;\n this.rounds = rounds;\n this.pos = 0;\n this.posOut = 0;\n this.finished = false;\n this.destroyed = false;\n // Can be passed from user as dkLen\n assert.number(outputLen);\n // 1600 = 5x5 matrix of 64bit. 1600 bits === 200 bytes\n if (0 >= this.blockLen || this.blockLen >= 200)\n throw new Error('Sha3 supports only keccak-f1600 function');\n this.state = new Uint8Array(200);\n this.state32 = u32(this.state);\n }\n keccak() {\n keccakP(this.state32, this.rounds);\n this.posOut = 0;\n this.pos = 0;\n }\n update(data) {\n assert.exists(this);\n const { blockLen, state } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n for (let i = 0; i < take; i++)\n state[this.pos++] ^= data[pos++];\n if (this.pos === blockLen)\n this.keccak();\n }\n return this;\n }\n finish() {\n if (this.finished)\n return;\n this.finished = true;\n const { state, suffix, pos, blockLen } = this;\n // Do the padding\n state[pos] ^= suffix;\n if ((suffix & 0x80) !== 0 && pos === blockLen - 1)\n this.keccak();\n state[blockLen - 1] ^= 0x80;\n this.keccak();\n }\n writeInto(out) {\n assert.exists(this, false);\n assert.bytes(out);\n this.finish();\n const bufferOut = this.state;\n const { blockLen } = this;\n for (let pos = 0, len = out.length; pos < len;) {\n if (this.posOut >= blockLen)\n this.keccak();\n const take = Math.min(blockLen - this.posOut, len - pos);\n out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);\n this.posOut += take;\n pos += take;\n }\n return out;\n }\n xofInto(out) {\n // Sha3/Keccak usage with XOF is probably mistake, only SHAKE instances can do XOF\n if (!this.enableXOF)\n throw new Error('XOF is not possible for this instance');\n return this.writeInto(out);\n }\n xof(bytes) {\n assert.number(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n assert.output(out, this);\n if (this.finished)\n throw new Error('digest() was already called');\n this.writeInto(out);\n this.destroy();\n return out;\n }\n digest() {\n return this.digestInto(new Uint8Array(this.outputLen));\n }\n destroy() {\n this.destroyed = true;\n this.state.fill(0);\n }\n _cloneInto(to) {\n const { blockLen, suffix, outputLen, rounds, enableXOF } = this;\n to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));\n to.state32.set(this.state32);\n to.pos = this.pos;\n to.posOut = this.posOut;\n to.finished = this.finished;\n to.rounds = rounds;\n // Suffix can change in cSHAKE\n to.suffix = suffix;\n to.outputLen = outputLen;\n to.enableXOF = enableXOF;\n to.destroyed = this.destroyed;\n return to;\n }\n}\nconst gen = (suffix, blockLen, outputLen) => wrapConstructor(() => new Keccak(blockLen, suffix, outputLen));\nexport const sha3_224 = gen(0x06, 144, 224 / 8);\n/**\n * SHA3-256 hash function\n * @param message - that would be hashed\n */\nexport const sha3_256 = gen(0x06, 136, 256 / 8);\nexport const sha3_384 = gen(0x06, 104, 384 / 8);\nexport const sha3_512 = gen(0x06, 72, 512 / 8);\nexport const keccak_224 = gen(0x01, 144, 224 / 8);\n/**\n * keccak-256 hash function. Different from SHA3-256.\n * @param message - that would be hashed\n */\nexport const keccak_256 = gen(0x01, 136, 256 / 8);\nexport const keccak_384 = gen(0x01, 104, 384 / 8);\nexport const keccak_512 = gen(0x01, 72, 512 / 8);\nconst genShake = (suffix, blockLen, outputLen) => wrapConstructorWithOpts((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === undefined ? outputLen : opts.dkLen, true));\nexport const shake128 = genShake(0x1f, 168, 128 / 8);\nexport const shake256 = genShake(0x1f, 136, 256 / 8);\n//# sourceMappingURL=sha3.js.map","import { keccak_256 } from '@noble/hashes/sha3';\nimport { isHex } from '../data/isHex.js';\nimport { toBytes } from '../encoding/toBytes.js';\nimport { toHex } from '../encoding/toHex.js';\nexport function keccak256(value, to_) {\n const to = to_ || 'hex';\n const bytes = keccak_256(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === 'bytes')\n return bytes;\n return toHex(bytes);\n}\n//# sourceMappingURL=keccak256.js.map","import { formatAbiItem } from '../abi/formatAbiItem.js';\nimport { extractFunctionName, extractFunctionParams, } from '../contract/extractFunctionParts.js';\nimport { toBytes } from '../encoding/toBytes.js';\nimport { keccak256 } from './keccak256.js';\nconst hash = (value) => keccak256(toBytes(value));\nexport function hashFunction(def) {\n const name = extractFunctionName(def);\n const params = extractFunctionParams(def) || [];\n return hash(`${name}(${params.map(({ type }) => type).join(',')})`);\n}\nexport function hashAbiItem(abiItem) {\n return hash(formatAbiItem(abiItem));\n}\n//# sourceMappingURL=hashFunction.js.map","import { hashAbiItem, hashFunction } from './hashFunction.js';\nexport const getEventSelector = (event) => {\n if (typeof event === 'string')\n return hashFunction(event);\n return hashAbiItem(event);\n};\n//# sourceMappingURL=getEventSelector.js.map","import { BaseError } from './base.js';\nexport class InvalidAddressError extends BaseError {\n constructor({ address }) {\n super(`Address \"${address}\" is invalid.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAddressError'\n });\n }\n}\n//# sourceMappingURL=address.js.map","const addressRegex = /^0x[a-fA-F0-9]{40}$/;\nexport function isAddress(address) {\n return addressRegex.test(address);\n}\n//# sourceMappingURL=isAddress.js.map","export function concat(values) {\n if (typeof values[0] === 'string')\n return concatHex(values);\n return concatBytes(values);\n}\nexport function concatBytes(values) {\n let length = 0;\n for (const arr of values) {\n length += arr.length;\n }\n const result = new Uint8Array(length);\n let offset = 0;\n for (const arr of values) {\n result.set(arr, offset);\n offset += arr.length;\n }\n return result;\n}\nexport function concatHex(values) {\n return `0x${values.reduce((acc, x) => acc + x.replace('0x', ''), '')}`;\n}\n//# sourceMappingURL=concat.js.map","import { SliceOffsetOutOfBoundsError } from '../../errors/data.js';\nimport { isHex } from './isHex.js';\nimport { size } from './size.js';\n/**\n * @description Returns a section of the hex or byte array given a start/end bytes offset.\n *\n * @param value The hex or byte array to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function slice(value, start, end, { strict } = {}) {\n if (isHex(value, { strict: false }))\n return sliceHex(value, start, end, {\n strict,\n });\n return sliceBytes(value, start, end, {\n strict,\n });\n}\nfunction assertStartOffset(value, start) {\n if (typeof start === 'number' && start > 0 && start > size(value) - 1)\n throw new SliceOffsetOutOfBoundsError({\n offset: start,\n position: 'start',\n size: size(value),\n });\n}\nfunction assertEndOffset(value, start, end) {\n if (typeof start === 'number' &&\n typeof end === 'number' &&\n size(value) !== end - start) {\n throw new SliceOffsetOutOfBoundsError({\n offset: end,\n position: 'end',\n size: size(value),\n });\n }\n}\n/**\n * @description Returns a section of the byte array given a start/end bytes offset.\n *\n * @param value The byte array to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function sliceBytes(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = value_.slice(start, end);\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n}\n/**\n * @description Returns a section of the hex value given a start/end bytes offset.\n *\n * @param value The hex value to slice.\n * @param start The start offset (in bytes).\n * @param end The end offset (in bytes).\n */\nexport function sliceHex(value_, start, end, { strict } = {}) {\n assertStartOffset(value_, start);\n const value = `0x${value_\n .replace('0x', '')\n .slice((start ?? 0) * 2, (end ?? value_.length) * 2)}`;\n if (strict)\n assertEndOffset(value, start, end);\n return value;\n}\n//# sourceMappingURL=slice.js.map","import { AbiEncodingArrayLengthMismatchError, AbiEncodingBytesSizeMismatchError, AbiEncodingLengthMismatchError, InvalidAbiEncodingTypeError, InvalidArrayError, } from '../../errors/abi.js';\nimport { InvalidAddressError } from '../../errors/address.js';\nimport { isAddress } from '../address/isAddress.js';\nimport { concat } from '../data/concat.js';\nimport { padHex } from '../data/pad.js';\nimport { size } from '../data/size.js';\nimport { slice } from '../data/slice.js';\nimport { boolToHex, numberToHex, stringToHex } from '../encoding/toHex.js';\n/**\n * @description Encodes a list of primitive values into an ABI-encoded hex value.\n */\nexport function encodeAbiParameters(params, values) {\n if (params.length !== values.length)\n throw new AbiEncodingLengthMismatchError({\n expectedLength: params.length,\n givenLength: values.length,\n });\n // Prepare the parameters to determine dynamic types to encode.\n const preparedParams = prepareParams({\n params: params,\n values,\n });\n const data = encodeParams(preparedParams);\n if (data.length === 0)\n return '0x';\n return data;\n}\nfunction prepareParams({ params, values, }) {\n const preparedParams = [];\n for (let i = 0; i < params.length; i++) {\n preparedParams.push(prepareParam({ param: params[i], value: values[i] }));\n }\n return preparedParams;\n}\nfunction prepareParam({ param, value, }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return encodeArray(value, { length, param: { ...param, type } });\n }\n if (param.type === 'tuple') {\n return encodeTuple(value, {\n param: param,\n });\n }\n if (param.type === 'address') {\n return encodeAddress(value);\n }\n if (param.type === 'bool') {\n return encodeBool(value);\n }\n if (param.type.startsWith('uint') || param.type.startsWith('int')) {\n const signed = param.type.startsWith('int');\n return encodeNumber(value, { signed });\n }\n if (param.type.startsWith('bytes')) {\n return encodeBytes(value, { param });\n }\n if (param.type === 'string') {\n return encodeString(value);\n }\n throw new InvalidAbiEncodingTypeError(param.type, {\n docsPath: '/docs/contract/encodeAbiParameters',\n });\n}\n/////////////////////////////////////////////////////////////////\nfunction encodeParams(preparedParams) {\n // 1. Compute the size of the static part of the parameters.\n let staticSize = 0;\n for (let i = 0; i < preparedParams.length; i++) {\n const { dynamic, encoded } = preparedParams[i];\n if (dynamic)\n staticSize += 32;\n else\n staticSize += size(encoded);\n }\n // 2. Split the parameters into static and dynamic parts.\n const staticParams = [];\n const dynamicParams = [];\n let dynamicSize = 0;\n for (let i = 0; i < preparedParams.length; i++) {\n const { dynamic, encoded } = preparedParams[i];\n if (dynamic) {\n staticParams.push(numberToHex(staticSize + dynamicSize, { size: 32 }));\n dynamicParams.push(encoded);\n dynamicSize += size(encoded);\n }\n else {\n staticParams.push(encoded);\n }\n }\n // 3. Concatenate static and dynamic parts.\n return concat([...staticParams, ...dynamicParams]);\n}\n/////////////////////////////////////////////////////////////////\nfunction encodeAddress(value) {\n if (!isAddress(value))\n throw new InvalidAddressError({ address: value });\n return { dynamic: false, encoded: padHex(value.toLowerCase()) };\n}\nfunction encodeArray(value, { length, param, }) {\n const dynamic = length === null;\n if (!Array.isArray(value))\n throw new InvalidArrayError(value);\n if (!dynamic && value.length !== length)\n throw new AbiEncodingArrayLengthMismatchError({\n expectedLength: length,\n givenLength: value.length,\n type: `${param.type}[${length}]`,\n });\n let dynamicChild = false;\n const preparedParams = [];\n for (let i = 0; i < value.length; i++) {\n const preparedParam = prepareParam({ param, value: value[i] });\n if (preparedParam.dynamic)\n dynamicChild = true;\n preparedParams.push(preparedParam);\n }\n if (dynamic || dynamicChild) {\n const data = encodeParams(preparedParams);\n if (dynamic) {\n const length = numberToHex(preparedParams.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParams.length > 0 ? concat([length, data]) : length,\n };\n }\n if (dynamicChild)\n return { dynamic: true, encoded: data };\n }\n return {\n dynamic: false,\n encoded: concat(preparedParams.map(({ encoded }) => encoded)),\n };\n}\nfunction encodeBytes(value, { param }) {\n const [, paramSize] = param.type.split('bytes');\n const bytesSize = size(value);\n if (!paramSize) {\n let value_ = value;\n // If the size is not divisible by 32 bytes, pad the end\n // with empty bytes to the ceiling 32 bytes.\n if (bytesSize % 32 !== 0)\n value_ = padHex(value_, {\n dir: 'right',\n size: Math.ceil((value.length - 2) / 2 / 32) * 32,\n });\n return {\n dynamic: true,\n encoded: concat([padHex(numberToHex(bytesSize, { size: 32 })), value_]),\n };\n }\n if (bytesSize !== parseInt(paramSize))\n throw new AbiEncodingBytesSizeMismatchError({\n expectedSize: parseInt(paramSize),\n value,\n });\n return { dynamic: false, encoded: padHex(value, { dir: 'right' }) };\n}\nfunction encodeBool(value) {\n return { dynamic: false, encoded: padHex(boolToHex(value)) };\n}\nfunction encodeNumber(value, { signed }) {\n return {\n dynamic: false,\n encoded: numberToHex(value, {\n size: 32,\n signed,\n }),\n };\n}\nfunction encodeString(value) {\n const hexValue = stringToHex(value);\n const partsLength = Math.ceil(size(hexValue) / 32);\n const parts = [];\n for (let i = 0; i < partsLength; i++) {\n parts.push(padHex(slice(hexValue, i * 32, (i + 1) * 32), {\n dir: 'right',\n }));\n }\n return {\n dynamic: true,\n encoded: concat([\n padHex(numberToHex(size(hexValue), { size: 32 })),\n ...parts,\n ]),\n };\n}\nfunction encodeTuple(value, { param }) {\n let dynamic = false;\n const preparedParams = [];\n for (let i = 0; i < param.components.length; i++) {\n const param_ = param.components[i];\n const index = Array.isArray(value) ? i : param_.name;\n const preparedParam = prepareParam({\n param: param_,\n value: value[index],\n });\n preparedParams.push(preparedParam);\n if (preparedParam.dynamic)\n dynamic = true;\n }\n return {\n dynamic,\n encoded: dynamic\n ? encodeParams(preparedParams)\n : concat(preparedParams.map(({ encoded }) => encoded)),\n };\n}\nexport function getArrayComponents(type) {\n const matches = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches\n ? // Return `null` if the array is dynamic.\n [matches[2] ? Number(matches[2]) : null, matches[1]]\n : undefined;\n}\n//# sourceMappingURL=encodeAbiParameters.js.map","import { isAddress } from '../address/isAddress.js';\nexport function getAbiItem({ abi, args = [], name, }) {\n const abiItems = abi.filter((x) => 'name' in x && x.name === name);\n if (abiItems.length === 0)\n return undefined;\n if (abiItems.length === 1)\n return abiItems[0];\n for (const abiItem of abiItems) {\n if (!('inputs' in abiItem))\n continue;\n if (!args || args.length === 0) {\n if (!abiItem.inputs || abiItem.inputs.length === 0)\n return abiItem;\n continue;\n }\n if (!abiItem.inputs)\n continue;\n if (abiItem.inputs.length === 0)\n continue;\n if (abiItem.inputs.length !== args.length)\n continue;\n const matched = args.every((arg, index) => {\n const abiParameter = 'inputs' in abiItem && abiItem.inputs[index];\n if (!abiParameter)\n return false;\n return isArgOfType(arg, abiParameter);\n });\n if (matched)\n return abiItem;\n }\n return abiItems[0];\n}\nexport function isArgOfType(arg, abiParameter) {\n const argType = typeof arg;\n const abiParameterType = abiParameter.type;\n switch (abiParameterType) {\n case 'address':\n return isAddress(arg);\n case 'bool':\n return argType === 'boolean';\n case 'function':\n return argType === 'string';\n case 'string':\n return argType === 'string';\n default: {\n if (abiParameterType === 'tuple' && 'components' in abiParameter)\n return Object.values(abiParameter.components).every((component, index) => {\n return isArgOfType(Object.values(arg)[index], component);\n });\n // `(u)int`: (un)signed integer type of `M` bits, `0 < M <= 256`, `M % 8 == 0`\n // https://regexr.com/6v8hp\n if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))\n return argType === 'number' || argType === 'bigint';\n // `bytes`: binary type of `M` bytes, `0 < M <= 32`\n // https://regexr.com/6va55\n if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))\n return argType === 'string' || arg instanceof Uint8Array;\n // fixed-length (`[M]`) and dynamic (`[]`) arrays\n // https://regexr.com/6va6i\n if (/[a-z]+[1-9]{0,3}(\\[[0-9]{0,}\\])+$/.test(abiParameterType)) {\n return (Array.isArray(arg) &&\n arg.every((x) => isArgOfType(x, {\n ...abiParameter,\n // Pop off `[]` or `[M]` from end of type\n type: abiParameterType.replace(/(\\[[0-9]{0,}\\])$/, ''),\n })));\n }\n return false;\n }\n }\n}\n//# sourceMappingURL=getAbiItem.js.map","import { AbiEventNotFoundError } from '../../errors/abi.js';\nimport { FilterTypeNotSupportedError } from '../../errors/log.js';\nimport { toBytes } from '../encoding/toBytes.js';\nimport { getEventSelector } from '../hash/getEventSelector.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { encodeAbiParameters } from './encodeAbiParameters.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nimport { getAbiItem } from './getAbiItem.js';\nexport function encodeEventTopics({ abi, eventName, args }) {\n let abiItem = abi[0];\n if (eventName) {\n abiItem = getAbiItem({\n abi,\n args,\n name: eventName,\n });\n if (!abiItem)\n throw new AbiEventNotFoundError(eventName, {\n docsPath: '/docs/contract/encodeEventTopics',\n });\n }\n if (abiItem.type !== 'event')\n throw new AbiEventNotFoundError(undefined, {\n docsPath: '/docs/contract/encodeEventTopics',\n });\n const definition = formatAbiItem(abiItem);\n const signature = getEventSelector(definition);\n let topics = [];\n if (args && 'inputs' in abiItem) {\n const indexedInputs = abiItem.inputs?.filter((param) => 'indexed' in param && param.indexed);\n const args_ = Array.isArray(args)\n ? args\n : Object.values(args).length > 0\n ? indexedInputs?.map((x) => args[x.name]) ?? []\n : [];\n if (args_.length > 0) {\n topics =\n indexedInputs?.map((param, i) => Array.isArray(args_[i])\n ? args_[i].map((_, j) => encodeArg({ param, value: args_[i][j] }))\n : args_[i]\n ? encodeArg({ param, value: args_[i] })\n : null) ?? [];\n }\n }\n return [signature, ...topics];\n}\nfunction encodeArg({ param, value, }) {\n if (param.type === 'string' || param.type === 'bytes')\n return keccak256(toBytes(value));\n if (param.type === 'tuple' || param.type.match(/^(.*)\\[(\\d+)?\\]$/))\n throw new FilterTypeNotSupportedError(param.type);\n return encodeAbiParameters([param], [value]);\n}\n//# sourceMappingURL=encodeEventTopics.js.map","/**\n * Scopes `request` to the filter ID. If the client is a fallback, it will\n * listen for responses and scope the child transport `request` function\n * to the successful filter ID.\n */\nexport function createFilterRequestScope(client, { method }) {\n const requestMap = {};\n if (client.transport.type === 'fallback')\n client.transport.onResponse?.(({ method: method_, response: id, status, transport, }) => {\n if (status === 'success' && method === method_)\n requestMap[id] = transport.request;\n });\n return ((id) => requestMap[id] || client.request);\n}\n//# sourceMappingURL=createFilterRequestScope.js.map","import { encodeEventTopics, } from '../../utils/abi/encodeEventTopics.js';\nimport { numberToHex } from '../../utils/encoding/toHex.js';\nimport { createFilterRequestScope } from '../../utils/filters/createFilterRequestScope.js';\n/**\n * Creates a Filter to retrieve event logs that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges.html) or [`getFilterLogs`](https://viem.sh/docs/actions/public/getFilterLogs.html).\n *\n * - Docs: https://viem.sh/docs/contract/createContractEventFilter.html\n *\n * @param client - Client to use\n * @param parameters - {@link CreateContractEventFilterParameters}\n * @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateContractEventFilterReturnType}\n *\n * @example\n * import { createPublicClient, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { createContractEventFilter } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const filter = await createContractEventFilter(client, {\n * abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),\n * })\n */\nexport async function createContractEventFilter(client, { address, abi, args, eventName, fromBlock, strict, toBlock, }) {\n const getRequest = createFilterRequestScope(client, {\n method: 'eth_newFilter',\n });\n const topics = eventName\n ? encodeEventTopics({\n abi,\n args,\n eventName,\n })\n : undefined;\n const id = await client.request({\n method: 'eth_newFilter',\n params: [\n {\n address,\n fromBlock: typeof fromBlock === 'bigint' ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === 'bigint' ? numberToHex(toBlock) : toBlock,\n topics,\n },\n ],\n });\n return {\n abi,\n args,\n eventName,\n id,\n request: getRequest(id),\n strict,\n type: 'event',\n };\n}\n//# sourceMappingURL=createContractEventFilter.js.map","export function parseAccount(account) {\n if (typeof account === 'string')\n return { address: account, type: 'json-rpc' };\n return account;\n}\n//# sourceMappingURL=parseAccount.js.map","import { slice } from '../data/slice.js';\nimport { hashAbiItem, hashFunction } from './hashFunction.js';\nexport const getFunctionSelector = (fn) => {\n if (typeof fn === 'string')\n return slice(hashFunction(fn), 0, 4);\n return slice(hashAbiItem(fn), 0, 4);\n};\n//# sourceMappingURL=getFunctionSelector.js.map","import { AbiFunctionNotFoundError } from '../../errors/abi.js';\nimport { concatHex } from '../data/concat.js';\nimport { getFunctionSelector } from '../hash/getFunctionSelector.js';\nimport { encodeAbiParameters } from './encodeAbiParameters.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nimport { getAbiItem } from './getAbiItem.js';\nexport function encodeFunctionData({ abi, args, functionName, }) {\n let abiItem = abi[0];\n if (functionName) {\n abiItem = getAbiItem({\n abi,\n args,\n name: functionName,\n });\n if (!abiItem)\n throw new AbiFunctionNotFoundError(functionName, {\n docsPath: '/docs/contract/encodeFunctionData',\n });\n }\n if (abiItem.type !== 'function')\n throw new AbiFunctionNotFoundError(undefined, {\n docsPath: '/docs/contract/encodeFunctionData',\n });\n const definition = formatAbiItem(abiItem);\n const signature = getFunctionSelector(definition);\n const data = 'inputs' in abiItem && abiItem.inputs\n ? encodeAbiParameters(abiItem.inputs, (args ?? []))\n : undefined;\n return concatHex([signature, data ?? '0x']);\n}\n//# sourceMappingURL=encodeFunctionData.js.map","// https://docs.soliditylang.org/en/v0.8.16/control-structures.html#panic-via-assert-and-error-via-require\nexport const panicReasons = {\n 1: 'An `assert` condition failed.',\n 17: 'Arithmic operation resulted in underflow or overflow.',\n 18: 'Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).',\n 33: 'Attempted to convert to an invalid type.',\n 34: 'Attempted to access a storage byte array that is incorrectly encoded.',\n 49: 'Performed `.pop()` on an empty array',\n 50: 'Array index is out of bounds.',\n 65: 'Allocated too much memory or created an array which is too large.',\n 81: 'Attempted to call a zero-initialized variable of internal function type.',\n};\nexport const solidityError = {\n inputs: [\n {\n name: 'message',\n type: 'string',\n },\n ],\n name: 'Error',\n type: 'error',\n};\nexport const solidityPanic = {\n inputs: [\n {\n name: 'reason',\n type: 'uint256',\n },\n ],\n name: 'Panic',\n type: 'error',\n};\n//# sourceMappingURL=solidity.js.map","import { InvalidAddressError } from '../../errors/address.js';\nimport { stringToBytes } from '../encoding/toBytes.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { isAddress } from './isAddress.js';\nexport function checksumAddress(address_, chainId) {\n const hexAddress = chainId\n ? `${chainId}${address_.toLowerCase()}`\n : address_.substring(2).toLowerCase();\n const hash = keccak256(stringToBytes(hexAddress), 'bytes');\n const address = (chainId ? hexAddress.substring(`${chainId}0x`.length) : hexAddress).split('');\n for (let i = 0; i < 40; i += 2) {\n if (hash[i >> 1] >> 4 >= 8 && address[i]) {\n address[i] = address[i].toUpperCase();\n }\n if ((hash[i >> 1] & 0x0f) >= 8 && address[i + 1]) {\n address[i + 1] = address[i + 1].toUpperCase();\n }\n }\n return `0x${address.join('')}`;\n}\nexport function getAddress(address, chainId) {\n if (!isAddress(address))\n throw new InvalidAddressError({ address });\n return checksumAddress(address, chainId);\n}\n//# sourceMappingURL=getAddress.js.map","import { AbiDecodingDataSizeTooSmallError, AbiDecodingZeroDataError, InvalidAbiDecodingTypeError, } from '../../errors/abi.js';\nimport { checksumAddress } from '../address/getAddress.js';\nimport { size } from '../data/size.js';\nimport { slice } from '../data/slice.js';\nimport { trim } from '../data/trim.js';\nimport { hexToBigInt, hexToBool, hexToNumber, hexToString, } from '../encoding/fromHex.js';\nimport { getArrayComponents } from './encodeAbiParameters.js';\nexport function decodeAbiParameters(params, data) {\n if (data === '0x' && params.length > 0)\n throw new AbiDecodingZeroDataError();\n if (size(data) && size(data) < 32)\n throw new AbiDecodingDataSizeTooSmallError({\n data,\n params: params,\n size: size(data),\n });\n return decodeParams({\n data,\n params: params,\n });\n}\nfunction decodeParams({ data, params, }) {\n const decodedValues = [];\n let position = 0;\n for (let i = 0; i < params.length; i++) {\n if (position >= size(data))\n throw new AbiDecodingDataSizeTooSmallError({\n data,\n params,\n size: size(data),\n });\n const param = params[i];\n const { consumed, value } = decodeParam({ data, param, position });\n decodedValues.push(value);\n // Step across the data by the amount of data consumed by this parameter.\n position += consumed;\n }\n return decodedValues;\n}\nfunction decodeParam({ data, param, position, }) {\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return decodeArray(data, {\n length,\n param: { ...param, type: type },\n position,\n });\n }\n if (param.type === 'tuple') {\n return decodeTuple(data, { param: param, position });\n }\n if (param.type === 'string') {\n return decodeString(data, { position });\n }\n if (param.type.startsWith('bytes')) {\n return decodeBytes(data, { param, position });\n }\n const value = slice(data, position, position + 32, { strict: true });\n if (param.type.startsWith('uint') || param.type.startsWith('int')) {\n return decodeNumber(value, { param });\n }\n if (param.type === 'address') {\n return decodeAddress(value);\n }\n if (param.type === 'bool') {\n return decodeBool(value);\n }\n throw new InvalidAbiDecodingTypeError(param.type, {\n docsPath: '/docs/contract/decodeAbiParameters',\n });\n}\n////////////////////////////////////////////////////////////////////\nfunction decodeAddress(value) {\n return { consumed: 32, value: checksumAddress(slice(value, -20)) };\n}\nfunction decodeArray(data, { param, length, position, }) {\n // If the length of the array is not known in advance (dynamic array),\n // we will need to decode the offset of the array data.\n if (!length) {\n // Get the offset of the array data.\n const offset = hexToNumber(slice(data, position, position + 32, { strict: true }));\n // Get the length of the array from the offset.\n const length = hexToNumber(slice(data, offset, offset + 32, { strict: true }));\n let consumed = 0;\n const value = [];\n for (let i = 0; i < length; ++i) {\n const decodedChild = decodeParam({\n data: slice(data, offset + 32),\n param,\n position: consumed,\n });\n consumed += decodedChild.consumed;\n value.push(decodedChild.value);\n }\n return { value, consumed: 32 };\n }\n // If the length of the array is known in advance,\n // and the length of an element deeply nested in the array is not known,\n // we need to decode the offset of the array data.\n if (hasDynamicChild(param)) {\n // Get the child type of the array.\n const arrayComponents = getArrayComponents(param.type);\n // If the child type is not known, the array is dynamic.\n const dynamicChild = !arrayComponents?.[0];\n let consumed = 0;\n const value = [];\n for (let i = 0; i < length; ++i) {\n const offset = hexToNumber(slice(data, position, position + 32, { strict: true }));\n const decodedChild = decodeParam({\n data: slice(data, offset),\n param,\n position: dynamicChild ? consumed : i * 32,\n });\n consumed += decodedChild.consumed;\n value.push(decodedChild.value);\n }\n return { value, consumed: 32 };\n }\n // If the length of the array is known in advance,\n // and the length of each element in the array is known,\n // the array data is encoded contiguously after the array.\n let consumed = 0;\n const value = [];\n for (let i = 0; i < length; ++i) {\n const decodedChild = decodeParam({\n data,\n param,\n position: position + consumed,\n });\n consumed += decodedChild.consumed;\n value.push(decodedChild.value);\n }\n return { value, consumed };\n}\nfunction decodeBool(value) {\n return { consumed: 32, value: hexToBool(value) };\n}\nfunction decodeBytes(data, { param, position }) {\n const [_, size] = param.type.split('bytes');\n if (!size) {\n // If we don't have a size, we're dealing with a dynamic-size array\n // so we need to read the offset of the data part first.\n const offset = hexToNumber(slice(data, position, position + 32, { strict: true }));\n const length = hexToNumber(slice(data, offset, offset + 32, { strict: true }));\n // If there is no length, we have zero data.\n if (length === 0)\n return { consumed: 32, value: '0x' };\n const value = slice(data, offset + 32, offset + 32 + length, {\n strict: true,\n });\n return { consumed: 32, value };\n }\n const value = slice(data, position, position + parseInt(size), {\n strict: true,\n });\n return { consumed: 32, value };\n}\nfunction decodeNumber(value, { param }) {\n const signed = param.type.startsWith('int');\n const size = parseInt(param.type.split('int')[1] || '256');\n return {\n consumed: 32,\n value: size > 48\n ? hexToBigInt(value, { signed })\n : hexToNumber(value, { signed }),\n };\n}\nfunction decodeString(data, { position }) {\n const offset = hexToNumber(slice(data, position, position + 32, { strict: true }));\n const length = hexToNumber(slice(data, offset, offset + 32, { strict: true }));\n // If there is no length, we have zero data (empty string).\n if (length === 0)\n return { consumed: 32, value: '' };\n const value = hexToString(trim(slice(data, offset + 32, offset + 32 + length, { strict: true })));\n return { consumed: 32, value };\n}\nfunction decodeTuple(data, { param, position }) {\n // Tuples can have unnamed components (i.e. they are arrays), so we must\n // determine whether the tuple is named or unnamed. In the case of a named\n // tuple, the value will be an object where each property is the name of the\n // component. In the case of an unnamed tuple, the value will be an array.\n const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !name);\n // Initialize the value to an object or an array, depending on whether the\n // tuple is named or unnamed.\n const value = hasUnnamedChild ? [] : {};\n let consumed = 0;\n // If the tuple has a dynamic child, we must first decode the offset to the\n // tuple data.\n if (hasDynamicChild(param)) {\n const offset = hexToNumber(slice(data, position, position + 32, { strict: true }));\n // Decode each component of the tuple, starting at the offset.\n for (let i = 0; i < param.components.length; ++i) {\n const component = param.components[i];\n const decodedChild = decodeParam({\n data: slice(data, offset),\n param: component,\n position: consumed,\n });\n consumed += decodedChild.consumed;\n value[hasUnnamedChild ? i : component?.name] = decodedChild.value;\n }\n return { consumed: 32, value };\n }\n // If the tuple has static children, we can just decode each component\n // in sequence.\n for (let i = 0; i < param.components.length; ++i) {\n const component = param.components[i];\n const decodedChild = decodeParam({\n data,\n param: component,\n position: position + consumed,\n });\n consumed += decodedChild.consumed;\n value[hasUnnamedChild ? i : component?.name] = decodedChild.value;\n }\n return { consumed, value };\n}\nfunction hasDynamicChild(param) {\n const { type } = param;\n if (type === 'string')\n return true;\n if (type === 'bytes')\n return true;\n if (type.endsWith('[]'))\n return true;\n if (type === 'tuple')\n return param.components?.some(hasDynamicChild);\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents &&\n hasDynamicChild({ ...param, type: arrayComponents[1] }))\n return true;\n return false;\n}\n//# sourceMappingURL=decodeAbiParameters.js.map","import { solidityError, solidityPanic } from '../../constants/solidity.js';\nimport { AbiDecodingZeroDataError, AbiErrorSignatureNotFoundError, } from '../../errors/abi.js';\nimport { slice } from '../data/slice.js';\nimport { getFunctionSelector } from '../hash/getFunctionSelector.js';\nimport { decodeAbiParameters } from './decodeAbiParameters.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nexport function decodeErrorResult({ abi, data, }) {\n const signature = slice(data, 0, 4);\n if (signature === '0x')\n throw new AbiDecodingZeroDataError();\n const abi_ = [...(abi || []), solidityError, solidityPanic];\n const abiItem = abi_.find((x) => x.type === 'error' && signature === getFunctionSelector(formatAbiItem(x)));\n if (!abiItem)\n throw new AbiErrorSignatureNotFoundError(signature, {\n docsPath: '/docs/contract/decodeErrorResult',\n });\n return {\n abiItem,\n args: ('inputs' in abiItem && abiItem.inputs && abiItem.inputs.length > 0\n ? decodeAbiParameters(abiItem.inputs, slice(data, 4))\n : undefined),\n errorName: abiItem.name,\n };\n}\n//# sourceMappingURL=decodeErrorResult.js.map","export const stringify = (value, replacer, space) => JSON.stringify(value, (key, value_) => {\n const value = typeof value_ === 'bigint' ? value_.toString() : value_;\n return typeof replacer === 'function' ? replacer(key, value) : value;\n}, space);\n//# sourceMappingURL=stringify.js.map","import { stringify } from '../stringify.js';\nexport function formatAbiItemWithArgs({ abiItem, args, includeFunctionName = true, includeName = false, }) {\n if (!('name' in abiItem))\n return;\n if (!('inputs' in abiItem))\n return;\n if (!abiItem.inputs)\n return;\n return `${includeFunctionName ? abiItem.name : ''}(${abiItem.inputs\n .map((input, i) => `${includeName && input.name ? `${input.name}: ` : ''}${typeof args[i] === 'object' ? stringify(args[i]) : args[i]}`)\n .join(', ')})`;\n}\n//# sourceMappingURL=formatAbiItemWithArgs.js.map","export const etherUnits = {\n gwei: 9,\n wei: 18,\n};\nexport const gweiUnits = {\n ether: -9,\n wei: 9,\n};\nexport const weiUnits = {\n ether: -18,\n gwei: -9,\n};\n//# sourceMappingURL=unit.js.map","export function formatUnits(value, decimals) {\n let display = value.toString();\n const negative = display.startsWith('-');\n if (negative)\n display = display.slice(1);\n display = display.padStart(decimals, '0');\n let [integer, fraction] = [\n display.slice(0, display.length - decimals),\n display.slice(display.length - decimals),\n ];\n fraction = fraction.replace(/(0+)$/, '');\n return `${negative ? '-' : ''}${integer || '0'}${fraction ? `.${fraction}` : ''}`;\n}\n//# sourceMappingURL=formatUnits.js.map","import { etherUnits } from '../../constants/unit.js';\nimport { formatUnits } from './formatUnits.js';\nexport function formatEther(wei, unit = 'wei') {\n return formatUnits(wei, etherUnits[unit]);\n}\n//# sourceMappingURL=formatEther.js.map","import { gweiUnits } from '../../constants/unit.js';\nimport { formatUnits } from './formatUnits.js';\nexport function formatGwei(wei, unit = 'wei') {\n return formatUnits(wei, gweiUnits[unit]);\n}\n//# sourceMappingURL=formatGwei.js.map","import { formatEther } from '../utils/unit/formatEther.js';\nimport { formatGwei } from '../utils/unit/formatGwei.js';\nimport { BaseError } from './base.js';\nexport function prettyPrint(args) {\n const entries = Object.entries(args)\n .map(([key, value]) => {\n if (value === undefined || value === false)\n return null;\n return [key, value];\n })\n .filter(Boolean);\n const maxLength = entries.reduce((acc, [key]) => Math.max(acc, key.length), 0);\n return entries\n .map(([key, value]) => ` ${`${key}:`.padEnd(maxLength + 1)} ${value}`)\n .join('\\n');\n}\nexport class FeeConflictError extends BaseError {\n constructor() {\n super([\n 'Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.',\n 'Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.',\n ].join('\\n'));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'FeeConflictError'\n });\n }\n}\nexport class InvalidLegacyVError extends BaseError {\n constructor({ v }) {\n super(`Invalid \\`v\\` value \"${v}\". Expected 27 or 28.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidLegacyVError'\n });\n }\n}\nexport class InvalidSerializableTransactionError extends BaseError {\n constructor({ transaction }) {\n super('Cannot infer a transaction type from provided transaction.', {\n metaMessages: [\n 'Provided Transaction:',\n '{',\n prettyPrint(transaction),\n '}',\n '',\n 'To infer the type, either provide:',\n '- a `type` to the Transaction, or',\n '- an EIP-1559 Transaction with `maxFeePerGas`, or',\n '- an EIP-2930 Transaction with `gasPrice` & `accessList`, or',\n '- a Legacy Transaction with `gasPrice`',\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidSerializableTransactionError'\n });\n }\n}\nexport class InvalidSerializedTransactionTypeError extends BaseError {\n constructor({ serializedType }) {\n super(`Serialized transaction type \"${serializedType}\" is invalid.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidSerializedTransactionType'\n });\n Object.defineProperty(this, \"serializedType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.serializedType = serializedType;\n }\n}\nexport class InvalidSerializedTransactionError extends BaseError {\n constructor({ attributes, serializedTransaction, type, }) {\n const missing = Object.entries(attributes)\n .map(([key, value]) => (typeof value === 'undefined' ? key : undefined))\n .filter(Boolean);\n super(`Invalid serialized transaction of type \"${type}\" was provided.`, {\n metaMessages: [\n `Serialized Transaction: \"${serializedTransaction}\"`,\n missing.length > 0 ? `Missing Attributes: ${missing.join(', ')}` : '',\n ].filter(Boolean),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidSerializedTransactionError'\n });\n Object.defineProperty(this, \"serializedTransaction\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"type\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.serializedTransaction = serializedTransaction;\n this.type = type;\n }\n}\nexport class InvalidStorageKeySizeError extends BaseError {\n constructor({ storageKey }) {\n super(`Size for storage key \"${storageKey}\" is invalid. Expected 32 bytes. Got ${Math.floor((storageKey.length - 2) / 2)} bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidStorageKeySizeError'\n });\n }\n}\nexport class TransactionExecutionError extends BaseError {\n constructor(cause, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }) {\n const prettyArgs = prettyPrint({\n chain: chain && `${chain?.name} (id: ${chain?.id})`,\n from: account?.address,\n to,\n value: typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n });\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Request Arguments:',\n prettyArgs,\n ].filter(Boolean),\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TransactionExecutionError'\n });\n this.cause = cause;\n }\n}\nexport class TransactionNotFoundError extends BaseError {\n constructor({ blockHash, blockNumber, blockTag, hash, index, }) {\n let identifier = 'Transaction';\n if (blockTag && index !== undefined)\n identifier = `Transaction at block time \"${blockTag}\" at index \"${index}\"`;\n if (blockHash && index !== undefined)\n identifier = `Transaction at block hash \"${blockHash}\" at index \"${index}\"`;\n if (blockNumber && index !== undefined)\n identifier = `Transaction at block number \"${blockNumber}\" at index \"${index}\"`;\n if (hash)\n identifier = `Transaction with hash \"${hash}\"`;\n super(`${identifier} could not be found.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TransactionNotFoundError'\n });\n }\n}\nexport class TransactionReceiptNotFoundError extends BaseError {\n constructor({ hash }) {\n super(`Transaction receipt with hash \"${hash}\" could not be found. The Transaction may not be processed on a block yet.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TransactionReceiptNotFoundError'\n });\n }\n}\nexport class WaitForTransactionReceiptTimeoutError extends BaseError {\n constructor({ hash }) {\n super(`Timed out while waiting for transaction with hash \"${hash}\" to be confirmed.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'WaitForTransactionReceiptTimeoutError'\n });\n }\n}\n//# sourceMappingURL=transaction.js.map","import { parseAccount } from '../accounts/utils/parseAccount.js';\nimport { panicReasons } from '../constants/solidity.js';\nimport { decodeErrorResult, } from '../utils/abi/decodeErrorResult.js';\nimport { formatAbiItem } from '../utils/abi/formatAbiItem.js';\nimport { formatAbiItemWithArgs } from '../utils/abi/formatAbiItemWithArgs.js';\nimport { getAbiItem } from '../utils/abi/getAbiItem.js';\nimport { formatEther } from '../utils/unit/formatEther.js';\nimport { formatGwei } from '../utils/unit/formatGwei.js';\nimport { AbiErrorSignatureNotFoundError } from './abi.js';\nimport { BaseError } from './base.js';\nimport { prettyPrint } from './transaction.js';\nimport { getContractAddress } from './utils.js';\nexport class CallExecutionError extends BaseError {\n constructor(cause, { account: account_, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }) {\n const account = account_ ? parseAccount(account_) : undefined;\n const prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n });\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Raw Call Arguments:',\n prettyArgs,\n ].filter(Boolean),\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'CallExecutionError'\n });\n this.cause = cause;\n }\n}\nexport class ContractFunctionExecutionError extends BaseError {\n constructor(cause, { abi, args, contractAddress, docsPath, functionName, sender, }) {\n const abiItem = getAbiItem({ abi, args, name: functionName });\n const formattedArgs = abiItem\n ? formatAbiItemWithArgs({\n abiItem,\n args,\n includeFunctionName: false,\n includeName: false,\n })\n : undefined;\n const functionWithParams = abiItem\n ? formatAbiItem(abiItem, { includeName: true })\n : undefined;\n const prettyArgs = prettyPrint({\n address: contractAddress && getContractAddress(contractAddress),\n function: functionWithParams,\n args: formattedArgs &&\n formattedArgs !== '()' &&\n `${[...Array(functionName?.length ?? 0).keys()]\n .map(() => ' ')\n .join('')}${formattedArgs}`,\n sender,\n });\n super(cause.shortMessage ||\n `An unknown error occurred while executing the contract function \"${functionName}\".`, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Contract Call:',\n prettyArgs,\n ].filter(Boolean),\n });\n Object.defineProperty(this, \"abi\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"args\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"contractAddress\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"formattedArgs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"functionName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"sender\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ContractFunctionExecutionError'\n });\n this.abi = abi;\n this.args = args;\n this.cause = cause;\n this.contractAddress = contractAddress;\n this.functionName = functionName;\n this.sender = sender;\n }\n}\nexport class ContractFunctionRevertedError extends BaseError {\n constructor({ abi, data, functionName, message, }) {\n let cause;\n let decodedData = undefined;\n let metaMessages;\n let reason;\n if (data && data !== '0x') {\n try {\n decodedData = decodeErrorResult({ abi, data });\n const { abiItem, errorName, args: errorArgs } = decodedData;\n if (errorName === 'Error') {\n reason = errorArgs[0];\n }\n else if (errorName === 'Panic') {\n const [firstArg] = errorArgs;\n reason = panicReasons[firstArg];\n }\n else {\n const errorWithParams = abiItem\n ? formatAbiItem(abiItem, { includeName: true })\n : undefined;\n const formattedArgs = abiItem && errorArgs\n ? formatAbiItemWithArgs({\n abiItem,\n args: errorArgs,\n includeFunctionName: false,\n includeName: false,\n })\n : undefined;\n metaMessages = [\n errorWithParams ? `Error: ${errorWithParams}` : '',\n formattedArgs && formattedArgs !== '()'\n ? ` ${[...Array(errorName?.length ?? 0).keys()]\n .map(() => ' ')\n .join('')}${formattedArgs}`\n : '',\n ];\n }\n }\n catch (err) {\n cause = err;\n }\n }\n else if (message)\n reason = message;\n let signature;\n if (cause instanceof AbiErrorSignatureNotFoundError) {\n signature = cause.signature;\n metaMessages = [\n `Unable to decode signature \"${signature}\" as it was not found on the provided ABI.`,\n 'Make sure you are using the correct ABI and that the error exists on it.',\n `You can look up the decoded signature here: https://openchain.xyz/signatures?query=${signature}.`,\n ];\n }\n super((reason && reason !== 'execution reverted') || signature\n ? [\n `The contract function \"${functionName}\" reverted with the following ${signature ? 'signature' : 'reason'}:`,\n reason || signature,\n ].join('\\n')\n : `The contract function \"${functionName}\" reverted.`, {\n cause,\n metaMessages,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ContractFunctionRevertedError'\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"reason\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"signature\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = decodedData;\n this.reason = reason;\n this.signature = signature;\n }\n}\nexport class ContractFunctionZeroDataError extends BaseError {\n constructor({ functionName }) {\n super(`The contract function \"${functionName}\" returned no data (\"0x\").`, {\n metaMessages: [\n 'This could be due to any of the following:',\n ` - The contract does not have the function \"${functionName}\",`,\n ' - The parameters passed to the contract function may be invalid, or',\n ' - The address is not a contract.',\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ContractFunctionZeroDataError'\n });\n }\n}\nexport class RawContractError extends BaseError {\n constructor({ data, message, }) {\n super(message || '');\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'RawContractError'\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = data;\n }\n}\n//# sourceMappingURL=contract.js.map","import { AbiDecodingZeroDataError } from '../../errors/abi.js';\nimport { BaseError } from '../../errors/base.js';\nimport { ContractFunctionExecutionError, ContractFunctionRevertedError, ContractFunctionZeroDataError, RawContractError, } from '../../errors/contract.js';\nconst EXECUTION_REVERTED_ERROR_CODE = 3;\nexport function getContractError(err, { abi, address, args, docsPath, functionName, sender, }) {\n const { code, data, message, shortMessage } = (err instanceof RawContractError\n ? err\n : err instanceof BaseError\n ? err.walk((err) => 'data' in err) || err.walk()\n : {});\n let cause = err;\n if (err instanceof AbiDecodingZeroDataError) {\n cause = new ContractFunctionZeroDataError({ functionName });\n }\n else if (code === EXECUTION_REVERTED_ERROR_CODE &&\n (data || message || shortMessage)) {\n cause = new ContractFunctionRevertedError({\n abi,\n data: typeof data === 'object' ? data.data : data,\n functionName,\n message: shortMessage ?? message,\n });\n }\n return new ContractFunctionExecutionError(cause, {\n abi,\n args,\n contractAddress: address,\n docsPath,\n functionName,\n sender,\n });\n}\n//# sourceMappingURL=getContractError.js.map","import { BaseError } from './base.js';\nexport class AccountNotFoundError extends BaseError {\n constructor({ docsPath } = {}) {\n super([\n 'Could not find an Account to execute with this Action.',\n 'Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient.',\n ].join('\\n'), {\n docsPath,\n docsSlug: 'account',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AccountNotFoundError'\n });\n }\n}\n//# sourceMappingURL=account.js.map","import { formatEther } from '../utils/unit/formatEther.js';\nimport { formatGwei } from '../utils/unit/formatGwei.js';\nimport { BaseError } from './base.js';\nimport { prettyPrint } from './transaction.js';\nexport class EstimateGasExecutionError extends BaseError {\n constructor(cause, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }) {\n const prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n });\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Estimate Gas Arguments:',\n prettyArgs,\n ].filter(Boolean),\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'EstimateGasExecutionError'\n });\n this.cause = cause;\n }\n}\n//# sourceMappingURL=estimateGas.js.map","import { formatGwei } from '../utils/unit/formatGwei.js';\nimport { BaseError } from './base.js';\n/**\n * geth: https://github.com/ethereum/go-ethereum/blob/master/core/error.go\n * https://github.com/ethereum/go-ethereum/blob/master/core/types/transaction.go#L34-L41\n *\n * erigon: https://github.com/ledgerwatch/erigon/blob/master/core/error.go\n * https://github.com/ledgerwatch/erigon/blob/master/core/types/transaction.go#L41-L46\n *\n * anvil: https://github.com/foundry-rs/foundry/blob/master/anvil/src/eth/error.rs#L108\n */\nclass ExecutionRevertedError extends BaseError {\n constructor({ cause, message, } = {}) {\n const reason = message\n ?.replace('execution reverted: ', '')\n ?.replace('execution reverted', '');\n super(`Execution reverted ${reason ? `with reason: ${reason}` : 'for an unknown reason'}.`, {\n cause,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ExecutionRevertedError'\n });\n }\n}\nObject.defineProperty(ExecutionRevertedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 3\n});\nObject.defineProperty(ExecutionRevertedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /execution reverted/\n});\nexport { ExecutionRevertedError };\nclass FeeCapTooHighError extends BaseError {\n constructor({ cause, maxFeePerGas, } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''}) cannot be higher than the maximum allowed value (2^256-1).`, {\n cause,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'FeeCapTooHigh'\n });\n }\n}\nObject.defineProperty(FeeCapTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas higher than 2\\^256-1|fee cap higher than 2\\^256-1/\n});\nexport { FeeCapTooHighError };\nclass FeeCapTooLowError extends BaseError {\n constructor({ cause, maxFeePerGas, } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)}` : ''} gwei) cannot be lower than the block base fee.`, {\n cause,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'FeeCapTooLow'\n });\n }\n}\nObject.defineProperty(FeeCapTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/\n});\nexport { FeeCapTooLowError };\nclass NonceTooHighError extends BaseError {\n constructor({ cause, nonce } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}is higher than the next one expected.`, { cause });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'NonceTooHighError'\n });\n }\n}\nObject.defineProperty(NonceTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too high/\n});\nexport { NonceTooHighError };\nclass NonceTooLowError extends BaseError {\n constructor({ cause, nonce } = {}) {\n super([\n `Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}is lower than the current nonce of the account.`,\n 'Try increasing the nonce or find the latest nonce with `getTransactionCount`.',\n ].join('\\n'), { cause });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'NonceTooLowError'\n });\n }\n}\nObject.defineProperty(NonceTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce too low|transaction already imported|already known/\n});\nexport { NonceTooLowError };\nclass NonceMaxValueError extends BaseError {\n constructor({ cause, nonce } = {}) {\n super(`Nonce provided for the transaction ${nonce ? `(${nonce}) ` : ''}exceeds the maximum allowed nonce.`, { cause });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'NonceMaxValueError'\n });\n }\n}\nObject.defineProperty(NonceMaxValueError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /nonce has max value/\n});\nexport { NonceMaxValueError };\nclass InsufficientFundsError extends BaseError {\n constructor({ cause } = {}) {\n super([\n 'The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.',\n ].join('\\n'), {\n cause,\n metaMessages: [\n 'This error could arise when the account does not have enough funds to:',\n ' - pay for the total gas fee,',\n ' - pay for the value to send.',\n ' ',\n 'The cost of the transaction is calculated as `gas * gas fee + value`, where:',\n ' - `gas` is the amount of gas needed for transaction to execute,',\n ' - `gas fee` is the gas fee,',\n ' - `value` is the amount of ether to send to the recipient.',\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InsufficientFundsError'\n });\n }\n}\nObject.defineProperty(InsufficientFundsError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /insufficient funds/\n});\nexport { InsufficientFundsError };\nclass IntrinsicGasTooHighError extends BaseError {\n constructor({ cause, gas } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction exceeds the limit allowed for the block.`, {\n cause,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'IntrinsicGasTooHighError'\n });\n }\n}\nObject.defineProperty(IntrinsicGasTooHighError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too high|gas limit reached/\n});\nexport { IntrinsicGasTooHighError };\nclass IntrinsicGasTooLowError extends BaseError {\n constructor({ cause, gas } = {}) {\n super(`The amount of gas ${gas ? `(${gas}) ` : ''}provided for the transaction is too low.`, {\n cause,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'IntrinsicGasTooLowError'\n });\n }\n}\nObject.defineProperty(IntrinsicGasTooLowError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /intrinsic gas too low/\n});\nexport { IntrinsicGasTooLowError };\nclass TransactionTypeNotSupportedError extends BaseError {\n constructor({ cause }) {\n super('The transaction type is not supported for this chain.', {\n cause,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TransactionTypeNotSupportedError'\n });\n }\n}\nObject.defineProperty(TransactionTypeNotSupportedError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /transaction type not valid/\n});\nexport { TransactionTypeNotSupportedError };\nclass TipAboveFeeCapError extends BaseError {\n constructor({ cause, maxPriorityFeePerGas, maxFeePerGas, } = {}) {\n super([\n `The provided tip (\\`maxPriorityFeePerGas\\`${maxPriorityFeePerGas\n ? ` = ${formatGwei(maxPriorityFeePerGas)} gwei`\n : ''}) cannot be higher than the fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${formatGwei(maxFeePerGas)} gwei` : ''}).`,\n ].join('\\n'), {\n cause,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TipAboveFeeCapError'\n });\n }\n}\nObject.defineProperty(TipAboveFeeCapError, \"nodeMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/\n});\nexport { TipAboveFeeCapError };\nexport class UnknownNodeError extends BaseError {\n constructor({ cause }) {\n super(`An error occurred while executing: ${cause?.message}`, {\n cause,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownNodeError'\n });\n }\n}\n//# sourceMappingURL=node.js.map","import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nimport { getUrl } from './utils.js';\nexport class HttpRequestError extends BaseError {\n constructor({ body, details, headers, status, url, }) {\n super('HTTP request failed.', {\n details,\n metaMessages: [\n status && `Status: ${status}`,\n `URL: ${getUrl(url)}`,\n body && `Request body: ${stringify(body)}`,\n ].filter(Boolean),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'HttpRequestError'\n });\n Object.defineProperty(this, \"body\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"headers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"status\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"url\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.body = body;\n this.headers = headers;\n this.status = status;\n this.url = url;\n }\n}\nexport class WebSocketRequestError extends BaseError {\n constructor({ body, details, url, }) {\n super('WebSocket request failed.', {\n details,\n metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'WebSocketRequestError'\n });\n }\n}\nexport class RpcRequestError extends BaseError {\n constructor({ body, error, url, }) {\n super('RPC Request failed.', {\n cause: error,\n details: error.message,\n metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'RpcRequestError'\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.code = error.code;\n }\n}\nexport class TimeoutError extends BaseError {\n constructor({ body, url, }) {\n super('The request took too long to respond.', {\n details: 'The request timed out.',\n metaMessages: [`URL: ${getUrl(url)}`, `Request body: ${stringify(body)}`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TimeoutError'\n });\n }\n}\n//# sourceMappingURL=request.js.map","import { BaseError } from './base.js';\nimport { RpcRequestError } from './request.js';\nconst unknownErrorCode = -1;\n/**\n * Error subclass implementing JSON RPC 2.0 errors and Ethereum RPC errors per EIP-1474.\n *\n * - EIP https://eips.ethereum.org/EIPS/eip-1474\n */\nexport class RpcError extends BaseError {\n constructor(cause, { code, docsPath, metaMessages, shortMessage }) {\n super(shortMessage, {\n cause,\n docsPath,\n metaMessages: metaMessages || cause?.metaMessages,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'RpcError'\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.name = cause.name;\n this.code = (cause instanceof RpcRequestError ? cause.code : code ?? unknownErrorCode);\n }\n}\n/**\n * Error subclass implementing Ethereum Provider errors per EIP-1193.\n *\n * - EIP https://eips.ethereum.org/EIPS/eip-1193\n */\nexport class ProviderRpcError extends RpcError {\n constructor(cause, options) {\n super(cause, options);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ProviderRpcError'\n });\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = options.data;\n }\n}\n/**\n * Subclass for a \"Parse error\" EIP-1474 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1474#error-codes\n */\nclass ParseRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: ParseRpcError.code,\n shortMessage: 'Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ParseRpcError'\n });\n }\n}\nObject.defineProperty(ParseRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32700\n});\nexport { ParseRpcError };\n/**\n * Subclass for a \"Invalid request\" EIP-1474 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1474#error-codes\n */\nclass InvalidRequestRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: InvalidRequestRpcError.code,\n shortMessage: 'JSON is not a valid request object.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidRequestRpcError'\n });\n }\n}\nObject.defineProperty(InvalidRequestRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32600\n});\nexport { InvalidRequestRpcError };\n/**\n * Subclass for a \"Method not found\" EIP-1474 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1474#error-codes\n */\nclass MethodNotFoundRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: MethodNotFoundRpcError.code,\n shortMessage: 'The method does not exist / is not available.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'MethodNotFoundRpcError'\n });\n }\n}\nObject.defineProperty(MethodNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32601\n});\nexport { MethodNotFoundRpcError };\n/**\n * Subclass for an \"Invalid params\" EIP-1474 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1474#error-codes\n */\nclass InvalidParamsRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: InvalidParamsRpcError.code,\n shortMessage: [\n 'Invalid parameters were provided to the RPC method.',\n 'Double check you have provided the correct parameters.',\n ].join('\\n'),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidParamsRpcError'\n });\n }\n}\nObject.defineProperty(InvalidParamsRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32602\n});\nexport { InvalidParamsRpcError };\n/**\n * Subclass for an \"Internal error\" EIP-1474 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1474#error-codes\n */\nclass InternalRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: InternalRpcError.code,\n shortMessage: 'An internal error was received.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InternalRpcError'\n });\n }\n}\nObject.defineProperty(InternalRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32603\n});\nexport { InternalRpcError };\n/**\n * Subclass for an \"Invalid input\" EIP-1474 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1474#error-codes\n */\nclass InvalidInputRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: InvalidInputRpcError.code,\n shortMessage: [\n 'Missing or invalid parameters.',\n 'Double check you have provided the correct parameters.',\n ].join('\\n'),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidInputRpcError'\n });\n }\n}\nObject.defineProperty(InvalidInputRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32000\n});\nexport { InvalidInputRpcError };\n/**\n * Subclass for a \"Resource not found\" EIP-1474 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1474#error-codes\n */\nclass ResourceNotFoundRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: ResourceNotFoundRpcError.code,\n shortMessage: 'Requested resource not found.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ResourceNotFoundRpcError'\n });\n }\n}\nObject.defineProperty(ResourceNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32001\n});\nexport { ResourceNotFoundRpcError };\n/**\n * Subclass for a \"Resource unavailable\" EIP-1474 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1474#error-codes\n */\nclass ResourceUnavailableRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: ResourceUnavailableRpcError.code,\n shortMessage: 'Requested resource not available.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ResourceUnavailableRpcError'\n });\n }\n}\nObject.defineProperty(ResourceUnavailableRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32002\n});\nexport { ResourceUnavailableRpcError };\n/**\n * Subclass for a \"Transaction rejected\" EIP-1474 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1474#error-codes\n */\nclass TransactionRejectedRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: TransactionRejectedRpcError.code,\n shortMessage: 'Transaction creation failed.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TransactionRejectedRpcError'\n });\n }\n}\nObject.defineProperty(TransactionRejectedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32003\n});\nexport { TransactionRejectedRpcError };\n/**\n * Subclass for a \"Method not supported\" EIP-1474 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1474#error-codes\n */\nclass MethodNotSupportedRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: MethodNotSupportedRpcError.code,\n shortMessage: 'Method is not implemented.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'MethodNotSupportedRpcError'\n });\n }\n}\nObject.defineProperty(MethodNotSupportedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32004\n});\nexport { MethodNotSupportedRpcError };\n/**\n * Subclass for a \"Limit exceeded\" EIP-1474 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1474#error-codes\n */\nclass LimitExceededRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: LimitExceededRpcError.code,\n shortMessage: 'Request exceeds defined limit.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'LimitExceededRpcError'\n });\n }\n}\nObject.defineProperty(LimitExceededRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32005\n});\nexport { LimitExceededRpcError };\n/**\n * Subclass for a \"JSON-RPC version not supported\" EIP-1474 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1474#error-codes\n */\nclass JsonRpcVersionUnsupportedError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: JsonRpcVersionUnsupportedError.code,\n shortMessage: 'Version of JSON-RPC protocol is not supported.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'JsonRpcVersionUnsupportedError'\n });\n }\n}\nObject.defineProperty(JsonRpcVersionUnsupportedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32006\n});\nexport { JsonRpcVersionUnsupportedError };\n/**\n * Subclass for a \"User Rejected Request\" EIP-1193 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1193#provider-errors\n */\nclass UserRejectedRequestError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: UserRejectedRequestError.code,\n shortMessage: 'User rejected the request.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UserRejectedRequestError'\n });\n }\n}\nObject.defineProperty(UserRejectedRequestError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4001\n});\nexport { UserRejectedRequestError };\n/**\n * Subclass for an \"Unauthorized\" EIP-1193 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1193#provider-errors\n */\nclass UnauthorizedProviderError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: UnauthorizedProviderError.code,\n shortMessage: 'The requested method and/or account has not been authorized by the user.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnauthorizedProviderError'\n });\n }\n}\nObject.defineProperty(UnauthorizedProviderError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4100\n});\nexport { UnauthorizedProviderError };\n/**\n * Subclass for an \"Unsupported Method\" EIP-1193 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1193#provider-errors\n */\nclass UnsupportedProviderMethodError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: UnsupportedProviderMethodError.code,\n shortMessage: 'The Provider does not support the requested method.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnsupportedProviderMethodError'\n });\n }\n}\nObject.defineProperty(UnsupportedProviderMethodError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4200\n});\nexport { UnsupportedProviderMethodError };\n/**\n * Subclass for an \"Disconnected\" EIP-1193 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1193#provider-errors\n */\nclass ProviderDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: ProviderDisconnectedError.code,\n shortMessage: 'The Provider is disconnected from all chains.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ProviderDisconnectedError'\n });\n }\n}\nObject.defineProperty(ProviderDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4900\n});\nexport { ProviderDisconnectedError };\n/**\n * Subclass for an \"Chain Disconnected\" EIP-1193 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1193#provider-errors\n */\nclass ChainDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: ChainDisconnectedError.code,\n shortMessage: 'The Provider is not connected to the requested chain.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ChainDisconnectedError'\n });\n }\n}\nObject.defineProperty(ChainDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4901\n});\nexport { ChainDisconnectedError };\n/**\n * Subclass for an \"Switch Chain\" EIP-1193 error.\n *\n * EIP https://eips.ethereum.org/EIPS/eip-1193#provider-errors\n */\nclass SwitchChainError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: SwitchChainError.code,\n shortMessage: 'An error occurred when attempting to switch chain.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SwitchChainError'\n });\n }\n}\nObject.defineProperty(SwitchChainError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4902\n});\nexport { SwitchChainError };\n/**\n * Subclass for an unknown RPC error.\n */\nexport class UnknownRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n shortMessage: 'An unknown RPC error occurred.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownRpcError'\n });\n }\n}\n//# sourceMappingURL=rpc.js.map","import { ExecutionRevertedError, FeeCapTooHighError, FeeCapTooLowError, InsufficientFundsError, IntrinsicGasTooHighError, IntrinsicGasTooLowError, NonceMaxValueError, NonceTooHighError, NonceTooLowError, TipAboveFeeCapError, TransactionTypeNotSupportedError, UnknownNodeError, } from '../../errors/node.js';\nimport { RpcRequestError } from '../../errors/request.js';\nimport { InvalidInputRpcError, TransactionRejectedRpcError, } from '../../errors/rpc.js';\nexport function containsNodeError(err) {\n return (err instanceof TransactionRejectedRpcError ||\n err instanceof InvalidInputRpcError ||\n (err instanceof RpcRequestError && err.code === ExecutionRevertedError.code));\n}\nexport function getNodeError(err, args) {\n const message = err.details.toLowerCase();\n if (FeeCapTooHighError.nodeMessage.test(message))\n return new FeeCapTooHighError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n });\n else if (FeeCapTooLowError.nodeMessage.test(message))\n return new FeeCapTooLowError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n });\n else if (NonceTooHighError.nodeMessage.test(message))\n return new NonceTooHighError({ cause: err, nonce: args?.nonce });\n else if (NonceTooLowError.nodeMessage.test(message))\n return new NonceTooLowError({ cause: err, nonce: args?.nonce });\n else if (NonceMaxValueError.nodeMessage.test(message))\n return new NonceMaxValueError({ cause: err, nonce: args?.nonce });\n else if (InsufficientFundsError.nodeMessage.test(message))\n return new InsufficientFundsError({ cause: err });\n else if (IntrinsicGasTooHighError.nodeMessage.test(message))\n return new IntrinsicGasTooHighError({ cause: err, gas: args?.gas });\n else if (IntrinsicGasTooLowError.nodeMessage.test(message))\n return new IntrinsicGasTooLowError({ cause: err, gas: args?.gas });\n else if (TransactionTypeNotSupportedError.nodeMessage.test(message))\n return new TransactionTypeNotSupportedError({ cause: err });\n else if (TipAboveFeeCapError.nodeMessage.test(message))\n return new TipAboveFeeCapError({\n cause: err,\n maxFeePerGas: args?.maxFeePerGas,\n maxPriorityFeePerGas: args?.maxPriorityFeePerGas,\n });\n else if (message.match(ExecutionRevertedError.nodeMessage) ||\n ('code' in err.cause &&\n err.cause?.code === ExecutionRevertedError.code))\n return new ExecutionRevertedError({\n cause: err,\n message: err.cause.details || err.details,\n });\n return new UnknownNodeError({\n cause: err.cause.cause,\n });\n}\n//# sourceMappingURL=getNodeError.js.map","import { EstimateGasExecutionError } from '../../errors/estimateGas.js';\nimport { containsNodeError, getNodeError, } from './getNodeError.js';\nexport function getEstimateGasError(err, { docsPath, ...args }) {\n let cause = err;\n if (containsNodeError(err))\n cause = getNodeError(err, args);\n return new EstimateGasExecutionError(cause, {\n docsPath,\n ...args,\n });\n}\n//# sourceMappingURL=getEstimateGasError.js.map","/**\n * @description Picks out the keys from `value` that exist in the formatter.\n */\nexport function extract(value, { format }) {\n if (!format)\n return {};\n const keys = Object.keys(format({}));\n return keys.reduce((data, key) => {\n // rome-ignore lint/suspicious/noPrototypeBuiltins:\n if (value?.hasOwnProperty(key)) {\n data[key] = value[key];\n }\n return data;\n }, {});\n}\n//# sourceMappingURL=extract.js.map","import { numberToHex } from '../encoding/toHex.js';\nimport { defineFormatter } from './formatter.js';\nexport function formatTransactionRequest(transactionRequest) {\n return {\n ...transactionRequest,\n gas: typeof transactionRequest.gas !== 'undefined'\n ? numberToHex(transactionRequest.gas)\n : undefined,\n gasPrice: typeof transactionRequest.gasPrice !== 'undefined'\n ? numberToHex(transactionRequest.gasPrice)\n : undefined,\n maxFeePerGas: typeof transactionRequest.maxFeePerGas !== 'undefined'\n ? numberToHex(transactionRequest.maxFeePerGas)\n : undefined,\n maxPriorityFeePerGas: typeof transactionRequest.maxPriorityFeePerGas !== 'undefined'\n ? numberToHex(transactionRequest.maxPriorityFeePerGas)\n : undefined,\n nonce: typeof transactionRequest.nonce !== 'undefined'\n ? numberToHex(transactionRequest.nonce)\n : undefined,\n value: typeof transactionRequest.value !== 'undefined'\n ? numberToHex(transactionRequest.value)\n : undefined,\n };\n}\nexport const defineTransactionRequest = /*#__PURE__*/ defineFormatter('transactionRequest', formatTransactionRequest);\n//# sourceMappingURL=transactionRequest.js.map","import { parseAccount } from '../../accounts/utils/parseAccount.js';\nimport { InvalidAddressError } from '../../errors/address.js';\nimport { FeeCapTooHighError, TipAboveFeeCapError } from '../../errors/node.js';\nimport { FeeConflictError } from '../../errors/transaction.js';\nimport { isAddress } from '../address/isAddress.js';\nexport function assertRequest(args) {\n const { account: account_, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to, } = args;\n const account = account_ ? parseAccount(account_) : undefined;\n if (account && !isAddress(account.address))\n throw new InvalidAddressError({ address: account.address });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof gasPrice !== 'undefined' &&\n (typeof maxFeePerGas !== 'undefined' ||\n typeof maxPriorityFeePerGas !== 'undefined'))\n throw new FeeConflictError();\n if (maxFeePerGas && maxFeePerGas > 2n ** 256n - 1n)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas &&\n maxFeePerGas &&\n maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n}\n//# sourceMappingURL=assertRequest.js.map","import { BaseError } from './base.js';\nexport class BlockNotFoundError extends BaseError {\n constructor({ blockHash, blockNumber, }) {\n let identifier = 'Block';\n if (blockHash)\n identifier = `Block at hash \"${blockHash}\"`;\n if (blockNumber)\n identifier = `Block at number \"${blockNumber}\"`;\n super(`${identifier} could not be found.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'BlockNotFoundError'\n });\n }\n}\n//# sourceMappingURL=block.js.map","import { hexToNumber } from '../encoding/fromHex.js';\nimport { defineFormatter } from './formatter.js';\nexport const transactionType = {\n '0x0': 'legacy',\n '0x1': 'eip2930',\n '0x2': 'eip1559',\n};\nexport function formatTransaction(transaction) {\n const transaction_ = {\n ...transaction,\n blockHash: transaction.blockHash ? transaction.blockHash : null,\n blockNumber: transaction.blockNumber\n ? BigInt(transaction.blockNumber)\n : null,\n chainId: transaction.chainId ? hexToNumber(transaction.chainId) : undefined,\n gas: transaction.gas ? BigInt(transaction.gas) : undefined,\n gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : undefined,\n maxFeePerGas: transaction.maxFeePerGas\n ? BigInt(transaction.maxFeePerGas)\n : undefined,\n maxPriorityFeePerGas: transaction.maxPriorityFeePerGas\n ? BigInt(transaction.maxPriorityFeePerGas)\n : undefined,\n nonce: transaction.nonce ? hexToNumber(transaction.nonce) : undefined,\n to: transaction.to ? transaction.to : null,\n transactionIndex: transaction.transactionIndex\n ? Number(transaction.transactionIndex)\n : null,\n type: transaction.type ? transactionType[transaction.type] : undefined,\n typeHex: transaction.type ? transaction.type : undefined,\n value: transaction.value ? BigInt(transaction.value) : undefined,\n v: transaction.v ? BigInt(transaction.v) : undefined,\n };\n if (transaction_.type === 'legacy') {\n delete transaction_['accessList'];\n delete transaction_['maxFeePerGas'];\n delete transaction_['maxPriorityFeePerGas'];\n }\n if (transaction_.type === 'eip2930') {\n delete transaction_['maxFeePerGas'];\n delete transaction_['maxPriorityFeePerGas'];\n }\n return transaction_;\n}\nexport const defineTransaction = /*#__PURE__*/ defineFormatter('transaction', formatTransaction);\n//# sourceMappingURL=transaction.js.map","import { defineFormatter } from './formatter.js';\nimport { formatTransaction } from './transaction.js';\nexport function formatBlock(block) {\n const transactions = block.transactions?.map((transaction) => {\n if (typeof transaction === 'string')\n return transaction;\n return formatTransaction(transaction);\n });\n return {\n ...block,\n baseFeePerGas: block.baseFeePerGas ? BigInt(block.baseFeePerGas) : null,\n difficulty: block.difficulty ? BigInt(block.difficulty) : undefined,\n gasLimit: block.gasLimit ? BigInt(block.gasLimit) : undefined,\n gasUsed: block.gasUsed ? BigInt(block.gasUsed) : undefined,\n hash: block.hash ? block.hash : null,\n logsBloom: block.logsBloom ? block.logsBloom : null,\n nonce: block.nonce ? block.nonce : null,\n number: block.number ? BigInt(block.number) : null,\n size: block.size ? BigInt(block.size) : undefined,\n timestamp: block.timestamp ? BigInt(block.timestamp) : undefined,\n transactions,\n totalDifficulty: block.totalDifficulty\n ? BigInt(block.totalDifficulty)\n : null,\n };\n}\nexport const defineBlock = /*#__PURE__*/ defineFormatter('block', formatBlock);\n//# sourceMappingURL=block.js.map","import { BlockNotFoundError } from '../../errors/block.js';\nimport { numberToHex } from '../../utils/encoding/toHex.js';\nimport { formatBlock, } from '../../utils/formatters/block.js';\n/**\n * Returns information about a block at a block number, hash, or tag.\n *\n * - Docs: https://viem.sh/docs/actions/public/getBlock.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/fetching-blocks\n * - JSON-RPC Methods:\n * - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`.\n * - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`.\n *\n * @param client - Client to use\n * @param parameters - {@link GetBlockParameters}\n * @returns Information about the block. {@link GetBlockReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getBlock } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const block = await getBlock(client)\n */\nexport async function getBlock(client, { blockHash, blockNumber, blockTag: blockTag_, includeTransactions: includeTransactions_, } = {}) {\n const blockTag = blockTag_ ?? 'latest';\n const includeTransactions = includeTransactions_ ?? false;\n const blockNumberHex = blockNumber !== undefined ? numberToHex(blockNumber) : undefined;\n let block = null;\n if (blockHash) {\n block = await client.request({\n method: 'eth_getBlockByHash',\n params: [blockHash, includeTransactions],\n });\n }\n else {\n block = await client.request({\n method: 'eth_getBlockByNumber',\n params: [blockNumberHex || blockTag, includeTransactions],\n });\n }\n if (!block)\n throw new BlockNotFoundError({ blockHash, blockNumber });\n const format = client.chain?.formatters?.block?.format || formatBlock;\n return format(block);\n}\n//# sourceMappingURL=getBlock.js.map","/**\n * Returns the current price of gas (in wei).\n *\n * - Docs: https://viem.sh/docs/actions/public/getGasPrice.html\n * - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice)\n *\n * @param client - Client to use\n * @returns The gas price (in wei). {@link GetGasPriceReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getGasPrice } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const gasPrice = await getGasPrice(client)\n */\nexport async function getGasPrice(client) {\n const gasPrice = await client.request({\n method: 'eth_gasPrice',\n });\n return BigInt(gasPrice);\n}\n//# sourceMappingURL=getGasPrice.js.map","import { hexToNumber } from '../../utils/encoding/fromHex.js';\nimport { numberToHex } from '../../utils/encoding/toHex.js';\n/**\n * Returns the number of [Transactions](https://viem.sh/docs/glossary/terms.html#transaction) an Account has broadcast / sent.\n *\n * - Docs: https://viem.sh/docs/actions/public/getTransactionCount.html\n * - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount)\n *\n * @param client - Client to use\n * @param parameters - {@link GetTransactionCountParameters}\n * @returns The number of transactions an account has sent. {@link GetTransactionCountReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getTransactionCount } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const transactionCount = await getTransactionCount(client, {\n * address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * })\n */\nexport async function getTransactionCount(client, { address, blockTag = 'latest', blockNumber }) {\n const count = await client.request({\n method: 'eth_getTransactionCount',\n params: [address, blockNumber ? numberToHex(blockNumber) : blockTag],\n });\n return hexToNumber(count);\n}\n//# sourceMappingURL=getTransactionCount.js.map","import { parseAccount } from '../../accounts/utils/parseAccount.js';\nimport { estimateGas, } from '../../actions/public/estimateGas.js';\nimport { getBlock } from '../../actions/public/getBlock.js';\nimport { getGasPrice } from '../../actions/public/getGasPrice.js';\nimport { getTransactionCount } from '../../actions/public/getTransactionCount.js';\nimport { AccountNotFoundError } from '../../errors/account.js';\nimport { BaseError } from '../../errors/base.js';\nimport { assertRequest } from './assertRequest.js';\nexport async function prepareRequest(client, args) {\n const { account: account_, chain = client.chain, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, } = args;\n if (!account_)\n throw new AccountNotFoundError();\n const account = parseAccount(account_);\n const block = await getBlock(client, { blockTag: 'latest' });\n const request = { ...args, from: account.address };\n if (typeof nonce === 'undefined')\n request.nonce = await getTransactionCount(client, {\n address: account.address,\n blockTag: 'pending',\n });\n if (typeof block.baseFeePerGas === 'bigint' &&\n typeof gasPrice === 'undefined') {\n let defaultPriorityFee = 1500000000n; // 1.5 gwei\n if (typeof chain?.fees?.defaultPriorityFee !== 'undefined') {\n defaultPriorityFee =\n typeof chain.fees.defaultPriorityFee === 'bigint'\n ? chain.fees.defaultPriorityFee\n : await chain.fees.defaultPriorityFee({\n block,\n request: request,\n });\n }\n // EIP-1559 fees\n if (typeof maxFeePerGas === 'undefined') {\n // Set a buffer of 1.2x on top of the base fee to account for fluctuations.\n request.maxPriorityFeePerGas = maxPriorityFeePerGas ?? defaultPriorityFee;\n request.maxFeePerGas =\n (block.baseFeePerGas * 120n) / 100n + request.maxPriorityFeePerGas;\n }\n else {\n if (typeof maxPriorityFeePerGas === 'undefined' &&\n maxFeePerGas < defaultPriorityFee)\n throw new BaseError('`maxFeePerGas` cannot be less than the default `maxPriorityFeePerGas` (1.5 gwei).');\n request.maxFeePerGas = maxFeePerGas;\n request.maxPriorityFeePerGas = maxPriorityFeePerGas ?? defaultPriorityFee;\n }\n }\n else if (typeof gasPrice === 'undefined') {\n // Legacy fees\n if (typeof maxFeePerGas !== 'undefined' ||\n typeof maxPriorityFeePerGas !== 'undefined')\n throw new BaseError('Chain does not support EIP-1559 fees.');\n // Set a buffer of 1.2x on top of the base fee to account for fluctuations.\n request.gasPrice = ((await getGasPrice(client)) * 120n) / 100n;\n }\n if (typeof gas === 'undefined')\n request.gas = await estimateGas(client, {\n ...request,\n account: { address: account.address, type: 'json-rpc' },\n });\n assertRequest(request);\n return request;\n}\n//# sourceMappingURL=prepareRequest.js.map","import { parseAccount } from '../../accounts/utils/parseAccount.js';\nimport { AccountNotFoundError } from '../../errors/account.js';\nimport { numberToHex } from '../../utils/encoding/toHex.js';\nimport { getEstimateGasError } from '../../utils/errors/getEstimateGasError.js';\nimport { extract } from '../../utils/formatters/extract.js';\nimport { formatTransactionRequest, } from '../../utils/formatters/transactionRequest.js';\nimport { assertRequest, } from '../../utils/transaction/assertRequest.js';\nimport { prepareRequest, } from '../../utils/transaction/prepareRequest.js';\n/**\n * Estimates the gas necessary to complete a transaction without submitting it to the network.\n *\n * - Docs: https://viem.sh/docs/actions/public/estimateGas.html\n * - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas)\n *\n * @param client - Client to use\n * @param parameters - {@link EstimateGasParameters}\n * @returns The gas estimate (in wei). {@link EstimateGasReturnType}\n *\n * @example\n * import { createPublicClient, http, parseEther } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { estimateGas } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const gasEstimate = await estimateGas(client, {\n * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * value: parseEther('1'),\n * })\n */\nexport async function estimateGas(client, args) {\n const account_ = args.account ?? client.account;\n if (!account_)\n throw new AccountNotFoundError({\n docsPath: '/docs/actions/public/estimateGas',\n });\n const account = parseAccount(account_);\n try {\n const { accessList, blockNumber, blockTag, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, ...rest } = account.type === 'local'\n ? (await prepareRequest(client, args))\n : args;\n const blockNumberHex = blockNumber ? numberToHex(blockNumber) : undefined;\n const block = blockNumberHex || blockTag;\n assertRequest(args);\n const format = client.chain?.formatters?.transactionRequest?.format ||\n formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format }),\n from: account.address,\n accessList,\n data,\n gas,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n });\n const balance = await client.request({\n method: 'eth_estimateGas',\n params: block ? [request, block] : [request],\n });\n return BigInt(balance);\n }\n catch (err) {\n throw getEstimateGasError(err, {\n ...args,\n account,\n chain: client.chain,\n });\n }\n}\n//# sourceMappingURL=estimateGas.js.map","import { parseAccount } from '../../accounts/utils/parseAccount.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getContractError } from '../../utils/errors/getContractError.js';\nimport { estimateGas } from './estimateGas.js';\n/**\n * Estimates the gas required to successfully execute a contract write function call.\n *\n * - Docs: https://viem.sh/docs/contract/estimateContractGas.html\n *\n * Internally, uses a [Public Client](https://viem.sh/docs/clients/public.html) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).\n *\n * @param client - Client to use\n * @param parameters - {@link EstimateContractGasParameters}\n * @returns The gas estimate (in wei). {@link EstimateContractGasReturnType}\n *\n * @example\n * import { createPublicClient, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { estimateContractGas } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const gas = await estimateContractGas(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi(['function mint() public']),\n * functionName: 'mint',\n * account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',\n * })\n */\nexport async function estimateContractGas(client, { abi, address, args, functionName, ...request }) {\n const data = encodeFunctionData({\n abi,\n args,\n functionName,\n });\n try {\n const gas = await estimateGas(client, {\n data,\n to: address,\n ...request,\n });\n return gas;\n }\n catch (err) {\n const account = request.account ? parseAccount(request.account) : undefined;\n throw getContractError(err, {\n abi: abi,\n address,\n args,\n docsPath: '/docs/contract/estimateContractGas',\n functionName,\n sender: account?.address,\n });\n }\n}\n//# sourceMappingURL=estimateContractGas.js.map","import { AbiFunctionNotFoundError, AbiFunctionOutputsNotFoundError, } from '../../errors/abi.js';\nimport { decodeAbiParameters } from './decodeAbiParameters.js';\nimport { getAbiItem } from './getAbiItem.js';\nconst docsPath = '/docs/contract/decodeFunctionResult';\nexport function decodeFunctionResult({ abi, args, functionName, data, }) {\n let abiItem = abi[0];\n if (functionName) {\n abiItem = getAbiItem({\n abi,\n args,\n name: functionName,\n });\n if (!abiItem)\n throw new AbiFunctionNotFoundError(functionName, { docsPath });\n }\n if (abiItem.type !== 'function')\n throw new AbiFunctionNotFoundError(undefined, { docsPath });\n if (!abiItem.outputs)\n throw new AbiFunctionOutputsNotFoundError(abiItem.name, { docsPath });\n const values = decodeAbiParameters(abiItem.outputs, data);\n if (values && values.length > 1)\n return values;\n if (values && values.length === 1)\n return values[0];\n return undefined;\n}\n//# sourceMappingURL=decodeFunctionResult.js.map","/* [Multicall3](https://github.com/mds1/multicall) */\nexport const multicall3Abi = [\n {\n inputs: [\n {\n components: [\n {\n name: 'target',\n type: 'address',\n },\n {\n name: 'allowFailure',\n type: 'bool',\n },\n {\n name: 'callData',\n type: 'bytes',\n },\n ],\n name: 'calls',\n type: 'tuple[]',\n },\n ],\n name: 'aggregate3',\n outputs: [\n {\n components: [\n {\n name: 'success',\n type: 'bool',\n },\n {\n name: 'returnData',\n type: 'bytes',\n },\n ],\n name: 'returnData',\n type: 'tuple[]',\n },\n ],\n stateMutability: 'view',\n type: 'function',\n },\n];\nconst universalResolverErrors = [\n {\n inputs: [],\n name: 'ResolverNotFound',\n type: 'error',\n },\n {\n inputs: [],\n name: 'ResolverWildcardNotSupported',\n type: 'error',\n },\n];\nexport const universalResolverResolveAbi = [\n ...universalResolverErrors,\n {\n name: 'resolve',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'name', type: 'bytes' },\n { name: 'data', type: 'bytes' },\n ],\n outputs: [\n { name: '', type: 'bytes' },\n { name: 'address', type: 'address' },\n ],\n },\n];\nexport const universalResolverReverseAbi = [\n ...universalResolverErrors,\n {\n name: 'reverse',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes', name: 'reverseName' }],\n outputs: [\n { type: 'string', name: 'resolvedName' },\n { type: 'address', name: 'resolvedAddress' },\n { type: 'address', name: 'reverseResolver' },\n { type: 'address', name: 'resolver' },\n ],\n },\n];\nexport const textResolverAbi = [\n {\n name: 'text',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'name', type: 'bytes32' },\n { name: 'key', type: 'string' },\n ],\n outputs: [{ name: '', type: 'string' }],\n },\n];\nexport const addressResolverAbi = [\n {\n name: 'addr',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ name: 'name', type: 'bytes32' }],\n outputs: [{ name: '', type: 'address' }],\n },\n {\n name: 'addr',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'name', type: 'bytes32' },\n { name: 'coinType', type: 'uint256' },\n ],\n outputs: [{ name: '', type: 'bytes' }],\n },\n];\n// ERC-1271\n// isValidSignature(bytes32 hash, bytes signature) → bytes4 magicValue\nexport const smartAccountAbi = [\n {\n name: 'isValidSignature',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { name: 'hash', type: 'bytes32' },\n { name: 'signature', type: 'bytes' },\n ],\n outputs: [{ name: '', type: 'bytes4' }],\n },\n];\n// ERC-6492 - universal deployless signature validator contract\n// constructor(address _signer, bytes32 _hash, bytes _signature) → bytes4 returnValue\n// returnValue is either 0x1 (valid) or 0x0 (invalid)\nexport const universalSignatureValidatorAbi = [\n {\n inputs: [\n {\n internalType: 'address',\n name: '_signer',\n type: 'address',\n },\n {\n internalType: 'bytes32',\n name: '_hash',\n type: 'bytes32',\n },\n {\n internalType: 'bytes',\n name: '_signature',\n type: 'bytes',\n },\n ],\n stateMutability: 'nonpayable',\n type: 'constructor',\n },\n];\n//# sourceMappingURL=abis.js.map","export const aggregate3Signature = '0x82ad56cb';\n//# sourceMappingURL=contract.js.map","import { BaseError } from './base.js';\nexport class ChainDoesNotSupportContract extends BaseError {\n constructor({ blockNumber, chain, contract, }) {\n super(`Chain \"${chain.name}\" does not support contract \"${contract.name}\".`, {\n metaMessages: [\n 'This could be due to any of the following:',\n ...(blockNumber &&\n contract.blockCreated &&\n contract.blockCreated > blockNumber\n ? [\n `- The contract \"${contract.name}\" was not deployed until block ${contract.blockCreated} (current block ${blockNumber}).`,\n ]\n : [\n `- The chain does not have the contract \"${contract.name}\" configured.`,\n ]),\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ChainDoesNotSupportContract'\n });\n }\n}\nexport class ChainMismatchError extends BaseError {\n constructor({ chain, currentChainId, }) {\n super(`The current chain of the wallet (id: ${currentChainId}) does not match the target chain for the transaction (id: ${chain.id} – ${chain.name}).`, {\n metaMessages: [\n `Current Chain ID: ${currentChainId}`,\n `Expected Chain ID: ${chain.id} – ${chain.name}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ChainMismatchError'\n });\n }\n}\nexport class ChainNotFoundError extends BaseError {\n constructor() {\n super([\n 'No chain was provided to the request.',\n 'Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.',\n ].join('\\n'));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ChainNotFoundError'\n });\n }\n}\nexport class ClientChainNotConfiguredError extends BaseError {\n constructor() {\n super('No chain was provided to the Client.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ClientChainNotConfiguredError'\n });\n }\n}\nexport class InvalidChainIdError extends BaseError {\n constructor({ chainId }) {\n super(`Chain ID \"${chainId}\" is invalid.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidChainIdError'\n });\n }\n}\n//# sourceMappingURL=chain.js.map","import { ChainDoesNotSupportContract, ChainMismatchError, ChainNotFoundError, } from '../errors/chain.js';\nexport function assertCurrentChain({ chain, currentChainId, }) {\n if (!chain)\n throw new ChainNotFoundError();\n if (currentChainId !== chain.id)\n throw new ChainMismatchError({ chain, currentChainId });\n}\nexport function defineChain(chain, config = {}) {\n const { fees = chain.fees, formatters = chain.formatters, serializers = chain.serializers, } = config;\n return {\n ...chain,\n fees,\n formatters,\n serializers,\n };\n}\nexport function getChainContractAddress({ blockNumber, chain, contract: name, }) {\n const contract = chain?.contracts?.[name];\n if (!contract)\n throw new ChainDoesNotSupportContract({\n chain,\n contract: { name },\n });\n if (blockNumber &&\n contract.blockCreated &&\n contract.blockCreated > blockNumber)\n throw new ChainDoesNotSupportContract({\n blockNumber,\n chain,\n contract: {\n name,\n blockCreated: contract.blockCreated,\n },\n });\n return contract.address;\n}\n//# sourceMappingURL=chain.js.map","import { CallExecutionError } from '../../errors/contract.js';\nimport { containsNodeError, getNodeError, } from './getNodeError.js';\nexport function getCallError(err, { docsPath, ...args }) {\n let cause = err;\n if (containsNodeError(err))\n cause = getNodeError(err, args);\n return new CallExecutionError(cause, {\n docsPath,\n ...args,\n });\n}\n//# sourceMappingURL=getCallError.js.map","const schedulerCache = /*#__PURE__*/ new Map();\nexport function createBatchScheduler({ fn, id, shouldSplitBatch, wait = 0, }) {\n const exec = async () => {\n const scheduler = getScheduler();\n flush();\n const args = scheduler.map(({ args }) => args);\n if (args.length === 0)\n return;\n fn(args)\n .then((data) => {\n scheduler.forEach(({ pendingPromise }, i) => pendingPromise.resolve?.([data[i], data]));\n })\n .catch((err) => {\n scheduler.forEach(({ pendingPromise }) => pendingPromise.reject?.(err));\n });\n };\n const flush = () => schedulerCache.delete(id);\n const getBatchedArgs = () => getScheduler().map(({ args }) => args);\n const getScheduler = () => schedulerCache.get(id) || [];\n const setScheduler = (item) => schedulerCache.set(id, [...getScheduler(), item]);\n return {\n flush,\n async schedule(args) {\n const pendingPromise = {};\n const promise = new Promise((resolve, reject) => {\n pendingPromise.resolve = resolve;\n pendingPromise.reject = reject;\n });\n const split = shouldSplitBatch?.([...getBatchedArgs(), args]);\n if (split)\n exec();\n const hasActiveScheduler = getScheduler().length > 0;\n if (hasActiveScheduler) {\n setScheduler({ args, pendingPromise });\n return promise;\n }\n setScheduler({ args, pendingPromise });\n setTimeout(exec, wait);\n return promise;\n },\n };\n}\n//# sourceMappingURL=createBatchScheduler.js.map","import { parseAccount } from '../../accounts/utils/parseAccount.js';\nimport { multicall3Abi } from '../../constants/abis.js';\nimport { aggregate3Signature } from '../../constants/contract.js';\nimport { BaseError } from '../../errors/base.js';\nimport { ChainDoesNotSupportContract, ClientChainNotConfiguredError, } from '../../errors/chain.js';\nimport { RawContractError } from '../../errors/contract.js';\nimport { decodeFunctionResult } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeFunctionData } from '../../utils/abi/encodeFunctionData.js';\nimport { getChainContractAddress } from '../../utils/chain.js';\nimport { numberToHex } from '../../utils/encoding/toHex.js';\nimport { getCallError } from '../../utils/errors/getCallError.js';\nimport { extract } from '../../utils/formatters/extract.js';\nimport { formatTransactionRequest, } from '../../utils/formatters/transactionRequest.js';\nimport { createBatchScheduler } from '../../utils/promise/createBatchScheduler.js';\nimport { assertRequest } from '../../utils/transaction/assertRequest.js';\n/**\n * Executes a new message call immediately without submitting a transaction to the network.\n *\n * - Docs: https://viem.sh/docs/actions/public/call.html\n * - JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call)\n *\n * @param client - Client to use\n * @param parameters - {@link CallParameters}\n * @returns The call data. {@link CallReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { call } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const data = await call(client, {\n * account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',\n * data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * })\n */\nexport async function call(client, args) {\n const { account: account_, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = 'latest', accessList, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, ...rest } = args;\n const account = account_ ? parseAccount(account_) : undefined;\n try {\n assertRequest(args);\n const blockNumberHex = blockNumber ? numberToHex(blockNumber) : undefined;\n const block = blockNumberHex || blockTag;\n const format = client.chain?.formatters?.transactionRequest?.format ||\n formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format }),\n from: account?.address,\n accessList,\n data,\n gas,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n });\n if (batch && shouldPerformMulticall({ request })) {\n try {\n return await scheduleMulticall(client, {\n ...request,\n blockNumber,\n blockTag,\n });\n }\n catch (err) {\n if (!(err instanceof ClientChainNotConfiguredError) &&\n !(err instanceof ChainDoesNotSupportContract))\n throw err;\n }\n }\n const response = await client.request({\n method: 'eth_call',\n params: block\n ? [request, block]\n : [request],\n });\n if (response === '0x')\n return { data: undefined };\n return { data: response };\n }\n catch (err) {\n const data = getRevertErrorData(err);\n const { offchainLookup, offchainLookupSignature } = await import('../../utils/ccip.js');\n if (data?.slice(0, 10) === offchainLookupSignature && to) {\n return { data: await offchainLookup(client, { data, to }) };\n }\n throw getCallError(err, {\n ...args,\n account,\n chain: client.chain,\n });\n }\n}\n// We only want to perform a scheduled multicall if:\n// - The request has calldata,\n// - The request has a target address,\n// - The target address is not already the aggregate3 signature,\n// - The request has no other properties (`nonce`, `gas`, etc cannot be sent with a multicall).\nfunction shouldPerformMulticall({ request }) {\n const { data, to, ...request_ } = request;\n if (!data)\n return false;\n if (data.startsWith(aggregate3Signature))\n return false;\n if (!to)\n return false;\n if (Object.values(request_).filter((x) => typeof x !== 'undefined').length > 0)\n return false;\n return true;\n}\nasync function scheduleMulticall(client, args) {\n const { batchSize = 1024, wait = 0 } = typeof client.batch?.multicall === 'object' ? client.batch.multicall : {};\n const { blockNumber, blockTag = 'latest', data, multicallAddress: multicallAddress_, to, } = args;\n let multicallAddress = multicallAddress_;\n if (!multicallAddress) {\n if (!client.chain)\n throw new ClientChainNotConfiguredError();\n multicallAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'multicall3',\n });\n }\n const blockNumberHex = blockNumber ? numberToHex(blockNumber) : undefined;\n const block = blockNumberHex || blockTag;\n const { schedule } = createBatchScheduler({\n id: `${client.uid}.${block}`,\n wait,\n shouldSplitBatch(args) {\n const size = args.reduce((size, { data }) => size + (data.length - 2), 0);\n return size > batchSize * 2;\n },\n fn: async (requests) => {\n const calls = requests.map((request) => ({\n allowFailure: true,\n callData: request.data,\n target: request.to,\n }));\n const calldata = encodeFunctionData({\n abi: multicall3Abi,\n args: [calls],\n functionName: 'aggregate3',\n });\n const data = await client.request({\n method: 'eth_call',\n params: [\n {\n data: calldata,\n to: multicallAddress,\n },\n block,\n ],\n });\n return decodeFunctionResult({\n abi: multicall3Abi,\n args: [calls],\n functionName: 'aggregate3',\n data: data || '0x',\n });\n },\n });\n const [{ returnData, success }] = await schedule({ data, to });\n if (!success)\n throw new RawContractError({ data: returnData });\n if (returnData === '0x')\n return { data: undefined };\n return { data: returnData };\n}\nexport function getRevertErrorData(err) {\n if (!(err instanceof BaseError))\n return undefined;\n const error = err.walk();\n return typeof error.data === 'object' ? error.data.data : error.data;\n}\n//# sourceMappingURL=call.js.map","import { decodeFunctionResult, } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getContractError } from '../../utils/errors/getContractError.js';\nimport { call } from './call.js';\n/**\n * Calls a read-only function on a contract, and returns the response.\n *\n * - Docs: https://viem.sh/docs/contract/readContract.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/reading-contracts\n *\n * A \"read-only\" function (constant function) on a Solidity contract is denoted by a `view` or `pure` keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas.\n *\n * Internally, uses a [Public Client](https://viem.sh/docs/clients/public.html) to call the [`call` action](https://viem.sh/docs/actions/public/call.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).\n *\n * @param client - Client to use\n * @param parameters - {@link ReadContractParameters}\n * @returns The response from the contract. Type is inferred. {@link ReadContractReturnType}\n *\n * @example\n * import { createPublicClient, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { readContract } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const result = await readContract(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi(['function balanceOf(address) view returns (uint256)']),\n * functionName: 'balanceOf',\n * args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],\n * })\n * // 424122n\n */\nexport async function readContract(client, { abi, address, args, functionName, ...callRequest }) {\n const calldata = encodeFunctionData({\n abi,\n args,\n functionName,\n });\n try {\n const { data } = await call(client, {\n data: calldata,\n to: address,\n ...callRequest,\n });\n return decodeFunctionResult({\n abi,\n args,\n functionName,\n data: data || '0x',\n });\n }\n catch (err) {\n throw getContractError(err, {\n abi: abi,\n address,\n args,\n docsPath: '/docs/contract/readContract',\n functionName,\n });\n }\n}\n//# sourceMappingURL=readContract.js.map","import { parseAccount } from '../../accounts/utils/parseAccount.js';\nimport { decodeFunctionResult, } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getContractError } from '../../utils/errors/getContractError.js';\nimport { call } from './call.js';\n/**\n * Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions.\n *\n * - Docs: https://viem.sh/docs/contract/simulateContract.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/writing-to-contracts\n *\n * This function does not require gas to execute and _**does not**_ change the state of the blockchain. It is almost identical to [`readContract`](https://viem.sh/docs/contract/readContract.html), but also supports contract write functions.\n *\n * Internally, uses a [Public Client](https://viem.sh/docs/clients/public.html) to call the [`call` action](https://viem.sh/docs/actions/public/call.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).\n *\n * @param client - Client to use\n * @param parameters - {@link SimulateContractParameters}\n * @returns The simulation result and write request. {@link SimulateContractReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { simulateContract } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const result = await simulateContract(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi(['function mint(uint32) view returns (uint32)']),\n * functionName: 'mint',\n * args: ['69420'],\n * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * })\n */\nexport async function simulateContract(client, { abi, address, args, dataSuffix, functionName, ...callRequest }) {\n const account = callRequest.account\n ? parseAccount(callRequest.account)\n : undefined;\n const calldata = encodeFunctionData({\n abi,\n args,\n functionName,\n });\n try {\n const { data } = await call(client, {\n batch: false,\n data: `${calldata}${dataSuffix ? dataSuffix.replace('0x', '') : ''}`,\n to: address,\n ...callRequest,\n });\n const result = decodeFunctionResult({\n abi,\n args,\n functionName,\n data: data || '0x',\n });\n return {\n result,\n request: {\n abi,\n address,\n args,\n dataSuffix,\n functionName,\n ...callRequest,\n },\n };\n }\n catch (err) {\n throw getContractError(err, {\n abi: abi,\n address,\n args,\n docsPath: '/docs/contract/simulateContract',\n functionName,\n sender: account?.address,\n });\n }\n}\n//# sourceMappingURL=simulateContract.js.map","export const listenersCache = /*#__PURE__*/ new Map();\nexport const cleanupCache = /*#__PURE__*/ new Map();\nlet callbackCount = 0;\n/**\n * @description Sets up an observer for a given function. If another function\n * is set up under the same observer id, the function will only be called once\n * for both instances of the observer.\n */\nexport function observe(observerId, callbacks, fn) {\n const callbackId = ++callbackCount;\n const getListeners = () => listenersCache.get(observerId) || [];\n const unsubscribe = () => {\n const listeners = getListeners();\n listenersCache.set(observerId, listeners.filter((cb) => cb.id !== callbackId));\n };\n const unwatch = () => {\n const cleanup = cleanupCache.get(observerId);\n if (getListeners().length === 1 && cleanup)\n cleanup();\n unsubscribe();\n };\n const listeners = getListeners();\n listenersCache.set(observerId, [\n ...listeners,\n { id: callbackId, fns: callbacks },\n ]);\n if (listeners && listeners.length > 0)\n return unwatch;\n const emit = {};\n for (const key in callbacks) {\n emit[key] = ((...args) => {\n const listeners = getListeners();\n if (listeners.length === 0)\n return;\n listeners.forEach((listener) => listener.fns[key]?.(...args));\n });\n }\n const cleanup = fn(emit);\n if (typeof cleanup === 'function')\n cleanupCache.set(observerId, cleanup);\n return unwatch;\n}\n//# sourceMappingURL=observe.js.map","export async function wait(time) {\n return new Promise((res) => setTimeout(res, time));\n}\n//# sourceMappingURL=wait.js.map","import { wait } from './wait.js';\n/**\n * @description Polls a function at a specified interval.\n */\nexport function poll(fn, { emitOnBegin, initialWaitTime, interval }) {\n let active = true;\n const unwatch = () => (active = false);\n const watch = async () => {\n let data;\n if (emitOnBegin)\n data = await fn({ unpoll: unwatch });\n const initialWait = (await initialWaitTime?.(data)) ?? interval;\n await wait(initialWait);\n const poll = async () => {\n if (!active)\n return;\n await fn({ unpoll: unwatch });\n await wait(interval);\n poll();\n };\n poll();\n };\n watch();\n return unwatch;\n}\n//# sourceMappingURL=poll.js.map","export const promiseCache = /*#__PURE__*/ new Map();\nexport const responseCache = /*#__PURE__*/ new Map();\nexport function getCache(cacheKey) {\n const buildCache = (cacheKey, cache) => ({\n clear: () => cache.delete(cacheKey),\n get: () => cache.get(cacheKey),\n set: (data) => cache.set(cacheKey, data),\n });\n const promise = buildCache(cacheKey, promiseCache);\n const response = buildCache(cacheKey, responseCache);\n return {\n clear: () => {\n promise.clear();\n response.clear();\n },\n promise,\n response,\n };\n}\n/**\n * @description Returns the result of a given promise, and caches the result for\n * subsequent invocations against a provided cache key.\n */\nexport async function withCache(fn, { cacheKey, cacheTime = Infinity }) {\n const cache = getCache(cacheKey);\n // If a response exists in the cache, and it's not expired, return it\n // and do not invoke the promise.\n // If the max age is 0, the cache is disabled.\n const response = cache.response.get();\n if (response && cacheTime > 0) {\n const age = new Date().getTime() - response.created.getTime();\n if (age < cacheTime)\n return response.data;\n }\n let promise = cache.promise.get();\n if (!promise) {\n promise = fn();\n // Store the promise in the cache so that subsequent invocations\n // will wait for the same promise to resolve (deduping).\n cache.promise.set(promise);\n }\n try {\n const data = await promise;\n // Store the response in the cache so that subsequent invocations\n // will return the same response.\n cache.response.set({ created: new Date(), data });\n return data;\n }\n finally {\n // Clear the promise cache so that subsequent invocations will\n // invoke the promise again.\n cache.promise.clear();\n }\n}\n//# sourceMappingURL=withCache.js.map","import { getCache, withCache } from '../../utils/promise/withCache.js';\nconst cacheKey = (id) => `blockNumber.${id}`;\nexport function getBlockNumberCache(id) {\n return getCache(cacheKey(id));\n}\n/**\n * Returns the number of the most recent block seen.\n *\n * - Docs: https://viem.sh/docs/actions/public/getBlockNumber.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/fetching-blocks\n * - JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber)\n *\n * @param client - Client to use\n * @param parameters - {@link GetBlockNumberParameters}\n * @returns The number of the block. {@link GetBlockNumberReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getBlockNumber } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const blockNumber = await getBlockNumber(client)\n * // 69420n\n */\nexport async function getBlockNumber(client, { cacheTime = client.cacheTime, maxAge } = {}) {\n const blockNumberHex = await withCache(() => client.request({\n method: 'eth_blockNumber',\n }), { cacheKey: cacheKey(client.uid), cacheTime: maxAge ?? cacheTime });\n return BigInt(blockNumberHex);\n}\n//# sourceMappingURL=getBlockNumber.js.map","import { AbiDecodingDataSizeTooSmallError, AbiEventSignatureEmptyTopicsError, AbiEventSignatureNotFoundError, DecodeLogDataMismatch, DecodeLogTopicsMismatch, } from '../../errors/abi.js';\nimport { getEventSelector } from '../hash/getEventSelector.js';\nimport { decodeAbiParameters } from './decodeAbiParameters.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nconst docsPath = '/docs/contract/decodeEventLog';\nexport function decodeEventLog({ abi, data, strict: strict_, topics, }) {\n const strict = strict_ ?? true;\n const [signature, ...argTopics] = topics;\n if (!signature)\n throw new AbiEventSignatureEmptyTopicsError({\n docsPath,\n });\n const abiItem = abi.find((x) => x.type === 'event' &&\n signature === getEventSelector(formatAbiItem(x)));\n if (!(abiItem && 'name' in abiItem) || abiItem.type !== 'event')\n throw new AbiEventSignatureNotFoundError(signature, {\n docsPath,\n });\n const { name, inputs } = abiItem;\n const isUnnamed = inputs?.some((x) => !('name' in x && x.name));\n let args = isUnnamed ? [] : {};\n // Decode topics (indexed args).\n const indexedInputs = inputs.filter((x) => 'indexed' in x && x.indexed);\n if (argTopics.length > 0) {\n for (let i = 0; i < indexedInputs.length; i++) {\n const param = indexedInputs[i];\n const topic = argTopics[i];\n if (!topic)\n throw new DecodeLogTopicsMismatch({\n abiItem,\n param: param,\n });\n args[param.name || i] = decodeTopic({ param, value: topic });\n }\n }\n // Decode data (non-indexed args).\n const nonIndexedInputs = inputs.filter((x) => !('indexed' in x && x.indexed));\n if (nonIndexedInputs.length > 0) {\n if (data && data !== '0x') {\n try {\n const decodedData = decodeAbiParameters(nonIndexedInputs, data);\n if (decodedData) {\n if (isUnnamed)\n args = [...args, ...decodedData];\n else {\n for (let i = 0; i < nonIndexedInputs.length; i++) {\n args[nonIndexedInputs[i].name] = decodedData[i];\n }\n }\n }\n }\n catch (err) {\n if (strict) {\n if (err instanceof AbiDecodingDataSizeTooSmallError)\n throw new DecodeLogDataMismatch({\n abiItem,\n data: err.data,\n params: err.params,\n size: err.size,\n });\n throw err;\n }\n }\n }\n else if (strict) {\n throw new DecodeLogDataMismatch({\n abiItem,\n data: '0x',\n params: nonIndexedInputs,\n size: 0,\n });\n }\n }\n return {\n eventName: name,\n args: Object.values(args).length > 0 ? args : undefined,\n };\n}\nfunction decodeTopic({ param, value }) {\n if (param.type === 'string' ||\n param.type === 'bytes' ||\n param.type === 'tuple' ||\n param.type.match(/^(.*)\\[(\\d+)?\\]$/))\n return value;\n const decodedArg = decodeAbiParameters([param], value) || [];\n return decodedArg[0];\n}\n//# sourceMappingURL=decodeEventLog.js.map","export function formatLog(log, { args, eventName } = {}) {\n return {\n ...log,\n blockHash: log.blockHash ? log.blockHash : null,\n blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,\n logIndex: log.logIndex ? Number(log.logIndex) : null,\n transactionHash: log.transactionHash ? log.transactionHash : null,\n transactionIndex: log.transactionIndex\n ? Number(log.transactionIndex)\n : null,\n ...(eventName ? { args, eventName } : {}),\n };\n}\n//# sourceMappingURL=log.js.map","import { DecodeLogDataMismatch, DecodeLogTopicsMismatch, } from '../../errors/abi.js';\nimport { decodeEventLog } from '../../utils/abi/decodeEventLog.js';\nimport { formatLog } from '../../utils/formatters/log.js';\n/**\n * Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called.\n *\n * - Docs: https://viem.sh/docs/actions/public/getFilterChanges.html\n * - JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges)\n *\n * A Filter can be created from the following actions:\n *\n * - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter.html)\n * - [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter.html)\n * - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter.html)\n * - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter.html)\n *\n * Depending on the type of filter, the return value will be different:\n *\n * - If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs.\n * - If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes.\n * - If the filter was created with `createBlockFilter`, it returns a list of block hashes.\n *\n * @param client - Client to use\n * @param parameters - {@link GetFilterChangesParameters}\n * @returns Logs or hashes. {@link GetFilterChangesReturnType}\n *\n * @example\n * // Blocks\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { createBlockFilter, getFilterChanges } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const filter = await createBlockFilter(client)\n * const hashes = await getFilterChanges(client, { filter })\n *\n * @example\n * // Contract Events\n * import { createPublicClient, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { createContractEventFilter, getFilterChanges } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const filter = await createContractEventFilter(client, {\n * address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n * abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']),\n * eventName: 'Transfer',\n * })\n * const logs = await getFilterChanges(client, { filter })\n *\n * @example\n * // Raw Events\n * import { createPublicClient, http, parseAbiItem } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { createEventFilter, getFilterChanges } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const filter = await createEventFilter(client, {\n * address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n * event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'),\n * })\n * const logs = await getFilterChanges(client, { filter })\n *\n * @example\n * // Transactions\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { createPendingTransactionFilter, getFilterChanges } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const filter = await createPendingTransactionFilter(client)\n * const hashes = await getFilterChanges(client, { filter })\n */\nexport async function getFilterChanges(_client, { filter, }) {\n const strict = 'strict' in filter && filter.strict;\n const logs = await filter.request({\n method: 'eth_getFilterChanges',\n params: [filter.id],\n });\n return logs\n .map((log) => {\n if (typeof log === 'string')\n return log;\n try {\n const { eventName, args } = 'abi' in filter && filter.abi\n ? decodeEventLog({\n abi: filter.abi,\n data: log.data,\n topics: log.topics,\n strict,\n })\n : { eventName: undefined, args: undefined };\n return formatLog(log, { args, eventName });\n }\n catch (err) {\n let eventName;\n let isUnnamed;\n if (err instanceof DecodeLogDataMismatch ||\n err instanceof DecodeLogTopicsMismatch) {\n // If strict mode is on, and log data/topics do not match event definition, skip.\n if ('strict' in filter && filter.strict)\n return;\n eventName = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x) => !('name' in x && x.name));\n }\n // Set args undefined if there is an error decoding (e.g. indexed/non-indexed params mismatch).\n return formatLog(log, { args: isUnnamed ? [] : {}, eventName });\n }\n })\n .filter(Boolean);\n}\n//# sourceMappingURL=getFilterChanges.js.map","import { DecodeLogDataMismatch, DecodeLogTopicsMismatch, } from '../../errors/abi.js';\nimport { decodeEventLog } from '../../utils/abi/decodeEventLog.js';\nimport { encodeEventTopics, } from '../../utils/abi/encodeEventTopics.js';\nimport { numberToHex } from '../../utils/encoding/toHex.js';\nimport { formatLog } from '../../utils/formatters/log.js';\n/**\n * Returns a list of event logs matching the provided parameters.\n *\n * - Docs: https://viem.sh/docs/actions/public/getLogs.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/filters-and-logs/event-logs\n * - JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs)\n *\n * @param client - Client to use\n * @param parameters - {@link GetLogsParameters}\n * @returns A list of event logs. {@link GetLogsReturnType}\n *\n * @example\n * import { createPublicClient, http, parseAbiItem } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getLogs } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const logs = await getLogs(client)\n */\nexport async function getLogs(client, { address, blockHash, fromBlock, toBlock, event, events: events_, args, strict: strict_, } = {}) {\n const strict = strict_ ?? false;\n const events = events_ ?? (event ? [event] : undefined);\n let topics = [];\n if (events) {\n topics = [\n events.flatMap((event) => encodeEventTopics({\n abi: [event],\n eventName: event.name,\n args,\n })),\n ];\n if (event)\n topics = topics[0];\n }\n let logs;\n if (blockHash) {\n logs = await client.request({\n method: 'eth_getLogs',\n params: [{ address, topics, blockHash }],\n });\n }\n else {\n logs = await client.request({\n method: 'eth_getLogs',\n params: [\n {\n address,\n topics,\n fromBlock: typeof fromBlock === 'bigint' ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === 'bigint' ? numberToHex(toBlock) : toBlock,\n },\n ],\n });\n }\n return logs\n .map((log) => {\n try {\n const { eventName, args } = events\n ? decodeEventLog({\n abi: events,\n data: log.data,\n topics: log.topics,\n strict,\n })\n : { eventName: undefined, args: undefined };\n return formatLog(log, { args, eventName: eventName });\n }\n catch (err) {\n let eventName;\n let isUnnamed;\n if (err instanceof DecodeLogDataMismatch ||\n err instanceof DecodeLogTopicsMismatch) {\n // If strict mode is on, and log data/topics do not match event definition, skip.\n if (strict)\n return;\n eventName = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x) => !('name' in x && x.name));\n }\n // Set args to empty if there is an error decoding (e.g. indexed/non-indexed params mismatch).\n return formatLog(log, { args: isUnnamed ? [] : {}, eventName });\n }\n })\n .filter(Boolean);\n}\n//# sourceMappingURL=getLogs.js.map","/**\n * Destroys a [`Filter`](https://viem.sh/docs/glossary/types.html#filter).\n *\n * - Docs: https://viem.sh/docs/actions/public/uninstallFilter.html\n * - JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter)\n *\n * Destroys a Filter that was created from one of the following Actions:\n * - [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter.html)\n * - [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter.html)\n * - [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter.html)\n *\n * @param client - Client to use\n * @param parameters - {@link UninstallFilterParameters}\n * @returns A boolean indicating if the Filter was successfully uninstalled. {@link UninstallFilterReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { createPendingTransactionFilter, uninstallFilter } from 'viem/public'\n *\n * const filter = await createPendingTransactionFilter(client)\n * const uninstalled = await uninstallFilter(client, { filter })\n * // true\n */\nexport async function uninstallFilter(_client, { filter }) {\n return filter.request({\n method: 'eth_uninstallFilter',\n params: [filter.id],\n });\n}\n//# sourceMappingURL=uninstallFilter.js.map","import { getAbiItem, } from '../../utils/abi/getAbiItem.js';\nimport { observe } from '../../utils/observe.js';\nimport { poll } from '../../utils/poll.js';\nimport { stringify } from '../../utils/stringify.js';\nimport { DecodeLogDataMismatch } from '../../errors/abi.js';\nimport { DecodeLogTopicsMismatch, InvalidInputRpcError, decodeEventLog, encodeEventTopics, formatLog, } from '../../index.js';\nimport { createContractEventFilter, } from './createContractEventFilter.js';\nimport { getBlockNumber } from './getBlockNumber.js';\nimport { getFilterChanges } from './getFilterChanges.js';\nimport { getLogs } from './getLogs.js';\nimport { uninstallFilter } from './uninstallFilter.js';\n/**\n * Watches and returns emitted contract event logs.\n *\n * - Docs: https://viem.sh/docs/contract/watchContractEvent.html\n *\n * This Action will batch up all the event logs found within the [`pollingInterval`](https://viem.sh/docs/contract/watchContractEvent.html#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/contract/watchContractEvent.html#onLogs).\n *\n * `watchContractEvent` will attempt to create an [Event Filter](https://viem.sh/docs/contract/createContractEventFilter.html) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead.\n *\n * @param client - Client to use\n * @param parameters - {@link WatchContractEventParameters}\n * @returns A function that can be invoked to stop watching for new event logs. {@link WatchContractEventReturnType}\n *\n * @example\n * import { createPublicClient, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { watchContractEvent } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const unwatch = watchContractEvent(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']),\n * eventName: 'Transfer',\n * args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' },\n * onLogs: (logs) => console.log(logs),\n * })\n */\nexport function watchContractEvent(client, { abi, address, args, batch = true, eventName, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_, }) {\n const enablePolling = typeof poll_ !== 'undefined' ? poll_ : client.transport.type !== 'webSocket';\n const pollContractEvent = () => {\n const observerId = stringify([\n 'watchContractEvent',\n address,\n args,\n batch,\n client.uid,\n eventName,\n pollingInterval,\n ]);\n const strict = strict_ ?? false;\n return observe(observerId, { onLogs, onError }, (emit) => {\n let previousBlockNumber;\n let filter;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter = (await createContractEventFilter(client, {\n abi,\n address,\n args,\n eventName,\n strict,\n }));\n }\n catch { }\n initialized = true;\n return;\n }\n try {\n let logs;\n if (filter) {\n logs = await getFilterChanges(client, { filter });\n }\n else {\n // If the filter doesn't exist, we will fall back to use `getLogs`.\n // The fall back exists because some RPC Providers do not support filters.\n // Fetch the block number to use for `getLogs`.\n const blockNumber = await getBlockNumber(client);\n // If the block number has changed, we will need to fetch the logs.\n // If the block number doesn't exist, we are yet to reach the first poll interval,\n // so do not emit any logs.\n if (previousBlockNumber && previousBlockNumber !== blockNumber) {\n logs = await getLogs(client, {\n address,\n args,\n fromBlock: previousBlockNumber + 1n,\n toBlock: blockNumber,\n event: getAbiItem({\n abi,\n name: eventName,\n }),\n });\n }\n else {\n logs = [];\n }\n previousBlockNumber = blockNumber;\n }\n if (logs.length === 0)\n return;\n if (batch)\n emit.onLogs(logs);\n else\n logs.forEach((log) => emit.onLogs([log]));\n }\n catch (err) {\n // If a filter has been set and gets uninstalled, providers will throw an InvalidInput error.\n // Reinitalize the filter when this occurs\n if (filter && err instanceof InvalidInputRpcError)\n initialized = false;\n emit.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval,\n });\n return async () => {\n if (filter)\n await uninstallFilter(client, { filter });\n unwatch();\n };\n });\n };\n const subscribeContractEvent = () => {\n let active = true;\n let unsubscribe = () => (active = false);\n (async () => {\n try {\n const topics = eventName\n ? encodeEventTopics({\n abi: abi,\n eventName: eventName,\n args,\n })\n : [];\n const { unsubscribe: unsubscribe_ } = await client.transport.subscribe({\n params: ['logs', { address, topics }],\n onData(data) {\n if (!active)\n return;\n const log = data.result;\n try {\n const { eventName, args } = decodeEventLog({\n abi: abi,\n data: log.data,\n topics: log.topics,\n strict: strict_,\n });\n const formatted = formatLog(log, {\n args,\n eventName: eventName,\n });\n onLogs([formatted]);\n }\n catch (err) {\n let eventName;\n let isUnnamed;\n if (err instanceof DecodeLogDataMismatch ||\n err instanceof DecodeLogTopicsMismatch) {\n // If strict mode is on, and log data/topics do not match event definition, skip.\n if (strict_)\n return;\n eventName = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x) => !('name' in x && x.name));\n }\n // Set args to empty if there is an error decoding (e.g. indexed/non-indexed params mismatch).\n const formatted = formatLog(log, {\n args: isUnnamed ? [] : {},\n eventName,\n });\n onLogs([formatted]);\n }\n },\n onError(error) {\n onError?.(error);\n },\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n }\n catch (err) {\n onError?.(err);\n }\n })();\n return unsubscribe;\n };\n return enablePolling ? pollContractEvent() : subscribeContractEvent();\n}\n//# sourceMappingURL=watchContractEvent.js.map","import { TransactionExecutionError } from '../../errors/transaction.js';\nimport { containsNodeError, getNodeError, } from './getNodeError.js';\nexport function getTransactionError(err, { docsPath, ...args }) {\n let cause = err;\n if (containsNodeError(err))\n cause = getNodeError(err, args);\n return new TransactionExecutionError(cause, {\n docsPath,\n ...args,\n });\n}\n//# sourceMappingURL=getTransactionError.js.map","import { hexToNumber } from '../../utils/encoding/fromHex.js';\n/**\n * Returns the chain ID associated with the current network.\n *\n * - Docs: https://viem.sh/docs/actions/public/getChainId.html\n * - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid)\n *\n * @param client - Client to use\n * @returns The current chain ID. {@link GetChainIdReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getChainId } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const chainId = await getChainId(client)\n * // 1\n */\nexport async function getChainId(client) {\n const chainIdHex = await client.request({\n method: 'eth_chainId',\n });\n return hexToNumber(chainIdHex);\n}\n//# sourceMappingURL=getChainId.js.map","import { parseAccount } from '../../accounts/utils/parseAccount.js';\nimport { AccountNotFoundError } from '../../errors/account.js';\nimport { assertCurrentChain } from '../../utils/chain.js';\nimport { getTransactionError } from '../../utils/errors/getTransactionError.js';\nimport { extract } from '../../utils/formatters/extract.js';\nimport { formatTransactionRequest, } from '../../utils/formatters/transactionRequest.js';\nimport { assertRequest, } from '../../utils/transaction/assertRequest.js';\nimport { prepareRequest } from '../../utils/transaction/prepareRequest.js';\nimport { getChainId } from '../public/getChainId.js';\n/**\n * Creates, signs, and sends a new transaction to the network.\n *\n * - Docs: https://viem.sh/docs/actions/wallet/sendTransaction.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/sending-transactions\n * - JSON-RPC Methods:\n * - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction)\n * - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction)\n *\n * @param client - Client to use\n * @param parameters - {@link SendTransactionParameters}\n * @returns The [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. {@link SendTransactionReturnType}\n *\n * @example\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { sendTransaction } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const hash = await sendTransaction(client, {\n * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * value: 1000000000000000000n,\n * })\n *\n * @example\n * // Account Hoisting\n * import { createWalletClient, http } from 'viem'\n * import { privateKeyToAccount } from 'viem/accounts'\n * import { mainnet } from 'viem/chains'\n * import { sendTransaction } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * account: privateKeyToAccount('0x…'),\n * chain: mainnet,\n * transport: http(),\n * })\n * const hash = await sendTransaction(client, {\n * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * value: 1000000000000000000n,\n * })\n */\nexport async function sendTransaction(client, args) {\n const { account: account_ = client.account, chain = client.chain, accessList, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, ...rest } = args;\n if (!account_)\n throw new AccountNotFoundError({\n docsPath: '/docs/actions/wallet/sendTransaction',\n });\n const account = parseAccount(account_);\n try {\n assertRequest(args);\n let chainId;\n if (chain !== null) {\n chainId = await getChainId(client);\n assertCurrentChain({\n currentChainId: chainId,\n chain,\n });\n }\n if (account.type === 'local') {\n // Prepare the request for signing (assign appropriate fees, etc.)\n const request = await prepareRequest(client, {\n account,\n accessList,\n chain,\n data,\n gas,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n ...rest,\n });\n if (!chainId)\n chainId = await getChainId(client);\n const serializer = chain?.serializers?.transaction;\n const signedRequest = (await account.signTransaction({\n ...request,\n chainId,\n }, { serializer }));\n return await client.request({\n method: 'eth_sendRawTransaction',\n params: [signedRequest],\n });\n }\n const format = chain?.formatters?.transactionRequest?.format || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format }),\n accessList,\n data,\n from: account.address,\n gas,\n gasPrice,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n });\n return await client.request({\n method: 'eth_sendTransaction',\n params: [request],\n });\n }\n catch (err) {\n throw getTransactionError(err, {\n ...args,\n account,\n chain: args.chain || undefined,\n });\n }\n}\n//# sourceMappingURL=sendTransaction.js.map","import { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { sendTransaction, } from './sendTransaction.js';\n/**\n * Executes a write function on a contract.\n *\n * - Docs: https://viem.sh/docs/contract/writeContract.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/writing-to-contracts\n *\n * A \"write\" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms.html) is needed to be broadcast in order to change the state.\n *\n * Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet.html) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction.html) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData.html).\n *\n * __Warning: The `write` internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to [simulate the contract write with `contract.simulate`](https://viem.sh/docs/contract/writeContract.html#usage) before you execute it.__\n *\n * @param client - Client to use\n * @param parameters - {@link WriteContractParameters}\n * @returns A [Transaction Hash](https://viem.sh/docs/glossary/terms.html#hash). {@link WriteContractReturnType}\n *\n * @example\n * import { createWalletClient, custom, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { writeContract } from 'viem/contract'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const hash = await writeContract(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),\n * functionName: 'mint',\n * args: [69420],\n * })\n *\n * @example\n * // With Validation\n * import { createWalletClient, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { simulateContract, writeContract } from 'viem/contract'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const { request } = await simulateContract(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),\n * functionName: 'mint',\n * args: [69420],\n * }\n * const hash = await writeContract(client, request)\n */\nexport async function writeContract(client, { abi, address, args, dataSuffix, functionName, ...request }) {\n const data = encodeFunctionData({\n abi,\n args,\n functionName,\n });\n const hash = await sendTransaction(client, {\n data: `${data}${dataSuffix ? dataSuffix.replace('0x', '') : ''}`,\n to: address,\n ...request,\n });\n return hash;\n}\n//# sourceMappingURL=writeContract.js.map","import { createContractEventFilter, } from './public/createContractEventFilter.js';\nimport { estimateContractGas, } from './public/estimateContractGas.js';\nimport { readContract, } from './public/readContract.js';\nimport { simulateContract, } from './public/simulateContract.js';\nimport { watchContractEvent, } from './public/watchContractEvent.js';\nimport { writeContract, } from './wallet/writeContract.js';\n/**\n * Gets type-safe interface for performing contract-related actions with a specific `abi` and `address`.\n *\n * - Docs https://viem.sh/docs/contract/getContract.html\n *\n * Using Contract Instances can make it easier to work with contracts if you don't want to pass the `abi` and `address` properites every time you perform contract actions, e.g. [`readContract`](https://viem.sh/docs/contract/readContract.html), [`writeContract`](https://viem.sh/docs/contract/writeContract.html), [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas.html), etc.\n *\n * @example\n * import { createPublicClient, getContract, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n *\n * const publicClient = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const contract = getContract({\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi([\n * 'function balanceOf(address owner) view returns (uint256)',\n * 'function ownerOf(uint256 tokenId) view returns (address)',\n * 'function totalSupply() view returns (uint256)',\n * ]),\n * publicClient,\n * })\n */\nexport function getContract({ abi, address, publicClient, walletClient, }) {\n const hasPublicClient = publicClient !== undefined && publicClient !== null;\n const hasWalletClient = walletClient !== undefined && walletClient !== null;\n const contract = {};\n let hasReadFunction = false;\n let hasWriteFunction = false;\n let hasEvent = false;\n for (const item of abi) {\n if (item.type === 'function')\n if (item.stateMutability === 'view' || item.stateMutability === 'pure')\n hasReadFunction = true;\n else\n hasWriteFunction = true;\n else if (item.type === 'event')\n hasEvent = true;\n // Exit early if all flags are `true`\n if (hasReadFunction && hasWriteFunction && hasEvent)\n break;\n }\n if (hasPublicClient) {\n if (hasReadFunction)\n contract.read = new Proxy({}, {\n get(_, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return readContract(publicClient, {\n abi,\n address,\n functionName,\n args,\n ...options,\n });\n };\n },\n });\n if (hasWriteFunction)\n contract.simulate = new Proxy({}, {\n get(_, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return simulateContract(publicClient, {\n abi,\n address,\n functionName,\n args,\n ...options,\n });\n };\n },\n });\n if (hasEvent) {\n contract.createEventFilter = new Proxy({}, {\n get(_, eventName) {\n return (...parameters) => {\n const abiEvent = abi.find((x) => x.type === 'event' && x.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return createContractEventFilter(publicClient, {\n abi,\n address,\n eventName,\n args,\n ...options,\n });\n };\n },\n });\n contract.watchEvent = new Proxy({}, {\n get(_, eventName) {\n return (...parameters) => {\n const abiEvent = abi.find((x) => x.type === 'event' && x.name === eventName);\n const { args, options } = getEventParameters(parameters, abiEvent);\n return watchContractEvent(publicClient, {\n abi,\n address,\n eventName,\n args,\n ...options,\n });\n };\n },\n });\n }\n }\n if (hasWalletClient) {\n if (hasWriteFunction)\n contract.write = new Proxy({}, {\n get(_, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n return writeContract(walletClient, {\n abi,\n address,\n functionName,\n args,\n ...options,\n });\n };\n },\n });\n }\n if (hasPublicClient || hasWalletClient)\n if (hasWriteFunction)\n contract.estimateGas = new Proxy({}, {\n get(_, functionName) {\n return (...parameters) => {\n const { args, options } = getFunctionParameters(parameters);\n const client = (publicClient ?? walletClient);\n return estimateContractGas(client, {\n abi,\n address,\n functionName,\n args,\n ...options,\n account: options.account ??\n walletClient.account,\n });\n };\n },\n });\n contract.address = address;\n contract.abi = abi;\n return contract;\n}\n/**\n * @internal exporting for testing only\n */\nexport function getFunctionParameters(values) {\n const hasArgs = values.length && Array.isArray(values[0]);\n const args = hasArgs ? values[0] : [];\n const options = (hasArgs ? values[1] : values[0]) ?? {};\n return { args, options };\n}\n/**\n * @internal exporting for testing only\n */\nexport function getEventParameters(values, abiEvent) {\n let hasArgs = false;\n // If first item is array, must be `args`\n if (Array.isArray(values[0]))\n hasArgs = true;\n // Check if first item is `args` or `options`\n else if (values.length === 1) {\n // if event has indexed inputs, must have `args`\n hasArgs = abiEvent.inputs.some((x) => x.indexed);\n // If there are two items in array, must have `args`\n }\n else if (values.length === 2) {\n hasArgs = true;\n }\n const args = hasArgs ? values[0] : undefined;\n const options = (hasArgs ? values[1] : values[0]) ?? {};\n return { args, options };\n}\n//# sourceMappingURL=getContract.js.map","import { numberToHex } from '../../utils/encoding/toHex.js';\n/**\n * Adds an EVM chain to the wallet.\n *\n * - Docs: https://viem.sh/docs/actions/wallet/addChain.html\n * - JSON-RPC Methods: [`eth_addEthereumChain`](https://eips.ethereum.org/EIPS/eip-3085)\n *\n * @param client - Client to use\n * @param parameters - {@link AddChainParameters}\n *\n * @example\n * import { createWalletClient, custom } from 'viem'\n * import { optimism } from 'viem/chains'\n * import { addChain } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * transport: custom(window.ethereum),\n * })\n * await addChain(client, { chain: optimism })\n */\nexport async function addChain(client, { chain }) {\n const { id, name, nativeCurrency, rpcUrls, blockExplorers } = chain;\n await client.request({\n method: 'wallet_addEthereumChain',\n params: [\n {\n chainId: numberToHex(id),\n chainName: name,\n nativeCurrency,\n rpcUrls: rpcUrls.default.http,\n blockExplorerUrls: blockExplorers\n ? Object.values(blockExplorers).map(({ url }) => url)\n : undefined,\n },\n ],\n });\n}\n//# sourceMappingURL=addChain.js.map","import { checksumAddress } from '../../utils/address/getAddress.js';\nimport { keccak256 } from '../../utils/hash/keccak256.js';\n/**\n * @description Converts an ECDSA public key to an address.\n *\n * @param publicKey The public key to convert.\n *\n * @returns The address.\n */\nexport function publicKeyToAddress(publicKey) {\n const address = keccak256(`0x${publicKey.substring(4)}`).substring(26);\n return checksumAddress(`0x${address}`);\n}\n//# sourceMappingURL=publicKeyToAddress.js.map","const size = 256;\nlet index = size;\nlet buffer;\nexport function uid(length = 11) {\n if (!buffer || index + length > size * 2) {\n buffer = '';\n index = 0;\n for (let i = 0; i < size; i++) {\n buffer += ((256 + Math.random() * 256) | 0).toString(16).substring(1);\n }\n }\n return buffer.substring(index, index++ + length);\n}\n//# sourceMappingURL=uid.js.map","import { parseAccount } from '../utils/accounts.js';\nimport { uid } from '../utils/uid.js';\nexport function createClient(parameters) {\n const { batch, cacheTime = parameters.pollingInterval ?? 4000, key = 'base', name = 'Base Client', pollingInterval = 4000, type = 'base', } = parameters;\n const chain = parameters.chain;\n const account = parameters.account\n ? parseAccount(parameters.account)\n : undefined;\n const { config, request, value } = parameters.transport({\n chain,\n pollingInterval,\n });\n const transport = { ...config, ...value };\n const client = {\n account,\n batch,\n cacheTime,\n chain,\n key,\n name,\n pollingInterval,\n request,\n transport,\n type,\n uid: uid(),\n };\n function extend(base) {\n return (extendFn) => {\n const extended = extendFn(base);\n for (const key in client)\n delete extended[key];\n const combined = { ...base, ...extended };\n return Object.assign(combined, { extend: extend(combined) });\n };\n }\n return Object.assign(client, { extend: extend(client) });\n}\n//# sourceMappingURL=createClient.js.map","import { wait } from '../wait.js';\nexport function withRetry(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry = () => true, } = {}) {\n return new Promise((resolve, reject) => {\n const attemptRetry = async ({ count = 0 } = {}) => {\n const retry = async ({ error }) => {\n const delay = typeof delay_ === 'function' ? delay_({ count, error }) : delay_;\n if (delay)\n await wait(delay);\n attemptRetry({ count: count + 1 });\n };\n try {\n const data = await fn();\n resolve(data);\n }\n catch (err) {\n if (count < retryCount &&\n (await shouldRetry({ count, error: err })))\n return retry({ error: err });\n reject(err);\n }\n };\n attemptRetry();\n });\n}\n//# sourceMappingURL=withRetry.js.map","import { BaseError } from '../errors/base.js';\nimport { HttpRequestError } from '../errors/request.js';\nimport { ChainDisconnectedError, InternalRpcError, InvalidInputRpcError, InvalidParamsRpcError, InvalidRequestRpcError, JsonRpcVersionUnsupportedError, LimitExceededRpcError, MethodNotFoundRpcError, MethodNotSupportedRpcError, ParseRpcError, ProviderDisconnectedError, ResourceNotFoundRpcError, ResourceUnavailableRpcError, SwitchChainError, TransactionRejectedRpcError, UnauthorizedProviderError, UnknownRpcError, UnsupportedProviderMethodError, UserRejectedRequestError, } from '../errors/rpc.js';\nimport { withRetry } from './promise/withRetry.js';\nexport const isDeterministicError = (error) => {\n if ('code' in error)\n return (error.code !== -1 &&\n error.code !== -32004 &&\n error.code !== -32005 &&\n error.code !== -32042 &&\n error.code !== -32603);\n if (error instanceof HttpRequestError && error.status)\n return (error.status !== 403 &&\n error.status !== 408 &&\n error.status !== 413 &&\n error.status !== 429 &&\n error.status !== 500 &&\n error.status !== 502 &&\n error.status !== 503 &&\n error.status !== 504);\n return false;\n};\nexport function buildRequest(request, { retryDelay = 150, retryCount = 3, } = {}) {\n return (async (args) => withRetry(async () => {\n try {\n return await request(args);\n }\n catch (err_) {\n const err = err_;\n switch (err.code) {\n // -32700\n case ParseRpcError.code:\n throw new ParseRpcError(err);\n // -32600\n case InvalidRequestRpcError.code:\n throw new InvalidRequestRpcError(err);\n // -32601\n case MethodNotFoundRpcError.code:\n throw new MethodNotFoundRpcError(err);\n // -32602\n case InvalidParamsRpcError.code:\n throw new InvalidParamsRpcError(err);\n // -32603\n case InternalRpcError.code:\n throw new InternalRpcError(err);\n // -32000\n case InvalidInputRpcError.code:\n throw new InvalidInputRpcError(err);\n // -32001\n case ResourceNotFoundRpcError.code:\n throw new ResourceNotFoundRpcError(err);\n // -32002\n case ResourceUnavailableRpcError.code:\n throw new ResourceUnavailableRpcError(err);\n // -32003\n case TransactionRejectedRpcError.code:\n throw new TransactionRejectedRpcError(err);\n // -32004\n case MethodNotSupportedRpcError.code:\n throw new MethodNotSupportedRpcError(err);\n // -32005\n case LimitExceededRpcError.code:\n throw new LimitExceededRpcError(err);\n // -32006\n case JsonRpcVersionUnsupportedError.code:\n throw new JsonRpcVersionUnsupportedError(err);\n // 4001\n case UserRejectedRequestError.code:\n throw new UserRejectedRequestError(err);\n // 4100\n case UnauthorizedProviderError.code:\n throw new UnauthorizedProviderError(err);\n // 4200\n case UnsupportedProviderMethodError.code:\n throw new UnsupportedProviderMethodError(err);\n // 4900\n case ProviderDisconnectedError.code:\n throw new ProviderDisconnectedError(err);\n // 4901\n case ChainDisconnectedError.code:\n throw new ChainDisconnectedError(err);\n // 4902\n case SwitchChainError.code:\n throw new SwitchChainError(err);\n default:\n if (err_ instanceof BaseError)\n throw err_;\n throw new UnknownRpcError(err);\n }\n }\n }, {\n delay: ({ count, error }) => {\n // If we find a Retry-After header, let's retry after the given time.\n if (error && error instanceof HttpRequestError) {\n const retryAfter = error?.headers?.get('Retry-After');\n if (retryAfter?.match(/\\d/))\n return parseInt(retryAfter) * 1000;\n }\n // Otherwise, let's retry with an exponential backoff.\n return ~~(1 << count) * retryDelay;\n },\n retryCount,\n shouldRetry: ({ error }) => !isDeterministicError(error),\n }));\n}\n//# sourceMappingURL=buildRequest.js.map","import { buildRequest } from '../../utils/buildRequest.js';\n/**\n * @description Creates an transport intended to be used with a client.\n */\nexport function createTransport({ key, name, request, retryCount = 3, retryDelay = 150, timeout, type, }, value) {\n return {\n config: { key, name, request, retryCount, retryDelay, timeout, type },\n request: buildRequest(request, { retryCount, retryDelay }),\n value,\n };\n}\n//# sourceMappingURL=createTransport.js.map","import { isDeterministicError } from '../../utils/buildRequest.js';\nimport { wait } from '../../utils/wait.js';\nimport { createTransport, } from './createTransport.js';\nexport function fallback(transports_, config = {}) {\n const { key = 'fallback', name = 'Fallback', rank = false, retryCount, retryDelay, } = config;\n return ({ chain, pollingInterval = 4000, timeout }) => {\n let transports = transports_;\n let onResponse = () => { };\n const transport = createTransport({\n key,\n name,\n async request({ method, params }) {\n const fetch = async (i = 0) => {\n const transport = transports[i]({ chain, retryCount: 0, timeout });\n try {\n const response = await transport.request({\n method,\n params,\n });\n onResponse({\n method,\n params: params,\n response,\n transport,\n status: 'success',\n });\n return response;\n }\n catch (err) {\n onResponse({\n error: err,\n method,\n params: params,\n transport,\n status: 'error',\n });\n // If the error is deterministic, we don't need to fall back.\n // So throw the error.\n if (isDeterministicError(err))\n throw err;\n // If we've reached the end of the fallbacks, throw the error.\n if (i === transports.length - 1)\n throw err;\n // Otherwise, try the next fallback.\n return fetch(i + 1);\n }\n };\n return fetch();\n },\n retryCount,\n retryDelay,\n type: 'fallback',\n }, {\n onResponse: (fn) => (onResponse = fn),\n transports: transports.map((fn) => fn({ chain, retryCount: 0 })),\n });\n if (rank) {\n const rankOptions = (typeof rank === 'object' ? rank : {});\n rankTransports({\n chain,\n interval: rankOptions.interval ?? pollingInterval,\n onTransports: (transports_) => (transports = transports_),\n sampleCount: rankOptions.sampleCount,\n timeout: rankOptions.timeout,\n transports,\n weights: rankOptions.weights,\n });\n }\n return transport;\n };\n}\nexport function rankTransports({ chain, interval = 4000, onTransports, sampleCount = 10, timeout = 1000, transports, weights = {}, }) {\n const { stability: stabilityWeight = 0.7, latency: latencyWeight = 0.3 } = weights;\n const samples = [];\n const rankTransports_ = async () => {\n // 1. Take a sample from each Transport.\n const sample = await Promise.all(transports.map(async (transport) => {\n const transport_ = transport({ chain, retryCount: 0, timeout });\n const start = Date.now();\n let end;\n let success;\n try {\n await transport_.request({ method: 'net_listening' });\n success = 1;\n }\n catch {\n success = 0;\n }\n finally {\n end = Date.now();\n }\n const latency = end - start;\n return { latency, success };\n }));\n // 2. Store the sample. If we have more than `sampleCount` samples, remove\n // the oldest sample.\n samples.push(sample);\n if (samples.length > sampleCount)\n samples.shift();\n // 3. Calculate the max latency from samples.\n const maxLatency = Math.max(...samples.map((sample) => Math.max(...sample.map(({ latency }) => latency))));\n // 4. Calculate the score for each Transport.\n const scores = transports\n .map((_, i) => {\n const latencies = samples.map((sample) => sample[i].latency);\n const meanLatency = latencies.reduce((acc, latency) => acc + latency, 0) /\n latencies.length;\n const latencyScore = 1 - meanLatency / maxLatency;\n const successes = samples.map((sample) => sample[i].success);\n const stabilityScore = successes.reduce((acc, success) => acc + success, 0) /\n successes.length;\n if (stabilityScore === 0)\n return [0, i];\n return [\n latencyWeight * latencyScore + stabilityWeight * stabilityScore,\n i,\n ];\n })\n .sort((a, b) => b[0] - a[0]);\n // 5. Sort the Transports by score.\n onTransports(scores.map(([, i]) => transports[i]));\n // 6. Wait, and then rank again.\n await wait(interval);\n rankTransports_();\n };\n rankTransports_();\n}\n//# sourceMappingURL=fallback.js.map","import { BaseError } from './base.js';\nexport class UrlRequiredError extends BaseError {\n constructor() {\n super('No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.', {\n docsPath: '/docs/clients/intro',\n });\n }\n}\n//# sourceMappingURL=transport.js.map","export function withTimeout(fn, { errorInstance, timeout, signal, }) {\n return new Promise((resolve, reject) => {\n ;\n (async () => {\n let timeoutId;\n try {\n const controller = new AbortController();\n if (timeout > 0) {\n timeoutId = setTimeout(() => {\n if (signal) {\n controller.abort();\n }\n else {\n reject(errorInstance);\n }\n }, timeout);\n }\n resolve(await fn({ signal: controller?.signal }));\n }\n catch (err) {\n if (err.name === 'AbortError')\n reject(errorInstance);\n reject(err);\n }\n finally {\n clearTimeout(timeoutId);\n }\n })();\n });\n}\n//# sourceMappingURL=withTimeout.js.map","import { HttpRequestError, TimeoutError, WebSocketRequestError, } from '../errors/request.js';\nimport { createBatchScheduler } from './promise/createBatchScheduler.js';\nimport { withTimeout } from './promise/withTimeout.js';\nimport { stringify } from './stringify.js';\nlet id = 0;\nasync function http(url, { body, fetchOptions = {}, timeout = 10000 }) {\n const { headers, method, signal: signal_ } = fetchOptions;\n try {\n const response = await withTimeout(async ({ signal }) => {\n const response = await fetch(url, {\n ...fetchOptions,\n body: Array.isArray(body)\n ? stringify(body.map((body) => ({\n jsonrpc: '2.0',\n id: id++,\n ...body,\n })))\n : stringify({ jsonrpc: '2.0', id: id++, ...body }),\n headers: {\n ...headers,\n 'Content-Type': 'application/json',\n },\n method: method || 'POST',\n signal: signal_ || (timeout > 0 ? signal : undefined),\n });\n return response;\n }, {\n errorInstance: new TimeoutError({ body, url }),\n timeout,\n signal: true,\n });\n let data;\n if (response.headers.get('Content-Type')?.startsWith('application/json')) {\n data = await response.json();\n }\n else {\n data = await response.text();\n }\n if (!response.ok) {\n throw new HttpRequestError({\n body,\n details: stringify(data.error) || response.statusText,\n headers: response.headers,\n status: response.status,\n url,\n });\n }\n return data;\n }\n catch (err) {\n if (err instanceof HttpRequestError)\n throw err;\n if (err instanceof TimeoutError)\n throw err;\n throw new HttpRequestError({\n body,\n details: err.message,\n url,\n });\n }\n}\nconst sockets = /*#__PURE__*/ new Map();\nexport async function getSocket(url_) {\n const url = new URL(url_);\n const urlKey = url.toString();\n let socket = sockets.get(urlKey);\n // If the socket already exists, return it.\n if (socket)\n return socket;\n const { schedule } = createBatchScheduler({\n id: urlKey,\n fn: async () => {\n let WebSocket = await import('isomorphic-ws');\n // Workaround for Vite.\n // https://github.com/vitejs/vite/issues/9703\n // TODO: Remove when issue is resolved.\n if (WebSocket.default\n ?.constructor)\n WebSocket = WebSocket\n .default;\n else\n WebSocket = WebSocket.WebSocket;\n const webSocket = new WebSocket(url);\n // Set up a cache for incoming \"synchronous\" requests.\n const requests = new Map();\n // Set up a cache for subscriptions (eth_subscribe).\n const subscriptions = new Map();\n const onMessage = ({ data }) => {\n const message = JSON.parse(data);\n const isSubscription = message.method === 'eth_subscription';\n const id = isSubscription ? message.params.subscription : message.id;\n const cache = isSubscription ? subscriptions : requests;\n const callback = cache.get(id);\n if (callback)\n callback({ data });\n if (!isSubscription)\n cache.delete(id);\n };\n const onClose = () => {\n sockets.delete(urlKey);\n webSocket.removeEventListener('close', onClose);\n webSocket.removeEventListener('message', onMessage);\n };\n // Setup event listeners for RPC & subscription responses.\n webSocket.addEventListener('close', onClose);\n webSocket.addEventListener('message', onMessage);\n // Wait for the socket to open.\n if (webSocket.readyState === WebSocket.CONNECTING) {\n await new Promise((resolve, reject) => {\n if (!webSocket)\n return;\n webSocket.onopen = resolve;\n webSocket.onerror = reject;\n });\n }\n // Create a new socket instance.\n socket = Object.assign(webSocket, {\n requests,\n subscriptions,\n });\n sockets.set(urlKey, socket);\n return [socket];\n },\n });\n const [_, [socket_]] = await schedule();\n return socket_;\n}\nfunction webSocket(socket, { body, onResponse }) {\n if (socket.readyState === socket.CLOSED ||\n socket.readyState === socket.CLOSING)\n throw new WebSocketRequestError({\n body,\n url: socket.url,\n details: 'Socket is closed.',\n });\n const id_ = id++;\n const callback = ({ data }) => {\n const message = JSON.parse(data);\n if (typeof message.id === 'number' && id_ !== message.id)\n return;\n onResponse?.(message);\n // If we are subscribing to a topic, we want to set up a listener for incoming\n // messages.\n if (body.method === 'eth_subscribe' && typeof message.result === 'string') {\n socket.subscriptions.set(message.result, callback);\n }\n // If we are unsubscribing from a topic, we want to remove the listener.\n if (body.method === 'eth_unsubscribe') {\n socket.subscriptions.delete(body.params?.[0]);\n }\n };\n socket.requests.set(id_, callback);\n socket.send(JSON.stringify({ jsonrpc: '2.0', ...body, id: id_ }));\n return socket;\n}\nasync function webSocketAsync(socket, { body, timeout = 10000 }) {\n return withTimeout(() => new Promise((onResponse) => rpc.webSocket(socket, {\n body,\n onResponse,\n })), {\n errorInstance: new TimeoutError({ body, url: socket.url }),\n timeout,\n });\n}\n///////////////////////////////////////////////////\nexport const rpc = {\n http,\n webSocket,\n webSocketAsync,\n};\n//# sourceMappingURL=rpc.js.map","import { RpcRequestError } from '../../errors/request.js';\nimport { UrlRequiredError } from '../../errors/transport.js';\nimport { createBatchScheduler } from '../../utils/promise/createBatchScheduler.js';\nimport { rpc } from '../../utils/rpc.js';\nimport { createTransport, } from './createTransport.js';\n/**\n * @description Creates a HTTP transport that connects to a JSON-RPC API.\n */\nexport function http(\n/** URL of the JSON-RPC API. Defaults to the chain's public RPC URL. */\nurl, config = {}) {\n const { batch, fetchOptions, key = 'http', name = 'HTTP JSON-RPC', retryDelay, } = config;\n return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {\n const { batchSize = 1000, wait = 0 } = typeof batch === 'object' ? batch : {};\n const retryCount = config.retryCount ?? retryCount_;\n const timeout = timeout_ ?? config.timeout ?? 10000;\n const url_ = url || chain?.rpcUrls.default.http[0];\n if (!url_)\n throw new UrlRequiredError();\n return createTransport({\n key,\n name,\n async request({ method, params }) {\n const body = { method, params };\n const { schedule } = createBatchScheduler({\n id: `${url}`,\n wait,\n shouldSplitBatch(requests) {\n return requests.length > batchSize;\n },\n fn: (body) => rpc.http(url_, {\n body,\n fetchOptions,\n timeout,\n }),\n });\n const fn = async (body) => batch\n ? schedule(body)\n : [await rpc.http(url_, { body, fetchOptions, timeout })];\n const [{ error, result }] = await fn(body);\n if (error)\n throw new RpcRequestError({\n body,\n error,\n url: url_,\n });\n return result;\n },\n retryCount,\n retryDelay,\n timeout,\n type: 'http',\n }, {\n url,\n });\n };\n}\n//# sourceMappingURL=http.js.map","import { panicReasons } from '../../constants/solidity.js';\nimport { BaseError } from '../../errors/base.js';\nimport { ContractFunctionRevertedError } from '../../errors/contract.js';\n/*\n * @description Checks if error is a valid null result UniversalResolver error\n */\nexport function isNullUniversalResolverError(err, callType) {\n if (!(err instanceof BaseError))\n return false;\n const cause = err.walk((e) => e instanceof ContractFunctionRevertedError);\n if (!(cause instanceof ContractFunctionRevertedError))\n return false;\n if (cause.data?.errorName === 'ResolverNotFound')\n return true;\n if (cause.data?.errorName === 'ResolverWildcardNotSupported')\n return true;\n // Backwards compatibility for older UniversalResolver contracts\n if (cause.reason?.includes('Wildcard on non-extended resolvers is not supported'))\n return true;\n // No primary name set for address.\n if (callType === 'reverse' && cause.reason === panicReasons[50])\n return true;\n return false;\n}\n//# sourceMappingURL=errors.js.map","export const arrayRegex = /^(.*)\\[([0-9]*)\\]$/;\n// `bytes`: binary type of `M` bytes, `0 < M <= 32`\n// https://regexr.com/6va55\nexport const bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n// `(u)int`: (un)signed integer type of `M` bits, `0 < M <= 256`, `M % 8 == 0`\n// https://regexr.com/6v8hp\nexport const integerRegex = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\n//# sourceMappingURL=regex.js.map","import { BytesSizeMismatchError } from '../errors/abi.js';\nimport { InvalidAddressError } from '../errors/address.js';\nimport { isAddress } from './address/isAddress.js';\nimport { size } from './data/size.js';\nimport { numberToHex } from './encoding/toHex.js';\nimport { bytesRegex, integerRegex } from './regex.js';\nexport function validateTypedData({ domain, message, primaryType, types: types_, }) {\n const types = types_;\n const validateData = (struct, value_) => {\n for (const param of struct) {\n const { name, type: type_ } = param;\n const type = type_;\n const value = value_[name];\n const integerMatch = type.match(integerRegex);\n if (integerMatch &&\n (typeof value === 'number' || typeof value === 'bigint')) {\n const [_type, base, size_] = integerMatch;\n // If number cannot be cast to a sized hex value, it is out of range\n // and will throw.\n numberToHex(value, {\n signed: base === 'int',\n size: parseInt(size_) / 8,\n });\n }\n if (type === 'address' && typeof value === 'string' && !isAddress(value))\n throw new InvalidAddressError({ address: value });\n const bytesMatch = type.match(bytesRegex);\n if (bytesMatch) {\n const [_type, size_] = bytesMatch;\n if (size_ && size(value) !== parseInt(size_))\n throw new BytesSizeMismatchError({\n expectedSize: parseInt(size_),\n givenSize: size(value),\n });\n }\n const struct = types[type];\n if (struct)\n validateData(struct, value);\n }\n };\n // Validate domain types.\n if (types['EIP712Domain'] && domain)\n validateData(types['EIP712Domain'], domain);\n if (primaryType !== 'EIP712Domain') {\n // Validate message types.\n const type = types[primaryType];\n validateData(type, message);\n }\n}\n//# sourceMappingURL=typedData.js.map","import { AbiConstructorNotFoundError, AbiConstructorParamsNotFoundError, } from '../../errors/abi.js';\nimport { concatHex } from '../data/concat.js';\nimport { encodeAbiParameters } from './encodeAbiParameters.js';\nconst docsPath = '/docs/contract/encodeDeployData';\nexport function encodeDeployData({ abi, args, bytecode, }) {\n if (!args || args.length === 0)\n return bytecode;\n const description = abi.find((x) => 'type' in x && x.type === 'constructor');\n if (!description)\n throw new AbiConstructorNotFoundError({ docsPath });\n if (!('inputs' in description))\n throw new AbiConstructorParamsNotFoundError({ docsPath });\n if (!description.inputs || description.inputs.length === 0)\n throw new AbiConstructorParamsNotFoundError({ docsPath });\n const data = encodeAbiParameters(description.inputs, args);\n return concatHex([bytecode, data]);\n}\n//# sourceMappingURL=encodeDeployData.js.map","import { concat } from '../data/concat.js';\nimport { toBytes } from './toBytes.js';\nimport { bytesToHex } from './toHex.js';\nexport function toRlp(hexOrBytes, to_) {\n const to = to_ || 'hex';\n return format(bytesToRlp(parse(hexOrBytes)), to);\n}\nfunction parse(hexOrBytes) {\n if (Array.isArray(hexOrBytes))\n return hexOrBytes.map(parse);\n return typeof hexOrBytes === 'string' ? toBytes(hexOrBytes) : hexOrBytes;\n}\nfunction format(bytes, type = 'bytes') {\n return type === 'hex' ? bytesToHex(bytes) : bytes;\n}\nexport function bytesToRlp(bytes) {\n if (Array.isArray(bytes)) {\n const encoded = concat(bytes.map(bytesToRlp));\n return new Uint8Array([...encodeLength(encoded.length, 0xc0), ...encoded]);\n }\n if (bytes.length === 1 && bytes[0] < 0x80)\n return bytes;\n return new Uint8Array([...encodeLength(bytes.length, 0x80), ...bytes]);\n}\nfunction encodeLength(length, offset) {\n if (length < 56)\n return [offset + length];\n return [toBytes(length).length + offset + 55, ...toBytes(length)];\n}\n//# sourceMappingURL=toRlp.js.map","import { hexToNumber } from '../encoding/fromHex.js';\nimport { defineFormatter } from './formatter.js';\nimport { formatLog } from './log.js';\nimport { transactionType } from './transaction.js';\nconst statuses = {\n '0x0': 'reverted',\n '0x1': 'success',\n};\nexport function formatTransactionReceipt(transactionReceipt) {\n return {\n ...transactionReceipt,\n blockNumber: transactionReceipt.blockNumber\n ? BigInt(transactionReceipt.blockNumber)\n : null,\n contractAddress: transactionReceipt.contractAddress\n ? transactionReceipt.contractAddress\n : null,\n cumulativeGasUsed: transactionReceipt.cumulativeGasUsed\n ? BigInt(transactionReceipt.cumulativeGasUsed)\n : null,\n effectiveGasPrice: transactionReceipt.effectiveGasPrice\n ? BigInt(transactionReceipt.effectiveGasPrice)\n : null,\n gasUsed: transactionReceipt.gasUsed\n ? BigInt(transactionReceipt.gasUsed)\n : null,\n logs: transactionReceipt.logs\n ? transactionReceipt.logs.map((log) => formatLog(log))\n : null,\n to: transactionReceipt.to ? transactionReceipt.to : null,\n transactionIndex: transactionReceipt.transactionIndex\n ? hexToNumber(transactionReceipt.transactionIndex)\n : null,\n status: transactionReceipt.status\n ? statuses[transactionReceipt.status]\n : null,\n type: transactionReceipt.type\n ? transactionType[transactionReceipt.type] || transactionReceipt.type\n : null,\n };\n}\nexport const defineTransactionReceipt = /*#__PURE__*/ defineFormatter('transactionReceipt', formatTransactionReceipt);\n//# sourceMappingURL=transactionReceipt.js.map","// Implementation forked and adapted from https://github.com/MetaMask/eth-sig-util/blob/main/src/sign-typed-data.ts\nimport { encodeAbiParameters } from '../abi/encodeAbiParameters.js';\nimport { concat } from '../data/concat.js';\nimport { toHex } from '../encoding/toHex.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { validateTypedData } from '../typedData.js';\nexport function hashTypedData({ domain: domain_, message, primaryType, types: types_, }) {\n const domain = typeof domain_ === 'undefined' ? {} : domain_;\n const types = {\n EIP712Domain: [\n typeof domain?.name === 'string' && { name: 'name', type: 'string' },\n domain?.version && { name: 'version', type: 'string' },\n typeof domain?.chainId === 'number' && {\n name: 'chainId',\n type: 'uint256',\n },\n domain?.verifyingContract && {\n name: 'verifyingContract',\n type: 'address',\n },\n domain?.salt && { name: 'salt', type: 'bytes32' },\n ].filter(Boolean),\n ...types_,\n };\n // Need to do a runtime validation check on addresses, byte ranges, integer ranges, etc\n // as we can't statically check this with TypeScript.\n validateTypedData({\n domain,\n message,\n primaryType,\n types,\n });\n const parts = ['0x1901'];\n if (domain)\n parts.push(hashDomain({\n domain,\n types: types,\n }));\n if (primaryType !== 'EIP712Domain') {\n parts.push(hashStruct({\n data: message,\n primaryType: primaryType,\n types: types,\n }));\n }\n return keccak256(concat(parts));\n}\nfunction hashDomain({ domain, types, }) {\n return hashStruct({\n data: domain,\n primaryType: 'EIP712Domain',\n types,\n });\n}\nfunction hashStruct({ data, primaryType, types, }) {\n const encoded = encodeData({\n data,\n primaryType,\n types,\n });\n return keccak256(encoded);\n}\nfunction encodeData({ data, primaryType, types, }) {\n const encodedTypes = [{ type: 'bytes32' }];\n const encodedValues = [hashType({ primaryType, types })];\n for (const field of types[primaryType]) {\n const [type, value] = encodeField({\n types,\n name: field.name,\n type: field.type,\n value: data[field.name],\n });\n encodedTypes.push(type);\n encodedValues.push(value);\n }\n return encodeAbiParameters(encodedTypes, encodedValues);\n}\nfunction hashType({ primaryType, types, }) {\n const encodedHashType = toHex(encodeType({ primaryType, types }));\n return keccak256(encodedHashType);\n}\nfunction encodeType({ primaryType, types, }) {\n let result = '';\n const unsortedDeps = findTypeDependencies({ primaryType, types });\n unsortedDeps.delete(primaryType);\n const deps = [primaryType, ...Array.from(unsortedDeps).sort()];\n for (const type of deps) {\n result += `${type}(${types[type]\n .map(({ name, type: t }) => `${t} ${name}`)\n .join(',')})`;\n }\n return result;\n}\nfunction findTypeDependencies({ primaryType: primaryType_, types, }, results = new Set()) {\n const match = primaryType_.match(/^\\w*/u);\n const primaryType = match?.[0];\n if (results.has(primaryType) || types[primaryType] === undefined) {\n return results;\n }\n results.add(primaryType);\n for (const field of types[primaryType]) {\n findTypeDependencies({ primaryType: field.type, types }, results);\n }\n return results;\n}\nfunction encodeField({ types, name, type, value, }) {\n if (types[type] !== undefined) {\n return [\n { type: 'bytes32' },\n keccak256(encodeData({ data: value, primaryType: type, types })),\n ];\n }\n if (type === 'bytes') {\n const prepend = value.length % 2 ? '0' : '';\n value = `0x${prepend + value.slice(2)}`;\n return [{ type: 'bytes32' }, keccak256(value)];\n }\n if (type === 'string')\n return [{ type: 'bytes32' }, keccak256(toHex(value))];\n if (type.lastIndexOf(']') === type.length - 1) {\n const parsedType = type.slice(0, type.lastIndexOf('['));\n const typeValuePairs = value.map((item) => encodeField({\n name,\n type: parsedType,\n types,\n value: item,\n }));\n return [\n { type: 'bytes32' },\n keccak256(encodeAbiParameters(typeValuePairs.map(([t]) => t), typeValuePairs.map(([, v]) => v))),\n ];\n }\n return [{ type }, value];\n}\n//# sourceMappingURL=hashTypedData.js.map","import { concat } from '../data/concat.js';\nimport { stringToBytes, toBytes } from '../encoding/toBytes.js';\nimport { keccak256 } from '../hash/keccak256.js';\nexport function hashMessage(message, to_) {\n const messageBytes = (() => {\n if (typeof message === 'string')\n return stringToBytes(message);\n if (message.raw instanceof Uint8Array)\n return message.raw;\n return toBytes(message.raw);\n })();\n const prefixBytes = stringToBytes(`\\x19Ethereum Signed Message:\\n${messageBytes.length}`);\n return keccak256(concat([prefixBytes, messageBytes]), to_);\n}\n//# sourceMappingURL=hashMessage.js.map","import { InvalidSerializableTransactionError } from '../../errors/transaction.js';\nexport function getTransactionType(transaction) {\n if (transaction.type)\n return transaction.type;\n if (typeof transaction.maxFeePerGas !== 'undefined' ||\n typeof transaction.maxPriorityFeePerGas !== 'undefined')\n return 'eip1559';\n if (typeof transaction.gasPrice !== 'undefined') {\n if (typeof transaction.accessList !== 'undefined')\n return 'eip2930';\n return 'legacy';\n }\n throw new InvalidSerializableTransactionError({ transaction });\n}\n//# sourceMappingURL=getTransactionType.js.map","import { InvalidAddressError } from '../../errors/address.js';\nimport { BaseError } from '../../errors/base.js';\nimport { InvalidChainIdError } from '../../errors/chain.js';\nimport { FeeCapTooHighError, TipAboveFeeCapError } from '../../errors/node.js';\nimport { isAddress } from '../address/isAddress.js';\nexport function assertTransactionEIP1559(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (gasPrice)\n throw new BaseError('`gasPrice` is not a valid EIP-1559 Transaction attribute.');\n if (maxFeePerGas && maxFeePerGas > 2n ** 256n - 1n)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas &&\n maxFeePerGas &&\n maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n}\nexport function assertTransactionEIP2930(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError('`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.');\n if (gasPrice && gasPrice > 2n ** 256n - 1n)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n}\nexport function assertTransactionLegacy(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to, accessList, } = transaction;\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof chainId !== 'undefined' && chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError('`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.');\n if (gasPrice && gasPrice > 2n ** 256n - 1n)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n if (accessList)\n throw new BaseError('`accessList` is not a valid Legacy Transaction attribute.');\n}\n//# sourceMappingURL=assertTransaction.js.map","import { InvalidAddressError } from '../../errors/address.js';\nimport { InvalidStorageKeySizeError } from '../../errors/transaction.js';\nimport { isAddress } from '../address/isAddress.js';\nimport {} from '../encoding/toRlp.js';\n/*\n * Serialize an EIP-2930 access list\n * @remarks\n * Use to create a transaction serializer with support for EIP-2930 access lists\n *\n * @param accessList - Array of objects of address and arrays of Storage Keys\n * @throws InvalidAddressError, InvalidStorageKeySizeError\n * @returns Array of hex strings\n */\nexport function serializeAccessList(accessList) {\n if (!accessList || accessList.length === 0)\n return [];\n const serializedAccessList = [];\n for (let i = 0; i < accessList.length; i++) {\n const { address, storageKeys } = accessList[i];\n for (let j = 0; j < storageKeys.length; j++) {\n if (storageKeys[j].length - 2 !== 64) {\n throw new InvalidStorageKeySizeError({ storageKey: storageKeys[j] });\n }\n }\n if (!isAddress(address)) {\n throw new InvalidAddressError({ address });\n }\n serializedAccessList.push([address, storageKeys]);\n }\n return serializedAccessList;\n}\n//# sourceMappingURL=serializeAccessList.js.map","import { InvalidLegacyVError } from '../../errors/transaction.js';\nimport { concatHex } from '../data/concat.js';\nimport { trim } from '../data/trim.js';\nimport { toHex } from '../encoding/toHex.js';\nimport { toRlp } from '../encoding/toRlp.js';\nimport { assertTransactionEIP1559, assertTransactionEIP2930, assertTransactionLegacy, } from './assertTransaction.js';\nimport { getTransactionType, } from './getTransactionType.js';\nimport { serializeAccessList } from './serializeAccessList.js';\nexport function serializeTransaction(transaction, signature) {\n const type = getTransactionType(transaction);\n if (type === 'eip1559')\n return serializeTransactionEIP1559(transaction, signature);\n if (type === 'eip2930')\n return serializeTransactionEIP2930(transaction, signature);\n return serializeTransactionLegacy(transaction, signature);\n}\nfunction serializeTransactionEIP1559(transaction, signature) {\n const { chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data, } = transaction;\n assertTransactionEIP1559(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n toHex(chainId),\n nonce ? toHex(nonce) : '0x',\n maxPriorityFeePerGas ? toHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? toHex(maxFeePerGas) : '0x',\n gas ? toHex(gas) : '0x',\n to ?? '0x',\n value ? toHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n ];\n if (signature)\n serializedTransaction.push(signature.v === 27n ? '0x' : toHex(1), // yParity\n trim(signature.r), trim(signature.s));\n return concatHex([\n '0x02',\n toRlp(serializedTransaction),\n ]);\n}\nfunction serializeTransactionEIP2930(transaction, signature) {\n const { chainId, gas, data, nonce, to, value, accessList, gasPrice } = transaction;\n assertTransactionEIP2930(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n toHex(chainId),\n nonce ? toHex(nonce) : '0x',\n gasPrice ? toHex(gasPrice) : '0x',\n gas ? toHex(gas) : '0x',\n to ?? '0x',\n value ? toHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n ];\n if (signature)\n serializedTransaction.push(signature.v === 27n ? '0x' : toHex(1), // yParity\n signature.r, signature.s);\n return concatHex([\n '0x01',\n toRlp(serializedTransaction),\n ]);\n}\nfunction serializeTransactionLegacy(transaction, signature) {\n const { chainId = 0, gas, data, nonce, to, value, gasPrice } = transaction;\n assertTransactionLegacy(transaction);\n let serializedTransaction = [\n nonce ? toHex(nonce) : '0x',\n gasPrice ? toHex(gasPrice) : '0x',\n gas ? toHex(gas) : '0x',\n to ?? '0x',\n value ? toHex(value) : '0x',\n data ?? '0x',\n ];\n if (signature) {\n let v = 27n + (signature.v === 27n ? 0n : 1n);\n if (chainId > 0)\n v = BigInt(chainId * 2) + BigInt(35n + signature.v - 27n);\n else if (signature.v !== v)\n throw new InvalidLegacyVError({ v: signature.v });\n serializedTransaction = [\n ...serializedTransaction,\n toHex(v),\n signature.r,\n signature.s,\n ];\n }\n else if (chainId > 0) {\n serializedTransaction = [\n ...serializedTransaction,\n toHex(chainId),\n '0x',\n '0x',\n ];\n }\n return toRlp(serializedTransaction);\n}\n//# sourceMappingURL=serializeTransaction.js.map","export function parseUnits(value, decimals) {\n let [integer, fraction = '0'] = value.split('.');\n const negative = integer.startsWith('-');\n if (negative)\n integer = integer.slice(1);\n // trim leading zeros.\n fraction = fraction.replace(/(0+)$/, '');\n // round off if the fraction is larger than the number of decimals.\n if (decimals === 0) {\n if (Math.round(Number(`.${fraction}`)) === 1)\n integer = `${BigInt(integer) + 1n}`;\n fraction = '';\n }\n else if (fraction.length > decimals) {\n const [left, unit, right] = [\n fraction.slice(0, decimals - 1),\n fraction.slice(decimals - 1, decimals),\n fraction.slice(decimals),\n ];\n const rounded = Math.round(Number(`${unit}.${right}`));\n if (rounded > 9)\n fraction = `${BigInt(left) + BigInt(1)}0`.padStart(left.length + 1, '0');\n else\n fraction = `${left}${rounded}`;\n if (fraction.length > decimals) {\n fraction = fraction.slice(1);\n integer = `${BigInt(integer) + 1n}`;\n }\n fraction = fraction.slice(0, decimals);\n }\n else {\n fraction = fraction.padEnd(decimals, '0');\n }\n return BigInt(`${negative ? '-' : ''}${integer}${fraction}`);\n}\n//# sourceMappingURL=parseUnits.js.map","import { etherUnits } from '../../constants/unit.js';\nimport { parseUnits } from './parseUnits.js';\nexport function parseEther(ether, unit = 'wei') {\n return parseUnits(ether, etherUnits[unit]);\n}\n//# sourceMappingURL=parseEther.js.map","import { isHex } from '../index.js';\nexport function encodedLabelToLabelhash(label) {\n if (label.length !== 66)\n return null;\n if (label.indexOf('[') !== 0)\n return null;\n if (label.indexOf(']') !== 65)\n return null;\n const hash = `0x${label.slice(1, 65)}`;\n if (!isHex(hash))\n return null;\n return hash;\n}\n//# sourceMappingURL=encodedLabelToLabelhash.js.map","import { concat } from '../data/concat.js';\nimport { stringToBytes, toBytes } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { encodedLabelToLabelhash } from './encodedLabelToLabelhash.js';\n/**\n * @description Hashes ENS name\n *\n * - Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `namehash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.\n *\n * @example\n * namehash('wagmi-dev.eth')\n * '0xf246651c1b9a6b141d19c2604e9a58f567973833990f830d882534a747801359'\n *\n * @link https://eips.ethereum.org/EIPS/eip-137\n */\nexport function namehash(name) {\n let result = new Uint8Array(32).fill(0);\n if (!name)\n return bytesToHex(result);\n const labels = name.split('.');\n // Iterate in reverse order building up hash\n for (let i = labels.length - 1; i >= 0; i -= 1) {\n const hashFromEncodedLabel = encodedLabelToLabelhash(labels[i]);\n const hashed = hashFromEncodedLabel\n ? toBytes(hashFromEncodedLabel)\n : keccak256(stringToBytes(labels[i]), 'bytes');\n result = keccak256(concat([result, hashed]), 'bytes');\n }\n return bytesToHex(result);\n}\n//# sourceMappingURL=namehash.js.map","export function encodeLabelhash(hash) {\n return `[${hash.slice(2)}]`;\n}\n//# sourceMappingURL=encodeLabelhash.js.map","import { stringToBytes } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { encodedLabelToLabelhash } from './encodedLabelToLabelhash.js';\n/**\n * @description Hashes ENS label\n *\n * - Since ENS labels prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS labels](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `labelhash`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.\n *\n * @example\n * labelhash('eth')\n * '0x4f5b812789fc606be1b3b16908db13fc7a9adf7ca72641f84d75b47069d3d7f0'\n */\nexport function labelhash(label) {\n const result = new Uint8Array(32).fill(0);\n if (!label)\n return bytesToHex(result);\n return encodedLabelToLabelhash(label) || keccak256(stringToBytes(label));\n}\n//# sourceMappingURL=labelhash.js.map","import { stringToBytes } from '../encoding/toBytes.js';\nimport { encodeLabelhash } from './encodeLabelhash.js';\nimport { labelhash } from './labelhash.js';\n/*\n * @description Encodes a DNS packet into a ByteArray containing a UDP payload.\n */\nexport function packetToBytes(packet) {\n // strip leading and trailing `.`\n const value = packet.replace(/^\\.|\\.$/gm, '');\n if (value.length === 0)\n return new Uint8Array(1);\n const bytes = new Uint8Array(stringToBytes(value).byteLength + 2);\n let offset = 0;\n const list = value.split('.');\n for (let i = 0; i < list.length; i++) {\n let encoded = stringToBytes(list[i]);\n // if the length is > 255, make the encoded label value a labelhash\n // this is compatible with the universal resolver\n if (encoded.byteLength > 255)\n encoded = stringToBytes(encodeLabelhash(labelhash(list[i])));\n bytes[offset] = encoded.length;\n bytes.set(encoded, offset + 1);\n offset += encoded.length + 1;\n }\n if (bytes.byteLength !== offset + 1)\n return bytes.slice(0, offset + 1);\n return bytes;\n}\n//# sourceMappingURL=packetToBytes.js.map","import { addressResolverAbi, universalResolverResolveAbi, } from '../../constants/abis.js';\nimport { decodeFunctionResult } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeFunctionData } from '../../utils/abi/encodeFunctionData.js';\nimport { getChainContractAddress } from '../../utils/chain.js';\nimport { trim } from '../../utils/data/trim.js';\nimport { toHex } from '../../utils/encoding/toHex.js';\nimport { isNullUniversalResolverError } from '../../utils/ens/errors.js';\nimport { namehash } from '../../utils/ens/namehash.js';\nimport { packetToBytes } from '../../utils/ens/packetToBytes.js';\nimport { readContract, } from '../public/readContract.js';\n/**\n * Gets address for ENS name.\n *\n * - Docs: https://viem.sh/docs/ens/actions/getEnsAddress.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens\n *\n * Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.\n *\n * Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.\n *\n * @param client - Client to use\n * @param parameters - {@link GetEnsAddressParameters}\n * @returns Address for ENS name or `null` if not found. {@link GetEnsAddressReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getEnsAddress, normalize } from 'viem/ens'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const ensAddress = await getEnsAddress(client, {\n * name: normalize('wagmi-dev.eth'),\n * })\n * // '0xd2135CfB216b74109775236E36d4b433F1DF507B'\n */\nexport async function getEnsAddress(client, { blockNumber, blockTag, coinType, name, universalResolverAddress: universalResolverAddress_, }) {\n let universalResolverAddress = universalResolverAddress_;\n if (!universalResolverAddress) {\n if (!client.chain)\n throw new Error('client chain not configured. universalResolverAddress is required.');\n universalResolverAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'ensUniversalResolver',\n });\n }\n try {\n const functionData = encodeFunctionData({\n abi: addressResolverAbi,\n functionName: 'addr',\n ...(coinType != null\n ? { args: [namehash(name), BigInt(coinType)] }\n : { args: [namehash(name)] }),\n });\n const res = await readContract(client, {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n functionName: 'resolve',\n args: [toHex(packetToBytes(name)), functionData],\n blockNumber,\n blockTag,\n });\n if (res[0] === '0x')\n return null;\n const address = trim(decodeFunctionResult({\n abi: addressResolverAbi,\n args: coinType != null ? [namehash(name), BigInt(coinType)] : undefined,\n functionName: 'addr',\n data: res[0],\n }));\n if (address === '0x')\n return null;\n if (trim(address) === '0x00')\n return null;\n return address;\n }\n catch (err) {\n if (isNullUniversalResolverError(err, 'resolve'))\n return null;\n throw err;\n }\n}\n//# sourceMappingURL=getEnsAddress.js.map","import { BaseError } from './base.js';\nexport class EnsAvatarInvalidMetadataError extends BaseError {\n constructor({ data }) {\n super('Unable to extract image from metadata. The metadata may be malformed or invalid.', {\n metaMessages: [\n '- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.',\n '',\n `Provided data: ${JSON.stringify(data)}`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'EnsAvatarInvalidMetadataError'\n });\n }\n}\nexport class EnsAvatarInvalidNftUriError extends BaseError {\n constructor({ reason }) {\n super(`ENS NFT avatar URI is invalid. ${reason}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'EnsAvatarInvalidNftUriError'\n });\n }\n}\nexport class EnsAvatarUriResolutionError extends BaseError {\n constructor({ uri }) {\n super(`Unable to resolve ENS avatar URI \"${uri}\". The URI may be malformed, invalid, or does not respond with a valid image.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'EnsAvatarUriResolutionError'\n });\n }\n}\nexport class EnsAvatarUnsupportedNamespaceError extends BaseError {\n constructor({ namespace }) {\n super(`ENS NFT avatar namespace \"${namespace}\" is not supported. Must be \"erc721\" or \"erc1155\".`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'EnsAvatarUnsupportedNamespaceError'\n });\n }\n}\n//# sourceMappingURL=ens.js.map","import { readContract } from '../../../actions/public/readContract.js';\nimport { EnsAvatarInvalidMetadataError, EnsAvatarInvalidNftUriError, EnsAvatarUnsupportedNamespaceError, EnsAvatarUriResolutionError, } from '../../../errors/ens.js';\nconst networkRegex = /(?https?:\\/\\/[^\\/]*|ipfs:\\/|ipns:\\/|ar:\\/)?(?\\/)?(?ipfs\\/|ipns\\/)?(?[\\w\\-.]+)(?\\/.*)?/;\nconst ipfsHashRegex = /^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\\/(?[\\w\\-.]+))?(?\\/.*)?$/;\nconst base64Regex = /^data:([a-zA-Z\\-/+]*);base64,([^\"].*)/;\nconst dataURIRegex = /^data:([a-zA-Z\\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;\nexport async function isImageUri(uri) {\n try {\n const res = await fetch(uri, { method: 'HEAD' });\n // retrieve content type header to check if content is image\n if (res.status === 200) {\n const contentType = res.headers.get('content-type');\n return contentType?.startsWith('image/');\n }\n return false;\n }\n catch (error) {\n // if error is not cors related then fail\n if (typeof error === 'object' && typeof error.response !== 'undefined') {\n return false;\n }\n // fail in NodeJS, since the error is not cors but any other network issue\n // rome-ignore lint/suspicious/noPrototypeBuiltins:\n if (!globalThis.hasOwnProperty('Image'))\n return false;\n // in case of cors, use image api to validate if given url is an actual image\n return new Promise((resolve) => {\n const img = new Image();\n img.onload = () => {\n resolve(true);\n };\n img.onerror = () => {\n resolve(false);\n };\n img.src = uri;\n });\n }\n}\nexport function getGateway(custom, defaultGateway) {\n if (!custom)\n return defaultGateway;\n if (custom.endsWith('/'))\n return custom.slice(0, -1);\n return custom;\n}\nexport function resolveAvatarUri({ uri, gatewayUrls, }) {\n const isEncoded = base64Regex.test(uri);\n if (isEncoded)\n return { uri, isOnChain: true, isEncoded };\n const ipfsGateway = getGateway(gatewayUrls?.ipfs, 'https://ipfs.io');\n const arweaveGateway = getGateway(gatewayUrls?.arweave, 'https://arweave.net');\n const networkRegexMatch = uri.match(networkRegex);\n const { protocol, subpath, target, subtarget = '', } = networkRegexMatch?.groups || {};\n const isIPNS = protocol === 'ipns:/' || subpath === 'ipns/';\n const isIPFS = protocol === 'ipfs:/' || subpath === 'ipfs/' || ipfsHashRegex.test(uri);\n if (uri.startsWith('http') && !isIPNS && !isIPFS) {\n let replacedUri = uri;\n if (gatewayUrls?.arweave)\n replacedUri = uri.replace(/https:\\/\\/arweave.net/g, gatewayUrls?.arweave);\n return { uri: replacedUri, isOnChain: false, isEncoded: false };\n }\n if ((isIPNS || isIPFS) && target) {\n return {\n uri: `${ipfsGateway}/${isIPNS ? 'ipns' : 'ipfs'}/${target}${subtarget}`,\n isOnChain: false,\n isEncoded: false,\n };\n }\n else if (protocol === 'ar:/' && target) {\n return {\n uri: `${arweaveGateway}/${target}${subtarget || ''}`,\n isOnChain: false,\n isEncoded: false,\n };\n }\n let parsedUri = uri.replace(dataURIRegex, '');\n if (parsedUri.startsWith(' res.json());\n const image = await parseAvatarUri({\n gatewayUrls,\n uri: getJsonImage(res),\n });\n return image;\n }\n catch {\n throw new EnsAvatarUriResolutionError({ uri });\n }\n}\nexport async function parseAvatarUri({ gatewayUrls, uri, }) {\n const { uri: resolvedURI, isOnChain } = resolveAvatarUri({ uri, gatewayUrls });\n if (isOnChain)\n return resolvedURI;\n // check if resolvedURI is an image, if it is return the url\n const isImage = await isImageUri(resolvedURI);\n if (isImage)\n return resolvedURI;\n throw new EnsAvatarUriResolutionError({ uri });\n}\nexport function parseNftUri(uri_) {\n let uri = uri_;\n // parse valid nft spec (CAIP-22/CAIP-29)\n // @see: https://github.com/ChainAgnostic/CAIPs/tree/master/CAIPs\n if (uri.startsWith('did:nft:')) {\n // convert DID to CAIP\n uri = uri.replace('did:nft:', '').replace(/_/g, '/');\n }\n const [reference, asset_namespace, tokenID] = uri.split('/');\n const [eip_namespace, chainID] = reference.split(':');\n const [erc_namespace, contractAddress] = asset_namespace.split(':');\n if (!eip_namespace || eip_namespace.toLowerCase() !== 'eip155')\n throw new EnsAvatarInvalidNftUriError({ reason: 'Only EIP-155 supported' });\n if (!chainID)\n throw new EnsAvatarInvalidNftUriError({ reason: 'Chain ID not found' });\n if (!contractAddress)\n throw new EnsAvatarInvalidNftUriError({\n reason: 'Contract address not found',\n });\n if (!tokenID)\n throw new EnsAvatarInvalidNftUriError({ reason: 'Token ID not found' });\n if (!erc_namespace)\n throw new EnsAvatarInvalidNftUriError({ reason: 'ERC namespace not found' });\n return {\n chainID: parseInt(chainID),\n namespace: erc_namespace.toLowerCase(),\n contractAddress: contractAddress,\n tokenID,\n };\n}\nexport async function getNftTokenUri(client, { nft }) {\n if (nft.namespace === 'erc721') {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: 'tokenURI',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ name: 'tokenId', type: 'uint256' }],\n outputs: [{ name: '', type: 'string' }],\n },\n ],\n functionName: 'tokenURI',\n args: [BigInt(nft.tokenID)],\n });\n }\n if (nft.namespace === 'erc1155') {\n return readContract(client, {\n address: nft.contractAddress,\n abi: [\n {\n name: 'uri',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ name: '_id', type: 'uint256' }],\n outputs: [{ name: '', type: 'string' }],\n },\n ],\n functionName: 'uri',\n args: [BigInt(nft.tokenID)],\n });\n }\n throw new EnsAvatarUnsupportedNamespaceError({ namespace: nft.namespace });\n}\n//# sourceMappingURL=utils.js.map","import { getJsonImage, getMetadataAvatarUri, getNftTokenUri, parseAvatarUri, parseNftUri, resolveAvatarUri, } from './utils.js';\nexport async function parseAvatarRecord(client, { gatewayUrls, record, }) {\n if (/eip155:/i.test(record))\n return parseNftAvatarUri(client, { gatewayUrls, record });\n return parseAvatarUri({ uri: record, gatewayUrls });\n}\nasync function parseNftAvatarUri(client, { gatewayUrls, record, }) {\n // parse NFT URI into properties\n const nft = parseNftUri(record);\n // fetch tokenURI from the NFT contract\n const nftUri = await getNftTokenUri(client, { nft });\n // resolve the URI from the fetched tokenURI\n const { uri: resolvedNftUri, isOnChain, isEncoded, } = resolveAvatarUri({ uri: nftUri, gatewayUrls });\n // if the resolved URI is on chain, return the data\n if (isOnChain &&\n (resolvedNftUri.includes('data:application/json;base64,') ||\n resolvedNftUri.startsWith('{'))) {\n const encodedJson = isEncoded\n ? // if it is encoded, decode it\n atob(resolvedNftUri.replace('data:application/json;base64,', ''))\n : // if it isn't encoded assume it is a JSON string, but it could be anything (it will error if it is)\n resolvedNftUri;\n const decoded = JSON.parse(encodedJson);\n return parseAvatarUri({ uri: getJsonImage(decoded), gatewayUrls });\n }\n let uriTokenId = nft.tokenID;\n if (nft.namespace === 'erc1155')\n uriTokenId = uriTokenId.replace('0x', '').padStart(64, '0');\n return getMetadataAvatarUri({\n gatewayUrls,\n uri: resolvedNftUri.replace(/(?:0x)?{id}/, uriTokenId),\n });\n}\n//# sourceMappingURL=parseAvatarRecord.js.map","import { textResolverAbi, universalResolverResolveAbi, } from '../../constants/abis.js';\nimport { decodeFunctionResult } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeFunctionData } from '../../utils/abi/encodeFunctionData.js';\nimport { getChainContractAddress } from '../../utils/chain.js';\nimport { toHex } from '../../utils/encoding/toHex.js';\nimport { isNullUniversalResolverError } from '../../utils/ens/errors.js';\nimport { namehash } from '../../utils/ens/namehash.js';\nimport { packetToBytes } from '../../utils/ens/packetToBytes.js';\nimport { readContract, } from '../public/readContract.js';\n/**\n * Gets a text record for specified ENS name.\n *\n * - Docs: https://viem.sh/docs/ens/actions/getEnsResolver.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens\n *\n * Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract.\n *\n * Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.\n *\n * @param client - Client to use\n * @param parameters - {@link GetEnsTextParameters}\n * @returns Address for ENS resolver. {@link GetEnsTextReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getEnsText, normalize } from 'viem/ens'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const twitterRecord = await getEnsText(client, {\n * name: normalize('wagmi-dev.eth'),\n * key: 'com.twitter',\n * })\n * // 'wagmi_sh'\n */\nexport async function getEnsText(client, { blockNumber, blockTag, name, key, universalResolverAddress: universalResolverAddress_, }) {\n let universalResolverAddress = universalResolverAddress_;\n if (!universalResolverAddress) {\n if (!client.chain)\n throw new Error('client chain not configured. universalResolverAddress is required.');\n universalResolverAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'ensUniversalResolver',\n });\n }\n try {\n const res = await readContract(client, {\n address: universalResolverAddress,\n abi: universalResolverResolveAbi,\n functionName: 'resolve',\n args: [\n toHex(packetToBytes(name)),\n encodeFunctionData({\n abi: textResolverAbi,\n functionName: 'text',\n args: [namehash(name), key],\n }),\n ],\n blockNumber,\n blockTag,\n });\n if (res[0] === '0x')\n return null;\n const record = decodeFunctionResult({\n abi: textResolverAbi,\n functionName: 'text',\n data: res[0],\n });\n return record === '' ? null : record;\n }\n catch (err) {\n if (isNullUniversalResolverError(err, 'resolve'))\n return null;\n throw err;\n }\n}\n//# sourceMappingURL=getEnsText.js.map","import { parseAvatarRecord } from '../../utils/ens/avatar/parseAvatarRecord.js';\nimport { getEnsText } from './getEnsText.js';\n/**\n * Gets the avatar of an ENS name.\n *\n * - Docs: https://viem.sh/docs/ens/actions/getEnsAvatar.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens\n *\n * Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText.html) with `key` set to `'avatar'`.\n *\n * Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.\n *\n * @param client - Client to use\n * @param parameters - {@link GetEnsAvatarParameters}\n * @returns Avatar URI or `null` if not found. {@link GetEnsAvatarReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getEnsAvatar, normalize } from 'viem/ens'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const ensAvatar = await getEnsAvatar(client, {\n * name: normalize('wagmi-dev.eth'),\n * })\n * // 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio'\n */\nexport async function getEnsAvatar(client, { blockNumber, blockTag, gatewayUrls, name, universalResolverAddress, }) {\n const record = await getEnsText(client, {\n blockNumber,\n blockTag,\n key: 'avatar',\n name,\n universalResolverAddress,\n });\n if (!record)\n return null;\n try {\n return await parseAvatarRecord(client, { record, gatewayUrls });\n }\n catch {\n return null;\n }\n}\n//# sourceMappingURL=getEnsAvatar.js.map","import { universalResolverReverseAbi } from '../../constants/abis.js';\nimport { getChainContractAddress } from '../../utils/chain.js';\nimport { toHex } from '../../utils/encoding/toHex.js';\nimport { isNullUniversalResolverError } from '../../utils/ens/errors.js';\nimport { packetToBytes } from '../../utils/ens/packetToBytes.js';\nimport { readContract, } from '../public/readContract.js';\n/**\n * Gets primary name for specified address.\n *\n * - Docs: https://viem.sh/docs/ens/actions/getEnsName.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens\n *\n * Calls `reverse(bytes)` on ENS Universal Resolver Contract to \"reverse resolve\" the address to the primary ENS name.\n *\n * @param client - Client to use\n * @param parameters - {@link GetEnsNameParameters}\n * @returns Name or `null` if not found. {@link GetEnsNameReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getEnsName } from 'viem/ens'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const ensName = await getEnsName(client, {\n * address: '0xd2135CfB216b74109775236E36d4b433F1DF507B',\n * })\n * // 'wagmi-dev.eth'\n */\nexport async function getEnsName(client, { address, blockNumber, blockTag, universalResolverAddress: universalResolverAddress_, }) {\n let universalResolverAddress = universalResolverAddress_;\n if (!universalResolverAddress) {\n if (!client.chain)\n throw new Error('client chain not configured. universalResolverAddress is required.');\n universalResolverAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'ensUniversalResolver',\n });\n }\n const reverseNode = `${address.toLowerCase().substring(2)}.addr.reverse`;\n try {\n const res = await readContract(client, {\n address: universalResolverAddress,\n abi: universalResolverReverseAbi,\n functionName: 'reverse',\n args: [toHex(packetToBytes(reverseNode))],\n blockNumber,\n blockTag,\n });\n return res[0];\n }\n catch (err) {\n if (isNullUniversalResolverError(err, 'reverse'))\n return null;\n throw err;\n }\n}\n//# sourceMappingURL=getEnsName.js.map","import { getChainContractAddress } from '../../utils/chain.js';\nimport { toHex } from '../../utils/encoding/toHex.js';\nimport { packetToBytes } from '../../utils/ens/packetToBytes.js';\nimport { readContract, } from '../public/readContract.js';\n/**\n * Gets resolver for ENS name.\n *\n * - Docs: https://viem.sh/docs/ens/actions/getEnsResolver.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/ens\n *\n * Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name.\n *\n * Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize.html) function for this.\n *\n * @param client - Client to use\n * @param parameters - {@link GetEnsResolverParameters}\n * @returns Address for ENS resolver. {@link GetEnsResolverReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getEnsResolver, normalize } from 'viem/ens'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const resolverAddress = await getEnsResolver(client, {\n * name: normalize('wagmi-dev.eth'),\n * })\n * // '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41'\n */\nexport async function getEnsResolver(client, { blockNumber, blockTag, name, universalResolverAddress: universalResolverAddress_, }) {\n let universalResolverAddress = universalResolverAddress_;\n if (!universalResolverAddress) {\n if (!client.chain)\n throw new Error('client chain not configured. universalResolverAddress is required.');\n universalResolverAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'ensUniversalResolver',\n });\n }\n const [resolverAddress] = await readContract(client, {\n address: universalResolverAddress,\n abi: [\n {\n inputs: [{ type: 'bytes' }],\n name: 'findResolver',\n outputs: [{ type: 'address' }, { type: 'bytes32' }],\n stateMutability: 'view',\n type: 'function',\n },\n ],\n functionName: 'findResolver',\n args: [toHex(packetToBytes(name))],\n blockNumber,\n blockTag,\n });\n return resolverAddress;\n}\n//# sourceMappingURL=getEnsResolver.js.map","import { createFilterRequestScope } from '../../utils/filters/createFilterRequestScope.js';\n/**\n * Creates a [`Filter`](https://viem.sh/docs/glossary/types.html#filter) to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges.html).\n *\n * - Docs: https://viem.sh/docs/actions/public/createBlockFilter.html\n * - JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter)\n *\n * @param client - Client to use\n * @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateBlockFilterReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { createBlockFilter } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const filter = await createBlockFilter(client)\n * // { id: \"0x345a6572337856574a76364e457a4366\", type: 'block' }\n */\nexport async function createBlockFilter(client) {\n const getRequest = createFilterRequestScope(client, {\n method: 'eth_newBlockFilter',\n });\n const id = await client.request({\n method: 'eth_newBlockFilter',\n });\n return { id, request: getRequest(id), type: 'block' };\n}\n//# sourceMappingURL=createBlockFilter.js.map","import { encodeEventTopics, } from '../../utils/abi/encodeEventTopics.js';\nimport { numberToHex } from '../../utils/encoding/toHex.js';\nimport { createFilterRequestScope } from '../../utils/filters/createFilterRequestScope.js';\n/**\n * Creates a [`Filter`](https://viem.sh/docs/glossary/types.html#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges.html).\n *\n * - Docs: https://viem.sh/docs/actions/public/createEventFilter.html\n * - JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter)\n *\n * @param client - Client to use\n * @param parameters - {@link CreateEventFilterParameters}\n * @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateEventFilterReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { createEventFilter } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const filter = await createEventFilter(client, {\n * address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2',\n * })\n */\nexport async function createEventFilter(client, { address, args, event, events: events_, fromBlock, strict, toBlock, } = {}) {\n const events = events_ ?? (event ? [event] : undefined);\n const getRequest = createFilterRequestScope(client, {\n method: 'eth_newFilter',\n });\n let topics = [];\n if (events) {\n topics = [\n events.flatMap((event) => encodeEventTopics({\n abi: [event],\n eventName: event.name,\n args,\n })),\n ];\n if (event)\n topics = topics[0];\n }\n const id = await client.request({\n method: 'eth_newFilter',\n params: [\n {\n address,\n fromBlock: typeof fromBlock === 'bigint' ? numberToHex(fromBlock) : fromBlock,\n toBlock: typeof toBlock === 'bigint' ? numberToHex(toBlock) : toBlock,\n ...(topics.length ? { topics } : {}),\n },\n ],\n });\n return {\n abi: events,\n args,\n eventName: event ? event.name : undefined,\n fromBlock,\n id,\n request: getRequest(id),\n strict,\n toBlock,\n type: 'event',\n };\n}\n//# sourceMappingURL=createEventFilter.js.map","import { createFilterRequestScope } from '../../utils/filters/createFilterRequestScope.js';\n/**\n * Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges.html).\n *\n * - Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter.html\n * - JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter)\n *\n * @param client - Client to use\n * @returns [`Filter`](https://viem.sh/docs/glossary/types.html#filter). {@link CreateBlockFilterReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { createPendingTransactionFilter } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const filter = await createPendingTransactionFilter(client)\n * // { id: \"0x345a6572337856574a76364e457a4366\", type: 'transaction' }\n */\nexport async function createPendingTransactionFilter(client) {\n const getRequest = createFilterRequestScope(client, {\n method: 'eth_newPendingTransactionFilter',\n });\n const id = await client.request({\n method: 'eth_newPendingTransactionFilter',\n });\n return { id, request: getRequest(id), type: 'transaction' };\n}\n//# sourceMappingURL=createPendingTransactionFilter.js.map","import { numberToHex } from '../../utils/encoding/toHex.js';\n/**\n * Returns the balance of an address in wei.\n *\n * - Docs: https://viem.sh/docs/actions/public/getBalance.html\n * - JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance)\n *\n * You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther.html).\n *\n * ```ts\n * const balance = await getBalance(client, {\n * address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * blockTag: 'safe'\n * })\n * const balanceAsEther = formatEther(balance)\n * // \"6.942\"\n * ```\n *\n * @param client - Client to use\n * @param parameters - {@link GetBalanceParameters}\n * @returns The balance of the address in wei. {@link GetBalanceReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getBalance } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const balance = await getBalance(client, {\n * address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * })\n * // 10000000000000000000000n (wei)\n */\nexport async function getBalance(client, { address, blockNumber, blockTag = 'latest' }) {\n const blockNumberHex = blockNumber ? numberToHex(blockNumber) : undefined;\n const balance = await client.request({\n method: 'eth_getBalance',\n params: [address, blockNumberHex || blockTag],\n });\n return BigInt(balance);\n}\n//# sourceMappingURL=getBalance.js.map","import { hexToNumber } from '../../utils/encoding/fromHex.js';\nimport { numberToHex } from '../../utils/encoding/toHex.js';\n/**\n * Returns the number of Transactions at a block number, hash, or tag.\n *\n * - Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount.html\n * - JSON-RPC Methods:\n * - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`.\n * - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`.\n *\n * @param client - Client to use\n * @param parameters - {@link GetBlockTransactionCountParameters}\n * @returns The block transaction count. {@link GetBlockTransactionCountReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getBlockTransactionCount } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const count = await getBlockTransactionCount(client)\n */\nexport async function getBlockTransactionCount(client, { blockHash, blockNumber, blockTag = 'latest', } = {}) {\n const blockNumberHex = blockNumber !== undefined ? numberToHex(blockNumber) : undefined;\n let count;\n if (blockHash) {\n count = await client.request({\n method: 'eth_getBlockTransactionCountByHash',\n params: [blockHash],\n });\n }\n else {\n count = await client.request({\n method: 'eth_getBlockTransactionCountByNumber',\n params: [blockNumberHex || blockTag],\n });\n }\n return hexToNumber(count);\n}\n//# sourceMappingURL=getBlockTransactionCount.js.map","import { numberToHex } from '../../utils/encoding/toHex.js';\n/**\n * Retrieves the bytecode at an address.\n *\n * - Docs: https://viem.sh/docs/contract/getBytecode.html\n * - JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode)\n *\n * @param client - Client to use\n * @param parameters - {@link GetBytecodeParameters}\n * @returns The contract's bytecode. {@link GetBytecodeReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getBytecode } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const code = await getBytecode(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * })\n */\nexport async function getBytecode(client, { address, blockNumber, blockTag = 'latest' }) {\n const blockNumberHex = blockNumber !== undefined ? numberToHex(blockNumber) : undefined;\n const hex = await client.request({\n method: 'eth_getCode',\n params: [address, blockNumberHex || blockTag],\n });\n if (hex === '0x')\n return undefined;\n return hex;\n}\n//# sourceMappingURL=getBytecode.js.map","export function formatFeeHistory(feeHistory) {\n return {\n baseFeePerGas: feeHistory.baseFeePerGas.map((value) => BigInt(value)),\n gasUsedRatio: feeHistory.gasUsedRatio,\n oldestBlock: BigInt(feeHistory.oldestBlock),\n reward: feeHistory.reward?.map((reward) => reward.map((value) => BigInt(value))),\n };\n}\n//# sourceMappingURL=feeHistory.js.map","import { numberToHex } from '../../utils/encoding/toHex.js';\nimport { formatFeeHistory } from '../../utils/formatters/feeHistory.js';\n/**\n * Returns a collection of historical gas information.\n *\n * - Docs: https://viem.sh/docs/actions/public/getFeeHistory.html\n * - JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory)\n *\n * @param client - Client to use\n * @param parameters - {@link GetFeeHistoryParameters}\n * @returns The gas estimate (in wei). {@link GetFeeHistoryReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getFeeHistory } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const feeHistory = await getFeeHistory(client, {\n * blockCount: 4,\n * rewardPercentiles: [25, 75],\n * })\n */\nexport async function getFeeHistory(client, { blockCount, blockNumber, blockTag = 'latest', rewardPercentiles, }) {\n const blockNumberHex = blockNumber ? numberToHex(blockNumber) : undefined;\n const feeHistory = await client.request({\n method: 'eth_feeHistory',\n params: [\n numberToHex(blockCount),\n blockNumberHex || blockTag,\n rewardPercentiles,\n ],\n });\n return formatFeeHistory(feeHistory);\n}\n//# sourceMappingURL=getFeeHistory.js.map","import { DecodeLogDataMismatch, DecodeLogTopicsMismatch, } from '../../errors/abi.js';\nimport { decodeEventLog } from '../../utils/abi/decodeEventLog.js';\nimport { formatLog } from '../../utils/formatters/log.js';\n/**\n * Returns a list of event logs since the filter was created.\n *\n * - Docs: https://viem.sh/docs/actions/public/getFilterLogs.html\n * - JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs)\n *\n * `getFilterLogs` is only compatible with **event filters**.\n *\n * @param client - Client to use\n * @param parameters - {@link GetFilterLogsParameters}\n * @returns A list of event logs. {@link GetFilterLogsReturnType}\n *\n * @example\n * import { createPublicClient, http, parseAbiItem } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { createEventFilter, getFilterLogs } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const filter = await createEventFilter(client, {\n * address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n * event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'),\n * })\n * const logs = await getFilterLogs(client, { filter })\n */\nexport async function getFilterLogs(_client, { filter, }) {\n const strict = filter.strict ?? false;\n const logs = await filter.request({\n method: 'eth_getFilterLogs',\n params: [filter.id],\n });\n return logs\n .map((log) => {\n try {\n const { eventName, args } = 'abi' in filter && filter.abi\n ? decodeEventLog({\n abi: filter.abi,\n data: log.data,\n topics: log.topics,\n strict,\n })\n : { eventName: undefined, args: undefined };\n return formatLog(log, { args, eventName });\n }\n catch (err) {\n let eventName;\n let isUnnamed;\n if (err instanceof DecodeLogDataMismatch ||\n err instanceof DecodeLogTopicsMismatch) {\n // If strict mode is on, and log data/topics do not match event definition, skip.\n if ('strict' in filter && filter.strict)\n return;\n eventName = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x) => !('name' in x && x.name));\n }\n // Set args to empty if there is an error decoding (e.g. indexed/non-indexed params mismatch).\n return formatLog(log, { args: isUnnamed ? [] : {}, eventName });\n }\n })\n .filter(Boolean);\n}\n//# sourceMappingURL=getFilterLogs.js.map","import { numberToHex } from '../../utils/encoding/toHex.js';\n/**\n * Returns the value from a storage slot at a given address.\n *\n * - Docs: https://viem.sh/docs/contract/getStorageAt.html\n * - JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat)\n *\n * @param client - Client to use\n * @param parameters - {@link GetStorageAtParameters}\n * @returns The value of the storage slot. {@link GetStorageAtReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getStorageAt } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const code = await getStorageAt(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * slot: toHex(0),\n * })\n */\nexport async function getStorageAt(client, { address, blockNumber, blockTag = 'latest', slot }) {\n const blockNumberHex = blockNumber !== undefined ? numberToHex(blockNumber) : undefined;\n const data = await client.request({\n method: 'eth_getStorageAt',\n params: [address, slot, blockNumberHex || blockTag],\n });\n return data;\n}\n//# sourceMappingURL=getStorageAt.js.map","import { TransactionNotFoundError } from '../../errors/transaction.js';\nimport { numberToHex } from '../../utils/encoding/toHex.js';\nimport { formatTransaction, } from '../../utils/formatters/transaction.js';\n/**\n * Returns information about a [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) given a hash or block identifier.\n *\n * - Docs: https://viem.sh/docs/actions/public/getTransaction.html\n * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/fetching-transactions\n * - JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash)\n *\n * @param client - Client to use\n * @param parameters - {@link GetTransactionParameters}\n * @returns The transaction information. {@link GetTransactionReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getTransaction } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const transaction = await getTransaction(client, {\n * hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',\n * })\n */\nexport async function getTransaction(client, { blockHash, blockNumber, blockTag: blockTag_, hash, index, }) {\n const blockTag = blockTag_ || 'latest';\n const blockNumberHex = blockNumber !== undefined ? numberToHex(blockNumber) : undefined;\n let transaction = null;\n if (hash) {\n transaction = await client.request({\n method: 'eth_getTransactionByHash',\n params: [hash],\n });\n }\n else if (blockHash) {\n transaction = await client.request({\n method: 'eth_getTransactionByBlockHashAndIndex',\n params: [blockHash, numberToHex(index)],\n });\n }\n else if (blockNumberHex || blockTag) {\n transaction = await client.request({\n method: 'eth_getTransactionByBlockNumberAndIndex',\n params: [blockNumberHex || blockTag, numberToHex(index)],\n });\n }\n if (!transaction)\n throw new TransactionNotFoundError({\n blockHash,\n blockNumber,\n blockTag,\n hash,\n index,\n });\n const format = client.chain?.formatters?.transaction?.format || formatTransaction;\n return format(transaction);\n}\n//# sourceMappingURL=getTransaction.js.map","import { getBlockNumber } from './getBlockNumber.js';\nimport { getTransaction } from './getTransaction.js';\n/**\n * Returns the number of blocks passed (confirmations) since the transaction was processed on a block.\n *\n * - Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations.html\n * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/fetching-transactions\n * - JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations)\n *\n * @param client - Client to use\n * @param parameters - {@link GetTransactionConfirmationsParameters}\n * @returns The number of blocks passed since the transaction was processed. If confirmations is 0, then the Transaction has not been confirmed & processed yet. {@link GetTransactionConfirmationsReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getTransactionConfirmations } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const confirmations = await getTransactionConfirmations(client, {\n * hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',\n * })\n */\nexport async function getTransactionConfirmations(client, { hash, transactionReceipt }) {\n const [blockNumber, transaction] = await Promise.all([\n getBlockNumber(client),\n hash ? getTransaction(client, { hash }) : undefined,\n ]);\n const transactionBlockNumber = transactionReceipt?.blockNumber || transaction?.blockNumber;\n if (!transactionBlockNumber)\n return 0n;\n return blockNumber - transactionBlockNumber + 1n;\n}\n//# sourceMappingURL=getTransactionConfirmations.js.map","import { TransactionReceiptNotFoundError } from '../../errors/transaction.js';\nimport { formatTransactionReceipt, } from '../../utils/formatters/transactionReceipt.js';\n/**\n * Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms.html#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash.\n *\n * - Docs: https://viem.sh/docs/actions/public/getTransactionReceipt.html\n * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/fetching-transactions\n * - JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionreceipt)\n *\n * @param client - Client to use\n * @param parameters - {@link GetTransactionReceiptParameters}\n * @returns The transaction receipt. {@link GetTransactionReceiptReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getTransactionReceipt } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const transactionReceipt = await getTransactionReceipt(client, {\n * hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',\n * })\n */\nexport async function getTransactionReceipt(client, { hash }) {\n const receipt = await client.request({\n method: 'eth_getTransactionReceipt',\n params: [hash],\n });\n if (!receipt)\n throw new TransactionReceiptNotFoundError({ hash });\n const format = client.chain?.formatters?.transactionReceipt?.format ||\n formatTransactionReceipt;\n return format(receipt);\n}\n//# sourceMappingURL=getTransactionReceipt.js.map","import { multicall3Abi } from '../../constants/abis.js';\nimport { AbiDecodingZeroDataError } from '../../errors/abi.js';\nimport { RawContractError } from '../../errors/contract.js';\nimport { decodeFunctionResult } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getChainContractAddress } from '../../utils/chain.js';\nimport { getContractError } from '../../utils/errors/getContractError.js';\nimport { readContract } from './readContract.js';\n/**\n * Similar to [`readContract`](https://viem.sh/docs/contract/readContract.html), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall).\n *\n * - Docs: https://viem.sh/docs/contract/multicall.html\n *\n * @param client - Client to use\n * @param parameters - {@link MulticallParameters}\n * @returns An array of results with accompanying status. {@link MulticallReturnType}\n *\n * @example\n * import { createPublicClient, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { multicall } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const abi = parseAbi([\n * 'function balanceOf(address) view returns (uint256)',\n * 'function totalSupply() view returns (uint256)',\n * ])\n * const results = await multicall(client, {\n * contracts: [\n * {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi,\n * functionName: 'balanceOf',\n * args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],\n * },\n * {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi,\n * functionName: 'totalSupply',\n * },\n * ],\n * })\n * // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]\n */\nexport async function multicall(client, args) {\n const { allowFailure = true, batchSize: batchSize_, blockNumber, blockTag, contracts: contracts_, multicallAddress: multicallAddress_, } = args;\n const batchSize = batchSize_ ??\n ((typeof client.batch?.multicall === 'object' &&\n client.batch.multicall.batchSize) ||\n 1024);\n // Fix type cast from `Narrow` in type definition.\n const contracts = contracts_;\n let multicallAddress = multicallAddress_;\n if (!multicallAddress) {\n if (!client.chain)\n throw new Error('client chain not configured. multicallAddress is required.');\n multicallAddress = getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'multicall3',\n });\n }\n const chunkedCalls = [[]];\n let currentChunk = 0;\n let currentChunkSize = 0;\n for (let i = 0; i < contracts.length; i++) {\n const { abi, address, args, functionName } = contracts[i];\n try {\n const callData = encodeFunctionData({\n abi,\n args,\n functionName,\n });\n currentChunkSize += callData.length;\n if (batchSize > 0 && currentChunkSize > batchSize) {\n currentChunk++;\n currentChunkSize = (callData.length - 2) / 2;\n chunkedCalls[currentChunk] = [];\n }\n chunkedCalls[currentChunk] = [\n ...chunkedCalls[currentChunk],\n {\n allowFailure: true,\n callData,\n target: address,\n },\n ];\n }\n catch (err) {\n const error = getContractError(err, {\n abi,\n address,\n args,\n docsPath: '/docs/contract/multicall',\n functionName,\n });\n if (!allowFailure)\n throw error;\n chunkedCalls[currentChunk] = [\n ...chunkedCalls[currentChunk],\n {\n allowFailure: true,\n callData: '0x',\n target: address,\n },\n ];\n }\n }\n const results = await Promise.all(chunkedCalls.map((calls) => readContract(client, {\n abi: multicall3Abi,\n address: multicallAddress,\n args: [calls],\n blockNumber,\n blockTag,\n functionName: 'aggregate3',\n })));\n return results.flat().map(({ returnData, success }, i) => {\n const calls = chunkedCalls.flat();\n const { callData } = calls[i];\n const { abi, address, functionName, args } = contracts[i];\n try {\n if (callData === '0x')\n throw new AbiDecodingZeroDataError();\n if (!success)\n throw new RawContractError({ data: returnData });\n const result = decodeFunctionResult({\n abi,\n args,\n data: returnData,\n functionName: functionName,\n });\n return allowFailure ? { result, status: 'success' } : result;\n }\n catch (err) {\n const error = getContractError(err, {\n abi,\n address,\n args,\n docsPath: '/docs/contract/multicall',\n functionName,\n });\n if (!allowFailure)\n throw error;\n return { error, result: undefined, status: 'failure' };\n }\n });\n}\n//# sourceMappingURL=multicall.js.map","export const universalSignatureValidatorByteCode = '0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572';\n//# sourceMappingURL=contracts.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// 100 lines of code in the file are duplicated from noble-hashes (utils).\n// This is OK: `abstract` directory does not use noble-hashes.\n// User may opt-in into using different hashing library. This way, noble-hashes\n// won't be included into their bundle.\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst u8a = (a) => a instanceof Uint8Array;\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\nexport function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n}\nexport function hexToNumber(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // Big Endian\n return BigInt(hex === '' ? '0' : `0x${hex}`);\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// BE: Big Endian, LE: Little Endian\nexport function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nexport function numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, '0'));\n}\nexport function numberToBytesLE(n, len) {\n return numberToBytesBE(n, len).reverse();\n}\n// Unpadded, rarely used\nexport function numberToVarBytesBE(n) {\n return hexToBytes(numberToHexUnpadded(n));\n}\n/**\n * Takes hex string or Uint8Array, converts to Uint8Array.\n * Validates output length.\n * Will throw error for other types.\n * @param title descriptive title for an error e.g. 'private key'\n * @param hex hex string or Uint8Array\n * @param expectedLength optional, will compare to result array's length\n * @returns\n */\nexport function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === 'string') {\n try {\n res = hexToBytes(hex);\n }\n catch (e) {\n throw new Error(`${title} must be valid hex string, got \"${hex}\". Cause: ${e}`);\n }\n }\n else if (u8a(hex)) {\n // Uint8Array.from() instead of hash.slice() because node.js Buffer\n // is instance of Uint8Array, and its slice() creates **mutable** copy\n res = Uint8Array.from(hex);\n }\n else {\n throw new Error(`${title} must be hex string or Uint8Array`);\n }\n const len = res.length;\n if (typeof expectedLength === 'number' && len !== expectedLength)\n throw new Error(`${title} expected ${expectedLength} bytes, got ${len}`);\n return res;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n const r = new Uint8Array(arrays.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrays.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\nexport function equalBytes(b1, b2) {\n // We don't care about timing attacks here\n if (b1.length !== b2.length)\n return false;\n for (let i = 0; i < b1.length; i++)\n if (b1[i] !== b2[i])\n return false;\n return true;\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n// Bit operations\n/**\n * Calculates amount of bits in a bigint.\n * Same as `n.toString(2).length`\n */\nexport function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n}\n/**\n * Gets single bit at position.\n * NOTE: first bit position is 0 (same as arrays)\n * Same as `!!+Array.from(n.toString(2)).reverse()[pos]`\n */\nexport function bitGet(n, pos) {\n return (n >> BigInt(pos)) & _1n;\n}\n/**\n * Sets single bit at position.\n */\nexport const bitSet = (n, pos, value) => {\n return n | ((value ? _1n : _0n) << BigInt(pos));\n};\n/**\n * Calculate mask for N bits. Not using ** operator with bigints because of old engines.\n * Same as BigInt(`0b${Array(i).fill('1').join('')}`)\n */\nexport const bitMask = (n) => (_2n << BigInt(n - 1)) - _1n;\n// DRBG\nconst u8n = (data) => new Uint8Array(data); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n * const drbg = createHmacDRBG(32, 32, hmac);\n * drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n if (typeof hmacFn !== 'function')\n throw new Error('hmacFn must be a function');\n // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n let i = 0; // Iterations counter, will throw when over 1000\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n const reseed = (seed = u8n()) => {\n // HMAC-DRBG reseed() function. Steps D-G\n k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n v = h(); // v = hmac(k || v)\n if (seed.length === 0)\n return;\n k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n v = h(); // v = hmac(k || v)\n };\n const gen = () => {\n // HMAC-DRBG generate() function\n if (i++ >= 1000)\n throw new Error('drbg: tried 1000 values');\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed); // Steps D-G\n let res = undefined; // Step H: grind until k is in [1..n-1]\n while (!(res = pred(gen())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n bigint: (val) => typeof val === 'bigint',\n function: (val) => typeof val === 'function',\n boolean: (val) => typeof val === 'boolean',\n string: (val) => typeof val === 'string',\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== 'function')\n throw new Error(`Invalid validator \"${type}\", expected function`);\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error(`Invalid param ${String(fieldName)}=${val} (${typeof val}), expected ${type}`);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n//# sourceMappingURL=utils.js.map","import { isHex, toBytes } from '../../index.js';\nimport { equalBytes } from '@noble/curves/abstract/utils';\nexport function isBytesEqual(a_, b_) {\n const a = isHex(a_) ? toBytes(a_) : a_;\n const b = isHex(b_) ? toBytes(b_) : b_;\n return equalBytes(a, b);\n}\n//# sourceMappingURL=isBytesEqual.js.map","import { universalSignatureValidatorAbi } from '../../constants/abis.js';\nimport { universalSignatureValidatorByteCode } from '../../constants/contracts.js';\nimport { CallExecutionError } from '../../errors/contract.js';\nimport { isBytesEqual } from '../../utils/data/isBytesEqual.js';\nimport { encodeDeployData, isHex, toHex } from '../../utils/index.js';\nimport { call } from './call.js';\n/**\n * Verifies a message hash on chain using ERC-6492.\n *\n * @param client - Client to use.\n * @param parameters - {@link VerifyHashParameters}\n * @returns Whether or not the signature is valid. {@link VerifyHashReturnType}\n */\nexport async function verifyHash(client, { address, hash, signature, ...callRequest }) {\n const signatureHex = isHex(signature) ? signature : toHex(signature);\n try {\n const { data } = await call(client, {\n data: encodeDeployData({\n abi: universalSignatureValidatorAbi,\n args: [address, hash, signatureHex],\n bytecode: universalSignatureValidatorByteCode,\n }),\n ...callRequest,\n });\n return isBytesEqual(data ?? '0x0', '0x1');\n }\n catch (error) {\n if (error instanceof CallExecutionError) {\n // if the execution fails, the signature was not valid and an internal method inside of the validator reverted\n // this can happen for many reasons, for example if signer can not be recovered from the signature\n // or if the signature has no valid format\n return false;\n }\n throw error;\n }\n}\n//# sourceMappingURL=verifyHash.js.map","import { hashMessage } from '../../utils/index.js';\nimport { verifyHash } from './verifyHash.js';\n/**\n * Verify that a message was signed by the provided address.\n *\n * Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492).\n *\n * - Docs {@link https://viem.sh/docs/actions/public/verifyMessage.html}\n *\n * @param client - Client to use.\n * @param parameters - {@link VerifyMessageParameters}\n * @returns Whether or not the signature is valid. {@link VerifyMessageReturnType}\n */\nexport async function verifyMessage(client, { address, message, signature, ...callRequest }) {\n const hash = hashMessage(message);\n return verifyHash(client, {\n address,\n hash,\n signature,\n ...callRequest,\n });\n}\n//# sourceMappingURL=verifyMessage.js.map","import { hashTypedData } from '../../utils/signature/hashTypedData.js';\nimport { verifyHash } from './verifyHash.js';\n/**\n * Verify that typed data was signed by the provided address.\n *\n * - Docs {@link https://viem.sh/docs/actions/public/verifyTypedData.html}\n *\n * @param client - Client to use.\n * @param parameters - {@link VerifyTypedDataParameters}\n * @returns Whether or not the signature is valid. {@link VerifyTypedDataReturnType}\n */\nexport async function verifyTypedData(client, { address, signature, message, primaryType, types, domain, ...callRequest }) {\n const hash = hashTypedData({ message, primaryType, types, domain });\n return verifyHash(client, {\n address,\n hash,\n signature,\n ...callRequest,\n });\n}\n//# sourceMappingURL=verifyTypedData.js.map","import { hexToBigInt } from '../../utils/encoding/fromHex.js';\nimport { observe } from '../../utils/observe.js';\nimport { poll } from '../../utils/poll.js';\nimport { stringify } from '../../utils/stringify.js';\nimport { getBlockNumber, } from './getBlockNumber.js';\n/**\n * Watches and returns incoming block numbers.\n *\n * - Docs: https://viem.sh/docs/actions/public/watchBlockNumber.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/watching-blocks\n * - JSON-RPC Methods:\n * - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval.\n * - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `\"newHeads\"` event.\n *\n * @param client - Client to use\n * @param parameters - {@link WatchBlockNumberParameters}\n * @returns A function that can be invoked to stop watching for new block numbers. {@link WatchBlockNumberReturnType}\n *\n * @example\n * import { createPublicClient, watchBlockNumber, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const unwatch = watchBlockNumber(client, {\n * onBlockNumber: (blockNumber) => console.log(blockNumber),\n * })\n */\nexport function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onBlockNumber, onError, poll: poll_, pollingInterval = client.pollingInterval, }) {\n const enablePolling = typeof poll_ !== 'undefined' ? poll_ : client.transport.type !== 'webSocket';\n let prevBlockNumber;\n const pollBlockNumber = () => {\n const observerId = stringify([\n 'watchBlockNumber',\n client.uid,\n emitOnBegin,\n emitMissed,\n pollingInterval,\n ]);\n return observe(observerId, { onBlockNumber, onError }, (emit) => poll(async () => {\n try {\n const blockNumber = await getBlockNumber(client, { cacheTime: 0 });\n if (prevBlockNumber) {\n // If the current block number is the same as the previous,\n // we can skip.\n if (blockNumber === prevBlockNumber)\n return;\n // If we have missed out on some previous blocks, and the\n // `emitMissed` flag is truthy, let's emit those blocks.\n if (blockNumber - prevBlockNumber > 1 && emitMissed) {\n for (let i = prevBlockNumber + 1n; i < blockNumber; i++) {\n emit.onBlockNumber(i, prevBlockNumber);\n prevBlockNumber = i;\n }\n }\n }\n // If the next block number is greater than the previous,\n // it is not in the past, and we can emit the new block number.\n if (!prevBlockNumber || blockNumber > prevBlockNumber) {\n emit.onBlockNumber(blockNumber, prevBlockNumber);\n prevBlockNumber = blockNumber;\n }\n }\n catch (err) {\n emit.onError?.(err);\n }\n }, {\n emitOnBegin,\n interval: pollingInterval,\n }));\n };\n const subscribeBlockNumber = () => {\n let active = true;\n let unsubscribe = () => (active = false);\n (async () => {\n try {\n const { unsubscribe: unsubscribe_ } = await client.transport.subscribe({\n params: ['newHeads'],\n onData(data) {\n if (!active)\n return;\n const blockNumber = hexToBigInt(data.result?.number);\n onBlockNumber(blockNumber, prevBlockNumber);\n prevBlockNumber = blockNumber;\n },\n onError(error) {\n onError?.(error);\n },\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n }\n catch (err) {\n onError?.(err);\n }\n })();\n return unsubscribe;\n };\n return enablePolling ? pollBlockNumber() : subscribeBlockNumber();\n}\n//# sourceMappingURL=watchBlockNumber.js.map","import { TransactionNotFoundError, TransactionReceiptNotFoundError, WaitForTransactionReceiptTimeoutError, } from '../../errors/transaction.js';\nimport { observe } from '../../utils/observe.js';\nimport { withRetry } from '../../utils/promise/withRetry.js';\nimport { stringify } from '../../utils/stringify.js';\nimport { getBlock } from './getBlock.js';\nimport { getTransaction, } from './getTransaction.js';\nimport { getTransactionReceipt, } from './getTransactionReceipt.js';\nimport { watchBlockNumber } from './watchBlockNumber.js';\n/**\n * Waits for the [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms.html#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms.html#transaction-receipt). If the Transaction reverts, then the action will throw an error.\n *\n * - Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt.html\n * - Example: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/transactions/sending-transactions\n * - JSON-RPC Methods:\n * - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed.\n * - If a Transaction has been replaced:\n * - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions\n * - Checks if one of the Transactions is a replacement\n * - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt).\n *\n * The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions).\n *\n * Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce.\n *\n * There are 3 types of Transaction Replacement reasons:\n *\n * - `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`)\n * - `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`)\n * - `replaced`: The Transaction has been replaced (e.g. different `value` or `data`)\n *\n * @param client - Client to use\n * @param parameters - {@link WaitForTransactionReceiptParameters}\n * @returns The transaction receipt. {@link WaitForTransactionReceiptReturnType}\n *\n * @example\n * import { createPublicClient, waitForTransactionReceipt, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const transactionReceipt = await waitForTransactionReceipt(client, {\n * hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d',\n * })\n */\nexport async function waitForTransactionReceipt(client, { confirmations = 1, hash, onReplaced, pollingInterval = client.pollingInterval, timeout, }) {\n const observerId = stringify(['waitForTransactionReceipt', client.uid, hash]);\n let transaction;\n let replacedTransaction;\n let receipt;\n let retrying = false;\n return new Promise((resolve, reject) => {\n if (timeout)\n setTimeout(() => reject(new WaitForTransactionReceiptTimeoutError({ hash })), timeout);\n const _unobserve = observe(observerId, { onReplaced, resolve, reject }, (emit) => {\n const _unwatch = watchBlockNumber(client, {\n emitMissed: true,\n emitOnBegin: true,\n poll: true,\n pollingInterval,\n async onBlockNumber(blockNumber_) {\n if (retrying)\n return;\n let blockNumber = blockNumber_;\n const done = (fn) => {\n _unwatch();\n fn();\n _unobserve();\n };\n try {\n // If we already have a valid receipt, let's check if we have enough\n // confirmations. If we do, then we can resolve.\n if (receipt) {\n if (blockNumber - receipt.blockNumber + 1n < confirmations)\n return;\n done(() => emit.resolve(receipt));\n return;\n }\n // Get the transaction to check if it's been replaced.\n // We need to retry as some RPC Providers may be slow to sync\n // up mined transactions.\n if (!transaction) {\n retrying = true;\n await withRetry(async () => {\n transaction = await getTransaction(client, { hash });\n if (transaction.blockNumber)\n blockNumber = transaction.blockNumber;\n }, {\n // exponential backoff\n delay: ({ count }) => ~~(1 << count) * 200,\n retryCount: 6,\n });\n retrying = false;\n }\n // Get the receipt to check if it's been processed.\n receipt = await getTransactionReceipt(client, { hash });\n // Check if we have enough confirmations. If not, continue polling.\n if (confirmations > 0 &&\n blockNumber - receipt.blockNumber + 1n < confirmations)\n return;\n done(() => emit.resolve(receipt));\n }\n catch (err) {\n // If the receipt is not found, the transaction will be pending.\n // We need to check if it has potentially been replaced.\n if (transaction &&\n (err instanceof TransactionNotFoundError ||\n err instanceof TransactionReceiptNotFoundError)) {\n replacedTransaction = transaction;\n // Let's retrieve the transactions from the current block.\n const block = await getBlock(client, {\n blockNumber,\n includeTransactions: true,\n });\n const replacementTransaction = block.transactions.find(({ from, nonce }) => from === replacedTransaction.from &&\n nonce === replacedTransaction.nonce);\n // If we couldn't find a replacement transaction, continue polling.\n if (!replacementTransaction)\n return;\n // If we found a replacement transaction, return it's receipt.\n receipt = await getTransactionReceipt(client, {\n hash: replacementTransaction.hash,\n });\n // Check if we have enough confirmations. If not, continue polling.\n if (blockNumber - receipt.blockNumber + 1n < confirmations)\n return;\n let reason = 'replaced';\n if (replacementTransaction.to === replacedTransaction.to &&\n replacementTransaction.value === replacedTransaction.value) {\n reason = 'repriced';\n }\n else if (replacementTransaction.from === replacementTransaction.to &&\n replacementTransaction.value === 0n) {\n reason = 'cancelled';\n }\n done(() => {\n emit.onReplaced?.({\n reason,\n replacedTransaction: replacedTransaction,\n transaction: replacementTransaction,\n transactionReceipt: receipt,\n });\n emit.resolve(receipt);\n });\n }\n else {\n done(() => emit.reject(err));\n }\n }\n },\n });\n });\n });\n}\n//# sourceMappingURL=waitForTransactionReceipt.js.map","import { formatBlock } from '../../utils/formatters/block.js';\nimport { observe } from '../../utils/observe.js';\nimport { poll } from '../../utils/poll.js';\nimport { stringify } from '../../utils/stringify.js';\nimport { getBlock } from './getBlock.js';\n/**\n * Watches and returns information for incoming blocks.\n *\n * - Docs: https://viem.sh/docs/actions/public/watchBlocks.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/blocks/watching-blocks\n * - JSON-RPC Methods:\n * - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval.\n * - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `\"newHeads\"` event.\n *\n * @param client - Client to use\n * @param parameters - {@link WatchBlocksParameters}\n * @returns A function that can be invoked to stop watching for new block numbers. {@link WatchBlocksReturnType}\n *\n * @example\n * import { createPublicClient, watchBlocks, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const unwatch = watchBlocks(client, {\n * onBlock: (block) => console.log(block),\n * })\n */\nexport function watchBlocks(client, { blockTag = 'latest', emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval, }) {\n const enablePolling = typeof poll_ !== 'undefined' ? poll_ : client.transport.type !== 'webSocket';\n const includeTransactions = includeTransactions_ ?? false;\n let prevBlock;\n const pollBlocks = () => {\n const observerId = stringify([\n 'watchBlocks',\n client.uid,\n emitMissed,\n emitOnBegin,\n includeTransactions,\n pollingInterval,\n ]);\n return observe(observerId, { onBlock, onError }, (emit) => poll(async () => {\n try {\n const block = await getBlock(client, {\n blockTag,\n includeTransactions,\n });\n if (block.number && prevBlock?.number) {\n // If the current block number is the same as the previous,\n // we can skip.\n if (block.number === prevBlock.number)\n return;\n // If we have missed out on some previous blocks, and the\n // `emitMissed` flag is truthy, let's emit those blocks.\n if (block.number - prevBlock.number > 1 && emitMissed) {\n for (let i = prevBlock?.number + 1n; i < block.number; i++) {\n const block = await getBlock(client, {\n blockNumber: i,\n includeTransactions,\n });\n emit.onBlock(block, prevBlock);\n prevBlock = block;\n }\n }\n }\n if (\n // If no previous block exists, emit.\n !prevBlock?.number ||\n // If the block tag is \"pending\" with no block number, emit.\n (blockTag === 'pending' && !block?.number) ||\n // If the next block number is greater than the previous block number, emit.\n // We don't want to emit blocks in the past.\n (block.number && block.number > prevBlock.number)) {\n emit.onBlock(block, prevBlock);\n prevBlock = block;\n }\n }\n catch (err) {\n emit.onError?.(err);\n }\n }, {\n emitOnBegin,\n interval: pollingInterval,\n }));\n };\n const subscribeBlocks = () => {\n let active = true;\n let unsubscribe = () => (active = false);\n (async () => {\n try {\n const { unsubscribe: unsubscribe_ } = await client.transport.subscribe({\n params: ['newHeads'],\n onData(data) {\n if (!active)\n return;\n const format = client.chain?.formatters?.block?.format || formatBlock;\n const block = format(data.result);\n onBlock(block, prevBlock);\n prevBlock = block;\n },\n onError(error) {\n onError?.(error);\n },\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n }\n catch (err) {\n onError?.(err);\n }\n })();\n return unsubscribe;\n };\n return enablePolling ? pollBlocks() : subscribeBlocks();\n}\n//# sourceMappingURL=watchBlocks.js.map","import { observe } from '../../utils/observe.js';\nimport { poll } from '../../utils/poll.js';\nimport { stringify } from '../../utils/stringify.js';\nimport { DecodeLogDataMismatch, DecodeLogTopicsMismatch, } from '../../errors/abi.js';\nimport { InvalidInputRpcError } from '../../errors/rpc.js';\nimport { decodeEventLog, encodeEventTopics, formatLog, } from '../../utils/index.js';\nimport { createEventFilter, } from './createEventFilter.js';\nimport { getBlockNumber } from './getBlockNumber.js';\nimport { getFilterChanges } from './getFilterChanges.js';\nimport { getLogs } from './getLogs.js';\nimport { uninstallFilter } from './uninstallFilter.js';\n/**\n * Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms.html#event-log).\n *\n * - Docs: https://viem.sh/docs/actions/public/watchEvent.html\n * - JSON-RPC Methods:\n * - **RPC Provider supports `eth_newFilter`:**\n * - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize).\n * - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges).\n * - **RPC Provider does not support `eth_newFilter`:**\n * - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval.\n *\n * This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent.html#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent.html#onLogs).\n *\n * `watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter.html) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs.html) instead.\n *\n * @param client - Client to use\n * @param parameters - {@link WatchEventParameters}\n * @returns A function that can be invoked to stop watching for new Event Logs. {@link WatchEventReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { watchEvent } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const unwatch = watchEvent(client, {\n * onLogs: (logs) => console.log(logs),\n * })\n */\nexport function watchEvent(client, { address, args, batch = true, event, events, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_, }) {\n const enablePolling = typeof poll_ !== 'undefined' ? poll_ : client.transport.type !== 'webSocket';\n const strict = strict_ ?? false;\n const pollEvent = () => {\n const observerId = stringify([\n 'watchEvent',\n address,\n args,\n batch,\n client.uid,\n event,\n pollingInterval,\n ]);\n return observe(observerId, { onLogs, onError }, (emit) => {\n let previousBlockNumber;\n let filter;\n let initialized = false;\n const unwatch = poll(async () => {\n if (!initialized) {\n try {\n filter = (await createEventFilter(client, {\n address,\n args,\n event: event,\n events,\n strict,\n }));\n }\n catch { }\n initialized = true;\n return;\n }\n try {\n let logs;\n if (filter) {\n logs = await getFilterChanges(client, { filter });\n }\n else {\n // If the filter doesn't exist, we will fall back to use `getLogs`.\n // The fall back exists because some RPC Providers do not support filters.\n // Fetch the block number to use for `getLogs`.\n const blockNumber = await getBlockNumber(client);\n // If the block number has changed, we will need to fetch the logs.\n // If the block number doesn't exist, we are yet to reach the first poll interval,\n // so do not emit any logs.\n if (previousBlockNumber && previousBlockNumber !== blockNumber) {\n logs = await getLogs(client, {\n address,\n args,\n event: event,\n events,\n fromBlock: previousBlockNumber + 1n,\n toBlock: blockNumber,\n });\n }\n else {\n logs = [];\n }\n previousBlockNumber = blockNumber;\n }\n if (logs.length === 0)\n return;\n if (batch)\n emit.onLogs(logs);\n else\n logs.forEach((log) => emit.onLogs([log]));\n }\n catch (err) {\n // If a filter has been set and gets uninstalled, providers will throw an InvalidInput error.\n // Reinitalize the filter when this occurs\n if (filter && err instanceof InvalidInputRpcError)\n initialized = false;\n emit.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval,\n });\n return async () => {\n if (filter)\n await uninstallFilter(client, { filter });\n unwatch();\n };\n });\n };\n const subscribeEvent = () => {\n let active = true;\n let unsubscribe = () => (active = false);\n (async () => {\n try {\n const events_ = events ?? (event ? [event] : undefined);\n let topics = [];\n if (events_) {\n topics = [\n events_.flatMap((event) => encodeEventTopics({\n abi: [event],\n eventName: event.name,\n args,\n })),\n ];\n if (event)\n topics = topics[0];\n }\n const { unsubscribe: unsubscribe_ } = await client.transport.subscribe({\n params: ['logs', { address, topics }],\n onData(data) {\n if (!active)\n return;\n const log = data.result;\n try {\n const { eventName, args } = decodeEventLog({\n abi: events_,\n data: log.data,\n topics: log.topics,\n strict,\n });\n const formatted = formatLog(log, {\n args,\n eventName: eventName,\n });\n onLogs([formatted]);\n }\n catch (err) {\n let eventName;\n let isUnnamed;\n if (err instanceof DecodeLogDataMismatch ||\n err instanceof DecodeLogTopicsMismatch) {\n // If strict mode is on, and log data/topics do not match event definition, skip.\n if (strict_)\n return;\n eventName = err.abiItem.name;\n isUnnamed = err.abiItem.inputs?.some((x) => !('name' in x && x.name));\n }\n // Set args to empty if there is an error decoding (e.g. indexed/non-indexed params mismatch).\n const formatted = formatLog(log, {\n args: isUnnamed ? [] : {},\n eventName,\n });\n onLogs([formatted]);\n }\n },\n onError(error) {\n onError?.(error);\n },\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n }\n catch (err) {\n onError?.(err);\n }\n })();\n return unsubscribe;\n };\n return enablePolling ? pollEvent() : subscribeEvent();\n}\n//# sourceMappingURL=watchEvent.js.map","import { observe } from '../../utils/observe.js';\nimport { poll } from '../../utils/poll.js';\nimport { stringify } from '../../utils/stringify.js';\nimport { createPendingTransactionFilter } from './createPendingTransactionFilter.js';\nimport { getFilterChanges } from './getFilterChanges.js';\nimport { uninstallFilter } from './uninstallFilter.js';\n/**\n * Watches and returns pending transaction hashes.\n *\n * - Docs: https://viem.sh/docs/actions/public/watchPendingTransactions.html\n * - JSON-RPC Methods:\n * - When `poll: true`\n * - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter.\n * - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval.\n * - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `\"newPendingTransactions\"` event.\n *\n * This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions.html#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions.html#ontransactions).\n *\n * @param client - Client to use\n * @param parameters - {@link WatchPendingTransactionsParameters}\n * @returns A function that can be invoked to stop watching for new pending transaction hashes. {@link WatchPendingTransactionsReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { watchPendingTransactions } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const unwatch = await watchPendingTransactions(client, {\n * onTransactions: (hashes) => console.log(hashes),\n * })\n */\nexport function watchPendingTransactions(client, { batch = true, onError, onTransactions, poll: poll_, pollingInterval = client.pollingInterval, }) {\n const enablePolling = typeof poll_ !== 'undefined' ? poll_ : client.transport.type !== 'webSocket';\n const pollPendingTransactions = () => {\n const observerId = stringify([\n 'watchPendingTransactions',\n client.uid,\n batch,\n pollingInterval,\n ]);\n return observe(observerId, { onTransactions, onError }, (emit) => {\n let filter;\n const unwatch = poll(async () => {\n try {\n if (!filter) {\n try {\n filter = await createPendingTransactionFilter(client);\n return;\n }\n catch (err) {\n unwatch();\n throw err;\n }\n }\n const hashes = await getFilterChanges(client, { filter });\n if (hashes.length === 0)\n return;\n if (batch)\n emit.onTransactions(hashes);\n else\n hashes.forEach((hash) => emit.onTransactions([hash]));\n }\n catch (err) {\n emit.onError?.(err);\n }\n }, {\n emitOnBegin: true,\n interval: pollingInterval,\n });\n return async () => {\n if (filter)\n await uninstallFilter(client, { filter });\n unwatch();\n };\n });\n };\n const subscribePendingTransactions = () => {\n let active = true;\n let unsubscribe = () => (active = false);\n (async () => {\n try {\n const { unsubscribe: unsubscribe_ } = await client.transport.subscribe({\n params: ['newPendingTransactions'],\n onData(data) {\n if (!active)\n return;\n const transaction = data.result;\n onTransactions([transaction]);\n },\n onError(error) {\n onError?.(error);\n },\n });\n unsubscribe = unsubscribe_;\n if (!active)\n unsubscribe();\n }\n catch (err) {\n onError?.(err);\n }\n })();\n return unsubscribe;\n };\n return enablePolling\n ? pollPendingTransactions()\n : subscribePendingTransactions();\n}\n//# sourceMappingURL=watchPendingTransactions.js.map","import { getEnsAddress, } from '../../actions/ens/getEnsAddress.js';\nimport { getEnsAvatar, } from '../../actions/ens/getEnsAvatar.js';\nimport { getEnsName, } from '../../actions/ens/getEnsName.js';\nimport { getEnsResolver, } from '../../actions/ens/getEnsResolver.js';\nimport { getEnsText, } from '../../actions/ens/getEnsText.js';\nimport { call, } from '../../actions/public/call.js';\nimport { createBlockFilter, } from '../../actions/public/createBlockFilter.js';\nimport { createContractEventFilter, } from '../../actions/public/createContractEventFilter.js';\nimport { createEventFilter, } from '../../actions/public/createEventFilter.js';\nimport { createPendingTransactionFilter, } from '../../actions/public/createPendingTransactionFilter.js';\nimport { estimateContractGas, } from '../../actions/public/estimateContractGas.js';\nimport { estimateGas, } from '../../actions/public/estimateGas.js';\nimport { getBalance, } from '../../actions/public/getBalance.js';\nimport { getBlock, } from '../../actions/public/getBlock.js';\nimport { getBlockNumber, } from '../../actions/public/getBlockNumber.js';\nimport { getBlockTransactionCount, } from '../../actions/public/getBlockTransactionCount.js';\nimport { getBytecode, } from '../../actions/public/getBytecode.js';\nimport { getChainId, } from '../../actions/public/getChainId.js';\nimport { getFeeHistory, } from '../../actions/public/getFeeHistory.js';\nimport { getFilterChanges, } from '../../actions/public/getFilterChanges.js';\nimport { getFilterLogs, } from '../../actions/public/getFilterLogs.js';\nimport { getGasPrice, } from '../../actions/public/getGasPrice.js';\nimport { getLogs, } from '../../actions/public/getLogs.js';\nimport { getStorageAt, } from '../../actions/public/getStorageAt.js';\nimport { getTransaction, } from '../../actions/public/getTransaction.js';\nimport { getTransactionConfirmations, } from '../../actions/public/getTransactionConfirmations.js';\nimport { getTransactionCount, } from '../../actions/public/getTransactionCount.js';\nimport { getTransactionReceipt, } from '../../actions/public/getTransactionReceipt.js';\nimport { multicall, } from '../../actions/public/multicall.js';\nimport { readContract, } from '../../actions/public/readContract.js';\nimport { simulateContract, } from '../../actions/public/simulateContract.js';\nimport { uninstallFilter, } from '../../actions/public/uninstallFilter.js';\nimport { verifyMessage, } from '../../actions/public/verifyMessage.js';\nimport { verifyTypedData, } from '../../actions/public/verifyTypedData.js';\nimport { waitForTransactionReceipt, } from '../../actions/public/waitForTransactionReceipt.js';\nimport { watchBlockNumber, } from '../../actions/public/watchBlockNumber.js';\nimport { watchBlocks, } from '../../actions/public/watchBlocks.js';\nimport { watchContractEvent, } from '../../actions/public/watchContractEvent.js';\nimport { watchEvent, } from '../../actions/public/watchEvent.js';\nimport { watchPendingTransactions, } from '../../actions/public/watchPendingTransactions.js';\nexport function publicActions(client) {\n return {\n call: (args) => call(client, args),\n createBlockFilter: () => createBlockFilter(client),\n createContractEventFilter: (args) => createContractEventFilter(client, args),\n createEventFilter: (args) => createEventFilter(client, args),\n createPendingTransactionFilter: () => createPendingTransactionFilter(client),\n estimateContractGas: (args) => estimateContractGas(client, args),\n estimateGas: (args) => estimateGas(client, args),\n getBalance: (args) => getBalance(client, args),\n getBlock: (args) => getBlock(client, args),\n getBlockNumber: (args) => getBlockNumber(client, args),\n getBlockTransactionCount: (args) => getBlockTransactionCount(client, args),\n getBytecode: (args) => getBytecode(client, args),\n getChainId: () => getChainId(client),\n getEnsAddress: (args) => getEnsAddress(client, args),\n getEnsAvatar: (args) => getEnsAvatar(client, args),\n getEnsName: (args) => getEnsName(client, args),\n getEnsResolver: (args) => getEnsResolver(client, args),\n getEnsText: (args) => getEnsText(client, args),\n getFeeHistory: (args) => getFeeHistory(client, args),\n getFilterChanges: (args) => getFilterChanges(client, args),\n getFilterLogs: (args) => getFilterLogs(client, args),\n getGasPrice: () => getGasPrice(client),\n getLogs: (args) => getLogs(client, args),\n getStorageAt: (args) => getStorageAt(client, args),\n getTransaction: (args) => getTransaction(client, args),\n getTransactionConfirmations: (args) => getTransactionConfirmations(client, args),\n getTransactionCount: (args) => getTransactionCount(client, args),\n getTransactionReceipt: (args) => getTransactionReceipt(client, args),\n multicall: (args) => multicall(client, args),\n readContract: (args) => readContract(client, args),\n simulateContract: (args) => simulateContract(client, args),\n verifyMessage: (args) => verifyMessage(client, args),\n verifyTypedData: (args) => verifyTypedData(client, args),\n uninstallFilter: (args) => uninstallFilter(client, args),\n waitForTransactionReceipt: (args) => waitForTransactionReceipt(client, args),\n watchBlocks: (args) => watchBlocks(client, args),\n watchBlockNumber: (args) => watchBlockNumber(client, args),\n watchContractEvent: (args) => watchContractEvent(client, args),\n watchEvent: (args) => watchEvent(client, args),\n watchPendingTransactions: (args) => watchPendingTransactions(client, args),\n };\n}\n//# sourceMappingURL=public.js.map","import { createClient } from './createClient.js';\nimport { publicActions } from './decorators/public.js';\nexport function createPublicClient(parameters) {\n const { key = 'public', name = 'Public Client' } = parameters;\n const client = createClient({\n ...parameters,\n key,\n name,\n type: 'publicClient',\n });\n return client.extend(publicActions);\n}\n//# sourceMappingURL=createPublicClient.js.map","import { encodeDeployData } from '../../utils/abi/encodeDeployData.js';\nimport { sendTransaction, } from './sendTransaction.js';\n/**\n * Deploys a contract to the network, given bytecode and constructor arguments.\n *\n * - Docs: https://viem.sh/docs/contract/deployContract.html\n * - Examples: https://stackblitz.com/github/wagmi-dev/viem/tree/main/examples/contracts/deploying-contracts\n *\n * @param client - Client to use\n * @param parameters - {@link DeployContractParameters}\n * @returns The [Transaction](https://viem.sh/docs/glossary/terms.html#transaction) hash. {@link DeployContractReturnType}\n *\n * @example\n * import { createWalletClient, http } from 'viem'\n * import { privateKeyToAccount } from 'viem/accounts'\n * import { mainnet } from 'viem/chains'\n * import { deployContract } from 'viem/contract'\n *\n * const client = createWalletClient({\n * account: privateKeyToAccount('0x…'),\n * chain: mainnet,\n * transport: http(),\n * })\n * const hash = await deployContract(client, {\n * abi: [],\n * account: '0x…,\n * bytecode: '0x608060405260405161083e38038061083e833981016040819052610...',\n * })\n */\nexport function deployContract(walletClient, { abi, args, bytecode, ...request }) {\n const calldata = encodeDeployData({\n abi,\n args,\n bytecode,\n });\n return sendTransaction(walletClient, {\n ...request,\n data: calldata,\n });\n}\n//# sourceMappingURL=deployContract.js.map","import { checksumAddress } from '../../utils/address/getAddress.js';\n/**\n * Returns a list of account addresses owned by the wallet or client.\n *\n * - Docs: https://viem.sh/docs/actions/wallet/getAddresses.html\n * - JSON-RPC Methods: [`eth_accounts`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_accounts)\n *\n * @param client - Client to use\n * @returns List of account addresses owned by the wallet or client. {@link GetAddressesReturnType}\n *\n * @example\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getAddresses } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const accounts = await getAddresses(client)\n */\nexport async function getAddresses(client) {\n const addresses = await client.request({ method: 'eth_accounts' });\n return addresses.map((address) => checksumAddress(address));\n}\n//# sourceMappingURL=getAddresses.js.map","/**\n * Gets the wallets current permissions.\n *\n * - Docs: https://viem.sh/docs/actions/wallet/getPermissions.html\n * - JSON-RPC Methods: [`wallet_getPermissions`](https://eips.ethereum.org/EIPS/eip-2255)\n *\n * @param client - Client to use\n * @returns The wallet permissions. {@link GetPermissionsReturnType}\n *\n * @example\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getPermissions } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const permissions = await getPermissions(client)\n */\nexport async function getPermissions(client) {\n const permissions = await client.request({ method: 'wallet_getPermissions' });\n return permissions;\n}\n//# sourceMappingURL=getPermissions.js.map","import { getAddress } from '../../utils/address/getAddress.js';\n/**\n * Requests a list of accounts managed by a wallet.\n *\n * - Docs: https://viem.sh/docs/actions/wallet/requestAddresses.html\n * - JSON-RPC Methods: [`eth_requestAccounts`](https://eips.ethereum.org/EIPS/eip-1102)\n *\n * Sends a request to the wallet, asking for permission to access the user's accounts. After the user accepts the request, it will return a list of accounts (addresses).\n *\n * This API can be useful for dapps that need to access the user's accounts in order to execute transactions or interact with smart contracts.\n *\n * @param client - Client to use\n * @returns List of accounts managed by a wallet {@link RequestAddressesReturnType}\n *\n * @example\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { requestAddresses } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const accounts = await requestAddresses(client)\n */\nexport async function requestAddresses(client) {\n const addresses = await client.request({ method: 'eth_requestAccounts' });\n return addresses.map((address) => getAddress(address));\n}\n//# sourceMappingURL=requestAddresses.js.map","/**\n * Requests permissions for a wallet.\n *\n * - Docs: https://viem.sh/docs/actions/wallet/requestPermissions.html\n * - JSON-RPC Methods: [`wallet_requestPermissions`](https://eips.ethereum.org/EIPS/eip-2255)\n *\n * @param client - Client to use\n * @param parameters - {@link RequestPermissionsParameters}\n * @returns The wallet permissions. {@link RequestPermissionsReturnType}\n *\n * @example\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { requestPermissions } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const permissions = await requestPermissions(client, {\n * eth_accounts: {}\n * })\n */\nexport async function requestPermissions(client, permissions) {\n return client.request({\n method: 'wallet_requestPermissions',\n params: [permissions],\n });\n}\n//# sourceMappingURL=requestPermissions.js.map","import { parseAccount } from '../../accounts/utils/parseAccount.js';\nimport { AccountNotFoundError } from '../../errors/account.js';\nimport { stringToHex, toHex } from '../../utils/encoding/toHex.js';\n/**\n * Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message))`.\n *\n * - Docs: https://viem.sh/docs/actions/wallet/signMessage.html\n * - JSON-RPC Methods:\n * - JSON-RPC Accounts: [`personal_sign`](https://docs.metamask.io/guide/signing-data.html#personal-sign)\n * - Local Accounts: Signs locally. No JSON-RPC request.\n *\n * With the calculated signature, you can:\n * - use [`verifyMessage`](https://viem.sh/docs/utilities/verifyMessage.html) to verify the signature,\n * - use [`recoverMessageAddress`](https://viem.sh/docs/utilities/recoverMessageAddress.html) to recover the signing address from a signature.\n *\n * @param client - Client to use\n * @param parameters - {@link SignMessageParameters}\n * @returns The signed message. {@link SignMessageReturnType}\n *\n * @example\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { signMessage } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const signature = await signMessage(client, {\n * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * message: 'hello world',\n * })\n *\n * @example\n * // Account Hoisting\n * import { createWalletClient, custom } from 'viem'\n * import { privateKeyToAccount } from 'viem/accounts'\n * import { mainnet } from 'viem/chains'\n * import { signMessage } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * account: privateKeyToAccount('0x…'),\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const signature = await signMessage(client, {\n * message: 'hello world',\n * })\n */\nexport async function signMessage(client, { account: account_ = client.account, message, }) {\n if (!account_)\n throw new AccountNotFoundError({\n docsPath: '/docs/actions/wallet/signMessage',\n });\n const account = parseAccount(account_);\n if (account.type === 'local')\n return account.signMessage({ message });\n const message_ = (() => {\n if (typeof message === 'string')\n return stringToHex(message);\n if (message.raw instanceof Uint8Array)\n return toHex(message.raw);\n return message.raw;\n })();\n return client.request({\n method: 'personal_sign',\n params: [message_, account.address],\n });\n}\n//# sourceMappingURL=signMessage.js.map","import { parseAccount } from '../../accounts/utils/parseAccount.js';\nimport { AccountNotFoundError } from '../../errors/account.js';\nimport { isHex } from '../../utils/data/isHex.js';\nimport { stringify } from '../../utils/stringify.js';\nimport { validateTypedData } from '../../utils/typedData.js';\n/**\n * Signs typed data and calculates an Ethereum-specific signature in [https://eips.ethereum.org/EIPS/eip-712](https://eips.ethereum.org/EIPS/eip-712): `sign(keccak256(\"\\x19\\x01\" ‖ domainSeparator ‖ hashStruct(message)))`\n *\n * - Docs: https://viem.sh/docs/actions/wallet/signTypedData.html\n * - JSON-RPC Methods:\n * - JSON-RPC Accounts: [`eth_signTypedData_v4`](https://docs.metamask.io/guide/signing-data.html#signtypeddata-v4)\n * - Local Accounts: Signs locally. No JSON-RPC request.\n *\n * @param client - Client to use\n * @param parameters - {@link SignTypedDataParameters}\n * @returns The signed data. {@link SignTypedDataReturnType}\n *\n * @example\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { signTypedData } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const signature = await signTypedData(client, {\n * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * domain: {\n * name: 'Ether Mail',\n * version: '1',\n * chainId: 1,\n * verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',\n * },\n * types: {\n * Person: [\n * { name: 'name', type: 'string' },\n * { name: 'wallet', type: 'address' },\n * ],\n * Mail: [\n * { name: 'from', type: 'Person' },\n * { name: 'to', type: 'Person' },\n * { name: 'contents', type: 'string' },\n * ],\n * },\n * primaryType: 'Mail',\n * message: {\n * from: {\n * name: 'Cow',\n * wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',\n * },\n * to: {\n * name: 'Bob',\n * wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',\n * },\n * contents: 'Hello, Bob!',\n * },\n * })\n *\n * @example\n * // Account Hoisting\n * import { createWalletClient, http } from 'viem'\n * import { privateKeyToAccount } from 'viem/accounts'\n * import { mainnet } from 'viem/chains'\n * import { signTypedData } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * account: privateKeyToAccount('0x…'),\n * chain: mainnet,\n * transport: http(),\n * })\n * const signature = await signTypedData(client, {\n * domain: {\n * name: 'Ether Mail',\n * version: '1',\n * chainId: 1,\n * verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',\n * },\n * types: {\n * Person: [\n * { name: 'name', type: 'string' },\n * { name: 'wallet', type: 'address' },\n * ],\n * Mail: [\n * { name: 'from', type: 'Person' },\n * { name: 'to', type: 'Person' },\n * { name: 'contents', type: 'string' },\n * ],\n * },\n * primaryType: 'Mail',\n * message: {\n * from: {\n * name: 'Cow',\n * wallet: '0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826',\n * },\n * to: {\n * name: 'Bob',\n * wallet: '0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB',\n * },\n * contents: 'Hello, Bob!',\n * },\n * })\n */\nexport async function signTypedData(client, { account: account_ = client.account, domain, message, primaryType, types: types_, }) {\n if (!account_)\n throw new AccountNotFoundError({\n docsPath: '/docs/actions/wallet/signTypedData',\n });\n const account = parseAccount(account_);\n const types = {\n EIP712Domain: [\n typeof domain?.name === 'string' && { name: 'name', type: 'string' },\n domain?.version && { name: 'version', type: 'string' },\n typeof domain?.chainId === 'number' && {\n name: 'chainId',\n type: 'uint256',\n },\n domain?.verifyingContract && {\n name: 'verifyingContract',\n type: 'address',\n },\n domain?.salt && { name: 'salt', type: 'bytes32' },\n ].filter(Boolean),\n ...types_,\n };\n // Need to do a runtime validation check on addresses, byte ranges, integer ranges, etc\n // as we can't statically check this with TypeScript.\n validateTypedData({\n domain,\n message,\n primaryType,\n types,\n });\n if (account.type === 'local')\n return account.signTypedData({\n domain,\n primaryType,\n types,\n message,\n });\n const typedData = stringify({ domain: domain ?? {}, primaryType, types, message }, (_, value) => (isHex(value) ? value.toLowerCase() : value));\n return client.request({\n method: 'eth_signTypedData_v4',\n params: [account.address, typedData],\n });\n}\n//# sourceMappingURL=signTypedData.js.map","import { numberToHex } from '../../utils/encoding/toHex.js';\n/**\n * Switch the target chain in a wallet.\n *\n * - Docs: https://viem.sh/docs/actions/wallet/switchChain.html\n * - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-3326)\n *\n * @param client - Client to use\n * @param parameters - {@link SwitchChainParameters}\n *\n * @example\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet, optimism } from 'viem/chains'\n * import { switchChain } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * await switchChain(client, { id: optimism.id })\n */\nexport async function switchChain(client, { id }) {\n await client.request({\n method: 'wallet_switchEthereumChain',\n params: [\n {\n chainId: numberToHex(id),\n },\n ],\n });\n}\n//# sourceMappingURL=switchChain.js.map","/**\n * Adds an EVM chain to the wallet.\n *\n * - Docs: https://viem.sh/docs/actions/wallet/watchAsset.html\n * - JSON-RPC Methods: [`eth_switchEthereumChain`](https://eips.ethereum.org/EIPS/eip-747)\n *\n * @param client - Client to use\n * @param parameters - {@link WatchAssetParameters}\n * @returns Boolean indicating if the token was successfully added. {@link WatchAssetReturnType}\n *\n * @example\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { watchAsset } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const success = await watchAsset(client, {\n * type: 'ERC20',\n * options: {\n * address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n * decimals: 18,\n * symbol: 'WETH',\n * },\n * })\n */\nexport async function watchAsset(client, params) {\n const added = await client.request({\n method: 'wallet_watchAsset',\n params,\n });\n return added;\n}\n//# sourceMappingURL=watchAsset.js.map","import { getChainId, } from '../../actions/public/getChainId.js';\nimport { addChain, } from '../../actions/wallet/addChain.js';\nimport { deployContract, } from '../../actions/wallet/deployContract.js';\nimport { getAddresses, } from '../../actions/wallet/getAddresses.js';\nimport { getPermissions, } from '../../actions/wallet/getPermissions.js';\nimport { requestAddresses, } from '../../actions/wallet/requestAddresses.js';\nimport { requestPermissions, } from '../../actions/wallet/requestPermissions.js';\nimport { sendTransaction, } from '../../actions/wallet/sendTransaction.js';\nimport { signMessage, } from '../../actions/wallet/signMessage.js';\nimport { signTypedData, } from '../../actions/wallet/signTypedData.js';\nimport { switchChain, } from '../../actions/wallet/switchChain.js';\nimport { watchAsset, } from '../../actions/wallet/watchAsset.js';\nimport { writeContract, } from '../../actions/wallet/writeContract.js';\nexport function walletActions(client) {\n return {\n addChain: (args) => addChain(client, args),\n deployContract: (args) => deployContract(client, args),\n getAddresses: () => getAddresses(client),\n getChainId: () => getChainId(client),\n getPermissions: () => getPermissions(client),\n requestAddresses: () => requestAddresses(client),\n requestPermissions: (args) => requestPermissions(client, args),\n sendTransaction: (args) => sendTransaction(client, args),\n signMessage: (args) => signMessage(client, args),\n signTypedData: (args) => signTypedData(client, args),\n switchChain: (args) => switchChain(client, args),\n watchAsset: (args) => watchAsset(client, args),\n writeContract: (args) => writeContract(client, args),\n };\n}\n//# sourceMappingURL=wallet.js.map","import { createClient } from './createClient.js';\nimport { walletActions } from './decorators/wallet.js';\nexport function createWalletClient(parameters) {\n const { key = 'wallet', name = 'Wallet Client', transport } = parameters;\n const client = createClient({\n ...parameters,\n key,\n name,\n transport: (opts) => transport({ ...opts, retryCount: 0 }),\n type: 'walletClient',\n });\n return client.extend(walletActions);\n}\n//# sourceMappingURL=createWalletClient.js.map","import { RpcRequestError } from '../../errors/request.js';\nimport { UrlRequiredError } from '../../errors/transport.js';\nimport { getSocket, rpc } from '../../utils/rpc.js';\nimport { createTransport, } from './createTransport.js';\n/**\n * @description Creates a WebSocket transport that connects to a JSON-RPC API.\n */\nexport function webSocket(\n/** URL of the JSON-RPC API. Defaults to the chain's public RPC URL. */\nurl, config = {}) {\n const { key = 'webSocket', name = 'WebSocket JSON-RPC', retryDelay } = config;\n return ({ chain, retryCount: retryCount_, timeout: timeout_ }) => {\n const retryCount = config.retryCount ?? retryCount_;\n const timeout = timeout_ ?? config.timeout ?? 10000;\n const url_ = url || chain?.rpcUrls.default.webSocket?.[0];\n if (!url_)\n throw new UrlRequiredError();\n return createTransport({\n key,\n name,\n async request({ method, params }) {\n const body = { method, params };\n const socket = await getSocket(url_);\n const { error, result } = await rpc.webSocketAsync(socket, {\n body,\n timeout,\n });\n if (error)\n throw new RpcRequestError({\n body,\n error,\n url: url_,\n });\n return result;\n },\n retryCount,\n retryDelay,\n timeout,\n type: 'webSocket',\n }, {\n getSocket() {\n return getSocket(url_);\n },\n async subscribe({ params, onData, onError }) {\n const socket = await getSocket(url_);\n const { result: subscriptionId } = await new Promise((resolve, reject) => rpc.webSocket(socket, {\n body: {\n method: 'eth_subscribe',\n params,\n },\n onResponse(response) {\n if (response.error) {\n reject(response.error);\n onError?.(response.error);\n return;\n }\n if (typeof response.id === 'number') {\n resolve(response);\n return;\n }\n if (response.method !== 'eth_subscription')\n return;\n onData(response.params);\n },\n }));\n return {\n subscriptionId,\n async unsubscribe() {\n return new Promise((resolve) => rpc.webSocket(socket, {\n body: {\n method: 'eth_unsubscribe',\n params: [subscriptionId],\n },\n onResponse: resolve,\n }));\n },\n };\n },\n });\n };\n}\n//# sourceMappingURL=webSocket.js.map","export function number(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error(`Wrong positive integer: ${n}`);\n}\nexport function bool(b) {\n if (typeof b !== 'boolean')\n throw new Error(`Expected boolean, not ${b}`);\n}\nexport function bytes(b, ...lengths) {\n if (!(b instanceof Uint8Array))\n throw new Error('Expected Uint8Array');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Expected Uint8Array of length ${lengths}, not of length=${b.length}`);\n}\nexport function hash(hash) {\n if (typeof hash !== 'function' || typeof hash.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(hash.outputLen);\n number(hash.blockLen);\n}\nexport function exists(instance, checkFinished = true) {\n if (instance.destroyed)\n throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished)\n throw new Error('Hash#digest() has already been called');\n}\nexport function output(out, instance) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\nconst assert = {\n number,\n bool,\n bytes,\n hash,\n exists,\n output,\n};\nexport default assert;\n//# sourceMappingURL=_assert.js.map","export const crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;\n//# sourceMappingURL=crypto.js.map","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated, we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nconst u8a = (a) => a instanceof Uint8Array;\n// Cast array to different type\nexport const u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n// Cast array to view\nexport const createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word, shift) => (word << (32 - shift)) | (word >>> shift);\n// big-endian hardware is rare. Just in case someone still decides to run hashes:\n// early-throw an error because we don't support BE yet.\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\nif (!isLE)\n throw new Error('Non little-endian hardware is not supported');\nconst hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0'));\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n if (!u8a(bytes))\n throw new Error('Uint8Array expected');\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n const len = hex.length;\n if (len % 2)\n throw new Error('padded hex string expected, got unpadded hex of length ' + len);\n const array = new Uint8Array(len / 2);\n for (let i = 0; i < array.length; i++) {\n const j = i * 2;\n const hexByte = hex.slice(j, j + 2);\n const byte = Number.parseInt(hexByte, 16);\n if (Number.isNaN(byte) || byte < 0)\n throw new Error('Invalid byte sequence');\n array[i] = byte;\n }\n return array;\n}\n// There is no setImmediate in browser and setTimeout is slow.\n// call of async fn will return Promise, which will be fullfiled only on\n// next scheduler queue processing step and this is exactly what we need.\nexport const nextTick = async () => { };\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters, tick, cb) {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick)\n continue;\n await nextTick();\n ts += diff;\n }\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data) {\n if (typeof data === 'string')\n data = utf8ToBytes(data);\n if (!u8a(data))\n throw new Error(`expected Uint8Array, got ${typeof data}`);\n return data;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n const r = new Uint8Array(arrays.reduce((sum, a) => sum + a.length, 0));\n let pad = 0; // walk through each item, ensure they have proper type\n arrays.forEach((a) => {\n if (!u8a(a))\n throw new Error('Uint8Array expected');\n r.set(a, pad);\n pad += a.length;\n });\n return r;\n}\n// For runtime check if class implements interface\nexport class Hash {\n // Safe version that clones internal state\n clone() {\n return this._cloneInto();\n }\n}\n// Check if object doens't have custom constructor (like Uint8Array/Array)\nconst isPlainObject = (obj) => Object.prototype.toString.call(obj) === '[object Object]' && obj.constructor === Object;\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && (typeof opts !== 'object' || !isPlainObject(opts)))\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged;\n}\nexport function wrapConstructor(hashCons) {\n const hashC = (msg) => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\nexport function wrapConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\nexport function wrapXOFConstructorWithOpts(hashCons) {\n const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({});\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts) => hashCons(opts);\n return hashC;\n}\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32) {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import assert from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n// Polyfill for Safari 14\nfunction setBigUint64(view, byteOffset, value, isLE) {\n if (typeof view.setBigUint64 === 'function')\n return view.setBigUint64(byteOffset, value, isLE);\n const _32n = BigInt(32);\n const _u32_max = BigInt(0xffffffff);\n const wh = Number((value >> _32n) & _u32_max);\n const wl = Number(value & _u32_max);\n const h = isLE ? 4 : 0;\n const l = isLE ? 0 : 4;\n view.setUint32(byteOffset + h, wh, isLE);\n view.setUint32(byteOffset + l, wl, isLE);\n}\n// Base SHA2 class (RFC 6234)\nexport class SHA2 extends Hash {\n constructor(blockLen, outputLen, padOffset, isLE) {\n super();\n this.blockLen = blockLen;\n this.outputLen = outputLen;\n this.padOffset = padOffset;\n this.isLE = isLE;\n this.finished = false;\n this.length = 0;\n this.pos = 0;\n this.destroyed = false;\n this.buffer = new Uint8Array(blockLen);\n this.view = createView(this.buffer);\n }\n update(data) {\n assert.exists(this);\n const { view, buffer, blockLen } = this;\n data = toBytes(data);\n const len = data.length;\n for (let pos = 0; pos < len;) {\n const take = Math.min(blockLen - this.pos, len - pos);\n // Fast path: we have at least one block in input, cast it to view and process\n if (take === blockLen) {\n const dataView = createView(data);\n for (; blockLen <= len - pos; pos += blockLen)\n this.process(dataView, pos);\n continue;\n }\n buffer.set(data.subarray(pos, pos + take), this.pos);\n this.pos += take;\n pos += take;\n if (this.pos === blockLen) {\n this.process(view, 0);\n this.pos = 0;\n }\n }\n this.length += data.length;\n this.roundClean();\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.output(out, this);\n this.finished = true;\n // Padding\n // We can avoid allocation of buffer for padding completely if it\n // was previously not allocated here. But it won't change performance.\n const { buffer, view, blockLen, isLE } = this;\n let { pos } = this;\n // append the bit '1' to the message\n buffer[pos++] = 0b10000000;\n this.buffer.subarray(pos).fill(0);\n // we have less than padOffset left in buffer, so we cannot put length in current block, need process it and pad again\n if (this.padOffset > blockLen - pos) {\n this.process(view, 0);\n pos = 0;\n }\n // Pad until full block byte with zeros\n for (let i = pos; i < blockLen; i++)\n buffer[i] = 0;\n // Note: sha512 requires length to be 128bit integer, but length in JS will overflow before that\n // You need to write around 2 exabytes (u64_max / 8 / (1024**6)) for this to happen.\n // So we just write lowest 64 bits of that value.\n setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);\n this.process(view, 0);\n const oview = createView(out);\n const len = this.outputLen;\n // NOTE: we do division by 4 later, which should be fused in single op with modulo by JIT\n if (len % 4)\n throw new Error('_sha2: outputLen should be aligned to 32bit');\n const outLen = len / 4;\n const state = this.get();\n if (outLen > state.length)\n throw new Error('_sha2: outputLen bigger than state');\n for (let i = 0; i < outLen; i++)\n oview.setUint32(4 * i, state[i], isLE);\n }\n digest() {\n const { buffer, outputLen } = this;\n this.digestInto(buffer);\n const res = buffer.slice(0, outputLen);\n this.destroy();\n return res;\n }\n _cloneInto(to) {\n to || (to = new this.constructor());\n to.set(...this.get());\n const { blockLen, buffer, length, finished, destroyed, pos } = this;\n to.length = length;\n to.pos = pos;\n to.finished = finished;\n to.destroyed = destroyed;\n if (length % blockLen)\n to.buffer.set(buffer);\n return to;\n }\n}\n//# sourceMappingURL=_sha2.js.map","import { SHA2 } from './_sha2.js';\nimport { rotr, wrapConstructor } from './utils.js';\n// Choice: a ? b : c\nconst Chi = (a, b, c) => (a & b) ^ (~a & c);\n// Majority function, true if any two inpust is true\nconst Maj = (a, b, c) => (a & b) ^ (a & c) ^ (b & c);\n// Round constants:\n// first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311)\n// prettier-ignore\nconst SHA256_K = new Uint32Array([\n 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,\n 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,\n 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,\n 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,\n 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,\n 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,\n 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,\n 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2\n]);\n// Initial state (first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19):\n// prettier-ignore\nconst IV = new Uint32Array([\n 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19\n]);\n// Temporary buffer, not used to store anything between runs\n// Named this way because it matches specification.\nconst SHA256_W = new Uint32Array(64);\nclass SHA256 extends SHA2 {\n constructor() {\n super(64, 32, 8, false);\n // We cannot use array here since array allows indexing by variable\n // which means optimizer/compiler cannot use registers.\n this.A = IV[0] | 0;\n this.B = IV[1] | 0;\n this.C = IV[2] | 0;\n this.D = IV[3] | 0;\n this.E = IV[4] | 0;\n this.F = IV[5] | 0;\n this.G = IV[6] | 0;\n this.H = IV[7] | 0;\n }\n get() {\n const { A, B, C, D, E, F, G, H } = this;\n return [A, B, C, D, E, F, G, H];\n }\n // prettier-ignore\n set(A, B, C, D, E, F, G, H) {\n this.A = A | 0;\n this.B = B | 0;\n this.C = C | 0;\n this.D = D | 0;\n this.E = E | 0;\n this.F = F | 0;\n this.G = G | 0;\n this.H = H | 0;\n }\n process(view, offset) {\n // Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array\n for (let i = 0; i < 16; i++, offset += 4)\n SHA256_W[i] = view.getUint32(offset, false);\n for (let i = 16; i < 64; i++) {\n const W15 = SHA256_W[i - 15];\n const W2 = SHA256_W[i - 2];\n const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ (W15 >>> 3);\n const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ (W2 >>> 10);\n SHA256_W[i] = (s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16]) | 0;\n }\n // Compression function main loop, 64 rounds\n let { A, B, C, D, E, F, G, H } = this;\n for (let i = 0; i < 64; i++) {\n const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);\n const T1 = (H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i]) | 0;\n const sigma0 = rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22);\n const T2 = (sigma0 + Maj(A, B, C)) | 0;\n H = G;\n G = F;\n F = E;\n E = (D + T1) | 0;\n D = C;\n C = B;\n B = A;\n A = (T1 + T2) | 0;\n }\n // Add the compressed chunk to the current hash value\n A = (A + this.A) | 0;\n B = (B + this.B) | 0;\n C = (C + this.C) | 0;\n D = (D + this.D) | 0;\n E = (E + this.E) | 0;\n F = (F + this.F) | 0;\n G = (G + this.G) | 0;\n H = (H + this.H) | 0;\n this.set(A, B, C, D, E, F, G, H);\n }\n roundClean() {\n SHA256_W.fill(0);\n }\n destroy() {\n this.set(0, 0, 0, 0, 0, 0, 0, 0);\n this.buffer.fill(0);\n }\n}\n// Constants from https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf\nclass SHA224 extends SHA256 {\n constructor() {\n super();\n this.A = 0xc1059ed8 | 0;\n this.B = 0x367cd507 | 0;\n this.C = 0x3070dd17 | 0;\n this.D = 0xf70e5939 | 0;\n this.E = 0xffc00b31 | 0;\n this.F = 0x68581511 | 0;\n this.G = 0x64f98fa7 | 0;\n this.H = 0xbefa4fa4 | 0;\n this.outputLen = 28;\n }\n}\n/**\n * SHA2-256 hash function\n * @param message - data that would be hashed\n */\nexport const sha256 = wrapConstructor(() => new SHA256());\nexport const sha224 = wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Utilities for modular arithmetics and finite fields\nimport { bitMask, numberToBytesBE, numberToBytesLE, bytesToNumberBE, bytesToNumberLE, ensureBytes, validateObject, } from './utils.js';\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3);\n// prettier-ignore\nconst _4n = BigInt(4), _5n = BigInt(5), _8n = BigInt(8);\n// prettier-ignore\nconst _9n = BigInt(9), _16n = BigInt(16);\n// Calculates a modulo b\nexport function mod(a, b) {\n const result = a % b;\n return result >= _0n ? result : b + result;\n}\n/**\n * Efficiently raise num to power and do modular division.\n * Unsafe in some contexts: uses ladder, so can expose bigint bits.\n * @example\n * pow(2n, 6n, 11n) // 64n % 11n == 9n\n */\n// TODO: use field version && remove\nexport function pow(num, power, modulo) {\n if (modulo <= _0n || power < _0n)\n throw new Error('Expected power/modulo > 0');\n if (modulo === _1n)\n return _0n;\n let res = _1n;\n while (power > _0n) {\n if (power & _1n)\n res = (res * num) % modulo;\n num = (num * num) % modulo;\n power >>= _1n;\n }\n return res;\n}\n// Does x ^ (2 ^ power) mod p. pow2(30, 4) == 30 ^ (2 ^ 4)\nexport function pow2(x, power, modulo) {\n let res = x;\n while (power-- > _0n) {\n res *= res;\n res %= modulo;\n }\n return res;\n}\n// Inverses number over modulo\nexport function invert(number, modulo) {\n if (number === _0n || modulo <= _0n) {\n throw new Error(`invert: expected positive integers, got n=${number} mod=${modulo}`);\n }\n // Euclidean GCD https://brilliant.org/wiki/extended-euclidean-algorithm/\n // Fermat's little theorem \"CT-like\" version inv(n) = n^(m-2) mod m is 30x slower.\n let a = mod(number, modulo);\n let b = modulo;\n // prettier-ignore\n let x = _0n, y = _1n, u = _1n, v = _0n;\n while (a !== _0n) {\n // JIT applies optimization if those two lines follow each other\n const q = b / a;\n const r = b % a;\n const m = x - u * q;\n const n = y - v * q;\n // prettier-ignore\n b = a, a = r, x = u, y = v, u = m, v = n;\n }\n const gcd = b;\n if (gcd !== _1n)\n throw new Error('invert: does not exist');\n return mod(x, modulo);\n}\n// Tonelli-Shanks algorithm\n// Paper 1: https://eprint.iacr.org/2012/685.pdf (page 12)\n// Paper 2: Square Roots from 1; 24, 51, 10 to Dan Shanks\nexport function tonelliShanks(P) {\n // Legendre constant: used to calculate Legendre symbol (a | p),\n // which denotes the value of a^((p-1)/2) (mod p).\n // (a | p) ≡ 1 if a is a square (mod p)\n // (a | p) ≡ -1 if a is not a square (mod p)\n // (a | p) ≡ 0 if a ≡ 0 (mod p)\n const legendreC = (P - _1n) / _2n;\n let Q, S, Z;\n // Step 1: By factoring out powers of 2 from p - 1,\n // find q and s such that p - 1 = q*(2^s) with q odd\n for (Q = P - _1n, S = 0; Q % _2n === _0n; Q /= _2n, S++)\n ;\n // Step 2: Select a non-square z such that (z | p) ≡ -1 and set c ≡ zq\n for (Z = _2n; Z < P && pow(Z, legendreC, P) !== P - _1n; Z++)\n ;\n // Fast-path\n if (S === 1) {\n const p1div4 = (P + _1n) / _4n;\n return function tonelliFast(Fp, n) {\n const root = Fp.pow(n, p1div4);\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Slow-path\n const Q1div2 = (Q + _1n) / _2n;\n return function tonelliSlow(Fp, n) {\n // Step 0: Check that n is indeed a square: (n | p) should not be ≡ -1\n if (Fp.pow(n, legendreC) === Fp.neg(Fp.ONE))\n throw new Error('Cannot find square root');\n let r = S;\n // TODO: will fail at Fp2/etc\n let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q); // will update both x and b\n let x = Fp.pow(n, Q1div2); // first guess at the square root\n let b = Fp.pow(n, Q); // first guess at the fudge factor\n while (!Fp.eql(b, Fp.ONE)) {\n if (Fp.eql(b, Fp.ZERO))\n return Fp.ZERO; // https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm (4. If t = 0, return r = 0)\n // Find m such b^(2^m)==1\n let m = 1;\n for (let t2 = Fp.sqr(b); m < r; m++) {\n if (Fp.eql(t2, Fp.ONE))\n break;\n t2 = Fp.sqr(t2); // t2 *= t2\n }\n // NOTE: r-m-1 can be bigger than 32, need to convert to bigint before shift, otherwise there will be overflow\n const ge = Fp.pow(g, _1n << BigInt(r - m - 1)); // ge = 2^(r-m-1)\n g = Fp.sqr(ge); // g = ge * ge\n x = Fp.mul(x, ge); // x *= ge\n b = Fp.mul(b, g); // b *= g\n r = m;\n }\n return x;\n };\n}\nexport function FpSqrt(P) {\n // NOTE: different algorithms can give different roots, it is up to user to decide which one they want.\n // For example there is FpSqrtOdd/FpSqrtEven to choice root based on oddness (used for hash-to-curve).\n // P ≡ 3 (mod 4)\n // √n = n^((P+1)/4)\n if (P % _4n === _3n) {\n // Not all roots possible!\n // const ORDER =\n // 0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn;\n // const NUM = 72057594037927816n;\n const p1div4 = (P + _1n) / _4n;\n return function sqrt3mod4(Fp, n) {\n const root = Fp.pow(n, p1div4);\n // Throw if root**2 != n\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // Atkin algorithm for q ≡ 5 (mod 8), https://eprint.iacr.org/2012/685.pdf (page 10)\n if (P % _8n === _5n) {\n const c1 = (P - _5n) / _8n;\n return function sqrt5mod8(Fp, n) {\n const n2 = Fp.mul(n, _2n);\n const v = Fp.pow(n2, c1);\n const nv = Fp.mul(n, v);\n const i = Fp.mul(Fp.mul(nv, _2n), v);\n const root = Fp.mul(nv, Fp.sub(i, Fp.ONE));\n if (!Fp.eql(Fp.sqr(root), n))\n throw new Error('Cannot find square root');\n return root;\n };\n }\n // P ≡ 9 (mod 16)\n if (P % _16n === _9n) {\n // NOTE: tonelli is too slow for bls-Fp2 calculations even on start\n // Means we cannot use sqrt for constants at all!\n //\n // const c1 = Fp.sqrt(Fp.negate(Fp.ONE)); // 1. c1 = sqrt(-1) in F, i.e., (c1^2) == -1 in F\n // const c2 = Fp.sqrt(c1); // 2. c2 = sqrt(c1) in F, i.e., (c2^2) == c1 in F\n // const c3 = Fp.sqrt(Fp.negate(c1)); // 3. c3 = sqrt(-c1) in F, i.e., (c3^2) == -c1 in F\n // const c4 = (P + _7n) / _16n; // 4. c4 = (q + 7) / 16 # Integer arithmetic\n // sqrt = (x) => {\n // let tv1 = Fp.pow(x, c4); // 1. tv1 = x^c4\n // let tv2 = Fp.mul(c1, tv1); // 2. tv2 = c1 * tv1\n // const tv3 = Fp.mul(c2, tv1); // 3. tv3 = c2 * tv1\n // let tv4 = Fp.mul(c3, tv1); // 4. tv4 = c3 * tv1\n // const e1 = Fp.equals(Fp.square(tv2), x); // 5. e1 = (tv2^2) == x\n // const e2 = Fp.equals(Fp.square(tv3), x); // 6. e2 = (tv3^2) == x\n // tv1 = Fp.cmov(tv1, tv2, e1); // 7. tv1 = CMOV(tv1, tv2, e1) # Select tv2 if (tv2^2) == x\n // tv2 = Fp.cmov(tv4, tv3, e2); // 8. tv2 = CMOV(tv4, tv3, e2) # Select tv3 if (tv3^2) == x\n // const e3 = Fp.equals(Fp.square(tv2), x); // 9. e3 = (tv2^2) == x\n // return Fp.cmov(tv1, tv2, e3); // 10. z = CMOV(tv1, tv2, e3) # Select the sqrt from tv1 and tv2\n // }\n }\n // Other cases: Tonelli-Shanks algorithm\n return tonelliShanks(P);\n}\n// Little-endian check for first LE bit (last BE bit);\nexport const isNegativeLE = (num, modulo) => (mod(num, modulo) & _1n) === _1n;\n// prettier-ignore\nconst FIELD_FIELDS = [\n 'create', 'isValid', 'is0', 'neg', 'inv', 'sqrt', 'sqr',\n 'eql', 'add', 'sub', 'mul', 'pow', 'div',\n 'addN', 'subN', 'mulN', 'sqrN'\n];\nexport function validateField(field) {\n const initial = {\n ORDER: 'bigint',\n MASK: 'bigint',\n BYTES: 'isSafeInteger',\n BITS: 'isSafeInteger',\n };\n const opts = FIELD_FIELDS.reduce((map, val) => {\n map[val] = 'function';\n return map;\n }, initial);\n return validateObject(field, opts);\n}\n// Generic field functions\nexport function FpPow(f, num, power) {\n // Should have same speed as pow for bigints\n // TODO: benchmark!\n if (power < _0n)\n throw new Error('Expected power > 0');\n if (power === _0n)\n return f.ONE;\n if (power === _1n)\n return num;\n let p = f.ONE;\n let d = num;\n while (power > _0n) {\n if (power & _1n)\n p = f.mul(p, d);\n d = f.sqr(d);\n power >>= _1n;\n }\n return p;\n}\n// 0 is non-invertible: non-batched version will throw on 0\nexport function FpInvertBatch(f, nums) {\n const tmp = new Array(nums.length);\n // Walk from first to last, multiply them by each other MOD p\n const lastMultiplied = nums.reduce((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = acc;\n return f.mul(acc, num);\n }, f.ONE);\n // Invert last element\n const inverted = f.inv(lastMultiplied);\n // Walk from last to first, multiply them by inverted each other MOD p\n nums.reduceRight((acc, num, i) => {\n if (f.is0(num))\n return acc;\n tmp[i] = f.mul(acc, tmp[i]);\n return f.mul(acc, num);\n }, inverted);\n return tmp;\n}\nexport function FpDiv(f, lhs, rhs) {\n return f.mul(lhs, typeof rhs === 'bigint' ? invert(rhs, f.ORDER) : f.inv(rhs));\n}\n// This function returns True whenever the value x is a square in the field F.\nexport function FpIsSquare(f) {\n const legendreConst = (f.ORDER - _1n) / _2n; // Integer arithmetic\n return (x) => {\n const p = f.pow(x, legendreConst);\n return f.eql(p, f.ZERO) || f.eql(p, f.ONE);\n };\n}\n// CURVE.n lengths\nexport function nLength(n, nBitLength) {\n // Bit size, byte size of CURVE.n\n const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;\n const nByteLength = Math.ceil(_nBitLength / 8);\n return { nBitLength: _nBitLength, nByteLength };\n}\n/**\n * Initializes a galois field over prime. Non-primes are not supported for now.\n * Do not init in loop: slow. Very fragile: always run a benchmark on change.\n * Major performance gains:\n * a) non-normalized operations like mulN instead of mul\n * b) `Object.freeze`\n * c) Same object shape: never add or remove keys\n * @param ORDER prime positive bigint\n * @param bitLen how many bits the field consumes\n * @param isLE (def: false) if encoding / decoding should be in little-endian\n * @param redef optional faster redefinitions of sqrt and other methods\n */\nexport function Field(ORDER, bitLen, isLE = false, redef = {}) {\n if (ORDER <= _0n)\n throw new Error(`Expected Fp ORDER > 0, got ${ORDER}`);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen);\n if (BYTES > 2048)\n throw new Error('Field lengths over 2048 bytes are not supported');\n const sqrtP = FpSqrt(ORDER);\n const f = Object.freeze({\n ORDER,\n BITS,\n BYTES,\n MASK: bitMask(BITS),\n ZERO: _0n,\n ONE: _1n,\n create: (num) => mod(num, ORDER),\n isValid: (num) => {\n if (typeof num !== 'bigint')\n throw new Error(`Invalid field element: expected bigint, got ${typeof num}`);\n return _0n <= num && num < ORDER; // 0 is valid element, but it's not invertible\n },\n is0: (num) => num === _0n,\n isOdd: (num) => (num & _1n) === _1n,\n neg: (num) => mod(-num, ORDER),\n eql: (lhs, rhs) => lhs === rhs,\n sqr: (num) => mod(num * num, ORDER),\n add: (lhs, rhs) => mod(lhs + rhs, ORDER),\n sub: (lhs, rhs) => mod(lhs - rhs, ORDER),\n mul: (lhs, rhs) => mod(lhs * rhs, ORDER),\n pow: (num, power) => FpPow(f, num, power),\n div: (lhs, rhs) => mod(lhs * invert(rhs, ORDER), ORDER),\n // Same as above, but doesn't normalize\n sqrN: (num) => num * num,\n addN: (lhs, rhs) => lhs + rhs,\n subN: (lhs, rhs) => lhs - rhs,\n mulN: (lhs, rhs) => lhs * rhs,\n inv: (num) => invert(num, ORDER),\n sqrt: redef.sqrt || ((n) => sqrtP(f, n)),\n invertBatch: (lst) => FpInvertBatch(f, lst),\n // TODO: do we really need constant cmov?\n // We don't have const-time bigints anyway, so probably will be not very useful\n cmov: (a, b, c) => (c ? b : a),\n toBytes: (num) => (isLE ? numberToBytesLE(num, BYTES) : numberToBytesBE(num, BYTES)),\n fromBytes: (bytes) => {\n if (bytes.length !== BYTES)\n throw new Error(`Fp.fromBytes: expected ${BYTES}, got ${bytes.length}`);\n return isLE ? bytesToNumberLE(bytes) : bytesToNumberBE(bytes);\n },\n });\n return Object.freeze(f);\n}\nexport function FpSqrtOdd(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? root : Fp.neg(root);\n}\nexport function FpSqrtEven(Fp, elm) {\n if (!Fp.isOdd)\n throw new Error(`Field doesn't have isOdd`);\n const root = Fp.sqrt(elm);\n return Fp.isOdd(root) ? Fp.neg(root) : root;\n}\n/**\n * FIPS 186 B.4.1-compliant \"constant-time\" private key generation utility.\n * Can take (n+8) or more bytes of uniform input e.g. from CSPRNG or KDF\n * and convert them into private scalar, with the modulo bias being negligible.\n * Needs at least 40 bytes of input for 32-byte private key.\n * https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/\n * @param hash hash output from SHA3 or a similar function\n * @param groupOrder size of subgroup - (e.g. curveFn.CURVE.n)\n * @param isLE interpret hash bytes as LE num\n * @returns valid private scalar\n */\nexport function hashToPrivateScalar(hash, groupOrder, isLE = false) {\n hash = ensureBytes('privateHash', hash);\n const hashLen = hash.length;\n const minLen = nLength(groupOrder).nByteLength + 8;\n if (minLen < 24 || hashLen < minLen || hashLen > 1024)\n throw new Error(`hashToPrivateScalar: expected ${minLen}-1024 bytes of input, got ${hashLen}`);\n const num = isLE ? bytesToNumberLE(hash) : bytesToNumberBE(hash);\n return mod(num, groupOrder - _1n) + _1n;\n}\n//# sourceMappingURL=modular.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Abelian group utilities\nimport { validateField, nLength } from './modular.js';\nimport { validateObject } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\n// Elliptic curve multiplication of Point by scalar. Fragile.\n// Scalars should always be less than curve order: this should be checked inside of a curve itself.\n// Creates precomputation tables for fast multiplication:\n// - private scalar is split by fixed size windows of W bits\n// - every window point is collected from window's table & added to accumulator\n// - since windows are different, same point inside tables won't be accessed more than once per calc\n// - each multiplication is 'Math.ceil(CURVE_ORDER / 𝑊) + 1' point additions (fixed for any scalar)\n// - +1 window is neccessary for wNAF\n// - wNAF reduces table size: 2x less memory + 2x faster generation, but 10% slower multiplication\n// TODO: Research returning 2d JS array of windows, instead of a single window. This would allow\n// windows to be in different memory locations\nexport function wNAF(c, bits) {\n const constTimeNegate = (condition, item) => {\n const neg = item.negate();\n return condition ? neg : item;\n };\n const opts = (W) => {\n const windows = Math.ceil(bits / W) + 1; // +1, because\n const windowSize = 2 ** (W - 1); // -1 because we skip zero\n return { windows, windowSize };\n };\n return {\n constTimeNegate,\n // non-const time multiplication ladder\n unsafeLadder(elm, n) {\n let p = c.ZERO;\n let d = elm;\n while (n > _0n) {\n if (n & _1n)\n p = p.add(d);\n d = d.double();\n n >>= _1n;\n }\n return p;\n },\n /**\n * Creates a wNAF precomputation window. Used for caching.\n * Default window size is set by `utils.precompute()` and is equal to 8.\n * Number of precomputed points depends on the curve size:\n * 2^(𝑊−1) * (Math.ceil(𝑛 / 𝑊) + 1), where:\n * - 𝑊 is the window size\n * - 𝑛 is the bitlength of the curve order.\n * For a 256-bit curve and window size 8, the number of precomputed points is 128 * 33 = 4224.\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = opts(W);\n const points = [];\n let p = elm;\n let base = p;\n for (let window = 0; window < windows; window++) {\n base = p;\n points.push(base);\n // =1, because we skip zero\n for (let i = 1; i < windowSize; i++) {\n base = base.add(p);\n points.push(base);\n }\n p = base.double();\n }\n return points;\n },\n /**\n * Implements ec multiplication using precomputed tables and w-ary non-adjacent form.\n * @param W window size\n * @param precomputes precomputed tables\n * @param n scalar (we don't check here, but should be less than curve order)\n * @returns real and fake (for const-time) points\n */\n wNAF(W, precomputes, n) {\n // TODO: maybe check that scalar is less than group order? wNAF behavious is undefined otherwise\n // But need to carefully remove other checks before wNAF. ORDER == bits here\n const { windows, windowSize } = opts(W);\n let p = c.ZERO;\n let f = c.BASE;\n const mask = BigInt(2 ** W - 1); // Create mask with W ones: 0b1111 for W=4 etc.\n const maxNumber = 2 ** W;\n const shiftBy = BigInt(W);\n for (let window = 0; window < windows; window++) {\n const offset = window * windowSize;\n // Extract W bits.\n let wbits = Number(n & mask);\n // Shift number by W bits.\n n >>= shiftBy;\n // If the bits are bigger than max size, we'll split those.\n // +224 => 256 - 32\n if (wbits > windowSize) {\n wbits -= maxNumber;\n n += _1n;\n }\n // This code was first written with assumption that 'f' and 'p' will never be infinity point:\n // since each addition is multiplied by 2 ** W, it cannot cancel each other. However,\n // there is negate now: it is possible that negated element from low value\n // would be the same as high element, which will create carry into next window.\n // It's not obvious how this can fail, but still worth investigating later.\n // Check if we're onto Zero point.\n // Add random point inside current window to f.\n const offset1 = offset;\n const offset2 = offset + Math.abs(wbits) - 1; // -1 because we skip zero\n const cond1 = window % 2 !== 0;\n const cond2 = wbits < 0;\n if (wbits === 0) {\n // The most important part for const-time getPublicKey\n f = f.add(constTimeNegate(cond1, precomputes[offset1]));\n }\n else {\n p = p.add(constTimeNegate(cond2, precomputes[offset2]));\n }\n }\n // JIT-compiler should not eliminate f here, since it will later be used in normalizeZ()\n // Even if the variable is still unused, there are some checks which will\n // throw an exception, so compiler needs to prove they won't happen, which is hard.\n // At this point there is a way to F be infinity-point even if p is not,\n // which makes it less const-time: around 1 bigint multiply.\n return { p, f };\n },\n wNAFCached(P, precomputesMap, n, transform) {\n // @ts-ignore\n const W = P._WINDOW_SIZE || 1;\n // Calculate precomputes on a first run, reuse them after\n let comp = precomputesMap.get(P);\n if (!comp) {\n comp = this.precomputeWindow(P, W);\n if (W !== 1) {\n precomputesMap.set(P, transform(comp));\n }\n }\n return this.wNAF(W, comp, n);\n },\n };\n}\nexport function validateBasic(curve) {\n validateField(curve.Fp);\n validateObject(curve, {\n n: 'bigint',\n h: 'bigint',\n Gx: 'field',\n Gy: 'field',\n }, {\n nBitLength: 'isSafeInteger',\n nByteLength: 'isSafeInteger',\n });\n // Set defaults\n return Object.freeze({\n ...nLength(curve.n, curve.nBitLength),\n ...curve,\n ...{ p: curve.Fp.ORDER },\n });\n}\n//# sourceMappingURL=curve.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// Short Weierstrass curve. The formula is: y² = x³ + ax + b\nimport * as mod from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes } from './utils.js';\nimport { wNAF, validateBasic } from './curve.js';\nfunction validatePointOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n a: 'field',\n b: 'field',\n }, {\n allowedPrivateKeyLengths: 'array',\n wrapPrivateKey: 'boolean',\n isTorsionFree: 'function',\n clearCofactor: 'function',\n allowInfinityPoint: 'boolean',\n fromBytes: 'function',\n toBytes: 'function',\n });\n const { endo, Fp, a } = opts;\n if (endo) {\n if (!Fp.eql(a, Fp.ZERO)) {\n throw new Error('Endomorphism can only be defined for Koblitz curves that have a=0');\n }\n if (typeof endo !== 'object' ||\n typeof endo.beta !== 'bigint' ||\n typeof endo.splitScalar !== 'function') {\n throw new Error('Expected endomorphism with beta: bigint and splitScalar: function');\n }\n }\n return Object.freeze({ ...opts });\n}\n// ASN.1 DER encoding utilities\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\nexport const DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m = '') {\n super(m);\n }\n },\n _parseInt(data) {\n const { Err: E } = DER;\n if (data.length < 2 || data[0] !== 0x02)\n throw new E('Invalid signature integer tag');\n const len = data[1];\n const res = data.subarray(2, len + 2);\n if (!len || res.length !== len)\n throw new E('Invalid signature integer: wrong length');\n // https://crypto.stackexchange.com/a/57734 Leftmost bit of first byte is 'negative' flag,\n // since we always use positive integers here. It must always be empty:\n // - add zero byte if exists\n // - if next byte doesn't have a flag, leading zero is not allowed (minimal encoding)\n if (res[0] & 0b10000000)\n throw new E('Invalid signature integer: negative');\n if (res[0] === 0x00 && !(res[1] & 0b10000000))\n throw new E('Invalid signature integer: unnecessary leading zero');\n return { d: b2n(res), l: data.subarray(len + 2) }; // d is data, l is left\n },\n toSig(hex) {\n // parse DER signature\n const { Err: E } = DER;\n const data = typeof hex === 'string' ? h2b(hex) : hex;\n if (!(data instanceof Uint8Array))\n throw new Error('ui8a expected');\n let l = data.length;\n if (l < 2 || data[0] != 0x30)\n throw new E('Invalid signature tag');\n if (data[1] !== l - 2)\n throw new E('Invalid signature: incorrect length');\n const { d: r, l: sBytes } = DER._parseInt(data.subarray(2));\n const { d: s, l: rBytesLeft } = DER._parseInt(sBytes);\n if (rBytesLeft.length)\n throw new E('Invalid signature: left bytes after parsing');\n return { r, s };\n },\n hexFromSig(sig) {\n // Add leading zero if first byte has negative bit enabled. More details in '_parseInt'\n const slice = (s) => (Number.parseInt(s[0], 16) & 0b1000 ? '00' + s : s);\n const h = (num) => {\n const hex = num.toString(16);\n return hex.length & 1 ? `0${hex}` : hex;\n };\n const s = slice(h(sig.s));\n const r = slice(h(sig.r));\n const shl = s.length / 2;\n const rhl = r.length / 2;\n const sl = h(shl);\n const rl = h(rhl);\n return `30${h(rhl + shl + 4)}02${rl}${r}02${sl}${s}`;\n },\n};\n// Be friendly to bad ECMAScript parsers by not using bigint literals\n// prettier-ignore\nconst _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4);\nexport function weierstrassPoints(opts) {\n const CURVE = validatePointOpts(opts);\n const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ\n const toBytes = CURVE.toBytes ||\n ((c, point, isCompressed) => {\n const a = point.toAffine();\n return ut.concatBytes(Uint8Array.from([0x04]), Fp.toBytes(a.x), Fp.toBytes(a.y));\n });\n const fromBytes = CURVE.fromBytes ||\n ((bytes) => {\n // const head = bytes[0];\n const tail = bytes.subarray(1);\n // if (head !== 0x04) throw new Error('Only non-compressed encoding is supported');\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n });\n /**\n * y² = x³ + ax + b: Short weierstrass curve formula\n * @returns y²\n */\n function weierstrassEquation(x) {\n const { a, b } = CURVE;\n const x2 = Fp.sqr(x); // x * x\n const x3 = Fp.mul(x2, x); // x2 * x\n return Fp.add(Fp.add(x3, Fp.mul(x, a)), b); // x3 + a * x + b\n }\n // Validate whether the passed curve params are valid.\n // We check if curve equation works for generator point.\n // `assertValidity()` won't work: `isTorsionFree()` is not available at this point in bls12-381.\n // ProjectivePoint class has not been initialized yet.\n if (!Fp.eql(Fp.sqr(CURVE.Gy), weierstrassEquation(CURVE.Gx)))\n throw new Error('bad generator point: equation left != right');\n // Valid group elements reside in range 1..n-1\n function isWithinCurveOrder(num) {\n return typeof num === 'bigint' && _0n < num && num < CURVE.n;\n }\n function assertGE(num) {\n if (!isWithinCurveOrder(num))\n throw new Error('Expected valid bigint: 0 < bigint < curve.n');\n }\n // Validates if priv key is valid and converts it to bigint.\n // Supports options allowedPrivateKeyLengths and wrapPrivateKey.\n function normPrivateKeyToScalar(key) {\n const { allowedPrivateKeyLengths: lengths, nByteLength, wrapPrivateKey, n } = CURVE;\n if (lengths && typeof key !== 'bigint') {\n if (key instanceof Uint8Array)\n key = ut.bytesToHex(key);\n // Normalize to hex string, pad. E.g. P521 would norm 130-132 char hex to 132-char bytes\n if (typeof key !== 'string' || !lengths.includes(key.length))\n throw new Error('Invalid key');\n key = key.padStart(nByteLength * 2, '0');\n }\n let num;\n try {\n num =\n typeof key === 'bigint'\n ? key\n : ut.bytesToNumberBE(ensureBytes('private key', key, nByteLength));\n }\n catch (error) {\n throw new Error(`private key must be ${nByteLength} bytes, hex or bigint, not ${typeof key}`);\n }\n if (wrapPrivateKey)\n num = mod.mod(num, n); // disabled by default, enabled for BLS\n assertGE(num); // num in range [1..N-1]\n return num;\n }\n const pointPrecomputes = new Map();\n function assertPrjPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ProjectivePoint expected');\n }\n /**\n * Projective Point works in 3d / projective (homogeneous) coordinates: (x, y, z) ∋ (x=x/z, y=y/z)\n * Default Point works in 2d / affine coordinates: (x, y)\n * We're doing calculations in projective, because its operations don't require costly inversion.\n */\n class Point {\n constructor(px, py, pz) {\n this.px = px;\n this.py = py;\n this.pz = pz;\n if (px == null || !Fp.isValid(px))\n throw new Error('x required');\n if (py == null || !Fp.isValid(py))\n throw new Error('y required');\n if (pz == null || !Fp.isValid(pz))\n throw new Error('z required');\n }\n // Does not validate if the point is on-curve.\n // Use fromHex instead, or call assertValidity() later.\n static fromAffine(p) {\n const { x, y } = p || {};\n if (!p || !Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('invalid affine point');\n if (p instanceof Point)\n throw new Error('projective point not allowed');\n const is0 = (i) => Fp.eql(i, Fp.ZERO);\n // fromAffine(x:0, y:0) would produce (x:0, y:0, z:1), but we need (x:0, y:1, z:0)\n if (is0(x) && is0(y))\n return Point.ZERO;\n return new Point(x, y, Fp.ONE);\n }\n get x() {\n return this.toAffine().x;\n }\n get y() {\n return this.toAffine().y;\n }\n /**\n * Takes a bunch of Projective Points but executes only one\n * inversion on all of them. Inversion is very slow operation,\n * so this improves performance massively.\n * Optimization: converts a list of projective points to a list of identical points with Z=1.\n */\n static normalizeZ(points) {\n const toInv = Fp.invertBatch(points.map((p) => p.pz));\n return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n }\n /**\n * Converts hash string or Uint8Array to Point.\n * @param hex short/long ECDSA hex\n */\n static fromHex(hex) {\n const P = Point.fromAffine(fromBytes(ensureBytes('pointHex', hex)));\n P.assertValidity();\n return P;\n }\n // Multiplies generator point by privateKey.\n static fromPrivateKey(privateKey) {\n return Point.BASE.multiply(normPrivateKeyToScalar(privateKey));\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n this._WINDOW_SIZE = windowSize;\n pointPrecomputes.delete(this);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n // Zero is valid point too!\n if (this.is0()) {\n if (CURVE.allowInfinityPoint)\n return;\n throw new Error('bad point: ZERO');\n }\n // Some 3rd-party test vectors require different wording between here & `fromCompressedHex`\n const { x, y } = this.toAffine();\n // Check if x, y are valid field elements\n if (!Fp.isValid(x) || !Fp.isValid(y))\n throw new Error('bad point: x or y not FE');\n const left = Fp.sqr(y); // y²\n const right = weierstrassEquation(x); // x³ + ax + b\n if (!Fp.eql(left, right))\n throw new Error('bad point: equation left != right');\n if (!this.isTorsionFree())\n throw new Error('bad point: not in prime-order subgroup');\n }\n hasEvenY() {\n const { y } = this.toAffine();\n if (Fp.isOdd)\n return !Fp.isOdd(y);\n throw new Error(\"Field doesn't support isOdd\");\n }\n /**\n * Compare one point to another.\n */\n equals(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n const U1 = Fp.eql(Fp.mul(X1, Z2), Fp.mul(X2, Z1));\n const U2 = Fp.eql(Fp.mul(Y1, Z2), Fp.mul(Y2, Z1));\n return U1 && U2;\n }\n /**\n * Flips point to one corresponding to (x, -y) in Affine coordinates.\n */\n negate() {\n return new Point(this.px, Fp.neg(this.py), this.pz);\n }\n // Renes-Costello-Batina exception-free doubling formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 3\n // Cost: 8M + 3S + 3*a + 2*b3 + 15add.\n double() {\n const { a, b } = CURVE;\n const b3 = Fp.mul(b, _3n);\n const { px: X1, py: Y1, pz: Z1 } = this;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n let t0 = Fp.mul(X1, X1); // step 1\n let t1 = Fp.mul(Y1, Y1);\n let t2 = Fp.mul(Z1, Z1);\n let t3 = Fp.mul(X1, Y1);\n t3 = Fp.add(t3, t3); // step 5\n Z3 = Fp.mul(X1, Z1);\n Z3 = Fp.add(Z3, Z3);\n X3 = Fp.mul(a, Z3);\n Y3 = Fp.mul(b3, t2);\n Y3 = Fp.add(X3, Y3); // step 10\n X3 = Fp.sub(t1, Y3);\n Y3 = Fp.add(t1, Y3);\n Y3 = Fp.mul(X3, Y3);\n X3 = Fp.mul(t3, X3);\n Z3 = Fp.mul(b3, Z3); // step 15\n t2 = Fp.mul(a, t2);\n t3 = Fp.sub(t0, t2);\n t3 = Fp.mul(a, t3);\n t3 = Fp.add(t3, Z3);\n Z3 = Fp.add(t0, t0); // step 20\n t0 = Fp.add(Z3, t0);\n t0 = Fp.add(t0, t2);\n t0 = Fp.mul(t0, t3);\n Y3 = Fp.add(Y3, t0);\n t2 = Fp.mul(Y1, Z1); // step 25\n t2 = Fp.add(t2, t2);\n t0 = Fp.mul(t2, t3);\n X3 = Fp.sub(X3, t0);\n Z3 = Fp.mul(t2, t1);\n Z3 = Fp.add(Z3, Z3); // step 30\n Z3 = Fp.add(Z3, Z3);\n return new Point(X3, Y3, Z3);\n }\n // Renes-Costello-Batina exception-free addition formula.\n // There is 30% faster Jacobian formula, but it is not complete.\n // https://eprint.iacr.org/2015/1060, algorithm 1\n // Cost: 12M + 0S + 3*a + 3*b3 + 23add.\n add(other) {\n assertPrjPoint(other);\n const { px: X1, py: Y1, pz: Z1 } = this;\n const { px: X2, py: Y2, pz: Z2 } = other;\n let X3 = Fp.ZERO, Y3 = Fp.ZERO, Z3 = Fp.ZERO; // prettier-ignore\n const a = CURVE.a;\n const b3 = Fp.mul(CURVE.b, _3n);\n let t0 = Fp.mul(X1, X2); // step 1\n let t1 = Fp.mul(Y1, Y2);\n let t2 = Fp.mul(Z1, Z2);\n let t3 = Fp.add(X1, Y1);\n let t4 = Fp.add(X2, Y2); // step 5\n t3 = Fp.mul(t3, t4);\n t4 = Fp.add(t0, t1);\n t3 = Fp.sub(t3, t4);\n t4 = Fp.add(X1, Z1);\n let t5 = Fp.add(X2, Z2); // step 10\n t4 = Fp.mul(t4, t5);\n t5 = Fp.add(t0, t2);\n t4 = Fp.sub(t4, t5);\n t5 = Fp.add(Y1, Z1);\n X3 = Fp.add(Y2, Z2); // step 15\n t5 = Fp.mul(t5, X3);\n X3 = Fp.add(t1, t2);\n t5 = Fp.sub(t5, X3);\n Z3 = Fp.mul(a, t4);\n X3 = Fp.mul(b3, t2); // step 20\n Z3 = Fp.add(X3, Z3);\n X3 = Fp.sub(t1, Z3);\n Z3 = Fp.add(t1, Z3);\n Y3 = Fp.mul(X3, Z3);\n t1 = Fp.add(t0, t0); // step 25\n t1 = Fp.add(t1, t0);\n t2 = Fp.mul(a, t2);\n t4 = Fp.mul(b3, t4);\n t1 = Fp.add(t1, t2);\n t2 = Fp.sub(t0, t2); // step 30\n t2 = Fp.mul(a, t2);\n t4 = Fp.add(t4, t2);\n t0 = Fp.mul(t1, t4);\n Y3 = Fp.add(Y3, t0);\n t0 = Fp.mul(t5, t4); // step 35\n X3 = Fp.mul(t3, X3);\n X3 = Fp.sub(X3, t0);\n t0 = Fp.mul(t3, t1);\n Z3 = Fp.mul(t5, Z3);\n Z3 = Fp.add(Z3, t0); // step 40\n return new Point(X3, Y3, Z3);\n }\n subtract(other) {\n return this.add(other.negate());\n }\n is0() {\n return this.equals(Point.ZERO);\n }\n wNAF(n) {\n return wnaf.wNAFCached(this, pointPrecomputes, n, (comp) => {\n const toInv = Fp.invertBatch(comp.map((p) => p.pz));\n return comp.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);\n });\n }\n /**\n * Non-constant-time multiplication. Uses double-and-add algorithm.\n * It's faster, but should only be used when you don't care about\n * an exposed private key e.g. sig verification, which works over *public* keys.\n */\n multiplyUnsafe(n) {\n const I = Point.ZERO;\n if (n === _0n)\n return I;\n assertGE(n); // Will throw on 0\n if (n === _1n)\n return this;\n const { endo } = CURVE;\n if (!endo)\n return wnaf.unsafeLadder(this, n);\n // Apply endomorphism\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let k1p = I;\n let k2p = I;\n let d = this;\n while (k1 > _0n || k2 > _0n) {\n if (k1 & _1n)\n k1p = k1p.add(d);\n if (k2 & _1n)\n k2p = k2p.add(d);\n d = d.double();\n k1 >>= _1n;\n k2 >>= _1n;\n }\n if (k1neg)\n k1p = k1p.negate();\n if (k2neg)\n k2p = k2p.negate();\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n return k1p.add(k2p);\n }\n /**\n * Constant time multiplication.\n * Uses wNAF method. Windowed method may be 10% faster,\n * but takes 2x longer to generate and consumes 2x memory.\n * Uses precomputes when available.\n * Uses endomorphism for Koblitz curves.\n * @param scalar by which the point would be multiplied\n * @returns New point\n */\n multiply(scalar) {\n assertGE(scalar);\n let n = scalar;\n let point, fake; // Fake point is used to const-time mult\n const { endo } = CURVE;\n if (endo) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n);\n let { p: k1p, f: f1p } = this.wNAF(k1);\n let { p: k2p, f: f2p } = this.wNAF(k2);\n k1p = wnaf.constTimeNegate(k1neg, k1p);\n k2p = wnaf.constTimeNegate(k2neg, k2p);\n k2p = new Point(Fp.mul(k2p.px, endo.beta), k2p.py, k2p.pz);\n point = k1p.add(k2p);\n fake = f1p.add(f2p);\n }\n else {\n const { p, f } = this.wNAF(n);\n point = p;\n fake = f;\n }\n // Normalize `z` for both points, but return only real one\n return Point.normalizeZ([point, fake])[0];\n }\n /**\n * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.\n * Not using Strauss-Shamir trick: precomputation tables are faster.\n * The trick could be useful if both P and Q are not G (not in our case).\n * @returns non-zero affine point\n */\n multiplyAndAddUnsafe(Q, a, b) {\n const G = Point.BASE; // No Strauss-Shamir trick: we have 10% faster G precomputes\n const mul = (P, a // Select faster multiply() method\n ) => (a === _0n || a === _1n || !P.equals(G) ? P.multiplyUnsafe(a) : P.multiply(a));\n const sum = mul(this, a).add(mul(Q, b));\n return sum.is0() ? undefined : sum;\n }\n // Converts Projective point to affine (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n // (x, y, z) ∋ (x=x/z, y=y/z)\n toAffine(iz) {\n const { px: x, py: y, pz: z } = this;\n const is0 = this.is0();\n // If invZ was 0, we return zero point. However we still want to execute\n // all operations, so we replace invZ with a random number, 1.\n if (iz == null)\n iz = is0 ? Fp.ONE : Fp.inv(z);\n const ax = Fp.mul(x, iz);\n const ay = Fp.mul(y, iz);\n const zz = Fp.mul(z, iz);\n if (is0)\n return { x: Fp.ZERO, y: Fp.ZERO };\n if (!Fp.eql(zz, Fp.ONE))\n throw new Error('invZ was invalid');\n return { x: ax, y: ay };\n }\n isTorsionFree() {\n const { h: cofactor, isTorsionFree } = CURVE;\n if (cofactor === _1n)\n return true; // No subgroups, always torsion-free\n if (isTorsionFree)\n return isTorsionFree(Point, this);\n throw new Error('isTorsionFree() has not been declared for the elliptic curve');\n }\n clearCofactor() {\n const { h: cofactor, clearCofactor } = CURVE;\n if (cofactor === _1n)\n return this; // Fast-path\n if (clearCofactor)\n return clearCofactor(Point, this);\n return this.multiplyUnsafe(CURVE.h);\n }\n toRawBytes(isCompressed = true) {\n this.assertValidity();\n return toBytes(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n return ut.bytesToHex(this.toRawBytes(isCompressed));\n }\n }\n Point.BASE = new Point(CURVE.Gx, CURVE.Gy, Fp.ONE);\n Point.ZERO = new Point(Fp.ZERO, Fp.ONE, Fp.ZERO);\n const _bits = CURVE.nBitLength;\n const wnaf = wNAF(Point, CURVE.endo ? Math.ceil(_bits / 2) : _bits);\n // Validate if generator point is on curve\n return {\n CURVE,\n ProjectivePoint: Point,\n normPrivateKeyToScalar,\n weierstrassEquation,\n isWithinCurveOrder,\n };\n}\nfunction validateOpts(curve) {\n const opts = validateBasic(curve);\n ut.validateObject(opts, {\n hash: 'hash',\n hmac: 'function',\n randomBytes: 'function',\n }, {\n bits2int: 'function',\n bits2int_modN: 'function',\n lowS: 'boolean',\n });\n return Object.freeze({ lowS: true, ...opts });\n}\nexport function weierstrass(curveDef) {\n const CURVE = validateOpts(curveDef);\n const { Fp, n: CURVE_ORDER } = CURVE;\n const compressedLen = Fp.BYTES + 1; // e.g. 33 for 32\n const uncompressedLen = 2 * Fp.BYTES + 1; // e.g. 65 for 32\n function isValidFieldElement(num) {\n return _0n < num && num < Fp.ORDER; // 0 is banned since it's not invertible FE\n }\n function modN(a) {\n return mod.mod(a, CURVE_ORDER);\n }\n function invN(a) {\n return mod.invert(a, CURVE_ORDER);\n }\n const { ProjectivePoint: Point, normPrivateKeyToScalar, weierstrassEquation, isWithinCurveOrder, } = weierstrassPoints({\n ...CURVE,\n toBytes(c, point, isCompressed) {\n const a = point.toAffine();\n const x = Fp.toBytes(a.x);\n const cat = ut.concatBytes;\n if (isCompressed) {\n return cat(Uint8Array.from([point.hasEvenY() ? 0x02 : 0x03]), x);\n }\n else {\n return cat(Uint8Array.from([0x04]), x, Fp.toBytes(a.y));\n }\n },\n fromBytes(bytes) {\n const len = bytes.length;\n const head = bytes[0];\n const tail = bytes.subarray(1);\n // this.assertValidity() is done inside of fromHex\n if (len === compressedLen && (head === 0x02 || head === 0x03)) {\n const x = ut.bytesToNumberBE(tail);\n if (!isValidFieldElement(x))\n throw new Error('Point is not on curve');\n const y2 = weierstrassEquation(x); // y² = x³ + ax + b\n let y = Fp.sqrt(y2); // y = y² ^ (p+1)/4\n const isYOdd = (y & _1n) === _1n;\n // ECDSA\n const isHeadOdd = (head & 1) === 1;\n if (isHeadOdd !== isYOdd)\n y = Fp.neg(y);\n return { x, y };\n }\n else if (len === uncompressedLen && head === 0x04) {\n const x = Fp.fromBytes(tail.subarray(0, Fp.BYTES));\n const y = Fp.fromBytes(tail.subarray(Fp.BYTES, 2 * Fp.BYTES));\n return { x, y };\n }\n else {\n throw new Error(`Point of length ${len} was invalid. Expected ${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes`);\n }\n },\n });\n const numToNByteStr = (num) => ut.bytesToHex(ut.numberToBytesBE(num, CURVE.nByteLength));\n function isBiggerThanHalfOrder(number) {\n const HALF = CURVE_ORDER >> _1n;\n return number > HALF;\n }\n function normalizeS(s) {\n return isBiggerThanHalfOrder(s) ? modN(-s) : s;\n }\n // slice bytes num\n const slcNum = (b, from, to) => ut.bytesToNumberBE(b.slice(from, to));\n /**\n * ECDSA signature with its (r, s) properties. Supports DER & compact representations.\n */\n class Signature {\n constructor(r, s, recovery) {\n this.r = r;\n this.s = s;\n this.recovery = recovery;\n this.assertValidity();\n }\n // pair (bytes of r, bytes of s)\n static fromCompact(hex) {\n const l = CURVE.nByteLength;\n hex = ensureBytes('compactSignature', hex, l * 2);\n return new Signature(slcNum(hex, 0, l), slcNum(hex, l, 2 * l));\n }\n // DER encoded ECDSA signature\n // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script\n static fromDER(hex) {\n const { r, s } = DER.toSig(ensureBytes('DER', hex));\n return new Signature(r, s);\n }\n assertValidity() {\n // can use assertGE here\n if (!isWithinCurveOrder(this.r))\n throw new Error('r must be 0 < r < CURVE.n');\n if (!isWithinCurveOrder(this.s))\n throw new Error('s must be 0 < s < CURVE.n');\n }\n addRecoveryBit(recovery) {\n return new Signature(this.r, this.s, recovery);\n }\n recoverPublicKey(msgHash) {\n const { r, s, recovery: rec } = this;\n const h = bits2int_modN(ensureBytes('msgHash', msgHash)); // Truncate hash\n if (rec == null || ![0, 1, 2, 3].includes(rec))\n throw new Error('recovery id invalid');\n const radj = rec === 2 || rec === 3 ? r + CURVE.n : r;\n if (radj >= Fp.ORDER)\n throw new Error('recovery id 2 or 3 invalid');\n const prefix = (rec & 1) === 0 ? '02' : '03';\n const R = Point.fromHex(prefix + numToNByteStr(radj));\n const ir = invN(radj); // r^-1\n const u1 = modN(-h * ir); // -hr^-1\n const u2 = modN(s * ir); // sr^-1\n const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); // (sr^-1)R-(hr^-1)G = -(hr^-1)G + (sr^-1)\n if (!Q)\n throw new Error('point at infinify'); // unsafe is fine: no priv data leaked\n Q.assertValidity();\n return Q;\n }\n // Signatures should be low-s, to prevent malleability.\n hasHighS() {\n return isBiggerThanHalfOrder(this.s);\n }\n normalizeS() {\n return this.hasHighS() ? new Signature(this.r, modN(-this.s), this.recovery) : this;\n }\n // DER-encoded\n toDERRawBytes() {\n return ut.hexToBytes(this.toDERHex());\n }\n toDERHex() {\n return DER.hexFromSig({ r: this.r, s: this.s });\n }\n // padded bytes of r, then padded bytes of s\n toCompactRawBytes() {\n return ut.hexToBytes(this.toCompactHex());\n }\n toCompactHex() {\n return numToNByteStr(this.r) + numToNByteStr(this.s);\n }\n }\n const utils = {\n isValidPrivateKey(privateKey) {\n try {\n normPrivateKeyToScalar(privateKey);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n normPrivateKeyToScalar: normPrivateKeyToScalar,\n /**\n * Produces cryptographically secure private key from random of size (nBitLength+64)\n * as per FIPS 186 B.4.1 with modulo bias being neglible.\n */\n randomPrivateKey: () => {\n const rand = CURVE.randomBytes(Fp.BYTES + 8);\n const num = mod.hashToPrivateScalar(rand, CURVE_ORDER);\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n },\n /**\n * Creates precompute table for an arbitrary EC point. Makes point \"cached\".\n * Allows to massively speed-up `point.multiply(scalar)`.\n * @returns cached point\n * @example\n * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));\n * fast.multiply(privKey); // much faster ECDH now\n */\n precompute(windowSize = 8, point = Point.BASE) {\n point._setWindowSize(windowSize);\n point.multiply(BigInt(3)); // 3 is arbitrary, just need any number here\n return point;\n },\n };\n /**\n * Computes public key for a private key. Checks for validity of the private key.\n * @param privateKey private key\n * @param isCompressed whether to return compact (default), or full key\n * @returns Public key, full when isCompressed=false; short when isCompressed=true\n */\n function getPublicKey(privateKey, isCompressed = true) {\n return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed);\n }\n /**\n * Quick and dirty check for item being public key. Does not validate hex, or being on-curve.\n */\n function isProbPub(item) {\n const arr = item instanceof Uint8Array;\n const str = typeof item === 'string';\n const len = (arr || str) && item.length;\n if (arr)\n return len === compressedLen || len === uncompressedLen;\n if (str)\n return len === 2 * compressedLen || len === 2 * uncompressedLen;\n if (item instanceof Point)\n return true;\n return false;\n }\n /**\n * ECDH (Elliptic Curve Diffie Hellman).\n * Computes shared public key from private key and public key.\n * Checks: 1) private key validity 2) shared key is on-curve.\n * Does NOT hash the result.\n * @param privateA private key\n * @param publicB different public key\n * @param isCompressed whether to return compact (default), or full key\n * @returns shared public key\n */\n function getSharedSecret(privateA, publicB, isCompressed = true) {\n if (isProbPub(privateA))\n throw new Error('first arg must be private key');\n if (!isProbPub(publicB))\n throw new Error('second arg must be public key');\n const b = Point.fromHex(publicB); // check for being on-curve\n return b.multiply(normPrivateKeyToScalar(privateA)).toRawBytes(isCompressed);\n }\n // RFC6979: ensure ECDSA msg is X bytes and < N. RFC suggests optional truncating via bits2octets.\n // FIPS 186-4 4.6 suggests the leftmost min(nBitLen, outLen) bits, which matches bits2int.\n // bits2int can produce res>N, we can do mod(res, N) since the bitLen is the same.\n // int2octets can't be used; pads small msgs with 0: unacceptatble for trunc as per RFC vectors\n const bits2int = CURVE.bits2int ||\n function (bytes) {\n // For curves with nBitLength % 8 !== 0: bits2octets(bits2octets(m)) !== bits2octets(m)\n // for some cases, since bytes.length * 8 is not actual bitLength.\n const num = ut.bytesToNumberBE(bytes); // check for == u8 done here\n const delta = bytes.length * 8 - CURVE.nBitLength; // truncate to nBitLength leftmost bits\n return delta > 0 ? num >> BigInt(delta) : num;\n };\n const bits2int_modN = CURVE.bits2int_modN ||\n function (bytes) {\n return modN(bits2int(bytes)); // can't use bytesToNumberBE here\n };\n // NOTE: pads output with zero as per spec\n const ORDER_MASK = ut.bitMask(CURVE.nBitLength);\n /**\n * Converts to bytes. Checks if num in `[0..ORDER_MASK-1]` e.g.: `[0..2^256-1]`.\n */\n function int2octets(num) {\n if (typeof num !== 'bigint')\n throw new Error('bigint expected');\n if (!(_0n <= num && num < ORDER_MASK))\n throw new Error(`bigint expected < 2^${CURVE.nBitLength}`);\n // works with order, can have different size than numToField!\n return ut.numberToBytesBE(num, CURVE.nByteLength);\n }\n // Steps A, D of RFC6979 3.2\n // Creates RFC6979 seed; converts msg/privKey to numbers.\n // Used only in sign, not in verify.\n // NOTE: we cannot assume here that msgHash has same amount of bytes as curve order, this will be wrong at least for P521.\n // Also it can be bigger for P224 + SHA256\n function prepSig(msgHash, privateKey, opts = defaultSigOpts) {\n if (['recovered', 'canonical'].some((k) => k in opts))\n throw new Error('sign() legacy options not supported');\n const { hash, randomBytes } = CURVE;\n let { lowS, prehash, extraEntropy: ent } = opts; // generates low-s sigs by default\n if (lowS == null)\n lowS = true; // RFC6979 3.2: we skip step A, because we already provide hash\n msgHash = ensureBytes('msgHash', msgHash);\n if (prehash)\n msgHash = ensureBytes('prehashed msgHash', hash(msgHash));\n // We can't later call bits2octets, since nested bits2int is broken for curves\n // with nBitLength % 8 !== 0. Because of that, we unwrap it here as int2octets call.\n // const bits2octets = (bits) => int2octets(bits2int_modN(bits))\n const h1int = bits2int_modN(msgHash);\n const d = normPrivateKeyToScalar(privateKey); // validate private key, convert to bigint\n const seedArgs = [int2octets(d), int2octets(h1int)];\n // extraEntropy. RFC6979 3.6: additional k' (optional).\n if (ent != null) {\n // K = HMAC_K(V || 0x00 || int2octets(x) || bits2octets(h1) || k')\n const e = ent === true ? randomBytes(Fp.BYTES) : ent; // generate random bytes OR pass as-is\n seedArgs.push(ensureBytes('extraEntropy', e, Fp.BYTES)); // check for being of size BYTES\n }\n const seed = ut.concatBytes(...seedArgs); // Step D of RFC6979 3.2\n const m = h1int; // NOTE: no need to call bits2int second time here, it is inside truncateHash!\n // Converts signature params into point w r/s, checks result for validity.\n function k2sig(kBytes) {\n // RFC 6979 Section 3.2, step 3: k = bits2int(T)\n const k = bits2int(kBytes); // Cannot use fields methods, since it is group element\n if (!isWithinCurveOrder(k))\n return; // Important: all mod() calls here must be done over N\n const ik = invN(k); // k^-1 mod n\n const q = Point.BASE.multiply(k).toAffine(); // q = Gk\n const r = modN(q.x); // r = q.x mod n\n if (r === _0n)\n return;\n // Can use scalar blinding b^-1(bm + bdr) where b ∈ [1,q−1] according to\n // https://tches.iacr.org/index.php/TCHES/article/view/7337/6509. We've decided against it:\n // a) dependency on CSPRNG b) 15% slowdown c) doesn't really help since bigints are not CT\n const s = modN(ik * modN(m + r * d)); // Not using blinding here\n if (s === _0n)\n return;\n let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); // recovery bit (2 or 3, when q.x > n)\n let normS = s;\n if (lowS && isBiggerThanHalfOrder(s)) {\n normS = normalizeS(s); // if lowS was passed, ensure s is always\n recovery ^= 1; // // in the bottom half of N\n }\n return new Signature(r, normS, recovery); // use normS, not s\n }\n return { seed, k2sig };\n }\n const defaultSigOpts = { lowS: CURVE.lowS, prehash: false };\n const defaultVerOpts = { lowS: CURVE.lowS, prehash: false };\n /**\n * Signs message hash with a private key.\n * ```\n * sign(m, d, k) where\n * (x, y) = G × k\n * r = x mod n\n * s = (m + dr)/k mod n\n * ```\n * @param msgHash NOT message. msg needs to be hashed to `msgHash`, or use `prehash`.\n * @param privKey private key\n * @param opts lowS for non-malleable sigs. extraEntropy for mixing randomness into k. prehash will hash first arg.\n * @returns signature with recovery param\n */\n function sign(msgHash, privKey, opts = defaultSigOpts) {\n const { seed, k2sig } = prepSig(msgHash, privKey, opts); // Steps A, D of RFC6979 3.2.\n const C = CURVE;\n const drbg = ut.createHmacDrbg(C.hash.outputLen, C.nByteLength, C.hmac);\n return drbg(seed, k2sig); // Steps B, C, D, E, F, G\n }\n // Enable precomputes. Slows down first publicKey computation by 20ms.\n Point.BASE._setWindowSize(8);\n // utils.precompute(8, ProjectivePoint.BASE)\n /**\n * Verifies a signature against message hash and public key.\n * Rejects lowS signatures by default: to override,\n * specify option `{lowS: false}`. Implements section 4.1.4 from https://www.secg.org/sec1-v2.pdf:\n *\n * ```\n * verify(r, s, h, P) where\n * U1 = hs^-1 mod n\n * U2 = rs^-1 mod n\n * R = U1⋅G - U2⋅P\n * mod(R.x, n) == r\n * ```\n */\n function verify(signature, msgHash, publicKey, opts = defaultVerOpts) {\n const sg = signature;\n msgHash = ensureBytes('msgHash', msgHash);\n publicKey = ensureBytes('publicKey', publicKey);\n if ('strict' in opts)\n throw new Error('options.strict was renamed to lowS');\n const { lowS, prehash } = opts;\n let _sig = undefined;\n let P;\n try {\n if (typeof sg === 'string' || sg instanceof Uint8Array) {\n // Signature can be represented in 2 ways: compact (2*nByteLength) & DER (variable-length).\n // Since DER can also be 2*nByteLength bytes, we check for it first.\n try {\n _sig = Signature.fromDER(sg);\n }\n catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n _sig = Signature.fromCompact(sg);\n }\n }\n else if (typeof sg === 'object' && typeof sg.r === 'bigint' && typeof sg.s === 'bigint') {\n const { r, s } = sg;\n _sig = new Signature(r, s);\n }\n else {\n throw new Error('PARSE');\n }\n P = Point.fromHex(publicKey);\n }\n catch (error) {\n if (error.message === 'PARSE')\n throw new Error(`signature must be Signature instance, Uint8Array or hex string`);\n return false;\n }\n if (lowS && _sig.hasHighS())\n return false;\n if (prehash)\n msgHash = CURVE.hash(msgHash);\n const { r, s } = _sig;\n const h = bits2int_modN(msgHash); // Cannot use fields methods, since it is group element\n const is = invN(s); // s^-1\n const u1 = modN(h * is); // u1 = hs^-1 mod n\n const u2 = modN(r * is); // u2 = rs^-1 mod n\n const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2)?.toAffine(); // R = u1⋅G + u2⋅P\n if (!R)\n return false;\n const v = modN(R.x);\n return v === r;\n }\n return {\n CURVE,\n getPublicKey,\n getSharedSecret,\n sign,\n verify,\n ProjectivePoint: Point,\n Signature,\n utils,\n };\n}\n/**\n * Implementation of the Shallue and van de Woestijne method for any weierstrass curve.\n * TODO: check if there is a way to merge this with uvRatio in Edwards; move to modular.\n * b = True and y = sqrt(u / v) if (u / v) is square in F, and\n * b = False and y = sqrt(Z * (u / v)) otherwise.\n * @param Fp\n * @param Z\n * @returns\n */\nexport function SWUFpSqrtRatio(Fp, Z) {\n // Generic implementation\n const q = Fp.ORDER;\n let l = _0n;\n for (let o = q - _1n; o % _2n === _0n; o /= _2n)\n l += _1n;\n const c1 = l; // 1. c1, the largest integer such that 2^c1 divides q - 1.\n // We need 2n ** c1 and 2n ** (c1-1). We can't use **; but we can use <<.\n // 2n ** c1 == 2n << (c1-1)\n const _2n_pow_c1_1 = _2n << (c1 - _1n - _1n);\n const _2n_pow_c1 = _2n_pow_c1_1 * _2n;\n const c2 = (q - _1n) / _2n_pow_c1; // 2. c2 = (q - 1) / (2^c1) # Integer arithmetic\n const c3 = (c2 - _1n) / _2n; // 3. c3 = (c2 - 1) / 2 # Integer arithmetic\n const c4 = _2n_pow_c1 - _1n; // 4. c4 = 2^c1 - 1 # Integer arithmetic\n const c5 = _2n_pow_c1_1; // 5. c5 = 2^(c1 - 1) # Integer arithmetic\n const c6 = Fp.pow(Z, c2); // 6. c6 = Z^c2\n const c7 = Fp.pow(Z, (c2 + _1n) / _2n); // 7. c7 = Z^((c2 + 1) / 2)\n let sqrtRatio = (u, v) => {\n let tv1 = c6; // 1. tv1 = c6\n let tv2 = Fp.pow(v, c4); // 2. tv2 = v^c4\n let tv3 = Fp.sqr(tv2); // 3. tv3 = tv2^2\n tv3 = Fp.mul(tv3, v); // 4. tv3 = tv3 * v\n let tv5 = Fp.mul(u, tv3); // 5. tv5 = u * tv3\n tv5 = Fp.pow(tv5, c3); // 6. tv5 = tv5^c3\n tv5 = Fp.mul(tv5, tv2); // 7. tv5 = tv5 * tv2\n tv2 = Fp.mul(tv5, v); // 8. tv2 = tv5 * v\n tv3 = Fp.mul(tv5, u); // 9. tv3 = tv5 * u\n let tv4 = Fp.mul(tv3, tv2); // 10. tv4 = tv3 * tv2\n tv5 = Fp.pow(tv4, c5); // 11. tv5 = tv4^c5\n let isQR = Fp.eql(tv5, Fp.ONE); // 12. isQR = tv5 == 1\n tv2 = Fp.mul(tv3, c7); // 13. tv2 = tv3 * c7\n tv5 = Fp.mul(tv4, tv1); // 14. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR)\n tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR)\n // 17. for i in (c1, c1 - 1, ..., 2):\n for (let i = c1; i > _1n; i--) {\n let tv5 = i - _2n; // 18. tv5 = i - 2\n tv5 = _2n << (tv5 - _1n); // 19. tv5 = 2^tv5\n let tvv5 = Fp.pow(tv4, tv5); // 20. tv5 = tv4^tv5\n const e1 = Fp.eql(tvv5, Fp.ONE); // 21. e1 = tv5 == 1\n tv2 = Fp.mul(tv3, tv1); // 22. tv2 = tv3 * tv1\n tv1 = Fp.mul(tv1, tv1); // 23. tv1 = tv1 * tv1\n tvv5 = Fp.mul(tv4, tv1); // 24. tv5 = tv4 * tv1\n tv3 = Fp.cmov(tv2, tv3, e1); // 25. tv3 = CMOV(tv2, tv3, e1)\n tv4 = Fp.cmov(tvv5, tv4, e1); // 26. tv4 = CMOV(tv5, tv4, e1)\n }\n return { isValid: isQR, value: tv3 };\n };\n if (Fp.ORDER % _4n === _3n) {\n // sqrt_ratio_3mod4(u, v)\n const c1 = (Fp.ORDER - _3n) / _4n; // 1. c1 = (q - 3) / 4 # Integer arithmetic\n const c2 = Fp.sqrt(Fp.neg(Z)); // 2. c2 = sqrt(-Z)\n sqrtRatio = (u, v) => {\n let tv1 = Fp.sqr(v); // 1. tv1 = v^2\n const tv2 = Fp.mul(u, v); // 2. tv2 = u * v\n tv1 = Fp.mul(tv1, tv2); // 3. tv1 = tv1 * tv2\n let y1 = Fp.pow(tv1, c1); // 4. y1 = tv1^c1\n y1 = Fp.mul(y1, tv2); // 5. y1 = y1 * tv2\n const y2 = Fp.mul(y1, c2); // 6. y2 = y1 * c2\n const tv3 = Fp.mul(Fp.sqr(y1), v); // 7. tv3 = y1^2; 8. tv3 = tv3 * v\n const isQR = Fp.eql(tv3, u); // 9. isQR = tv3 == u\n let y = Fp.cmov(y2, y1, isQR); // 10. y = CMOV(y2, y1, isQR)\n return { isValid: isQR, value: y }; // 11. return (isQR, y) isQR ? y : y*c2\n };\n }\n // No curves uses that\n // if (Fp.ORDER % _8n === _5n) // sqrt_ratio_5mod8\n return sqrtRatio;\n}\n/**\n * From draft-irtf-cfrg-hash-to-curve-16\n */\nexport function mapToCurveSimpleSWU(Fp, opts) {\n mod.validateField(Fp);\n if (!Fp.isValid(opts.A) || !Fp.isValid(opts.B) || !Fp.isValid(opts.Z))\n throw new Error('mapToCurveSimpleSWU: invalid opts');\n const sqrtRatio = SWUFpSqrtRatio(Fp, opts.Z);\n if (!Fp.isOdd)\n throw new Error('Fp.isOdd is not implemented!');\n // Input: u, an element of F.\n // Output: (x, y), a point on E.\n return (u) => {\n // prettier-ignore\n let tv1, tv2, tv3, tv4, tv5, tv6, x, y;\n tv1 = Fp.sqr(u); // 1. tv1 = u^2\n tv1 = Fp.mul(tv1, opts.Z); // 2. tv1 = Z * tv1\n tv2 = Fp.sqr(tv1); // 3. tv2 = tv1^2\n tv2 = Fp.add(tv2, tv1); // 4. tv2 = tv2 + tv1\n tv3 = Fp.add(tv2, Fp.ONE); // 5. tv3 = tv2 + 1\n tv3 = Fp.mul(tv3, opts.B); // 6. tv3 = B * tv3\n tv4 = Fp.cmov(opts.Z, Fp.neg(tv2), !Fp.eql(tv2, Fp.ZERO)); // 7. tv4 = CMOV(Z, -tv2, tv2 != 0)\n tv4 = Fp.mul(tv4, opts.A); // 8. tv4 = A * tv4\n tv2 = Fp.sqr(tv3); // 9. tv2 = tv3^2\n tv6 = Fp.sqr(tv4); // 10. tv6 = tv4^2\n tv5 = Fp.mul(tv6, opts.A); // 11. tv5 = A * tv6\n tv2 = Fp.add(tv2, tv5); // 12. tv2 = tv2 + tv5\n tv2 = Fp.mul(tv2, tv3); // 13. tv2 = tv2 * tv3\n tv6 = Fp.mul(tv6, tv4); // 14. tv6 = tv6 * tv4\n tv5 = Fp.mul(tv6, opts.B); // 15. tv5 = B * tv6\n tv2 = Fp.add(tv2, tv5); // 16. tv2 = tv2 + tv5\n x = Fp.mul(tv1, tv3); // 17. x = tv1 * tv3\n const { isValid, value } = sqrtRatio(tv2, tv6); // 18. (is_gx1_square, y1) = sqrt_ratio(tv2, tv6)\n y = Fp.mul(tv1, u); // 19. y = tv1 * u -> Z * u^3 * y1\n y = Fp.mul(y, value); // 20. y = y * y1\n x = Fp.cmov(x, tv3, isValid); // 21. x = CMOV(x, tv3, is_gx1_square)\n y = Fp.cmov(y, value, isValid); // 22. y = CMOV(y, y1, is_gx1_square)\n const e1 = Fp.isOdd(u) === Fp.isOdd(y); // 23. e1 = sgn0(u) == sgn0(y)\n y = Fp.cmov(Fp.neg(y), y, e1); // 24. y = CMOV(-y, y, e1)\n x = Fp.div(x, tv4); // 25. x = x / tv4\n return { x, y };\n };\n}\n//# sourceMappingURL=weierstrass.js.map","import assert from './_assert.js';\nimport { Hash, toBytes } from './utils.js';\n// HMAC (RFC 2104)\nexport class HMAC extends Hash {\n constructor(hash, _key) {\n super();\n this.finished = false;\n this.destroyed = false;\n assert.hash(hash);\n const key = toBytes(_key);\n this.iHash = hash.create();\n if (typeof this.iHash.update !== 'function')\n throw new Error('Expected instance of class which extends utils.Hash');\n this.blockLen = this.iHash.blockLen;\n this.outputLen = this.iHash.outputLen;\n const blockLen = this.blockLen;\n const pad = new Uint8Array(blockLen);\n // blockLen can be bigger than outputLen\n pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36;\n this.iHash.update(pad);\n // By doing update (processing of first block) of outer hash here we can re-use it between multiple calls via clone\n this.oHash = hash.create();\n // Undo internal XOR && apply outer XOR\n for (let i = 0; i < pad.length; i++)\n pad[i] ^= 0x36 ^ 0x5c;\n this.oHash.update(pad);\n pad.fill(0);\n }\n update(buf) {\n assert.exists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n assert.exists(this);\n assert.bytes(out, this.outputLen);\n this.finished = true;\n this.iHash.digestInto(out);\n this.oHash.update(out);\n this.oHash.digestInto(out);\n this.destroy();\n }\n digest() {\n const out = new Uint8Array(this.oHash.outputLen);\n this.digestInto(out);\n return out;\n }\n _cloneInto(to) {\n // Create new instance without calling constructor since key already in state and we don't know it.\n to || (to = Object.create(Object.getPrototypeOf(this), {}));\n const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;\n to = to;\n to.finished = finished;\n to.destroyed = destroyed;\n to.blockLen = blockLen;\n to.outputLen = outputLen;\n to.oHash = oHash._cloneInto(to.oHash);\n to.iHash = iHash._cloneInto(to.iHash);\n return to;\n }\n destroy() {\n this.destroyed = true;\n this.oHash.destroy();\n this.iHash.destroy();\n }\n}\n/**\n * HMAC: RFC2104 message authentication code.\n * @param hash - function that would be used e.g. sha256\n * @param key - message key\n * @param message - message data\n */\nexport const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();\nhmac.create = (hash, key) => new HMAC(hash, key);\n//# sourceMappingURL=hmac.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { hmac } from '@noble/hashes/hmac';\nimport { concatBytes, randomBytes } from '@noble/hashes/utils';\nimport { weierstrass } from './abstract/weierstrass.js';\n// connects noble-curves to noble-hashes\nexport function getHash(hash) {\n return {\n hash,\n hmac: (key, ...msgs) => hmac(hash, key, concatBytes(...msgs)),\n randomBytes,\n };\n}\nexport function createCurve(curveDef, defHash) {\n const create = (hash) => weierstrass({ ...curveDef, ...getHash(hash) });\n return Object.freeze({ ...create(defHash), create });\n}\n//# sourceMappingURL=_shortw_utils.js.map","/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\nimport { sha256 } from '@noble/hashes/sha256';\nimport { randomBytes } from '@noble/hashes/utils';\nimport { Field, mod, pow2 } from './abstract/modular.js';\nimport { mapToCurveSimpleSWU } from './abstract/weierstrass.js';\nimport { bytesToNumberBE, concatBytes, ensureBytes, numberToBytesBE } from './abstract/utils.js';\nimport { createHasher, isogenyMap } from './abstract/hash-to-curve.js';\nimport { createCurve } from './_shortw_utils.js';\nconst secp256k1P = BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f');\nconst secp256k1N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141');\nconst _1n = BigInt(1);\nconst _2n = BigInt(2);\nconst divNearest = (a, b) => (a + b / _2n) / b;\n/**\n * √n = n^((p+1)/4) for fields p = 3 mod 4. We unwrap the loop and multiply bit-by-bit.\n * (P+1n/4n).toString(2) would produce bits [223x 1, 0, 22x 1, 4x 0, 11, 00]\n */\nfunction sqrtMod(y) {\n const P = secp256k1P;\n // prettier-ignore\n const _3n = BigInt(3), _6n = BigInt(6), _11n = BigInt(11), _22n = BigInt(22);\n // prettier-ignore\n const _23n = BigInt(23), _44n = BigInt(44), _88n = BigInt(88);\n const b2 = (y * y * y) % P; // x^3, 11\n const b3 = (b2 * b2 * y) % P; // x^7\n const b6 = (pow2(b3, _3n, P) * b3) % P;\n const b9 = (pow2(b6, _3n, P) * b3) % P;\n const b11 = (pow2(b9, _2n, P) * b2) % P;\n const b22 = (pow2(b11, _11n, P) * b11) % P;\n const b44 = (pow2(b22, _22n, P) * b22) % P;\n const b88 = (pow2(b44, _44n, P) * b44) % P;\n const b176 = (pow2(b88, _88n, P) * b88) % P;\n const b220 = (pow2(b176, _44n, P) * b44) % P;\n const b223 = (pow2(b220, _3n, P) * b3) % P;\n const t1 = (pow2(b223, _23n, P) * b22) % P;\n const t2 = (pow2(t1, _6n, P) * b2) % P;\n const root = pow2(t2, _2n, P);\n if (!Fp.eql(Fp.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst Fp = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\nexport const secp256k1 = createCurve({\n a: BigInt(0),\n b: BigInt(7),\n Fp,\n n: secp256k1N,\n // Base point (x, y) aka generator point\n Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'),\n Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'),\n h: BigInt(1),\n lowS: true,\n /**\n * secp256k1 belongs to Koblitz curves: it has efficiently computable endomorphism.\n * Endomorphism uses 2x less RAM, speeds up precomputation by 2x and ECDH / key recovery by 20%.\n * For precomputed wNAF it trades off 1/2 init time & 1/3 ram for 20% perf hit.\n * Explanation: https://gist.github.com/paulmillr/eb670806793e84df628a7c434a873066\n */\n endo: {\n beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'),\n splitScalar: (k) => {\n const n = secp256k1N;\n const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15');\n const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3');\n const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8');\n const b2 = a1;\n const POW_2_128 = BigInt('0x100000000000000000000000000000000'); // (2n**128n).toString(16)\n const c1 = divNearest(b2 * k, n);\n const c2 = divNearest(-b1 * k, n);\n let k1 = mod(k - c1 * a1 - c2 * a2, n);\n let k2 = mod(-c1 * b1 - c2 * b2, n);\n const k1neg = k1 > POW_2_128;\n const k2neg = k2 > POW_2_128;\n if (k1neg)\n k1 = n - k1;\n if (k2neg)\n k2 = n - k2;\n if (k1 > POW_2_128 || k2 > POW_2_128) {\n throw new Error('splitScalar: Endomorphism failed, k=' + k);\n }\n return { k1neg, k1, k2neg, k2 };\n },\n },\n}, sha256);\n// Schnorr signatures are superior to ECDSA from above. Below is Schnorr-specific BIP0340 code.\n// https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki\nconst _0n = BigInt(0);\nconst fe = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1P;\nconst ge = (x) => typeof x === 'bigint' && _0n < x && x < secp256k1N;\n/** An object mapping tags to their tagged hash prefix of [SHA256(tag) | SHA256(tag)] */\nconst TAGGED_HASH_PREFIXES = {};\nfunction taggedHash(tag, ...messages) {\n let tagP = TAGGED_HASH_PREFIXES[tag];\n if (tagP === undefined) {\n const tagH = sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0)));\n tagP = concatBytes(tagH, tagH);\n TAGGED_HASH_PREFIXES[tag] = tagP;\n }\n return sha256(concatBytes(tagP, ...messages));\n}\n// ECDSA compact points are 33-byte. Schnorr is 32: we strip first byte 0x02 or 0x03\nconst pointToBytes = (point) => point.toRawBytes(true).slice(1);\nconst numTo32b = (n) => numberToBytesBE(n, 32);\nconst modP = (x) => mod(x, secp256k1P);\nconst modN = (x) => mod(x, secp256k1N);\nconst Point = secp256k1.ProjectivePoint;\nconst GmulAdd = (Q, a, b) => Point.BASE.multiplyAndAddUnsafe(Q, a, b);\n// Calculate point, scalar and bytes\nfunction schnorrGetExtPubKey(priv) {\n let d_ = secp256k1.utils.normPrivateKeyToScalar(priv); // same method executed in fromPrivateKey\n let p = Point.fromPrivateKey(d_); // P = d'⋅G; 0 < d' < n check is done inside\n const scalar = p.hasEvenY() ? d_ : modN(-d_);\n return { scalar: scalar, bytes: pointToBytes(p) };\n}\n/**\n * lift_x from BIP340. Convert 32-byte x coordinate to elliptic curve point.\n * @returns valid point checked for being on-curve\n */\nfunction lift_x(x) {\n if (!fe(x))\n throw new Error('bad x: need 0 < x < p'); // Fail if x ≥ p.\n const xx = modP(x * x);\n const c = modP(xx * x + BigInt(7)); // Let c = x³ + 7 mod p.\n let y = sqrtMod(c); // Let y = c^(p+1)/4 mod p.\n if (y % _2n !== _0n)\n y = modP(-y); // Return the unique point P such that x(P) = x and\n const p = new Point(x, y, _1n); // y(P) = y if y mod 2 = 0 or y(P) = p-y otherwise.\n p.assertValidity();\n return p;\n}\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(bytesToNumberBE(taggedHash('BIP0340/challenge', ...args)));\n}\n/**\n * Schnorr public key is just `x` coordinate of Point as per BIP340.\n */\nfunction schnorrGetPublicKey(privateKey) {\n return schnorrGetExtPubKey(privateKey).bytes; // d'=int(sk). Fail if d'=0 or d'≥n. Ret bytes(d'⋅G)\n}\n/**\n * Creates Schnorr signature as per BIP340. Verifies itself before returning anything.\n * auxRand is optional and is not the sole source of k generation: bad CSPRNG won't be dangerous.\n */\nfunction schnorrSign(message, privateKey, auxRand = randomBytes(32)) {\n const m = ensureBytes('message', message);\n const { bytes: px, scalar: d } = schnorrGetExtPubKey(privateKey); // checks for isWithinCurveOrder\n const a = ensureBytes('auxRand', auxRand, 32); // Auxiliary random data a: a 32-byte array\n const t = numTo32b(d ^ bytesToNumberBE(taggedHash('BIP0340/aux', a))); // Let t be the byte-wise xor of bytes(d) and hash/aux(a)\n const rand = taggedHash('BIP0340/nonce', t, px, m); // Let rand = hash/nonce(t || bytes(P) || m)\n const k_ = modN(bytesToNumberBE(rand)); // Let k' = int(rand) mod n\n if (k_ === _0n)\n throw new Error('sign failed: k is zero'); // Fail if k' = 0.\n const { bytes: rx, scalar: k } = schnorrGetExtPubKey(k_); // Let R = k'⋅G.\n const e = challenge(rx, px, m); // Let e = int(hash/challenge(bytes(R) || bytes(P) || m)) mod n.\n const sig = new Uint8Array(64); // Let sig = bytes(R) || bytes((k + ed) mod n).\n sig.set(rx, 0);\n sig.set(numTo32b(modN(k + e * d)), 32);\n // If Verify(bytes(P), m, sig) (see below) returns failure, abort\n if (!schnorrVerify(sig, m, px))\n throw new Error('sign: Invalid signature produced');\n return sig;\n}\n/**\n * Verifies Schnorr signature.\n * Will swallow errors & return false except for initial type validation of arguments.\n */\nfunction schnorrVerify(signature, message, publicKey) {\n const sig = ensureBytes('signature', signature, 64);\n const m = ensureBytes('message', message);\n const pub = ensureBytes('publicKey', publicKey, 32);\n try {\n const P = lift_x(bytesToNumberBE(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = bytesToNumberBE(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!fe(r))\n return false;\n const s = bytesToNumberBE(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!ge(s))\n return false;\n const e = challenge(numTo32b(r), pointToBytes(P), m); // int(challenge(bytes(r)||bytes(P)||m))%n\n const R = GmulAdd(P, s, modN(-e)); // R = s⋅G - e⋅P\n if (!R || !R.hasEvenY() || R.toAffine().x !== r)\n return false; // -eP == (n-e)P\n return true; // Fail if is_infinite(R) / not has_even_y(R) / x(R) ≠ r.\n }\n catch (error) {\n return false;\n }\n}\nexport const schnorr = /* @__PURE__ */ (() => ({\n getPublicKey: schnorrGetPublicKey,\n sign: schnorrSign,\n verify: schnorrVerify,\n utils: {\n randomPrivateKey: secp256k1.utils.randomPrivateKey,\n lift_x,\n pointToBytes,\n numberToBytesBE,\n bytesToNumberBE,\n taggedHash,\n mod,\n },\n}))();\nconst isoMap = /* @__PURE__ */ (() => isogenyMap(Fp, [\n // xNum\n [\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7',\n '0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581',\n '0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262',\n '0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c',\n ],\n // xDen\n [\n '0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b',\n '0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n // yNum\n [\n '0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c',\n '0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3',\n '0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931',\n '0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84',\n ],\n // yDen\n [\n '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b',\n '0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573',\n '0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f',\n '0x0000000000000000000000000000000000000000000000000000000000000001', // LAST 1\n ],\n].map((i) => i.map((j) => BigInt(j)))))();\nconst mapSWU = /* @__PURE__ */ (() => mapToCurveSimpleSWU(Fp, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: Fp.create(BigInt('-11')),\n}))();\nconst htf = /* @__PURE__ */ (() => createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(Fp.create(scalars[0]));\n return isoMap(x, y);\n}, {\n DST: 'secp256k1_XMD:SHA-256_SSWU_RO_',\n encodeDST: 'secp256k1_XMD:SHA-256_SSWU_NU_',\n p: Fp.ORDER,\n m: 1,\n k: 128,\n expand: 'xmd',\n hash: sha256,\n}))();\nexport const hashToCurve = /* @__PURE__ */ (() => htf.hashToCurve)();\nexport const encodeToCurve = /* @__PURE__ */ (() => htf.encodeToCurve)();\n//# sourceMappingURL=secp256k1.js.map","import { secp256k1 } from '@noble/curves/secp256k1';\nimport { hexToBigInt } from '../../utils/encoding/fromHex.js';\nimport { toHex } from '../../utils/encoding/toHex.js';\n/**\n * @description Converts a signature into hex format.\n *\n * @param signature The signature to convert.\n * @returns The signature in hex format.\n *\n * @example\n * signatureToHex({\n * r: '0x6e100a352ec6ad1b70802290e18aeed190704973570f3b8ed42cb9808e2ea6bf',\n * s: '0x4a90a229a244495b41890987806fcbd2d5d23fc0dbe5f5256c2613c039d76db8',\n * v: 28n\n * })\n * // \"0x6e100a352ec6ad1b70802290e18aeed190704973570f3b8ed42cb9808e2ea6bf4a90a229a244495b41890987806fcbd2d5d23fc0dbe5f5256c2613c039d76db81c\"\n */\nexport function signatureToHex({ r, s, v }) {\n return `0x${new secp256k1.Signature(hexToBigInt(r), hexToBigInt(s)).toCompactHex()}${toHex(v).slice(2)}`;\n}\n//# sourceMappingURL=signatureToHex.js.map","function t(r,e){throw new Error(e??`Unexpected value: ${r}`)}function o(...r){return r.reduce((e,n)=>n>e?n:e)}function u(...r){return r.reduce((e,n)=>ne?1:0}function*f(r,e){for(let n=0;nr(...e,...n)}function P(r){return r!==void 0}function g(r){return r!==null}function b(r){return new Promise(e=>setTimeout(()=>e(),r))}function T(){return new Promise(r=>{requestIdleCallback(()=>r())})}export{t as assertExhaustive,o as bigIntMax,u as bigIntMin,m as bigIntSort,f as chunk,d as curry,P as isDefined,g as isNotNull,b as wait,T as waitForIdle};\n//# sourceMappingURL=utils.js.map","var r=class extends Error{name=\"MUDError\"};export{r as a};\n//# sourceMappingURL=chunk-UPQEB2HW.js.map","import{isDynamicAbiType as C}from\"@latticexyz/schema-type\";function ne(e){let t=[],s=[];for(let i of e)C(i)?s.push(i):t.push(i);return{staticFields:t,dynamicFields:s}}import{hexToString as K,sliceHex as N}from\"viem\";import{assertExhaustive as R}from\"@latticexyz/common/utils\";import{arrayAbiTypeToStaticAbiType as W,staticAbiTypeToByteLength as _}from\"@latticexyz/schema-type\";import{getAddress as V,hexToBigInt as j,hexToBool as z}from\"viem\";import{assertExhaustive as O}from\"@latticexyz/common/utils\";import{staticAbiTypeToByteLength as U,staticAbiTypeToDefaultValue as M}from\"@latticexyz/schema-type\";import{MUDError as u}from\"@latticexyz/common/errors\";import{staticAbiTypeToByteLength as L}from\"@latticexyz/schema-type\";var d=class extends u{name=\"InvalidHexValueError\";constructor(t){super(`Hex value \"${t}\" is an odd length (${t.length-2}). It must be an even length.`)}},f=class extends u{name=\"InvalidHexLengthForSchemaError\";constructor(t){super(`Hex value \"${t}\" has length of ${t.length-2}, but expected length of 64 for a schema.`)}},x=class extends u{name=\"InvalidHexLengthForPackedCounterError\";constructor(t){super(`Hex value \"${t}\" has length of ${t.length-2}, but expected length of 64 for a packed counter.`)}},g=class extends u{name=\"InvalidHexLengthForStaticFieldError\";constructor(t,s){super(`Hex value \"${s}\" has length of ${s.length-2}, but expected length of ${L[t]*2} for ${t} type.`)}},S=class extends u{name=\"InvalidHexLengthForArrayFieldError\";constructor(t,s){super(`Hex value \"${s}\" has length of ${s.length-2}, but expected a multiple of ${L[t]*2} for ${t}[] type.`)}},A=class extends u{name=\"SchemaStaticLengthMismatchError\";constructor(t,s,i){super(`Schema \"${t}\" static data length (${s}) did not match the summed length of all static fields (${i}). Is \\`staticAbiTypeToByteLength\\` up to date with Solidity schema types?`)}},v=class extends u{name=\"PackedCounterLengthMismatchError\";constructor(t,s,i){super(`PackedCounter \"${t}\" total bytes length (${s}) did not match the summed length of all field byte lengths (${i}).`)}};function p(e,t){if(t.length>3&&t.length%2!==0)throw new d(t);if((t.length-2)/2!==U[e])throw new g(e,t);switch(e){case\"uint8\":case\"uint16\":case\"uint24\":case\"uint32\":case\"uint40\":case\"uint48\":case\"uint56\":case\"uint64\":case\"uint72\":case\"uint80\":case\"uint88\":case\"uint96\":case\"uint104\":case\"uint112\":case\"uint120\":case\"uint128\":case\"uint136\":case\"uint144\":case\"uint152\":case\"uint160\":case\"uint168\":case\"uint176\":case\"uint184\":case\"uint192\":case\"uint200\":case\"uint208\":case\"uint216\":case\"uint224\":case\"uint232\":case\"uint240\":case\"uint248\":case\"uint256\":case\"int8\":case\"int16\":case\"int24\":case\"int32\":case\"int40\":case\"int48\":case\"int56\":case\"int64\":case\"int72\":case\"int80\":case\"int88\":case\"int96\":case\"int104\":case\"int112\":case\"int120\":case\"int128\":case\"int136\":case\"int144\":case\"int152\":case\"int160\":case\"int168\":case\"int176\":case\"int184\":case\"int192\":case\"int200\":case\"int208\":case\"int216\":case\"int224\":case\"int232\":case\"int240\":case\"int248\":case\"int256\":{let i=j(t,{signed:e.startsWith(\"int\")}),a=typeof M[e];if(a===\"number\")return Number(i);if(a===\"bigint\")return i;throw new Error(`Unexpected default value type (${a}) for ABI type (${e})`)}case\"bytes1\":case\"bytes2\":case\"bytes3\":case\"bytes4\":case\"bytes5\":case\"bytes6\":case\"bytes7\":case\"bytes8\":case\"bytes9\":case\"bytes10\":case\"bytes11\":case\"bytes12\":case\"bytes13\":case\"bytes14\":case\"bytes15\":case\"bytes16\":case\"bytes17\":case\"bytes18\":case\"bytes19\":case\"bytes20\":case\"bytes21\":case\"bytes22\":case\"bytes23\":case\"bytes24\":case\"bytes25\":case\"bytes26\":case\"bytes27\":case\"bytes28\":case\"bytes29\":case\"bytes30\":case\"bytes31\":case\"bytes32\":return t;case\"bool\":return z(t);case\"address\":return V(t)}return O(e,`Unsupported static ABI type: ${e}`)}function h(e,t){if(e===\"bytes\")return t;if(e===\"string\")return K(t);if(t.length>3&&t.length%2!==0)throw new d(t);let s=(t.length-2)/2;switch(e){case\"uint8[]\":case\"uint16[]\":case\"uint24[]\":case\"uint32[]\":case\"uint40[]\":case\"uint48[]\":case\"uint56[]\":case\"uint64[]\":case\"uint72[]\":case\"uint80[]\":case\"uint88[]\":case\"uint96[]\":case\"uint104[]\":case\"uint112[]\":case\"uint120[]\":case\"uint128[]\":case\"uint136[]\":case\"uint144[]\":case\"uint152[]\":case\"uint160[]\":case\"uint168[]\":case\"uint176[]\":case\"uint184[]\":case\"uint192[]\":case\"uint200[]\":case\"uint208[]\":case\"uint216[]\":case\"uint224[]\":case\"uint232[]\":case\"uint240[]\":case\"uint248[]\":case\"uint256[]\":case\"int8[]\":case\"int16[]\":case\"int24[]\":case\"int32[]\":case\"int40[]\":case\"int48[]\":case\"int56[]\":case\"int64[]\":case\"int72[]\":case\"int80[]\":case\"int88[]\":case\"int96[]\":case\"int104[]\":case\"int112[]\":case\"int120[]\":case\"int128[]\":case\"int136[]\":case\"int144[]\":case\"int152[]\":case\"int160[]\":case\"int168[]\":case\"int176[]\":case\"int184[]\":case\"int192[]\":case\"int200[]\":case\"int208[]\":case\"int216[]\":case\"int224[]\":case\"int232[]\":case\"int240[]\":case\"int248[]\":case\"int256[]\":case\"bytes1[]\":case\"bytes2[]\":case\"bytes3[]\":case\"bytes4[]\":case\"bytes5[]\":case\"bytes6[]\":case\"bytes7[]\":case\"bytes8[]\":case\"bytes9[]\":case\"bytes10[]\":case\"bytes11[]\":case\"bytes12[]\":case\"bytes13[]\":case\"bytes14[]\":case\"bytes15[]\":case\"bytes16[]\":case\"bytes17[]\":case\"bytes18[]\":case\"bytes19[]\":case\"bytes20[]\":case\"bytes21[]\":case\"bytes22[]\":case\"bytes23[]\":case\"bytes24[]\":case\"bytes25[]\":case\"bytes26[]\":case\"bytes27[]\":case\"bytes28[]\":case\"bytes29[]\":case\"bytes30[]\":case\"bytes31[]\":case\"bytes32[]\":case\"bool[]\":case\"address[]\":{let i=W(e),a=_[i];if(s%a!==0)throw new S(i,t);return new Array(s/a).fill(void 0).map((n,c)=>{let r=N(t,c*a,(c+1)*a);return p(i,r)})}}return R(e,`Unsupported dynamic ABI type: ${e}`)}import{isDynamicAbiType as q}from\"@latticexyz/schema-type\";function ke(e,t){return q(e)?h(e,t):p(e,t)}import{decodeAbiParameters as G}from\"viem\";function ze(e,t){if(e.staticFields.length!==t.length)throw new Error(`key tuple length ${t.length} does not match key schema length ${e.staticFields.length}`);return t.map((s,i)=>G([{type:e.staticFields[i]}],s)[0])}import{staticAbiTypeToByteLength as Q,dynamicAbiTypeToDefaultValue as X}from\"@latticexyz/schema-type\";import{sliceHex as H}from\"viem\";import{sliceHex as $}from\"viem\";function B(e){if(e.length!==66)throw new x(e);let t=p(\"uint56\",$(e,32-7,32)),s=h(\"uint40[]\",$(e,0,32-7)),i=Object.freeze([...s].reverse()),a=BigInt(i.reduce((m,n)=>m+n,0));if(a!==t)throw new v(e,t,a);return{totalByteLength:t,fieldByteLengths:i}}import{staticAbiTypeToByteLength as J}from\"@latticexyz/schema-type\";function P(e){return e.reduce((t,s)=>t+J[s],0)}function ct(e,t){let s=[],i=0;e.staticFields.forEach(n=>{let c=Q[n],r=p(n,H(t,i,i+c));i+=c,s.push(r)});let a=P(e.staticFields),m=i;if(m!==a&&console.warn(\"Decoded static data length does not match schema's expected static data length. Data may get corrupted. Is `getStaticByteLength` outdated?\",{expectedLength:a,actualLength:m,bytesOffset:i}),e.dynamicFields.length>0){let n=B(H(t,i,i+32));i+=32,e.dynamicFields.forEach((r,F)=>{let o=n.fieldByteLengths[F];if(o>0){let y=h(r,H(t,i,i+o));i+=o,s.push(y)}else s.push(X[r])});let c=i-32-m;BigInt(c)!==n.totalByteLength&&console.warn(\"Decoded dynamic data length does not match data layout's expected data length. Data may get corrupted. Did the data layout change?\",{expectedLength:n.totalByteLength,actualLength:c,bytesOffset:i})}return s}import{arrayAbiTypeToStaticAbiType as Y,isArrayAbiType as Z}from\"@latticexyz/schema-type\";import{encodePacked as w}from\"viem\";function l(e,t){if(Z(e)&&Array.isArray(t)){let s=Y(e);return w(t.map(()=>s),t)}return w([e],[t])}import{encodeAbiParameters as ee}from\"viem\";function dt(e,t){return t.map((s,i)=>ee([{type:e.staticFields[i]}],[s]))}function Tt(e,t){let s=t.slice(0,e.staticFields.length),i=t.slice(e.staticFields.length),a=s.map((o,y)=>l(e.staticFields[y],o).replace(/^0x/,\"\")).join(\"\");if(e.dynamicFields.length===0)return`0x${a}`;let m=i.map((o,y)=>l(e.dynamicFields[y],o).replace(/^0x/,\"\")),n=m.map(o=>o.length/2),c=n.reduce((o,y)=>o+BigInt(y),0n),r=m.join(\"\"),F=`${l(\"uint56\",c).replace(/^0x/,\"\")}${n.map(o=>l(\"uint40\",o).replace(/^0x/,\"\")).join(\"\")}`.padEnd(64,\"0\");return`0x${a}${F}${r}`}import{schemaAbiTypes as I,staticAbiTypeToByteLength as te}from\"@latticexyz/schema-type\";import{hexToNumber as T,sliceHex as b}from\"viem\";function D(e){if(e.length!==66)throw new f(e);let t=T(b(e,0,2)),s=T(b(e,2,3)),i=T(b(e,3,4)),a=[],m=[];for(let c=4;c<4+s;c++){let r=T(b(e,c,c+1));a.push(I[r])}for(let c=4+s;c<4+s+i;c++){let r=T(b(e,c,c+1));m.push(I[r])}let n=a.reduce((c,r)=>c+te[r],0);if(n!==t)throw console.warn(`Schema \"${e}\" static data length (${t}) did not match the summed length of all static fields (${n}). Is \\`staticAbiTypeToByteLength\\` up to date with Solidity schema types?`),new A(e,t,n);return{staticFields:a,dynamicFields:m}}import{sliceHex as E}from\"viem\";function Lt(e){let t=D(E(e,0,32));return{keySchema:D(E(e,32,64)),valueSchema:t}}function Bt(e,t){return tk.indexOf(i)),s=e.dynamicFields.map(i=>k.indexOf(i));return`0x${[P(e.staticFields).toString(16).padStart(4,\"0\"),e.staticFields.length.toString(16).padStart(2,\"0\"),e.dynamicFields.length.toString(16).padStart(2,\"0\"),...t.map(i=>i.toString(16).padStart(2,\"0\")),...s.map(i=>i.toString(16).padStart(2,\"0\"))].join(\"\").padEnd(64,\"0\")}`}export{d as InvalidHexLengthError,S as InvalidHexLengthForArrayFieldError,x as InvalidHexLengthForPackedCounterError,f as InvalidHexLengthForSchemaError,g as InvalidHexLengthForStaticFieldError,v as PackedCounterLengthMismatchError,A as SchemaStaticLengthMismatchError,ne as abiTypesToSchema,h as decodeDynamicField,ke as decodeField,ze as decodeKeyTuple,ct as decodeRecord,p as decodeStaticField,l as encodeField,dt as encodeKeyTuple,Tt as encodeRecord,B as hexToPackedCounter,D as hexToSchema,Lt as hexToTableSchema,Bt as schemaIndexToAbiType,kt as schemaToHex,P as staticDataLength};\n//# sourceMappingURL=index.js.map","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","import { secp256k1 } from '@noble/curves/secp256k1';\nimport { toHex } from '../utils/encoding/toHex.js';\n/**\n * @description Generates a random private key.\n *\n * @returns A randomly generated private key.\n */\nexport function generatePrivateKey() {\n return toHex(secp256k1.utils.randomPrivateKey());\n}\n//# sourceMappingURL=generatePrivateKey.js.map","import { InvalidAddressError } from '../errors/address.js';\nimport { isAddress } from '../utils/address/isAddress.js';\n/**\n * @description Creates an Account from a custom signing implementation.\n *\n * @returns A Local Account.\n */\nexport function toAccount(source) {\n if (typeof source === 'string') {\n if (!isAddress(source))\n throw new InvalidAddressError({ address: source });\n return {\n address: source,\n type: 'json-rpc',\n };\n }\n if (!isAddress(source.address))\n throw new InvalidAddressError({ address: source.address });\n return {\n address: source.address,\n signMessage: source.signMessage,\n signTransaction: source.signTransaction,\n signTypedData: source.signTypedData,\n source: 'custom',\n type: 'local',\n };\n}\n//# sourceMappingURL=toAccount.js.map","import { secp256k1 } from '@noble/curves/secp256k1';\nimport { toHex } from '../../utils/encoding/toHex.js';\n/**\n * @description Signs a hash with a given private key.\n *\n * @param hash The hash to sign.\n * @param privateKey The private key to sign with.\n *\n * @returns The signature.\n */\nexport async function sign({ hash, privateKey, }) {\n const { r, s, recovery } = secp256k1.sign(hash.slice(2), privateKey.slice(2));\n return {\n r: toHex(r),\n s: toHex(s),\n v: recovery ? 28n : 27n,\n };\n}\n//# sourceMappingURL=sign.js.map","import { hashMessage } from '../../utils/signature/hashMessage.js';\nimport { signatureToHex } from '../../utils/signature/signatureToHex.js';\nimport { sign } from './sign.js';\n/**\n * @description Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191):\n * `keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message))`.\n *\n * @returns The signature.\n */\nexport async function signMessage({ message, privateKey, }) {\n const signature = await sign({ hash: hashMessage(message), privateKey });\n return signatureToHex(signature);\n}\n//# sourceMappingURL=signMessage.js.map","import { keccak256 } from '../../utils/hash/keccak256.js';\nimport { serializeTransaction, } from '../../utils/transaction/serializeTransaction.js';\nimport { sign } from './sign.js';\nexport async function signTransaction({ privateKey, transaction, serializer = serializeTransaction, }) {\n const signature = await sign({\n hash: keccak256(serializer(transaction)),\n privateKey,\n });\n return serializer(transaction, signature);\n}\n//# sourceMappingURL=signTransaction.js.map","import { hashTypedData, } from '../../utils/signature/hashTypedData.js';\nimport { signatureToHex } from '../../utils/signature/signatureToHex.js';\nimport { sign } from './sign.js';\n/**\n * @description Signs typed data and calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191):\n * `keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(message) + message))`.\n *\n * @returns The signature.\n */\nexport async function signTypedData({ privateKey, ...typedData }) {\n const signature = await sign({\n hash: hashTypedData(typedData),\n privateKey,\n });\n return signatureToHex(signature);\n}\n//# sourceMappingURL=signTypedData.js.map","import { secp256k1 } from '@noble/curves/secp256k1';\nimport { toHex } from '../utils/encoding/toHex.js';\nimport { toAccount } from './toAccount.js';\nimport { publicKeyToAddress } from './utils/publicKeyToAddress.js';\nimport { signMessage } from './utils/signMessage.js';\nimport { signTransaction } from './utils/signTransaction.js';\nimport { signTypedData } from './utils/signTypedData.js';\n/**\n * @description Creates an Account from a private key.\n *\n * @returns A Private Key Account.\n */\nexport function privateKeyToAccount(privateKey) {\n const publicKey = toHex(secp256k1.getPublicKey(privateKey.slice(2), false));\n const address = publicKeyToAddress(publicKey);\n const account = toAccount({\n address,\n async signMessage({ message }) {\n return signMessage({ message, privateKey });\n },\n async signTransaction(transaction, { serializer } = {}) {\n return signTransaction({ privateKey, transaction, serializer });\n },\n async signTypedData(typedData) {\n return signTypedData({ ...typedData, privateKey });\n },\n });\n return {\n ...account,\n publicKey,\n source: 'privateKey',\n };\n}\n//# sourceMappingURL=privateKeyToAccount.js.map","function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n this._timer = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts.slice(0);\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n if (this._timer) {\n clearTimeout(this._timer);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.push(err);\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(0, this._errors.length - 1);\n timeout = this._cachedTimeouts.slice(-1);\n } else {\n return false;\n }\n }\n\n var self = this;\n this._timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n this._timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n","var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && (options.forever || options.retries === Infinity),\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n","module.exports = require('./lib/retry');","import retry from 'retry';\n\nconst networkErrorMsgs = new Set([\n\t'Failed to fetch', // Chrome\n\t'NetworkError when attempting to fetch resource.', // Firefox\n\t'The Internet connection appears to be offline.', // Safari\n\t'Network request failed', // `cross-fetch`\n\t'fetch failed', // Undici (Node.js)\n]);\n\nexport class AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\n\t\tif (message instanceof Error) {\n\t\t\tthis.originalError = message;\n\t\t\t({message} = message);\n\t\t} else {\n\t\t\tthis.originalError = new Error(message);\n\t\t\tthis.originalError.stack = this.stack;\n\t\t}\n\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\nconst decorateErrorWithCounts = (error, attemptNumber, options) => {\n\t// Minus 1 from attemptNumber because the first attempt does not count as a retry\n\tconst retriesLeft = options.retries - (attemptNumber - 1);\n\n\terror.attemptNumber = attemptNumber;\n\terror.retriesLeft = retriesLeft;\n\treturn error;\n};\n\nconst isNetworkError = errorMessage => networkErrorMsgs.has(errorMessage);\n\nconst getDOMException = errorMessage => globalThis.DOMException === undefined\n\t? new Error(errorMessage)\n\t: new DOMException(errorMessage);\n\nexport default async function pRetry(input, options) {\n\treturn new Promise((resolve, reject) => {\n\t\toptions = {\n\t\t\tonFailedAttempt() {},\n\t\t\tretries: 10,\n\t\t\t...options,\n\t\t};\n\n\t\tconst operation = retry.operation(options);\n\n\t\toperation.attempt(async attemptNumber => {\n\t\t\ttry {\n\t\t\t\tresolve(await input(attemptNumber));\n\t\t\t} catch (error) {\n\t\t\t\tif (!(error instanceof Error)) {\n\t\t\t\t\treject(new TypeError(`Non-error was thrown: \"${error}\". You should only throw errors.`));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (error instanceof AbortError) {\n\t\t\t\t\toperation.stop();\n\t\t\t\t\treject(error.originalError);\n\t\t\t\t} else if (error instanceof TypeError && !isNetworkError(error.message)) {\n\t\t\t\t\toperation.stop();\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n\t\t\t\t\tdecorateErrorWithCounts(error, attemptNumber, options);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait options.onFailedAttempt(error);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!operation.retry(error)) {\n\t\t\t\t\t\treject(operation.mainError());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (options.signal && !options.signal.aborted) {\n\t\t\toptions.signal.addEventListener('abort', () => {\n\t\t\t\toperation.stop();\n\t\t\t\tconst reason = options.signal.reason === undefined\n\t\t\t\t\t? getDOMException('The operation was aborted.')\n\t\t\t\t\t: options.signal.reason;\n\t\t\t\treject(reason instanceof Error ? reason : getDOMException(reason));\n\t\t\t}, {\n\t\t\t\tonce: true,\n\t\t\t});\n\t\t}\n\t});\n}\n","import{privateKeyToAccount as W}from\"viem/accounts\";function J(e){return{...W(e)}}import{getContract as M}from\"viem\";import O from\"p-retry\";import{BaseError as k,NonceTooHighError as R,NonceTooLowError as v}from\"viem\";import H from\"debug\";var p=H(\"mud:common\");var x=p.extend(\"createNonceManager\");function b({publicClient:e,address:t,blockTag:r}){let n={current:-1},a=typeof BroadcastChannel<\"u\"?new BroadcastChannel(`mud:createNonceManager:${e.chain?.id}:${t}`):null;a&&a.addEventListener(\"message\",o=>{let T=JSON.parse(o.data);x(\"got nonce from broadcast channel\",T),n.current=T});function c(){return n.current>=0}function d(){if(!c())throw new Error(\"call resetNonce before using nextNonce\");let o=n.current++;return a?.postMessage(JSON.stringify(n.current)),o}async function u(){let o=await e.getTransactionCount({address:t,blockTag:r});n.current=o,a?.postMessage(JSON.stringify(n.current)),x(\"reset nonce to\",n.current)}function C(o){return o instanceof k&&o.walk(T=>T instanceof v||T instanceof R)!=null}return{hasNonce:c,nextNonce:d,resetNonce:u,shouldResetNonce:C}}var m=p.extend(\"createContract\");function E(e){let t=e.length&&Array.isArray(e[0]),r=t?e[0]:[],n=(t?e[1]:e[0])??{};return{args:r,options:n}}function me({abi:e,address:t,publicClient:r,walletClient:n,onWrite:a}){let c=M({abi:e,address:t,publicClient:r,walletClient:n});if(c.write){let d=0,u=b({publicClient:r,address:n.account.address});c.write=new Proxy({},{get(C,o){async function T(s){if(s.gas)return m(\"gas provided, skipping simulate\",o,s),s;m(\"simulating write\",o,s);let{request:l}=await r.simulateContract({...s,account:s.account??n.account});return l}async function w(s){let l=await T(s);return await O(async()=>{u.hasNonce()||await u.resetNonce();let i=u.nextNonce();return m(\"calling write function with nonce\",i,l),await n.writeContract({nonce:i,...l})},{retries:3,onFailedAttempt:async i=>{if(u.shouldResetNonce(i)){m(\"got nonce error, retrying\",i),await u.resetNonce();return}throw i}})}return(...s)=>{let l=`${n.chain.id}:${n.account.address}:${d++}`,{args:i,options:N}=E(s),f={address:t,abi:e,functionName:o,args:i,...N},g=w(f);return a?.({id:l,request:f,result:g}),g}}})}return c}import{generatePrivateKey as S,privateKeyToAccount as A}from\"viem/accounts\";import{isHex as $}from\"viem\";function B(e,t){if(!$(e))throw console.error(\"Private key found in cache is not valid hex\",{privateKey:e,cacheKey:t}),new Error(`Private key found in cache (${t}) is not valid hex`);A(e)}function be(e=\"mud:burnerWallet\"){let t=localStorage.getItem(e);if(t!=null)return B(t,e),t;let r=S();return console.log(\"New burner wallet created:\",A(r)),localStorage.setItem(e,r),r}import{hexToString as h,sliceHex as P}from\"viem\";function ye(e){let t=h(P(e,0,16)).replace(/\\0+$/,\"\"),r=h(P(e,16,32)).replace(/\\0+$/,\"\");return{namespace:t,name:r}}import{stringToHex as y,concatHex as G}from\"viem\";function He(e,t){return G([y(e.substring(0,16),{size:16}),y(t.substring(0,16),{size:16})])}import{keccak256 as q}from\"viem\";var I=p.extend(\"transportObserver\");function Ee(e){return t=>{let r=e(t);return{...r,request:async a=>{if(a.method===\"eth_sendRawTransaction\"&&a.params instanceof Array){let c=a.params.map(d=>q(d));I(\"saw txs\",c)}return r.request(a)}}}}export{J as createBurnerAccount,me as createContract,b as createNonceManager,be as getBurnerPrivateKey,ye as hexToTableId,He as tableIdToHex,Ee as transportObserver};\n//# sourceMappingURL=index.js.map","var I=(t=>(t[t.UINT8=0]=\"UINT8\",t[t.UINT16=1]=\"UINT16\",t[t.UINT24=2]=\"UINT24\",t[t.UINT32=3]=\"UINT32\",t[t.UINT40=4]=\"UINT40\",t[t.UINT48=5]=\"UINT48\",t[t.UINT56=6]=\"UINT56\",t[t.UINT64=7]=\"UINT64\",t[t.UINT72=8]=\"UINT72\",t[t.UINT80=9]=\"UINT80\",t[t.UINT88=10]=\"UINT88\",t[t.UINT96=11]=\"UINT96\",t[t.UINT104=12]=\"UINT104\",t[t.UINT112=13]=\"UINT112\",t[t.UINT120=14]=\"UINT120\",t[t.UINT128=15]=\"UINT128\",t[t.UINT136=16]=\"UINT136\",t[t.UINT144=17]=\"UINT144\",t[t.UINT152=18]=\"UINT152\",t[t.UINT160=19]=\"UINT160\",t[t.UINT168=20]=\"UINT168\",t[t.UINT176=21]=\"UINT176\",t[t.UINT184=22]=\"UINT184\",t[t.UINT192=23]=\"UINT192\",t[t.UINT200=24]=\"UINT200\",t[t.UINT208=25]=\"UINT208\",t[t.UINT216=26]=\"UINT216\",t[t.UINT224=27]=\"UINT224\",t[t.UINT232=28]=\"UINT232\",t[t.UINT240=29]=\"UINT240\",t[t.UINT248=30]=\"UINT248\",t[t.UINT256=31]=\"UINT256\",t[t.INT8=32]=\"INT8\",t[t.INT16=33]=\"INT16\",t[t.INT24=34]=\"INT24\",t[t.INT32=35]=\"INT32\",t[t.INT40=36]=\"INT40\",t[t.INT48=37]=\"INT48\",t[t.INT56=38]=\"INT56\",t[t.INT64=39]=\"INT64\",t[t.INT72=40]=\"INT72\",t[t.INT80=41]=\"INT80\",t[t.INT88=42]=\"INT88\",t[t.INT96=43]=\"INT96\",t[t.INT104=44]=\"INT104\",t[t.INT112=45]=\"INT112\",t[t.INT120=46]=\"INT120\",t[t.INT128=47]=\"INT128\",t[t.INT136=48]=\"INT136\",t[t.INT144=49]=\"INT144\",t[t.INT152=50]=\"INT152\",t[t.INT160=51]=\"INT160\",t[t.INT168=52]=\"INT168\",t[t.INT176=53]=\"INT176\",t[t.INT184=54]=\"INT184\",t[t.INT192=55]=\"INT192\",t[t.INT200=56]=\"INT200\",t[t.INT208=57]=\"INT208\",t[t.INT216=58]=\"INT216\",t[t.INT224=59]=\"INT224\",t[t.INT232=60]=\"INT232\",t[t.INT240=61]=\"INT240\",t[t.INT248=62]=\"INT248\",t[t.INT256=63]=\"INT256\",t[t.BYTES1=64]=\"BYTES1\",t[t.BYTES2=65]=\"BYTES2\",t[t.BYTES3=66]=\"BYTES3\",t[t.BYTES4=67]=\"BYTES4\",t[t.BYTES5=68]=\"BYTES5\",t[t.BYTES6=69]=\"BYTES6\",t[t.BYTES7=70]=\"BYTES7\",t[t.BYTES8=71]=\"BYTES8\",t[t.BYTES9=72]=\"BYTES9\",t[t.BYTES10=73]=\"BYTES10\",t[t.BYTES11=74]=\"BYTES11\",t[t.BYTES12=75]=\"BYTES12\",t[t.BYTES13=76]=\"BYTES13\",t[t.BYTES14=77]=\"BYTES14\",t[t.BYTES15=78]=\"BYTES15\",t[t.BYTES16=79]=\"BYTES16\",t[t.BYTES17=80]=\"BYTES17\",t[t.BYTES18=81]=\"BYTES18\",t[t.BYTES19=82]=\"BYTES19\",t[t.BYTES20=83]=\"BYTES20\",t[t.BYTES21=84]=\"BYTES21\",t[t.BYTES22=85]=\"BYTES22\",t[t.BYTES23=86]=\"BYTES23\",t[t.BYTES24=87]=\"BYTES24\",t[t.BYTES25=88]=\"BYTES25\",t[t.BYTES26=89]=\"BYTES26\",t[t.BYTES27=90]=\"BYTES27\",t[t.BYTES28=91]=\"BYTES28\",t[t.BYTES29=92]=\"BYTES29\",t[t.BYTES30=93]=\"BYTES30\",t[t.BYTES31=94]=\"BYTES31\",t[t.BYTES32=95]=\"BYTES32\",t[t.BOOL=96]=\"BOOL\",t[t.ADDRESS=97]=\"ADDRESS\",t[t.UINT8_ARRAY=98]=\"UINT8_ARRAY\",t[t.UINT16_ARRAY=99]=\"UINT16_ARRAY\",t[t.UINT24_ARRAY=100]=\"UINT24_ARRAY\",t[t.UINT32_ARRAY=101]=\"UINT32_ARRAY\",t[t.UINT40_ARRAY=102]=\"UINT40_ARRAY\",t[t.UINT48_ARRAY=103]=\"UINT48_ARRAY\",t[t.UINT56_ARRAY=104]=\"UINT56_ARRAY\",t[t.UINT64_ARRAY=105]=\"UINT64_ARRAY\",t[t.UINT72_ARRAY=106]=\"UINT72_ARRAY\",t[t.UINT80_ARRAY=107]=\"UINT80_ARRAY\",t[t.UINT88_ARRAY=108]=\"UINT88_ARRAY\",t[t.UINT96_ARRAY=109]=\"UINT96_ARRAY\",t[t.UINT104_ARRAY=110]=\"UINT104_ARRAY\",t[t.UINT112_ARRAY=111]=\"UINT112_ARRAY\",t[t.UINT120_ARRAY=112]=\"UINT120_ARRAY\",t[t.UINT128_ARRAY=113]=\"UINT128_ARRAY\",t[t.UINT136_ARRAY=114]=\"UINT136_ARRAY\",t[t.UINT144_ARRAY=115]=\"UINT144_ARRAY\",t[t.UINT152_ARRAY=116]=\"UINT152_ARRAY\",t[t.UINT160_ARRAY=117]=\"UINT160_ARRAY\",t[t.UINT168_ARRAY=118]=\"UINT168_ARRAY\",t[t.UINT176_ARRAY=119]=\"UINT176_ARRAY\",t[t.UINT184_ARRAY=120]=\"UINT184_ARRAY\",t[t.UINT192_ARRAY=121]=\"UINT192_ARRAY\",t[t.UINT200_ARRAY=122]=\"UINT200_ARRAY\",t[t.UINT208_ARRAY=123]=\"UINT208_ARRAY\",t[t.UINT216_ARRAY=124]=\"UINT216_ARRAY\",t[t.UINT224_ARRAY=125]=\"UINT224_ARRAY\",t[t.UINT232_ARRAY=126]=\"UINT232_ARRAY\",t[t.UINT240_ARRAY=127]=\"UINT240_ARRAY\",t[t.UINT248_ARRAY=128]=\"UINT248_ARRAY\",t[t.UINT256_ARRAY=129]=\"UINT256_ARRAY\",t[t.INT8_ARRAY=130]=\"INT8_ARRAY\",t[t.INT16_ARRAY=131]=\"INT16_ARRAY\",t[t.INT24_ARRAY=132]=\"INT24_ARRAY\",t[t.INT32_ARRAY=133]=\"INT32_ARRAY\",t[t.INT40_ARRAY=134]=\"INT40_ARRAY\",t[t.INT48_ARRAY=135]=\"INT48_ARRAY\",t[t.INT56_ARRAY=136]=\"INT56_ARRAY\",t[t.INT64_ARRAY=137]=\"INT64_ARRAY\",t[t.INT72_ARRAY=138]=\"INT72_ARRAY\",t[t.INT80_ARRAY=139]=\"INT80_ARRAY\",t[t.INT88_ARRAY=140]=\"INT88_ARRAY\",t[t.INT96_ARRAY=141]=\"INT96_ARRAY\",t[t.INT104_ARRAY=142]=\"INT104_ARRAY\",t[t.INT112_ARRAY=143]=\"INT112_ARRAY\",t[t.INT120_ARRAY=144]=\"INT120_ARRAY\",t[t.INT128_ARRAY=145]=\"INT128_ARRAY\",t[t.INT136_ARRAY=146]=\"INT136_ARRAY\",t[t.INT144_ARRAY=147]=\"INT144_ARRAY\",t[t.INT152_ARRAY=148]=\"INT152_ARRAY\",t[t.INT160_ARRAY=149]=\"INT160_ARRAY\",t[t.INT168_ARRAY=150]=\"INT168_ARRAY\",t[t.INT176_ARRAY=151]=\"INT176_ARRAY\",t[t.INT184_ARRAY=152]=\"INT184_ARRAY\",t[t.INT192_ARRAY=153]=\"INT192_ARRAY\",t[t.INT200_ARRAY=154]=\"INT200_ARRAY\",t[t.INT208_ARRAY=155]=\"INT208_ARRAY\",t[t.INT216_ARRAY=156]=\"INT216_ARRAY\",t[t.INT224_ARRAY=157]=\"INT224_ARRAY\",t[t.INT232_ARRAY=158]=\"INT232_ARRAY\",t[t.INT240_ARRAY=159]=\"INT240_ARRAY\",t[t.INT248_ARRAY=160]=\"INT248_ARRAY\",t[t.INT256_ARRAY=161]=\"INT256_ARRAY\",t[t.BYTES1_ARRAY=162]=\"BYTES1_ARRAY\",t[t.BYTES2_ARRAY=163]=\"BYTES2_ARRAY\",t[t.BYTES3_ARRAY=164]=\"BYTES3_ARRAY\",t[t.BYTES4_ARRAY=165]=\"BYTES4_ARRAY\",t[t.BYTES5_ARRAY=166]=\"BYTES5_ARRAY\",t[t.BYTES6_ARRAY=167]=\"BYTES6_ARRAY\",t[t.BYTES7_ARRAY=168]=\"BYTES7_ARRAY\",t[t.BYTES8_ARRAY=169]=\"BYTES8_ARRAY\",t[t.BYTES9_ARRAY=170]=\"BYTES9_ARRAY\",t[t.BYTES10_ARRAY=171]=\"BYTES10_ARRAY\",t[t.BYTES11_ARRAY=172]=\"BYTES11_ARRAY\",t[t.BYTES12_ARRAY=173]=\"BYTES12_ARRAY\",t[t.BYTES13_ARRAY=174]=\"BYTES13_ARRAY\",t[t.BYTES14_ARRAY=175]=\"BYTES14_ARRAY\",t[t.BYTES15_ARRAY=176]=\"BYTES15_ARRAY\",t[t.BYTES16_ARRAY=177]=\"BYTES16_ARRAY\",t[t.BYTES17_ARRAY=178]=\"BYTES17_ARRAY\",t[t.BYTES18_ARRAY=179]=\"BYTES18_ARRAY\",t[t.BYTES19_ARRAY=180]=\"BYTES19_ARRAY\",t[t.BYTES20_ARRAY=181]=\"BYTES20_ARRAY\",t[t.BYTES21_ARRAY=182]=\"BYTES21_ARRAY\",t[t.BYTES22_ARRAY=183]=\"BYTES22_ARRAY\",t[t.BYTES23_ARRAY=184]=\"BYTES23_ARRAY\",t[t.BYTES24_ARRAY=185]=\"BYTES24_ARRAY\",t[t.BYTES25_ARRAY=186]=\"BYTES25_ARRAY\",t[t.BYTES26_ARRAY=187]=\"BYTES26_ARRAY\",t[t.BYTES27_ARRAY=188]=\"BYTES27_ARRAY\",t[t.BYTES28_ARRAY=189]=\"BYTES28_ARRAY\",t[t.BYTES29_ARRAY=190]=\"BYTES29_ARRAY\",t[t.BYTES30_ARRAY=191]=\"BYTES30_ARRAY\",t[t.BYTES31_ARRAY=192]=\"BYTES31_ARRAY\",t[t.BYTES32_ARRAY=193]=\"BYTES32_ARRAY\",t[t.BOOL_ARRAY=194]=\"BOOL_ARRAY\",t[t.ADDRESS_ARRAY=195]=\"ADDRESS_ARRAY\",t[t.BYTES=196]=\"BYTES\",t[t.STRING=197]=\"STRING\",t))(I||{});var Y={[0]:\"uint8\",[1]:\"uint16\",[2]:\"uint24\",[3]:\"uint32\",[4]:\"uint40\",[5]:\"uint48\",[6]:\"uint56\",[7]:\"uint64\",[8]:\"uint72\",[9]:\"uint80\",[10]:\"uint88\",[11]:\"uint96\",[12]:\"uint104\",[13]:\"uint112\",[14]:\"uint120\",[15]:\"uint128\",[16]:\"uint136\",[17]:\"uint144\",[18]:\"uint152\",[19]:\"uint160\",[20]:\"uint168\",[21]:\"uint176\",[22]:\"uint184\",[23]:\"uint192\",[24]:\"uint200\",[25]:\"uint208\",[26]:\"uint216\",[27]:\"uint224\",[28]:\"uint232\",[29]:\"uint240\",[30]:\"uint248\",[31]:\"uint256\",[32]:\"int8\",[33]:\"int16\",[34]:\"int24\",[35]:\"int32\",[36]:\"int40\",[37]:\"int48\",[38]:\"int56\",[39]:\"int64\",[40]:\"int72\",[41]:\"int80\",[42]:\"int88\",[43]:\"int96\",[44]:\"int104\",[45]:\"int112\",[46]:\"int120\",[47]:\"int128\",[48]:\"int136\",[49]:\"int144\",[50]:\"int152\",[51]:\"int160\",[52]:\"int168\",[53]:\"int176\",[54]:\"int184\",[55]:\"int192\",[56]:\"int200\",[57]:\"int208\",[58]:\"int216\",[59]:\"int224\",[60]:\"int232\",[61]:\"int240\",[62]:\"int248\",[63]:\"int256\",[64]:\"bytes1\",[65]:\"bytes2\",[66]:\"bytes3\",[67]:\"bytes4\",[68]:\"bytes5\",[69]:\"bytes6\",[70]:\"bytes7\",[71]:\"bytes8\",[72]:\"bytes9\",[73]:\"bytes10\",[74]:\"bytes11\",[75]:\"bytes12\",[76]:\"bytes13\",[77]:\"bytes14\",[78]:\"bytes15\",[79]:\"bytes16\",[80]:\"bytes17\",[81]:\"bytes18\",[82]:\"bytes19\",[83]:\"bytes20\",[84]:\"bytes21\",[85]:\"bytes22\",[86]:\"bytes23\",[87]:\"bytes24\",[88]:\"bytes25\",[89]:\"bytes26\",[90]:\"bytes27\",[91]:\"bytes28\",[92]:\"bytes29\",[93]:\"bytes30\",[94]:\"bytes31\",[95]:\"bytes32\",[96]:\"bool\",[97]:\"address\",[98]:\"uint8[]\",[99]:\"uint16[]\",[100]:\"uint24[]\",[101]:\"uint32[]\",[102]:\"uint40[]\",[103]:\"uint48[]\",[104]:\"uint56[]\",[105]:\"uint64[]\",[106]:\"uint72[]\",[107]:\"uint80[]\",[108]:\"uint88[]\",[109]:\"uint96[]\",[110]:\"uint104[]\",[111]:\"uint112[]\",[112]:\"uint120[]\",[113]:\"uint128[]\",[114]:\"uint136[]\",[115]:\"uint144[]\",[116]:\"uint152[]\",[117]:\"uint160[]\",[118]:\"uint168[]\",[119]:\"uint176[]\",[120]:\"uint184[]\",[121]:\"uint192[]\",[122]:\"uint200[]\",[123]:\"uint208[]\",[124]:\"uint216[]\",[125]:\"uint224[]\",[126]:\"uint232[]\",[127]:\"uint240[]\",[128]:\"uint248[]\",[129]:\"uint256[]\",[130]:\"int8[]\",[131]:\"int16[]\",[132]:\"int24[]\",[133]:\"int32[]\",[134]:\"int40[]\",[135]:\"int48[]\",[136]:\"int56[]\",[137]:\"int64[]\",[138]:\"int72[]\",[139]:\"int80[]\",[140]:\"int88[]\",[141]:\"int96[]\",[142]:\"int104[]\",[143]:\"int112[]\",[144]:\"int120[]\",[145]:\"int128[]\",[146]:\"int136[]\",[147]:\"int144[]\",[148]:\"int152[]\",[149]:\"int160[]\",[150]:\"int168[]\",[151]:\"int176[]\",[152]:\"int184[]\",[153]:\"int192[]\",[154]:\"int200[]\",[155]:\"int208[]\",[156]:\"int216[]\",[157]:\"int224[]\",[158]:\"int232[]\",[159]:\"int240[]\",[160]:\"int248[]\",[161]:\"int256[]\",[162]:\"bytes1[]\",[163]:\"bytes2[]\",[164]:\"bytes3[]\",[165]:\"bytes4[]\",[166]:\"bytes5[]\",[167]:\"bytes6[]\",[168]:\"bytes7[]\",[169]:\"bytes8[]\",[170]:\"bytes9[]\",[171]:\"bytes10[]\",[172]:\"bytes11[]\",[173]:\"bytes12[]\",[174]:\"bytes13[]\",[175]:\"bytes14[]\",[176]:\"bytes15[]\",[177]:\"bytes16[]\",[178]:\"bytes17[]\",[179]:\"bytes18[]\",[180]:\"bytes19[]\",[181]:\"bytes20[]\",[182]:\"bytes21[]\",[183]:\"bytes22[]\",[184]:\"bytes23[]\",[185]:\"bytes24[]\",[186]:\"bytes25[]\",[187]:\"bytes26[]\",[188]:\"bytes27[]\",[189]:\"bytes28[]\",[190]:\"bytes29[]\",[191]:\"bytes30[]\",[192]:\"bytes31[]\",[193]:\"bytes32[]\",[194]:\"bool[]\",[195]:\"address[]\",[196]:\"bytes\",[197]:\"string\"};var s=Object.values(Y);var _=Object.fromEntries(Object.entries(Y).map(([R,A])=>[A,parseInt(R)]));function n(R){let A=R.valueOf();return A<32?A+1:A<64?A+1-32:A<96?A+1-64:R==96?1:R==97?20:0}var U=s.filter(R=>n(_[R])>0);var u={[98]:0,[99]:1,[100]:2,[101]:3,[102]:4,[103]:5,[104]:6,[105]:7,[106]:8,[107]:9,[108]:10,[109]:11,[110]:12,[111]:13,[112]:14,[113]:15,[114]:16,[115]:17,[116]:18,[117]:19,[118]:20,[119]:21,[120]:22,[121]:23,[122]:24,[123]:25,[124]:26,[125]:27,[126]:28,[127]:29,[128]:30,[129]:31,[130]:32,[131]:33,[132]:34,[133]:35,[134]:36,[135]:37,[136]:38,[137]:39,[138]:40,[139]:41,[140]:42,[141]:43,[142]:44,[143]:45,[144]:46,[145]:47,[146]:48,[147]:49,[148]:50,[149]:51,[150]:52,[151]:53,[152]:54,[153]:55,[154]:56,[155]:57,[156]:58,[157]:59,[158]:60,[159]:61,[160]:62,[161]:63,[162]:64,[163]:65,[164]:66,[165]:67,[166]:68,[167]:69,[168]:70,[169]:71,[170]:72,[171]:73,[172]:74,[173]:75,[174]:76,[175]:77,[176]:78,[177]:79,[178]:80,[179]:81,[180]:82,[181]:83,[182]:84,[183]:85,[184]:86,[185]:87,[186]:88,[187]:89,[188]:90,[189]:91,[190]:92,[191]:93,[192]:94,[193]:95,[194]:96,[195]:97};function o(R){if(R.length>28)throw new Error(\"Schema can only have up to 28 fields\");let A=new Uint8Array(32),T=0,N=0,b=!1;for(let i=0;i0){if(b)throw new Error(\"Static fields must come before dynamic fields in the schema\");N++}else b=!0;T+=E,A[i+4]=R[i]}let r=R.length-N;if(r>14)throw new Error(\"Schema can only have up to 14 dynamic fields\");return new DataView(A.buffer).setUint16(0,T),A[2]=N,A[3]=r,A}var B={uint8:0,uint16:0,uint24:0,uint32:0,uint40:0,uint48:0,uint56:0n,uint64:0n,uint72:0n,uint80:0n,uint88:0n,uint96:0n,uint104:0n,uint112:0n,uint120:0n,uint128:0n,uint136:0n,uint144:0n,uint152:0n,uint160:0n,uint168:0n,uint176:0n,uint184:0n,uint192:0n,uint200:0n,uint208:0n,uint216:0n,uint224:0n,uint232:0n,uint240:0n,uint248:0n,uint256:0n,int8:0,int16:0,int24:0,int32:0,int40:0,int48:0,int56:0n,int64:0n,int72:0n,int80:0n,int88:0n,int96:0n,int104:0n,int112:0n,int120:0n,int128:0n,int136:0n,int144:0n,int152:0n,int160:0n,int168:0n,int176:0n,int184:0n,int192:0n,int200:0n,int208:0n,int216:0n,int224:0n,int232:0n,int240:0n,int248:0n,int256:0n,bytes1:\"0x00\",bytes2:\"0x0000\",bytes3:\"0x000000\",bytes4:\"0x00000000\",bytes5:\"0x0000000000\",bytes6:\"0x000000000000\",bytes7:\"0x00000000000000\",bytes8:\"0x0000000000000000\",bytes9:\"0x000000000000000000\",bytes10:\"0x00000000000000000000\",bytes11:\"0x0000000000000000000000\",bytes12:\"0x000000000000000000000000\",bytes13:\"0x00000000000000000000000000\",bytes14:\"0x0000000000000000000000000000\",bytes15:\"0x000000000000000000000000000000\",bytes16:\"0x00000000000000000000000000000000\",bytes17:\"0x0000000000000000000000000000000000\",bytes18:\"0x000000000000000000000000000000000000\",bytes19:\"0x00000000000000000000000000000000000000\",bytes20:\"0x0000000000000000000000000000000000000000\",bytes21:\"0x000000000000000000000000000000000000000000\",bytes22:\"0x00000000000000000000000000000000000000000000\",bytes23:\"0x0000000000000000000000000000000000000000000000\",bytes24:\"0x000000000000000000000000000000000000000000000000\",bytes25:\"0x00000000000000000000000000000000000000000000000000\",bytes26:\"0x0000000000000000000000000000000000000000000000000000\",bytes27:\"0x000000000000000000000000000000000000000000000000000000\",bytes28:\"0x00000000000000000000000000000000000000000000000000000000\",bytes29:\"0x0000000000000000000000000000000000000000000000000000000000\",bytes30:\"0x000000000000000000000000000000000000000000000000000000000000\",bytes31:\"0x00000000000000000000000000000000000000000000000000000000000000\",bytes32:\"0x0000000000000000000000000000000000000000000000000000000000000000\",bool:!1,address:\"0x0000000000000000000000000000000000000000\",\"uint8[]\":[],\"uint16[]\":[],\"uint24[]\":[],\"uint32[]\":[],\"uint40[]\":[],\"uint48[]\":[],\"uint56[]\":[],\"uint64[]\":[],\"uint72[]\":[],\"uint80[]\":[],\"uint88[]\":[],\"uint96[]\":[],\"uint104[]\":[],\"uint112[]\":[],\"uint120[]\":[],\"uint128[]\":[],\"uint136[]\":[],\"uint144[]\":[],\"uint152[]\":[],\"uint160[]\":[],\"uint168[]\":[],\"uint176[]\":[],\"uint184[]\":[],\"uint192[]\":[],\"uint200[]\":[],\"uint208[]\":[],\"uint216[]\":[],\"uint224[]\":[],\"uint232[]\":[],\"uint240[]\":[],\"uint248[]\":[],\"uint256[]\":[],\"int8[]\":[],\"int16[]\":[],\"int24[]\":[],\"int32[]\":[],\"int40[]\":[],\"int48[]\":[],\"int56[]\":[],\"int64[]\":[],\"int72[]\":[],\"int80[]\":[],\"int88[]\":[],\"int96[]\":[],\"int104[]\":[],\"int112[]\":[],\"int120[]\":[],\"int128[]\":[],\"int136[]\":[],\"int144[]\":[],\"int152[]\":[],\"int160[]\":[],\"int168[]\":[],\"int176[]\":[],\"int184[]\":[],\"int192[]\":[],\"int200[]\":[],\"int208[]\":[],\"int216[]\":[],\"int224[]\":[],\"int232[]\":[],\"int240[]\":[],\"int248[]\":[],\"int256[]\":[],\"bytes1[]\":[],\"bytes2[]\":[],\"bytes3[]\":[],\"bytes4[]\":[],\"bytes5[]\":[],\"bytes6[]\":[],\"bytes7[]\":[],\"bytes8[]\":[],\"bytes9[]\":[],\"bytes10[]\":[],\"bytes11[]\":[],\"bytes12[]\":[],\"bytes13[]\":[],\"bytes14[]\":[],\"bytes15[]\":[],\"bytes16[]\":[],\"bytes17[]\":[],\"bytes18[]\":[],\"bytes19[]\":[],\"bytes20[]\":[],\"bytes21[]\":[],\"bytes22[]\":[],\"bytes23[]\":[],\"bytes24[]\":[],\"bytes25[]\":[],\"bytes26[]\":[],\"bytes27[]\":[],\"bytes28[]\":[],\"bytes29[]\":[],\"bytes30[]\":[],\"bytes31[]\":[],\"bytes32[]\":[],\"bool[]\":[],\"address[]\":[],bytes:\"0x\",string:\"\"};function g(R){let A=R.replace(/(\\w+)\\[\\d+\\]/g,\"$1[]\");return B[A]}export{_ as AbiTypeToSchemaType,s as AbiTypes,I as SchemaType,u as SchemaTypeArrayToElement,Y as SchemaTypeToAbiType,U as StaticAbiTypes,o as encodeSchema,g as getAbiTypeDefaultValue,n as getStaticByteLength};\n//# sourceMappingURL=index.js.map","var util;\n(function (util) {\n util.assertEqual = (val) => val;\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array\n .map((val) => (typeof val === \"string\" ? `'${val}'` : val))\n .join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util || (util = {}));\nvar objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil || (objectUtil = {}));\nconst ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nconst getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then &&\n typeof data.then === \"function\" &&\n data.catch &&\n typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n};\n\nconst ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nconst quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nclass ZodError extends Error {\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n get errors() {\n return this.issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `smaller than or equal to`\n : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n};\n\nlet overrideErrorMap = errorMap;\nfunction setErrorMap(map) {\n overrideErrorMap = map;\n}\nfunction getErrorMap() {\n return overrideErrorMap;\n}\n\nconst makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message || errorMessage,\n };\n};\nconst EMPTY_PATH = [];\nfunction addIssueToContext(ctx, issueData) {\n const issue = makeIssue({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nclass ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n syncPairs.push({\n key: await pair.key,\n value: await pair.value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" &&\n (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nconst INVALID = Object.freeze({\n status: \"aborted\",\n});\nconst DIRTY = (value) => ({ status: \"dirty\", value });\nconst OK = (value) => ({ status: \"valid\", value });\nconst isAborted = (x) => x.status === \"aborted\";\nconst isDirty = (x) => x.status === \"dirty\";\nconst isValid = (x) => x.status === \"valid\";\nconst isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n\nvar errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message === null || message === void 0 ? void 0 : message.message;\n})(errorUtil || (errorUtil = {}));\n\nclass ParseInputLazyPath {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (this._key instanceof Array) {\n this._cachedPath.push(...this._path, ...this._key);\n }\n else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n}\nconst handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n }\n else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n },\n };\n }\n};\nfunction processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap, invalid_type_error, required_error, description } = params;\n if (errorMap && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap)\n return { errorMap: errorMap, description };\n const customMap = (iss, ctx) => {\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n if (typeof ctx.data === \"undefined\") {\n return { message: required_error !== null && required_error !== void 0 ? required_error : ctx.defaultError };\n }\n return { message: invalid_type_error !== null && invalid_type_error !== void 0 ? invalid_type_error : ctx.defaultError };\n };\n return { errorMap: customMap, description };\n}\nclass ZodType {\n constructor(def) {\n /** Alias of safeParseAsync */\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.readonly = this.readonly.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n }\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return (ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n });\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n },\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n var _a;\n const ctx = {\n common: {\n issues: [],\n async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n async: true,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult)\n ? maybeAsyncResult\n : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n }\n else if (typeof message === \"function\") {\n return message(val);\n }\n else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val),\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\"\n ? refinementData(val, ctx)\n : refinementData);\n return false;\n }\n else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement },\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this, this._def);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform },\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def),\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description,\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n readonly() {\n return ZodReadonly.create(this);\n }\n isOptional() {\n return this.safeParse(undefined).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n}\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[a-z][a-z0-9]*$/;\nconst ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/;\n// const uuidRegex =\n// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}$/i;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n// /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n// /^[a-zA-Z0-9\\.\\!\\#\\$\\%\\&\\'\\*\\+\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// const emailRegex =\n// /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_+-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n// /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emojiRegex = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nlet emojiRegex;\nconst ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;\nconst ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\n// Adapted from https://stackoverflow.com/a/3143231\nconst datetimeRegex = (args) => {\n if (args.precision) {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}Z$`);\n }\n }\n else if (args.precision === 0) {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}Z$`);\n }\n }\n else {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?Z$`);\n }\n }\n};\nfunction isValidIP(ip, version) {\n if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n}\nclass ZodString extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx.parsedType,\n }\n //\n );\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n status.dirty();\n }\n }\n else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"emoji\") {\n if (!emojiRegex) {\n emojiRegex = new RegExp(_emojiRegex, \"u\");\n }\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n }\n catch (_a) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n }\n else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n }\n else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n }\n else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _regex(regex, validation, message) {\n return this.refinement((data) => regex.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message),\n });\n }\n _addCheck(check) {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n var _a;\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex,\n ...errorUtil.errToObj(message),\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value: value,\n position: options === null || options === void 0 ? void 0 : options.position,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil.errToObj(message),\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message),\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message),\n });\n }\n /**\n * @deprecated Use z.string().min(1) instead.\n * @see {@link ZodString.min}\n */\n nonempty(message) {\n return this.min(1, errorUtil.errToObj(message));\n }\n trim() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }],\n });\n }\n toLowerCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n });\n }\n toUpperCase() {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodString.create = (params) => {\n var _a;\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / Math.pow(10, decCount);\n}\nclass ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message),\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value: value,\n message: errorUtil.toString(message),\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message),\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message),\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" ||\n (ch.kind === \"multipleOf\" && util.isInteger(ch.value)));\n }\n get isFinite() {\n let max = null, min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" ||\n ch.kind === \"int\" ||\n ch.kind === \"multipleOf\") {\n return true;\n }\n else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n}\nZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = BigInt(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodBigInt.create = (params) => {\n var _a;\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\nclass ZodBoolean extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (isNaN(input.data.getTime())) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_date,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime()),\n };\n }\n _addCheck(check) {\n return new ZodDate({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n}\nZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params),\n });\n};\nclass ZodSymbol extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params),\n });\n};\nclass ZodUndefined extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params),\n });\n};\nclass ZodNull extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params),\n });\n};\nclass ZodAny extends ZodType {\n constructor() {\n super(...arguments);\n // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params),\n });\n};\nclass ZodUnknown extends ZodType {\n constructor() {\n super(...arguments);\n // required\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params),\n });\n};\nclass ZodNever extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n}\nZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params),\n });\n};\nclass ZodVoid extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params),\n });\n};\nclass ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: (tooSmall ? def.exactLength.value : undefined),\n maximum: (tooBig ? def.exactLength.value : undefined),\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message,\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message,\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message,\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n })).then((result) => {\n return ParseStatus.mergeArray(status, result);\n });\n }\n const result = [...ctx.data].map((item, i) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil.toString(message) },\n });\n }\n max(maxLength, message) {\n return new ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message) },\n });\n }\n length(len, message) {\n return new ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message) },\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params),\n });\n};\nfunction deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape,\n });\n }\n else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element),\n });\n }\n else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n }\n else {\n return schema;\n }\n}\nclass ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n this.nonstrict = this.passthrough;\n // extend<\n // Augmentation extends ZodRawShape,\n // NewOutput extends util.flatten<{\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // }>,\n // NewInput extends util.flatten<{\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }>\n // >(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape,\n // UnknownKeys,\n // Catchall,\n // NewOutput,\n // NewInput\n // > {\n // return new ZodObject({\n // ...this._def,\n // shape: () => ({\n // ...this._def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // }\n /**\n * @deprecated Use `.extend` instead\n * */\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape = this._def.shape();\n const keys = util.objectKeys(shape);\n return (this._cached = { shape, keys });\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever &&\n this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] },\n });\n }\n }\n else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys,\n });\n status.dirty();\n }\n }\n else if (unknownKeys === \"strip\") ;\n else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n }\n else {\n // run catchall validation\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data,\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve()\n .then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n syncPairs.push({\n key,\n value: await pair.value,\n alwaysSet: pair.alwaysSet,\n });\n }\n return syncPairs;\n })\n .then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil.errToObj;\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...(message !== undefined\n ? {\n errorMap: (issue, ctx) => {\n var _a, _b, _c, _d;\n const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,\n };\n return {\n message: defaultError,\n };\n },\n }\n : {}),\n });\n }\n strip() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strip\",\n });\n }\n passthrough() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\",\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation,\n }),\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape(),\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index) {\n return new ZodObject({\n ...this._def,\n catchall: index,\n });\n }\n pick(mask) {\n const shape = {};\n util.objectKeys(mask).forEach((key) => {\n if (mask[key] && this.shape[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n omit(mask) {\n const shape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (!mask[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n }\n else {\n newShape[key] = fieldSchema.optional();\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n required(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n }\n else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n}\nZodObject.create = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.strictCreate = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.lazycreate = (shape, params) => {\n return new ZodObject({\n shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nclass ZodUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n // return first issue-free validation if it exists\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n // add issues from dirty option\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n // return invalid\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n }),\n ctx: childCtx,\n };\n })).then(handleResults);\n }\n else {\n let dirty = undefined;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n });\n if (result.status === \"valid\") {\n return result;\n }\n else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues) => new ZodError(issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n}\nZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params),\n });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n////////// //////////\n////////// ZodDiscriminatedUnion //////////\n////////// //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n }\n else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n }\n else if (type instanceof ZodLiteral) {\n return [type.value];\n }\n else if (type instanceof ZodEnum) {\n return type.options;\n }\n else if (type instanceof ZodNativeEnum) {\n // eslint-disable-next-line ban/ban\n return Object.keys(type.enum);\n }\n else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n }\n else if (type instanceof ZodUndefined) {\n return [undefined];\n }\n else if (type instanceof ZodNull) {\n return [null];\n }\n else {\n return null;\n }\n};\nclass ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator],\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n // Get all the valid discriminator values\n const optionsMap = new Map();\n // try {\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params),\n });\n }\n}\nfunction mergeValues(a, b) {\n const aType = getParsedType(a);\n const bType = getParsedType(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b);\n const sharedKeys = util\n .objectKeys(a)\n .filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a.length !== b.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n else if (aType === ZodParsedType.date &&\n bType === ZodParsedType.date &&\n +a === +b) {\n return { valid: true, data: a };\n }\n else {\n return { valid: false };\n }\n}\nclass ZodIntersection extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types,\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n ]).then(([left, right]) => handleParsed(left, right));\n }\n else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }));\n }\n }\n}\nZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left: left,\n right: right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params),\n });\n};\nclass ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n status.dirty();\n }\n const items = [...ctx.data]\n .map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n })\n .filter((x) => !!x); // filter nulls\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n }\n else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new ZodTuple({\n ...this._def,\n rest,\n });\n }\n}\nZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params),\n });\n};\nclass ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third),\n });\n }\n return new ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second),\n });\n }\n}\nclass ZodMap extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n };\n });\n if (ctx.common.async) {\n const finalMap = new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n }\n else {\n const finalMap = new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n}\nZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params),\n });\n};\nclass ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message,\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message,\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements) {\n const parsedSet = new Set();\n for (const element of elements) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements) => finalizeSet(elements));\n }\n else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message) },\n });\n }\n max(maxSize, message) {\n return new ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message) },\n });\n }\n size(size, message) {\n return this.min(size, message).max(size, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params),\n });\n};\nclass ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error,\n },\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error,\n },\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(async function (...args) {\n const error = new ZodError([]);\n const parsedArgs = await me._def.args\n .parseAsync(args, params)\n .catch((e) => {\n error.addIssue(makeArgsIssue(args, e));\n throw error;\n });\n const result = await Reflect.apply(fn, this, parsedArgs);\n const parsedReturns = await me._def.returns._def.type\n .parseAsync(result, params)\n .catch((e) => {\n error.addIssue(makeReturnsIssue(result, e));\n throw error;\n });\n return parsedReturns;\n });\n }\n else {\n // Would love a way to avoid disabling this rule, but we need\n // an alias (using an arrow function was what caused 2651).\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const me = this;\n return OK(function (...args) {\n const parsedArgs = me._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = Reflect.apply(fn, this, parsedArgs.data);\n const parsedReturns = me._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create()),\n });\n }\n returns(returnType) {\n return new ZodFunction({\n ...this._def,\n returns: returnType,\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new ZodFunction({\n args: (args\n ? args\n : ZodTuple.create([]).rest(ZodUnknown.create())),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params),\n });\n }\n}\nclass ZodLazy extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n}\nZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter: getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params),\n });\n};\nclass ZodLiteral extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n}\nZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value: value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params),\n });\n};\nfunction createZodEnum(values, params) {\n return new ZodEnum({\n values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params),\n });\n}\nclass ZodEnum extends ZodType {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (this._def.values.indexOf(input.data) === -1) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values) {\n return ZodEnum.create(values);\n }\n exclude(values) {\n return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));\n }\n}\nZodEnum.create = createZodEnum;\nclass ZodNativeEnum extends ZodType {\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string &&\n ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (nativeEnumValues.indexOf(input.data) === -1) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n}\nZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params),\n });\n};\nclass ZodPromise extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise &&\n ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise\n ? ctx.data\n : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap,\n });\n }));\n }\n}\nZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params),\n });\n};\nclass ZodEffects extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n ? this._def.schema.sourceType()\n : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n }\n else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n },\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data, checkCtx);\n if (ctx.common.issues.length) {\n return {\n status: \"dirty\",\n value: ctx.data,\n };\n }\n if (ctx.common.async) {\n return Promise.resolve(processed).then((processed) => {\n return this._def.schema._parseAsync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n });\n }\n else {\n return this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc\n // effect: RefinementEffect\n ) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n // return value is ignored\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (!isValid(base))\n return base;\n const result = effect.transform(base.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((base) => {\n if (!isValid(base))\n return base;\n return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));\n });\n }\n }\n util.assertNever(effect);\n }\n}\nZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params),\n });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params),\n });\n};\nclass ZodOptional extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(undefined);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params),\n });\n};\nclass ZodNullable extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params),\n });\n};\nclass ZodDefault extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n}\nZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\"\n ? params.default\n : () => params.default,\n ...processCreateParams(params),\n });\n};\nclass ZodCatch extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n // newCtx is used to not collect issues from inner types in ctx\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx,\n },\n });\n if (isAsync(result)) {\n return result.then((result) => {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n });\n }\n else {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n}\nZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params),\n });\n};\nclass ZodNaN extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n}\nZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params),\n });\n};\nconst BRAND = Symbol(\"zod_brand\");\nclass ZodBranded extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n unwrap() {\n return this._def.type;\n }\n}\nclass ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n }\n else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n };\n return handleAsync();\n }\n else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value,\n };\n }\n else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n }\n static create(a, b) {\n return new ZodPipeline({\n in: a,\n out: b,\n typeName: ZodFirstPartyTypeKind.ZodPipeline,\n });\n }\n}\nclass ZodReadonly extends ZodType {\n _parse(input) {\n const result = this._def.innerType._parse(input);\n if (isValid(result)) {\n result.value = Object.freeze(result.value);\n }\n return result;\n }\n}\nZodReadonly.create = (type, params) => {\n return new ZodReadonly({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodReadonly,\n ...processCreateParams(params),\n });\n};\nconst custom = (check, params = {}, \n/**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) => {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n var _a, _b;\n if (!check(data)) {\n const p = typeof params === \"function\"\n ? params(data)\n : typeof params === \"string\"\n ? { message: params }\n : params;\n const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n const p2 = typeof p === \"string\" ? { message: p } : p;\n ctx.addIssue({ code: \"custom\", ...p2, fatal: _fatal });\n }\n });\n return ZodAny.create();\n};\nconst late = {\n object: ZodObject.lazycreate,\n};\nvar ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\nconst instanceOfType = (\n// const instanceOfType = any>(\ncls, params = {\n message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nconst stringType = ZodString.create;\nconst numberType = ZodNumber.create;\nconst nanType = ZodNaN.create;\nconst bigIntType = ZodBigInt.create;\nconst booleanType = ZodBoolean.create;\nconst dateType = ZodDate.create;\nconst symbolType = ZodSymbol.create;\nconst undefinedType = ZodUndefined.create;\nconst nullType = ZodNull.create;\nconst anyType = ZodAny.create;\nconst unknownType = ZodUnknown.create;\nconst neverType = ZodNever.create;\nconst voidType = ZodVoid.create;\nconst arrayType = ZodArray.create;\nconst objectType = ZodObject.create;\nconst strictObjectType = ZodObject.strictCreate;\nconst unionType = ZodUnion.create;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nconst intersectionType = ZodIntersection.create;\nconst tupleType = ZodTuple.create;\nconst recordType = ZodRecord.create;\nconst mapType = ZodMap.create;\nconst setType = ZodSet.create;\nconst functionType = ZodFunction.create;\nconst lazyType = ZodLazy.create;\nconst literalType = ZodLiteral.create;\nconst enumType = ZodEnum.create;\nconst nativeEnumType = ZodNativeEnum.create;\nconst promiseType = ZodPromise.create;\nconst effectsType = ZodEffects.create;\nconst optionalType = ZodOptional.create;\nconst nullableType = ZodNullable.create;\nconst preprocessType = ZodEffects.createWithPreprocess;\nconst pipelineType = ZodPipeline.create;\nconst ostring = () => stringType().optional();\nconst onumber = () => numberType().optional();\nconst oboolean = () => booleanType().optional();\nconst coerce = {\n string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n boolean: ((arg) => ZodBoolean.create({\n ...arg,\n coerce: true,\n })),\n bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nconst NEVER = INVALID;\n\nvar z = /*#__PURE__*/Object.freeze({\n __proto__: null,\n defaultErrorMap: errorMap,\n setErrorMap: setErrorMap,\n getErrorMap: getErrorMap,\n makeIssue: makeIssue,\n EMPTY_PATH: EMPTY_PATH,\n addIssueToContext: addIssueToContext,\n ParseStatus: ParseStatus,\n INVALID: INVALID,\n DIRTY: DIRTY,\n OK: OK,\n isAborted: isAborted,\n isDirty: isDirty,\n isValid: isValid,\n isAsync: isAsync,\n get util () { return util; },\n get objectUtil () { return objectUtil; },\n ZodParsedType: ZodParsedType,\n getParsedType: getParsedType,\n ZodType: ZodType,\n ZodString: ZodString,\n ZodNumber: ZodNumber,\n ZodBigInt: ZodBigInt,\n ZodBoolean: ZodBoolean,\n ZodDate: ZodDate,\n ZodSymbol: ZodSymbol,\n ZodUndefined: ZodUndefined,\n ZodNull: ZodNull,\n ZodAny: ZodAny,\n ZodUnknown: ZodUnknown,\n ZodNever: ZodNever,\n ZodVoid: ZodVoid,\n ZodArray: ZodArray,\n ZodObject: ZodObject,\n ZodUnion: ZodUnion,\n ZodDiscriminatedUnion: ZodDiscriminatedUnion,\n ZodIntersection: ZodIntersection,\n ZodTuple: ZodTuple,\n ZodRecord: ZodRecord,\n ZodMap: ZodMap,\n ZodSet: ZodSet,\n ZodFunction: ZodFunction,\n ZodLazy: ZodLazy,\n ZodLiteral: ZodLiteral,\n ZodEnum: ZodEnum,\n ZodNativeEnum: ZodNativeEnum,\n ZodPromise: ZodPromise,\n ZodEffects: ZodEffects,\n ZodTransformer: ZodEffects,\n ZodOptional: ZodOptional,\n ZodNullable: ZodNullable,\n ZodDefault: ZodDefault,\n ZodCatch: ZodCatch,\n ZodNaN: ZodNaN,\n BRAND: BRAND,\n ZodBranded: ZodBranded,\n ZodPipeline: ZodPipeline,\n ZodReadonly: ZodReadonly,\n custom: custom,\n Schema: ZodType,\n ZodSchema: ZodType,\n late: late,\n get ZodFirstPartyTypeKind () { return ZodFirstPartyTypeKind; },\n coerce: coerce,\n any: anyType,\n array: arrayType,\n bigint: bigIntType,\n boolean: booleanType,\n date: dateType,\n discriminatedUnion: discriminatedUnionType,\n effect: effectsType,\n 'enum': enumType,\n 'function': functionType,\n 'instanceof': instanceOfType,\n intersection: intersectionType,\n lazy: lazyType,\n literal: literalType,\n map: mapType,\n nan: nanType,\n nativeEnum: nativeEnumType,\n never: neverType,\n 'null': nullType,\n nullable: nullableType,\n number: numberType,\n object: objectType,\n oboolean: oboolean,\n onumber: onumber,\n optional: optionalType,\n ostring: ostring,\n pipeline: pipelineType,\n preprocess: preprocessType,\n promise: promiseType,\n record: recordType,\n set: setType,\n strictObject: strictObjectType,\n string: stringType,\n symbol: symbolType,\n transformer: effectsType,\n tuple: tupleType,\n 'undefined': undefinedType,\n union: unionType,\n unknown: unknownType,\n 'void': voidType,\n NEVER: NEVER,\n ZodIssueCode: ZodIssueCode,\n quotelessJson: quotelessJson,\n ZodError: ZodError\n});\n\nexport { BRAND, DIRTY, EMPTY_PATH, INVALID, NEVER, OK, ParseStatus, ZodType as Schema, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodError, ZodFirstPartyTypeKind, ZodFunction, ZodIntersection, ZodIssueCode, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodParsedType, ZodPipeline, ZodPromise, ZodReadonly, ZodRecord, ZodType as ZodSchema, ZodSet, ZodString, ZodSymbol, ZodEffects as ZodTransformer, ZodTuple, ZodType, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, addIssueToContext, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, coerce, custom, dateType as date, z as default, errorMap as defaultErrorMap, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, getErrorMap, getParsedType, instanceOfType as instanceof, intersectionType as intersection, isAborted, isAsync, isDirty, isValid, late, lazyType as lazy, literalType as literal, makeIssue, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, objectUtil, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, quotelessJson, recordType as record, setType as set, setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, util, voidType as void, z };\n","const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","/* eslint-env browser */\n\nconst level = (() => {\n\tif (navigator.userAgentData) {\n\t\tconst brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium');\n\t\tif (brand && brand.version > 93) {\n\t\t\treturn 3;\n\t\t}\n\t}\n\n\tif (/\\b(Chrome|Chromium)\\//.test(navigator.userAgent)) {\n\t\treturn 1;\n\t}\n\n\treturn 0;\n})();\n\nconst colorSupport = level !== 0 && {\n\tlevel,\n\thasBasic: true,\n\thas256: level >= 2,\n\thas16m: level >= 3,\n};\n\nconst supportsColor = {\n\tstdout: colorSupport,\n\tstderr: colorSupport,\n};\n\nexport default supportsColor;\n","// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nexport function stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n","import ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\nimport { // eslint-disable-line import/order\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn ansiStyles[type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));\n\t}\n\n\treturn ansiStyles[type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n","const identifierRegex = /[$_\\p{ID_Start}][$\\u200c\\u200d\\p{ID_Continue}]*/u;\nexport function joinPath(path) {\n if (path.length === 1) {\n return path[0].toString();\n }\n return path.reduce((acc, item) => {\n if (typeof item === 'number') {\n return acc + '[' + item.toString() + ']';\n }\n if (item.includes('\"')) {\n return acc + '[\"' + escapeQuotes(item) + '\"]';\n }\n if (!identifierRegex.test(item)) {\n return acc + '[\"' + item + '\"]';\n }\n const separator = acc.length === 0 ? '' : '.';\n return acc + separator + item;\n }, '');\n}\nfunction escapeQuotes(str) {\n return str.replace(/\"/g, '\\\\\"');\n}\n","export function isNonEmptyArray(value) {\n return value.length !== 0;\n}\n","import * as zod from 'zod';\nimport { joinPath } from './utils/joinPath';\nimport { isNonEmptyArray } from './utils/NonEmptyArray';\nconst MAX_ISSUES_IN_MESSAGE = 99;\nconst ISSUE_SEPARATOR = '; ';\nconst UNION_SEPARATOR = ', or ';\nconst PREFIX = 'Validation error';\nconst PREFIX_SEPARATOR = ': ';\nexport class ValidationError extends Error {\n details;\n name;\n constructor(message, details = []) {\n super(message);\n this.details = details;\n this.name = 'ZodValidationError';\n }\n toString() {\n return this.message;\n }\n}\nfunction getMessageFromZodIssue(issue, issueSeparator, unionSeparator) {\n if (issue.code === 'invalid_union') {\n return issue.unionErrors\n .reduce((acc, zodError) => {\n const newIssues = zodError.issues\n .map((issue) => getMessageFromZodIssue(issue, issueSeparator, unionSeparator))\n .join(issueSeparator);\n if (!acc.includes(newIssues)) {\n acc.push(newIssues);\n }\n return acc;\n }, [])\n .join(unionSeparator);\n }\n if (isNonEmptyArray(issue.path)) {\n if (issue.path.length === 1) {\n const identifier = issue.path[0];\n if (typeof identifier === 'number') {\n return `${issue.message} at index ${identifier}`;\n }\n }\n return `${issue.message} at \"${joinPath(issue.path)}\"`;\n }\n return issue.message;\n}\nfunction conditionallyPrefixMessage(reason, prefix, prefixSeparator) {\n if (prefix !== null) {\n if (reason.length > 0) {\n return [prefix, reason].join(prefixSeparator);\n }\n return prefix;\n }\n if (reason.length > 0) {\n return reason;\n }\n return PREFIX;\n}\nexport function fromZodIssue(issue, options = {}) {\n const { issueSeparator = ISSUE_SEPARATOR, unionSeparator = UNION_SEPARATOR, prefixSeparator = PREFIX_SEPARATOR, prefix = PREFIX, } = options;\n const reason = getMessageFromZodIssue(issue, issueSeparator, unionSeparator);\n const message = conditionallyPrefixMessage(reason, prefix, prefixSeparator);\n return new ValidationError(message, [issue]);\n}\nexport function fromZodError(zodError, options = {}) {\n const { maxIssuesInMessage = MAX_ISSUES_IN_MESSAGE, issueSeparator = ISSUE_SEPARATOR, unionSeparator = UNION_SEPARATOR, prefixSeparator = PREFIX_SEPARATOR, prefix = PREFIX, } = options;\n const reason = zodError.errors\n .slice(0, maxIssuesInMessage)\n .map((issue) => getMessageFromZodIssue(issue, issueSeparator, unionSeparator))\n .join(issueSeparator);\n const message = conditionallyPrefixMessage(reason, prefix, prefixSeparator);\n return new ValidationError(message, zodError.errors);\n}\nexport const toValidationError = (options = {}) => (err) => {\n if (err instanceof zod.ZodError) {\n return fromZodError(err, options);\n }\n if (err instanceof Error) {\n return err;\n }\n return new Error('Unknown error');\n};\nexport function isValidationError(err) {\n return err instanceof ValidationError;\n}\nexport function isValidationErrorLike(err) {\n return err instanceof Error && err.name === 'ZodValidationError';\n}\n","var a=Object.defineProperty;var m=(r,e,o)=>e in r?a(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o;var x=(r,e,o)=>(m(r,typeof e!=\"symbol\"?e+\"\":e,o),o);import d from\"chalk\";import{z as c,ZodIssueCode as i}from\"zod\";import{fromZodError as p}from\"zod-validation-error\";var t=class extends Error{name=\"MUDContextAlreadyCreatedError\";message=\"MUD context was already created\"},s=class extends Error{name=\"MUDContextNotCreatedError\";message=\"MUD context has not been created\"};function l(r,e){return p(r,{prefix:d.red(e),prefixSeparator:`\n- `,issueSeparator:`\n- `})}var n=class extends Error{name=\"NotInsideProjectError\";message=\"You are not inside a MUD project\"};function U(r,e){return new c.ZodError([{code:i.custom,path:r,message:`Unrecognized system: \"${e}\"`}])}export{x as a,t as b,s as c,l as d,n as e,U as f};\n//# sourceMappingURL=chunk-AXXYPYMM.js.map","import{a as m,b as f,c as p}from\"./chunk-AXXYPYMM.js\";import{z as s}from\"zod\";import{utils as E}from\"ethers\";import{ZodIssueCode as r}from\"zod\";var g=16;function d(e,t){/^\\w+$/.test(e)||t.addIssue({code:r.custom,message:\"Name must contain only alphanumeric & underscore characters\"})}function x(e,t){d(e,t),/^[A-Z]/.test(e)||t.addIssue({code:r.custom,message:\"Name must start with a capital letter\"})}function C(e,t){d(e,t),/^[a-z]/.test(e)||t.addIssue({code:r.custom,message:\"Name must start with a lowercase letter\"})}function h(e,t){e.length===0&&t.addIssue({code:r.custom,message:\"Enum must not be empty\"}),e.length>=256&&t.addIssue({code:r.custom,message:\"Length of enum must be < 256\"});let o=M(e);o.length>0&&t.addIssue({code:r.custom,message:`Enum must not have duplicate names for: ${o.join(\", \")}`})}function c(e,t){return(o,n)=>{if(o===\"\"){e&&n.addIssue({code:r.custom,message:\"Route must not be empty\"});return}o[0]!==\"/\"&&n.addIssue({code:r.custom,message:'Route must start with \"/\"'}),o[o.length-1]===\"/\"&&n.addIssue({code:r.custom,message:'Route must not end with \"/\"'});let a=o.split(\"/\");t&&a.length>2&&n.addIssue({code:r.custom,message:'Route must only have one level (e.g. \"/foo\")'});for(let u=1;ug&&t.addIssue({code:r.custom,message:`Selector must be <= ${g} characters`}),/^\\w*$/.test(e)||t.addIssue({code:r.custom,message:\"Selector must contain only alphanumeric & underscore characters\"})}function z(e){let t=e.match(/^(\\w+)\\[(\\d+)\\]$/);return t?{elementType:t[1],staticLength:Number.parseInt(t[2])}:null}var v=s.string().superRefine(x),$=s.string().superRefine(C),B=s.string().superRefine(d),G=s.array(v).superRefine(h),O=s.string().superRefine(y),V=s.string().superRefine(b),j=s.string().superRefine(R),k=s.string().superRefine(D),P=s.string().superRefine(U);var l=class{static isCreated(){return this._global.__mudCoreContext!==void 0}static createContext(){if(this.isCreated())throw new f;let t=this._global,o=new l;return t.__mudCoreContext=o,o}static getContext(){let o=this._global.__mudCoreContext;if(o===void 0)throw new p;return o}configExtenders=[]},i=l;m(i,\"_global\",typeof global>\"u\"?window.global??{}:global);function Y(e){let t=e,o=i.getContext();for(let n of o.configExtenders)t=n(t);return t}function q(e){i.getContext().configExtenders.push(e)}import{MUDError as I}from\"@latticexyz/common/errors\";var w=(o=>(o[o.TABLE_ID=0]=\"TABLE_ID\",o[o.SYSTEM_ADDRESS=1]=\"SYSTEM_ADDRESS\",o))(w||{});function ee(e){return{type:0,input:e}}function A(e){return typeof e==\"object\"&&e!==null&&\"type\"in e&&\"input\"in e}async function te(e,t){if(!A(e))return e;let o;if(e.type===0){let n=t.tableIds?.[e.input];o=n&&{value:n,type:\"bytes32\"}}if(o===void 0)throw new I(`Could not resolve dynamic resolution: \n${JSON.stringify(e,null,2)}`);return o}export{g as a,d as b,x as c,C as d,h as e,y as f,R as g,b as h,D as i,M as j,U as k,z as l,v as m,$ as n,B as o,G as p,O as q,V as r,j as s,k as t,P as u,i as v,Y as w,q as x,w as y,ee as z,A,te as B};\n//# sourceMappingURL=chunk-4G6ZGMDP.js.map","var l={storeImportPath:\"@latticexyz/store/src/\",userTypesPath:\"Types\",codegenDirectory:\"codegen\"},g={namespace:\"\",enums:{}},m={directory:\"tables\",keySchema:{key:\"bytes32\"},tableIdArgument:!1,storeArgument:!0,ephemeral:!1};import{AbiTypes as D,StaticAbiTypes as z}from\"@latticexyz/schema-type/deprecated\";import{z as t,ZodIssueCode as o}from\"zod\";import{getDuplicates as p,parseStaticArray as R,STORE_SELECTOR_MAX_LENGTH as L,zObjectName as f,zSelector as S,zUserEnum as k,zValueName as b}from\"@latticexyz/config\";var j=f,O=b,v=b,I=f,d=t.string(),_=t.string(),P=t.record(O,_).default(m.keySchema),U=t.record(v,d).refine(e=>Object.keys(e).length>0,\"Table schema may not be empty\"),K=d.transform(e=>U.parse({value:e})),q=U.or(K),h=t.object({directory:t.string().default(m.directory),name:S.optional(),tableIdArgument:t.boolean().default(m.tableIdArgument),storeArgument:t.boolean().default(m.storeArgument),dataStruct:t.boolean().optional(),keySchema:P,schema:q,ephemeral:t.boolean().default(m.ephemeral)}).transform(e=>(Object.keys(e.schema).length===1?e.dataStruct??=!1:e.dataStruct??=!0,e)),B=d.transform(e=>h.parse({schema:{value:e}})),M=h.or(B),$=t.record(j,M).transform(e=>{for(let n of Object.keys(e)){let s=e[n];s.name=n.slice(0,L),e[n]=s}return e}),H=t.object({enums:t.record(I,k).default(g.enums)}),x=t.object({namespace:S.default(g.namespace),storeImportPath:t.string().default(l.storeImportPath),tables:$,userTypesPath:t.string().default(l.userTypesPath),codegenDirectory:t.string().default(l.codegenDirectory)}).merge(H),se=x.superRefine(C),re=x.catchall(t.any()).superRefine(C);function C(e,n){for(let a of Object.values(e.tables)){let c=Object.keys(a.keySchema),N=Object.keys(a.schema),T=p([...c,...N]);T.length>0&&n.addIssue({code:o.custom,message:`Field and key names within one table must be unique: ${T.join(\", \")}`})}let s=Object.keys(e.tables),r=Object.keys(e.enums),i=r,E=[...s,...i],u=p(E);u.length>0&&n.addIssue({code:o.custom,message:`Table library names, enum names must be globally unique: ${u.join(\", \")}`});let A=Object.values(e.tables).map(({name:a})=>a),y=p(A);y.length>0&&n.addIssue({code:o.custom,message:`Table names must be unique: ${y.join(\", \")}`});for(let a of Object.values(e.tables)){for(let c of Object.values(a.keySchema))F(r,c,n);for(let c of Object.values(a.schema))G(i,r,c,n)}}function G(e,n,s,r){if(!D.includes(s)&&!e.includes(s)){let i=R(s);i?V(n,i.elementType,i.staticLength,r):r.addIssue({code:o.custom,message:`${s} is not a valid abi type, and is not defined in userTypes`})}}function F(e,n,s){!z.includes(n)&&!e.includes(n)&&s.addIssue({code:o.custom,message:`${n} is not a static type`})}function V(e,n,s,r){F(e,n,r),s===0?r.addIssue({code:o.custom,message:\"Static array length must not be 0\"}):s>=2**16&&r.addIssue({code:o.custom,message:\"Static array length must be less than 2**16\"})}export{l as a,g as b,m as c,q as d,M as e,$ as f,H as g,se as h,re as i};\n//# sourceMappingURL=chunk-5AKM5HGJ.js.map","import{v as e,w as o,z as r}from\"../chunk-4G6ZGMDP.js\";import\"../chunk-AXXYPYMM.js\";e.isCreated()||e.createContext();export{o as mudCoreConfig,r as resolveTableId};\n//# sourceMappingURL=index.js.map","import{i as e}from\"./chunk-5AKM5HGJ.js\";import\"@latticexyz/config/register\";import{mudCoreConfig as c,resolveTableId as y}from\"@latticexyz/config/register\";import{extendMUDCoreConfig as t,fromZodErrorCustom as n}from\"@latticexyz/config\";import{ZodError as i}from\"zod\";t(r=>{try{return e.parse(r)}catch(o){throw o instanceof i?n(o,\"StoreConfig Validation Error\"):o}});import{mudCoreConfig as m}from\"@latticexyz/config\";function s(r){return m(r)}export{s as a,c as b,y as c};\n//# sourceMappingURL=chunk-6QMWGFYG.js.map","import{a as e}from\"./chunk-6QMWGFYG.js\";import\"./chunk-5AKM5HGJ.js\";var a=e({storeImportPath:\"../../\",namespace:\"mudstore\",enums:{ExampleEnum:[\"None\",\"First\",\"Second\",\"Third\"]},tables:{Hooks:\"address[]\",Callbacks:\"bytes24[]\",Tables:{keySchema:{tableId:\"bytes32\"},schema:{keySchema:\"bytes32\",valueSchema:\"bytes32\",abiEncodedKeyNames:\"bytes\",abiEncodedFieldNames:\"bytes\"}},Mixed:{schema:{u32:\"uint32\",u128:\"uint128\",a32:\"uint32[]\",s:\"string\"}},Vector2:{schema:{x:\"uint32\",y:\"uint32\"}},KeyEncoding:{keySchema:{k1:\"uint256\",k2:\"int32\",k3:\"bytes16\",k4:\"address\",k5:\"bool\",k6:\"ExampleEnum\"},schema:\"bool\"}}});export{a as default};\n//# sourceMappingURL=mud.config.js.map","import{decodeField as R,decodeKeyTuple as F,decodeRecord as S,abiTypesToSchema as C,hexToSchema as N}from\"@latticexyz/protocol-parser\";import{decodeAbiParameters as v,getAddress as m,parseAbiParameters as h}from\"viem\";import E from\"debug\";var g=E(\"mud:store-sync\");import{isDefined as O}from\"@latticexyz/common/utils\";import{hexToTableId as T,tableIdToHex as V}from\"@latticexyz/common\";import x from\"@latticexyz/store/mud.config\";var k=x.tables.Tables,A=V(x.namespace,k.name);function G({registerTables:I,getTables:L,storeOperations:P}){return async o=>{let t=o.logs.map(e=>{if(e.eventName!==\"StoreSetRecord\"||e.args.table!==A)return;let[a,...f]=e.args.key;f.length&&console.warn(\"registerSchema event is expected to have only one key in key tuple, but got multiple\",e);let b=T(a),c=S(C(Object.values(k.schema)),e.args.data),s=Object.fromEntries(Object.keys(k.schema).map((i,d)=>[i,c[d]])),p=N(s.keySchema),l=N(s.valueSchema),r=v(h(\"string[]\"),s.abiEncodedKeyNames)[0],n=v(h(\"string[]\"),s.abiEncodedFieldNames)[0],u=[...l.staticFields,...l.dynamicFields];return{address:e.address,tableId:a,namespace:b.namespace,name:b.name,keySchema:Object.fromEntries(p.staticFields.map((i,d)=>[r[d],i])),valueSchema:Object.fromEntries(u.map((i,d)=>[n[d],i]))}}).filter(O);t.length>0&&await I({blockNumber:o.blockNumber,tables:t});let j=Array.from(new Set(o.logs.map(e=>JSON.stringify({address:m(e.address),tableId:e.args.table,...T(e.args.table)})))).map(e=>JSON.parse(e)),B=Object.fromEntries((await L({blockNumber:o.blockNumber,tables:j})).map(e=>[`${m(e.address)}:${e.tableId}`,e])),y=o.logs.map(e=>{let a=B[`${m(e.address)}:${e.args.table}`];if(!a){g(\"no table found for event, skipping\",T(e.args.table),e);return}let f=Object.keys(a.keySchema),b=F({staticFields:Object.values(a.keySchema),dynamicFields:[]},e.args.key),c=Object.fromEntries(b.map((r,n)=>[f[n],r])),s=Object.values(a.valueSchema),p=C(s),l=Object.keys(a.valueSchema);if(e.eventName===\"StoreSetRecord\"||e.eventName===\"StoreEphemeralRecord\"){let r=S(p,e.args.data),n=Object.fromEntries(l.map((u,i)=>[u,r[i]]));return{log:e,address:m(e.address),namespace:a.namespace,name:a.name,type:\"SetRecord\",key:c,value:n}}if(e.eventName===\"StoreSetField\"){let r=l[e.args.schemaIndex],n=R(s[e.args.schemaIndex],e.args.data);return{log:e,address:m(e.address),namespace:a.namespace,name:a.name,type:\"SetField\",key:c,fieldName:r,fieldValue:n}}if(e.eventName===\"StoreDeleteRecord\")return{log:e,address:m(e.address),namespace:a.namespace,name:a.name,type:\"DeleteRecord\",key:c};g(\"unknown store event or log, skipping\",e)}).filter(O);return await P({blockNumber:o.blockNumber,operations:y}),{blockNumber:o.blockNumber,operations:y}}}var w=(t=>(t.INITIALIZE=\"initialize\",t.SNAPSHOT=\"snapshot\",t.RPC=\"rpc\",t.LIVE=\"live\",t))(w||{});export{g as a,G as b,w as c};\n//# sourceMappingURL=chunk-SNWOSPCV.js.map","/**\n * @internal\n */ function invert(obj) {\n const newObj = Object.create(null);\n for(const key in obj){\n const v = obj[key];\n newObj[v] = key;\n }\n return newObj;\n}\n\n// reference: https://www.jsonrpc.org/specification\n/**\n * JSON-RPC 2.0 Error codes\n *\n * `-32000` to `-32099` are reserved for implementation-defined server-errors.\n * For tRPC we're copying the last digits of HTTP 4XX errors.\n */ const TRPC_ERROR_CODES_BY_KEY = {\n /**\n * Invalid JSON was received by the server.\n * An error occurred on the server while parsing the JSON text.\n */ PARSE_ERROR: -32700,\n /**\n * The JSON sent is not a valid Request object.\n */ BAD_REQUEST: -32600,\n /**\n * Internal JSON-RPC error.\n */ INTERNAL_SERVER_ERROR: -32603,\n // Implementation specific errors\n UNAUTHORIZED: -32001,\n FORBIDDEN: -32003,\n NOT_FOUND: -32004,\n METHOD_NOT_SUPPORTED: -32005,\n TIMEOUT: -32008,\n CONFLICT: -32009,\n PRECONDITION_FAILED: -32012,\n PAYLOAD_TOO_LARGE: -32013,\n UNPROCESSABLE_CONTENT: -32022,\n TOO_MANY_REQUESTS: -32029,\n CLIENT_CLOSED_REQUEST: -32099\n};\nconst TRPC_ERROR_CODES_BY_NUMBER = invert(TRPC_ERROR_CODES_BY_KEY);\n\nexport { TRPC_ERROR_CODES_BY_KEY as T, TRPC_ERROR_CODES_BY_NUMBER as a, invert as i };\n","import { i as invert, T as TRPC_ERROR_CODES_BY_KEY } from './codes-24aa1ce1.mjs';\n\nconst TRPC_ERROR_CODES_BY_NUMBER = invert(TRPC_ERROR_CODES_BY_KEY);\nconst JSONRPC2_TO_HTTP_CODE = {\n PARSE_ERROR: 400,\n BAD_REQUEST: 400,\n NOT_FOUND: 404,\n INTERNAL_SERVER_ERROR: 500,\n UNAUTHORIZED: 401,\n FORBIDDEN: 403,\n TIMEOUT: 408,\n CONFLICT: 409,\n CLIENT_CLOSED_REQUEST: 499,\n PRECONDITION_FAILED: 412,\n PAYLOAD_TOO_LARGE: 413,\n METHOD_NOT_SUPPORTED: 405,\n UNPROCESSABLE_CONTENT: 422,\n TOO_MANY_REQUESTS: 429\n};\nfunction getStatusCodeFromKey(code) {\n return JSONRPC2_TO_HTTP_CODE[code] ?? 500;\n}\nfunction getHTTPStatusCode(json) {\n const arr = Array.isArray(json) ? json : [\n json\n ];\n const httpStatuses = new Set(arr.map((res)=>{\n if ('error' in res) {\n const data = res.error.data;\n if (typeof data.httpStatus === 'number') {\n return data.httpStatus;\n }\n const code = TRPC_ERROR_CODES_BY_NUMBER[res.error.code];\n return getStatusCodeFromKey(code);\n }\n return 200;\n }));\n if (httpStatuses.size !== 1) {\n return 207;\n }\n const httpStatus = httpStatuses.values().next().value;\n return httpStatus;\n}\nfunction getHTTPStatusCodeFromError(error) {\n const { code } = error;\n return getStatusCodeFromKey(code);\n}\n\nconst noop = ()=>{\n// noop\n};\nfunction createInnerProxy(callback, path) {\n const proxy = new Proxy(noop, {\n get (_obj, key) {\n if (typeof key !== 'string' || key === 'then') {\n // special case for if the proxy is accidentally treated\n // like a PromiseLike (like in `Promise.resolve(proxy)`)\n return undefined;\n }\n return createInnerProxy(callback, [\n ...path,\n key\n ]);\n },\n apply (_1, _2, args) {\n const isApply = path[path.length - 1] === 'apply';\n return callback({\n args: isApply ? args.length >= 2 ? args[1] : [] : args,\n path: isApply ? path.slice(0, -1) : path\n });\n }\n });\n return proxy;\n}\n/**\n * Creates a proxy that calls the callback with the path and arguments\n *\n * @internal\n */ const createRecursiveProxy = (callback)=>createInnerProxy(callback, []);\n/**\n * Used in place of `new Proxy` where each handler will map 1 level deep to another value.\n *\n * @internal\n */ const createFlatProxy = (callback)=>{\n return new Proxy(noop, {\n get (_obj, name) {\n if (typeof name !== 'string' || name === 'then') {\n // special case for if the proxy is accidentally treated\n // like a PromiseLike (like in `Promise.resolve(proxy)`)\n return undefined;\n }\n return callback(name);\n }\n });\n};\n\nexport { TRPC_ERROR_CODES_BY_NUMBER as T, createRecursiveProxy as a, getHTTPStatusCode as b, createFlatProxy as c, getHTTPStatusCodeFromError as g };\n","import { T as TRPCError } from './TRPCError-6a1653a4.mjs';\nimport { a as createRecursiveProxy, g as getHTTPStatusCodeFromError } from './index-044a193b.mjs';\nimport { T as TRPC_ERROR_CODES_BY_KEY } from './codes-24aa1ce1.mjs';\n\n/**\n * @public\n */ /**\n * @internal\n */ function getDataTransformer(transformer) {\n if ('input' in transformer) {\n return transformer;\n }\n return {\n input: transformer,\n output: transformer\n };\n}\n/**\n * @internal\n */ const defaultTransformer = {\n _default: true,\n input: {\n serialize: (obj)=>obj,\n deserialize: (obj)=>obj\n },\n output: {\n serialize: (obj)=>obj,\n deserialize: (obj)=>obj\n }\n};\n\nconst defaultFormatter = ({ shape })=>{\n return shape;\n};\n\n/**\n * Create an object without inheriting anything from `Object.prototype`\n * @internal\n */ function omitPrototype(obj) {\n return Object.assign(Object.create(null), obj);\n}\n\nconst procedureTypes = [\n 'query',\n 'mutation',\n 'subscription'\n];\n\nfunction isRouter(procedureOrRouter) {\n return 'router' in procedureOrRouter._def;\n}\nconst emptyRouter = {\n _ctx: null,\n _errorShape: null,\n _meta: null,\n queries: {},\n mutations: {},\n subscriptions: {},\n errorFormatter: defaultFormatter,\n transformer: defaultTransformer\n};\n/**\n * Reserved words that can't be used as router or procedure names\n */ const reservedWords = [\n /**\n * Then is a reserved word because otherwise we can't return a promise that returns a Proxy\n * since JS will think that `.then` is something that exists\n */ 'then'\n];\n/**\n * @internal\n */ function createRouterFactory(config) {\n return function createRouterInner(procedures) {\n const reservedWordsUsed = new Set(Object.keys(procedures).filter((v)=>reservedWords.includes(v)));\n if (reservedWordsUsed.size > 0) {\n throw new Error('Reserved words used in `router({})` call: ' + Array.from(reservedWordsUsed).join(', '));\n }\n const routerProcedures = omitPrototype({});\n function recursiveGetPaths(procedures, path = '') {\n for (const [key, procedureOrRouter] of Object.entries(procedures ?? {})){\n const newPath = `${path}${key}`;\n if (isRouter(procedureOrRouter)) {\n recursiveGetPaths(procedureOrRouter._def.procedures, `${newPath}.`);\n continue;\n }\n if (routerProcedures[newPath]) {\n throw new Error(`Duplicate key: ${newPath}`);\n }\n routerProcedures[newPath] = procedureOrRouter;\n }\n }\n recursiveGetPaths(procedures);\n const _def = {\n _config: config,\n router: true,\n procedures: routerProcedures,\n ...emptyRouter,\n record: procedures,\n queries: Object.entries(routerProcedures).filter((pair)=>pair[1]._def.query).reduce((acc, [key, val])=>({\n ...acc,\n [key]: val\n }), {}),\n mutations: Object.entries(routerProcedures).filter((pair)=>pair[1]._def.mutation).reduce((acc, [key, val])=>({\n ...acc,\n [key]: val\n }), {}),\n subscriptions: Object.entries(routerProcedures).filter((pair)=>pair[1]._def.subscription).reduce((acc, [key, val])=>({\n ...acc,\n [key]: val\n }), {})\n };\n const router = {\n ...procedures,\n _def,\n createCaller (ctx) {\n const proxy = createRecursiveProxy(({ path , args })=>{\n // interop mode\n if (path.length === 1 && procedureTypes.includes(path[0])) {\n return callProcedure({\n procedures: _def.procedures,\n path: args[0],\n rawInput: args[1],\n ctx,\n type: path[0]\n });\n }\n const fullPath = path.join('.');\n const procedure = _def.procedures[fullPath];\n let type = 'query';\n if (procedure._def.mutation) {\n type = 'mutation';\n } else if (procedure._def.subscription) {\n type = 'subscription';\n }\n return procedure({\n path: fullPath,\n rawInput: args[0],\n ctx,\n type\n });\n });\n return proxy;\n },\n getErrorShape (opts) {\n const { path , error } = opts;\n const { code } = opts.error;\n const shape = {\n message: error.message,\n code: TRPC_ERROR_CODES_BY_KEY[code],\n data: {\n code,\n httpStatus: getHTTPStatusCodeFromError(error)\n }\n };\n if (config.isDev && typeof opts.error.stack === 'string') {\n shape.data.stack = opts.error.stack;\n }\n if (typeof path === 'string') {\n shape.data.path = path;\n }\n return this._def._config.errorFormatter({\n ...opts,\n shape\n });\n }\n };\n return router;\n };\n}\n/**\n * @internal\n */ function callProcedure(opts) {\n const { type , path } = opts;\n if (!(path in opts.procedures) || !opts.procedures[path]?._def[type]) {\n throw new TRPCError({\n code: 'NOT_FOUND',\n message: `No \"${type}\"-procedure on path \"${path}\"`\n });\n }\n const procedure = opts.procedures[path];\n return procedure(opts);\n}\n\n/**\n * The default check to see if we're in a server\n */ const isServerDefault = typeof window === 'undefined' || 'Deno' in window || globalThis.process?.env?.NODE_ENV === 'test' || !!globalThis.process?.env?.JEST_WORKER_ID || !!globalThis.process?.env?.VITEST_WORKER_ID;\n\nexport { defaultTransformer as a, callProcedure as b, createRouterFactory as c, defaultFormatter as d, getDataTransformer as g, isServerDefault as i, procedureTypes as p };\n","var DoubleIndexedKV = /** @class */ (function () {\n function DoubleIndexedKV() {\n this.keyToValue = new Map();\n this.valueToKey = new Map();\n }\n DoubleIndexedKV.prototype.set = function (key, value) {\n this.keyToValue.set(key, value);\n this.valueToKey.set(value, key);\n };\n DoubleIndexedKV.prototype.getByKey = function (key) {\n return this.keyToValue.get(key);\n };\n DoubleIndexedKV.prototype.getByValue = function (value) {\n return this.valueToKey.get(value);\n };\n DoubleIndexedKV.prototype.clear = function () {\n this.keyToValue.clear();\n this.valueToKey.clear();\n };\n return DoubleIndexedKV;\n}());\nexport { DoubleIndexedKV };\n//# sourceMappingURL=double-indexed-kv.js.map","import { DoubleIndexedKV } from './double-indexed-kv';\nvar Registry = /** @class */ (function () {\n function Registry(generateIdentifier) {\n this.generateIdentifier = generateIdentifier;\n this.kv = new DoubleIndexedKV();\n }\n Registry.prototype.register = function (value, identifier) {\n if (this.kv.getByValue(value)) {\n return;\n }\n if (!identifier) {\n identifier = this.generateIdentifier(value);\n }\n this.kv.set(identifier, value);\n };\n Registry.prototype.clear = function () {\n this.kv.clear();\n };\n Registry.prototype.getIdentifier = function (value) {\n return this.kv.getByValue(value);\n };\n Registry.prototype.getValue = function (identifier) {\n return this.kv.getByKey(identifier);\n };\n return Registry;\n}());\nexport { Registry };\n//# sourceMappingURL=registry.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Registry } from './registry';\nvar ClassRegistry = /** @class */ (function (_super) {\n __extends(ClassRegistry, _super);\n function ClassRegistry() {\n var _this = _super.call(this, function (c) { return c.name; }) || this;\n _this.classToAllowedProps = new Map();\n return _this;\n }\n ClassRegistry.prototype.register = function (value, options) {\n if (typeof options === 'object') {\n if (options.allowProps) {\n this.classToAllowedProps.set(value, options.allowProps);\n }\n _super.prototype.register.call(this, value, options.identifier);\n }\n else {\n _super.prototype.register.call(this, value, options);\n }\n };\n ClassRegistry.prototype.getAllowedProps = function (value) {\n return this.classToAllowedProps.get(value);\n };\n return ClassRegistry;\n}(Registry));\nexport { ClassRegistry };\n//# sourceMappingURL=class-registry.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nfunction valuesOfObj(record) {\n if ('values' in Object) {\n // eslint-disable-next-line es5/no-es6-methods\n return Object.values(record);\n }\n var values = [];\n // eslint-disable-next-line no-restricted-syntax\n for (var key in record) {\n if (record.hasOwnProperty(key)) {\n values.push(record[key]);\n }\n }\n return values;\n}\nexport function find(record, predicate) {\n var values = valuesOfObj(record);\n if ('find' in values) {\n // eslint-disable-next-line es5/no-es6-methods\n return values.find(predicate);\n }\n var valuesNotNever = values;\n for (var i = 0; i < valuesNotNever.length; i++) {\n var value = valuesNotNever[i];\n if (predicate(value)) {\n return value;\n }\n }\n return undefined;\n}\nexport function forEach(record, run) {\n Object.entries(record).forEach(function (_a) {\n var _b = __read(_a, 2), key = _b[0], value = _b[1];\n return run(value, key);\n });\n}\nexport function includes(arr, value) {\n return arr.indexOf(value) !== -1;\n}\nexport function findArr(record, predicate) {\n for (var i = 0; i < record.length; i++) {\n var value = record[i];\n if (predicate(value)) {\n return value;\n }\n }\n return undefined;\n}\n//# sourceMappingURL=util.js.map","import { find } from './util';\nvar CustomTransformerRegistry = /** @class */ (function () {\n function CustomTransformerRegistry() {\n this.transfomers = {};\n }\n CustomTransformerRegistry.prototype.register = function (transformer) {\n this.transfomers[transformer.name] = transformer;\n };\n CustomTransformerRegistry.prototype.findApplicable = function (v) {\n return find(this.transfomers, function (transformer) {\n return transformer.isApplicable(v);\n });\n };\n CustomTransformerRegistry.prototype.findByName = function (name) {\n return this.transfomers[name];\n };\n return CustomTransformerRegistry;\n}());\nexport { CustomTransformerRegistry };\n//# sourceMappingURL=custom-transformer-registry.js.map","var getType = function (payload) {\n return Object.prototype.toString.call(payload).slice(8, -1);\n};\nexport var isUndefined = function (payload) {\n return typeof payload === 'undefined';\n};\nexport var isNull = function (payload) { return payload === null; };\nexport var isPlainObject = function (payload) {\n if (typeof payload !== 'object' || payload === null)\n return false;\n if (payload === Object.prototype)\n return false;\n if (Object.getPrototypeOf(payload) === null)\n return true;\n return Object.getPrototypeOf(payload) === Object.prototype;\n};\nexport var isEmptyObject = function (payload) {\n return isPlainObject(payload) && Object.keys(payload).length === 0;\n};\nexport var isArray = function (payload) {\n return Array.isArray(payload);\n};\nexport var isString = function (payload) {\n return typeof payload === 'string';\n};\nexport var isNumber = function (payload) {\n return typeof payload === 'number' && !isNaN(payload);\n};\nexport var isBoolean = function (payload) {\n return typeof payload === 'boolean';\n};\nexport var isRegExp = function (payload) {\n return payload instanceof RegExp;\n};\nexport var isMap = function (payload) {\n return payload instanceof Map;\n};\nexport var isSet = function (payload) {\n return payload instanceof Set;\n};\nexport var isSymbol = function (payload) {\n return getType(payload) === 'Symbol';\n};\nexport var isDate = function (payload) {\n return payload instanceof Date && !isNaN(payload.valueOf());\n};\nexport var isError = function (payload) {\n return payload instanceof Error;\n};\nexport var isNaNValue = function (payload) {\n return typeof payload === 'number' && isNaN(payload);\n};\nexport var isPrimitive = function (payload) {\n return isBoolean(payload) ||\n isNull(payload) ||\n isUndefined(payload) ||\n isNumber(payload) ||\n isString(payload) ||\n isSymbol(payload);\n};\nexport var isBigint = function (payload) {\n return typeof payload === 'bigint';\n};\nexport var isInfinite = function (payload) {\n return payload === Infinity || payload === -Infinity;\n};\nexport var isTypedArray = function (payload) {\n return ArrayBuffer.isView(payload) && !(payload instanceof DataView);\n};\nexport var isURL = function (payload) { return payload instanceof URL; };\n//# sourceMappingURL=is.js.map","export var escapeKey = function (key) { return key.replace(/\\./g, '\\\\.'); };\nexport var stringifyPath = function (path) {\n return path\n .map(String)\n .map(escapeKey)\n .join('.');\n};\nexport var parsePath = function (string) {\n var result = [];\n var segment = '';\n for (var i = 0; i < string.length; i++) {\n var char = string.charAt(i);\n var isEscapedDot = char === '\\\\' && string.charAt(i + 1) === '.';\n if (isEscapedDot) {\n segment += '.';\n i++;\n continue;\n }\n var isEndOfSegment = char === '.';\n if (isEndOfSegment) {\n result.push(segment);\n segment = '';\n continue;\n }\n segment += char;\n }\n var lastSegment = segment;\n result.push(lastSegment);\n return result;\n};\n//# sourceMappingURL=pathstringifier.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\nimport { isBigint, isDate, isInfinite, isMap, isNaNValue, isRegExp, isSet, isUndefined, isSymbol, isArray, isError, isTypedArray, isURL, } from './is';\nimport { findArr } from './util';\nfunction simpleTransformation(isApplicable, annotation, transform, untransform) {\n return {\n isApplicable: isApplicable,\n annotation: annotation,\n transform: transform,\n untransform: untransform\n };\n}\nvar simpleRules = [\n simpleTransformation(isUndefined, 'undefined', function () { return null; }, function () { return undefined; }),\n simpleTransformation(isBigint, 'bigint', function (v) { return v.toString(); }, function (v) {\n if (typeof BigInt !== 'undefined') {\n return BigInt(v);\n }\n console.error('Please add a BigInt polyfill.');\n return v;\n }),\n simpleTransformation(isDate, 'Date', function (v) { return v.toISOString(); }, function (v) { return new Date(v); }),\n simpleTransformation(isError, 'Error', function (v, superJson) {\n var baseError = {\n name: v.name,\n message: v.message\n };\n superJson.allowedErrorProps.forEach(function (prop) {\n baseError[prop] = v[prop];\n });\n return baseError;\n }, function (v, superJson) {\n var e = new Error(v.message);\n e.name = v.name;\n e.stack = v.stack;\n superJson.allowedErrorProps.forEach(function (prop) {\n e[prop] = v[prop];\n });\n return e;\n }),\n simpleTransformation(isRegExp, 'regexp', function (v) { return '' + v; }, function (regex) {\n var body = regex.slice(1, regex.lastIndexOf('/'));\n var flags = regex.slice(regex.lastIndexOf('/') + 1);\n return new RegExp(body, flags);\n }),\n simpleTransformation(isSet, 'set', \n // (sets only exist in es6+)\n // eslint-disable-next-line es5/no-es6-methods\n function (v) { return __spreadArray([], __read(v.values())); }, function (v) { return new Set(v); }),\n simpleTransformation(isMap, 'map', function (v) { return __spreadArray([], __read(v.entries())); }, function (v) { return new Map(v); }),\n simpleTransformation(function (v) { return isNaNValue(v) || isInfinite(v); }, 'number', function (v) {\n if (isNaNValue(v)) {\n return 'NaN';\n }\n if (v > 0) {\n return 'Infinity';\n }\n else {\n return '-Infinity';\n }\n }, Number),\n simpleTransformation(function (v) { return v === 0 && 1 / v === -Infinity; }, 'number', function () {\n return '-0';\n }, Number),\n simpleTransformation(isURL, 'URL', function (v) { return v.toString(); }, function (v) { return new URL(v); }),\n];\nfunction compositeTransformation(isApplicable, annotation, transform, untransform) {\n return {\n isApplicable: isApplicable,\n annotation: annotation,\n transform: transform,\n untransform: untransform\n };\n}\nvar symbolRule = compositeTransformation(function (s, superJson) {\n if (isSymbol(s)) {\n var isRegistered = !!superJson.symbolRegistry.getIdentifier(s);\n return isRegistered;\n }\n return false;\n}, function (s, superJson) {\n var identifier = superJson.symbolRegistry.getIdentifier(s);\n return ['symbol', identifier];\n}, function (v) { return v.description; }, function (_, a, superJson) {\n var value = superJson.symbolRegistry.getValue(a[1]);\n if (!value) {\n throw new Error('Trying to deserialize unknown symbol');\n }\n return value;\n});\nvar constructorToName = [\n Int8Array,\n Uint8Array,\n Int16Array,\n Uint16Array,\n Int32Array,\n Uint32Array,\n Float32Array,\n Float64Array,\n Uint8ClampedArray,\n].reduce(function (obj, ctor) {\n obj[ctor.name] = ctor;\n return obj;\n}, {});\nvar typedArrayRule = compositeTransformation(isTypedArray, function (v) { return ['typed-array', v.constructor.name]; }, function (v) { return __spreadArray([], __read(v)); }, function (v, a) {\n var ctor = constructorToName[a[1]];\n if (!ctor) {\n throw new Error('Trying to deserialize unknown typed array');\n }\n return new ctor(v);\n});\nexport function isInstanceOfRegisteredClass(potentialClass, superJson) {\n if (potentialClass === null || potentialClass === void 0 ? void 0 : potentialClass.constructor) {\n var isRegistered = !!superJson.classRegistry.getIdentifier(potentialClass.constructor);\n return isRegistered;\n }\n return false;\n}\nvar classRule = compositeTransformation(isInstanceOfRegisteredClass, function (clazz, superJson) {\n var identifier = superJson.classRegistry.getIdentifier(clazz.constructor);\n return ['class', identifier];\n}, function (clazz, superJson) {\n var allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);\n if (!allowedProps) {\n return __assign({}, clazz);\n }\n var result = {};\n allowedProps.forEach(function (prop) {\n result[prop] = clazz[prop];\n });\n return result;\n}, function (v, a, superJson) {\n var clazz = superJson.classRegistry.getValue(a[1]);\n if (!clazz) {\n throw new Error('Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564');\n }\n return Object.assign(Object.create(clazz.prototype), v);\n});\nvar customRule = compositeTransformation(function (value, superJson) {\n return !!superJson.customTransformerRegistry.findApplicable(value);\n}, function (value, superJson) {\n var transformer = superJson.customTransformerRegistry.findApplicable(value);\n return ['custom', transformer.name];\n}, function (value, superJson) {\n var transformer = superJson.customTransformerRegistry.findApplicable(value);\n return transformer.serialize(value);\n}, function (v, a, superJson) {\n var transformer = superJson.customTransformerRegistry.findByName(a[1]);\n if (!transformer) {\n throw new Error('Trying to deserialize unknown custom value');\n }\n return transformer.deserialize(v);\n});\nvar compositeRules = [classRule, symbolRule, customRule, typedArrayRule];\nexport var transformValue = function (value, superJson) {\n var applicableCompositeRule = findArr(compositeRules, function (rule) {\n return rule.isApplicable(value, superJson);\n });\n if (applicableCompositeRule) {\n return {\n value: applicableCompositeRule.transform(value, superJson),\n type: applicableCompositeRule.annotation(value, superJson)\n };\n }\n var applicableSimpleRule = findArr(simpleRules, function (rule) {\n return rule.isApplicable(value, superJson);\n });\n if (applicableSimpleRule) {\n return {\n value: applicableSimpleRule.transform(value, superJson),\n type: applicableSimpleRule.annotation\n };\n }\n return undefined;\n};\nvar simpleRulesByAnnotation = {};\nsimpleRules.forEach(function (rule) {\n simpleRulesByAnnotation[rule.annotation] = rule;\n});\nexport var untransformValue = function (json, type, superJson) {\n if (isArray(type)) {\n switch (type[0]) {\n case 'symbol':\n return symbolRule.untransform(json, type, superJson);\n case 'class':\n return classRule.untransform(json, type, superJson);\n case 'custom':\n return customRule.untransform(json, type, superJson);\n case 'typed-array':\n return typedArrayRule.untransform(json, type, superJson);\n default:\n throw new Error('Unknown transformation: ' + type);\n }\n }\n else {\n var transformation = simpleRulesByAnnotation[type];\n if (!transformation) {\n throw new Error('Unknown transformation: ' + type);\n }\n return transformation.untransform(json, superJson);\n }\n};\n//# sourceMappingURL=transformer.js.map","import { isMap, isArray, isPlainObject, isSet } from './is';\nimport { includes } from './util';\nvar getNthKey = function (value, n) {\n var keys = value.keys();\n while (n > 0) {\n keys.next();\n n--;\n }\n return keys.next().value;\n};\nfunction validatePath(path) {\n if (includes(path, '__proto__')) {\n throw new Error('__proto__ is not allowed as a property');\n }\n if (includes(path, 'prototype')) {\n throw new Error('prototype is not allowed as a property');\n }\n if (includes(path, 'constructor')) {\n throw new Error('constructor is not allowed as a property');\n }\n}\nexport var getDeep = function (object, path) {\n validatePath(path);\n for (var i = 0; i < path.length; i++) {\n var key = path[i];\n if (isSet(object)) {\n object = getNthKey(object, +key);\n }\n else if (isMap(object)) {\n var row = +key;\n var type = +path[++i] === 0 ? 'key' : 'value';\n var keyOfRow = getNthKey(object, row);\n switch (type) {\n case 'key':\n object = keyOfRow;\n break;\n case 'value':\n object = object.get(keyOfRow);\n break;\n }\n }\n else {\n object = object[key];\n }\n }\n return object;\n};\nexport var setDeep = function (object, path, mapper) {\n validatePath(path);\n if (path.length === 0) {\n return mapper(object);\n }\n var parent = object;\n for (var i = 0; i < path.length - 1; i++) {\n var key = path[i];\n if (isArray(parent)) {\n var index = +key;\n parent = parent[index];\n }\n else if (isPlainObject(parent)) {\n parent = parent[key];\n }\n else if (isSet(parent)) {\n var row = +key;\n parent = getNthKey(parent, row);\n }\n else if (isMap(parent)) {\n var isEnd = i === path.length - 2;\n if (isEnd) {\n break;\n }\n var row = +key;\n var type = +path[++i] === 0 ? 'key' : 'value';\n var keyOfRow = getNthKey(parent, row);\n switch (type) {\n case 'key':\n parent = keyOfRow;\n break;\n case 'value':\n parent = parent.get(keyOfRow);\n break;\n }\n }\n }\n var lastKey = path[path.length - 1];\n if (isArray(parent)) {\n parent[+lastKey] = mapper(parent[+lastKey]);\n }\n else if (isPlainObject(parent)) {\n parent[lastKey] = mapper(parent[lastKey]);\n }\n if (isSet(parent)) {\n var oldValue = getNthKey(parent, +lastKey);\n var newValue = mapper(oldValue);\n if (oldValue !== newValue) {\n parent[\"delete\"](oldValue);\n parent.add(newValue);\n }\n }\n if (isMap(parent)) {\n var row = +path[path.length - 2];\n var keyToRow = getNthKey(parent, row);\n var type = +lastKey === 0 ? 'key' : 'value';\n switch (type) {\n case 'key': {\n var newKey = mapper(keyToRow);\n parent.set(newKey, parent.get(keyToRow));\n if (newKey !== keyToRow) {\n parent[\"delete\"](keyToRow);\n }\n break;\n }\n case 'value': {\n parent.set(keyToRow, mapper(parent.get(keyToRow)));\n break;\n }\n }\n }\n return object;\n};\n//# sourceMappingURL=accessDeep.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\nimport { isArray, isEmptyObject, isMap, isPlainObject, isPrimitive, isSet, } from './is';\nimport { escapeKey, stringifyPath } from './pathstringifier';\nimport { isInstanceOfRegisteredClass, transformValue, untransformValue, } from './transformer';\nimport { includes, forEach } from './util';\nimport { parsePath } from './pathstringifier';\nimport { getDeep, setDeep } from './accessDeep';\nfunction traverse(tree, walker, origin) {\n if (origin === void 0) { origin = []; }\n if (!tree) {\n return;\n }\n if (!isArray(tree)) {\n forEach(tree, function (subtree, key) {\n return traverse(subtree, walker, __spreadArray(__spreadArray([], __read(origin)), __read(parsePath(key))));\n });\n return;\n }\n var _a = __read(tree, 2), nodeValue = _a[0], children = _a[1];\n if (children) {\n forEach(children, function (child, key) {\n traverse(child, walker, __spreadArray(__spreadArray([], __read(origin)), __read(parsePath(key))));\n });\n }\n walker(nodeValue, origin);\n}\nexport function applyValueAnnotations(plain, annotations, superJson) {\n traverse(annotations, function (type, path) {\n plain = setDeep(plain, path, function (v) { return untransformValue(v, type, superJson); });\n });\n return plain;\n}\nexport function applyReferentialEqualityAnnotations(plain, annotations) {\n function apply(identicalPaths, path) {\n var object = getDeep(plain, parsePath(path));\n identicalPaths.map(parsePath).forEach(function (identicalObjectPath) {\n plain = setDeep(plain, identicalObjectPath, function () { return object; });\n });\n }\n if (isArray(annotations)) {\n var _a = __read(annotations, 2), root = _a[0], other = _a[1];\n root.forEach(function (identicalPath) {\n plain = setDeep(plain, parsePath(identicalPath), function () { return plain; });\n });\n if (other) {\n forEach(other, apply);\n }\n }\n else {\n forEach(annotations, apply);\n }\n return plain;\n}\nvar isDeep = function (object, superJson) {\n return isPlainObject(object) ||\n isArray(object) ||\n isMap(object) ||\n isSet(object) ||\n isInstanceOfRegisteredClass(object, superJson);\n};\nfunction addIdentity(object, path, identities) {\n var existingSet = identities.get(object);\n if (existingSet) {\n existingSet.push(path);\n }\n else {\n identities.set(object, [path]);\n }\n}\nexport function generateReferentialEqualityAnnotations(identitites, dedupe) {\n var result = {};\n var rootEqualityPaths = undefined;\n identitites.forEach(function (paths) {\n if (paths.length <= 1) {\n return;\n }\n // if we're not deduping, all of these objects continue existing.\n // putting the shortest path first makes it easier to parse for humans\n // if we're deduping though, only the first entry will still exist, so we can't do this optimisation.\n if (!dedupe) {\n paths = paths\n .map(function (path) { return path.map(String); })\n .sort(function (a, b) { return a.length - b.length; });\n }\n var _a = __read(paths), representativePath = _a[0], identicalPaths = _a.slice(1);\n if (representativePath.length === 0) {\n rootEqualityPaths = identicalPaths.map(stringifyPath);\n }\n else {\n result[stringifyPath(representativePath)] = identicalPaths.map(stringifyPath);\n }\n });\n if (rootEqualityPaths) {\n if (isEmptyObject(result)) {\n return [rootEqualityPaths];\n }\n else {\n return [rootEqualityPaths, result];\n }\n }\n else {\n return isEmptyObject(result) ? undefined : result;\n }\n}\nexport var walker = function (object, identities, superJson, dedupe, path, objectsInThisPath, seenObjects) {\n var _a;\n if (path === void 0) { path = []; }\n if (objectsInThisPath === void 0) { objectsInThisPath = []; }\n if (seenObjects === void 0) { seenObjects = new Map(); }\n var primitive = isPrimitive(object);\n if (!primitive) {\n addIdentity(object, path, identities);\n var seen = seenObjects.get(object);\n if (seen) {\n // short-circuit result if we've seen this object before\n return dedupe\n ? {\n transformedValue: null\n }\n : seen;\n }\n }\n if (!isDeep(object, superJson)) {\n var transformed_1 = transformValue(object, superJson);\n var result_1 = transformed_1\n ? {\n transformedValue: transformed_1.value,\n annotations: [transformed_1.type]\n }\n : {\n transformedValue: object\n };\n if (!primitive) {\n seenObjects.set(object, result_1);\n }\n return result_1;\n }\n if (includes(objectsInThisPath, object)) {\n // prevent circular references\n return {\n transformedValue: null\n };\n }\n var transformationResult = transformValue(object, superJson);\n var transformed = (_a = transformationResult === null || transformationResult === void 0 ? void 0 : transformationResult.value) !== null && _a !== void 0 ? _a : object;\n var transformedValue = isArray(transformed) ? [] : {};\n var innerAnnotations = {};\n forEach(transformed, function (value, index) {\n var recursiveResult = walker(value, identities, superJson, dedupe, __spreadArray(__spreadArray([], __read(path)), [index]), __spreadArray(__spreadArray([], __read(objectsInThisPath)), [object]), seenObjects);\n transformedValue[index] = recursiveResult.transformedValue;\n if (isArray(recursiveResult.annotations)) {\n innerAnnotations[index] = recursiveResult.annotations;\n }\n else if (isPlainObject(recursiveResult.annotations)) {\n forEach(recursiveResult.annotations, function (tree, key) {\n innerAnnotations[escapeKey(index) + '.' + key] = tree;\n });\n }\n });\n var result = isEmptyObject(innerAnnotations)\n ? {\n transformedValue: transformedValue,\n annotations: !!transformationResult\n ? [transformationResult.type]\n : undefined\n }\n : {\n transformedValue: transformedValue,\n annotations: !!transformationResult\n ? [transformationResult.type, innerAnnotations]\n : innerAnnotations\n };\n if (!primitive) {\n seenObjects.set(object, result);\n }\n return result;\n};\n//# sourceMappingURL=plainer.js.map","function getType(payload) {\n return Object.prototype.toString.call(payload).slice(8, -1);\n}\nfunction isUndefined(payload) {\n return getType(payload) === \"Undefined\";\n}\nfunction isNull(payload) {\n return getType(payload) === \"Null\";\n}\nfunction isPlainObject(payload) {\n if (getType(payload) !== \"Object\")\n return false;\n const prototype = Object.getPrototypeOf(payload);\n return !!prototype && prototype.constructor === Object && prototype === Object.prototype;\n}\nfunction isObject(payload) {\n return isPlainObject(payload);\n}\nfunction isEmptyObject(payload) {\n return isPlainObject(payload) && Object.keys(payload).length === 0;\n}\nfunction isFullObject(payload) {\n return isPlainObject(payload) && Object.keys(payload).length > 0;\n}\nfunction isAnyObject(payload) {\n return getType(payload) === \"Object\";\n}\nfunction isObjectLike(payload) {\n return isAnyObject(payload);\n}\nfunction isFunction(payload) {\n return typeof payload === \"function\";\n}\nfunction isArray(payload) {\n return getType(payload) === \"Array\";\n}\nfunction isFullArray(payload) {\n return isArray(payload) && payload.length > 0;\n}\nfunction isEmptyArray(payload) {\n return isArray(payload) && payload.length === 0;\n}\nfunction isString(payload) {\n return getType(payload) === \"String\";\n}\nfunction isFullString(payload) {\n return isString(payload) && payload !== \"\";\n}\nfunction isEmptyString(payload) {\n return payload === \"\";\n}\nfunction isNumber(payload) {\n return getType(payload) === \"Number\" && !isNaN(payload);\n}\nfunction isPositiveNumber(payload) {\n return isNumber(payload) && payload > 0;\n}\nfunction isNegativeNumber(payload) {\n return isNumber(payload) && payload < 0;\n}\nfunction isBoolean(payload) {\n return getType(payload) === \"Boolean\";\n}\nfunction isRegExp(payload) {\n return getType(payload) === \"RegExp\";\n}\nfunction isMap(payload) {\n return getType(payload) === \"Map\";\n}\nfunction isWeakMap(payload) {\n return getType(payload) === \"WeakMap\";\n}\nfunction isSet(payload) {\n return getType(payload) === \"Set\";\n}\nfunction isWeakSet(payload) {\n return getType(payload) === \"WeakSet\";\n}\nfunction isSymbol(payload) {\n return getType(payload) === \"Symbol\";\n}\nfunction isDate(payload) {\n return getType(payload) === \"Date\" && !isNaN(payload);\n}\nfunction isBlob(payload) {\n return getType(payload) === \"Blob\";\n}\nfunction isFile(payload) {\n return getType(payload) === \"File\";\n}\nfunction isPromise(payload) {\n return getType(payload) === \"Promise\";\n}\nfunction isError(payload) {\n return getType(payload) === \"Error\";\n}\nfunction isNaNValue(payload) {\n return getType(payload) === \"Number\" && isNaN(payload);\n}\nfunction isPrimitive(payload) {\n return isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);\n}\nconst isNullOrUndefined = isOneOf(isNull, isUndefined);\nfunction isOneOf(a, b, c, d, e) {\n return (value) => a(value) || b(value) || !!c && c(value) || !!d && d(value) || !!e && e(value);\n}\nfunction isType(payload, type) {\n if (!(type instanceof Function)) {\n throw new TypeError(\"Type must be a function\");\n }\n if (!Object.prototype.hasOwnProperty.call(type, \"prototype\")) {\n throw new TypeError(\"Type is not a class\");\n }\n const name = type.name;\n return getType(payload) === name || Boolean(payload && payload.constructor === type);\n}\nfunction isInstanceOf(value, classOrClassName) {\n if (typeof classOrClassName === \"function\") {\n for (let p = value; p; p = Object.getPrototypeOf(p)) {\n if (isType(p, classOrClassName)) {\n return true;\n }\n }\n return false;\n } else {\n for (let p = value; p; p = Object.getPrototypeOf(p)) {\n if (getType(p) === classOrClassName) {\n return true;\n }\n }\n return false;\n }\n}\n\nexport { getType, isAnyObject, isArray, isBlob, isBoolean, isDate, isEmptyArray, isEmptyObject, isEmptyString, isError, isFile, isFullArray, isFullObject, isFullString, isFunction, isInstanceOf, isMap, isNaNValue, isNegativeNumber, isNull, isNullOrUndefined, isNumber, isObject, isObjectLike, isOneOf, isPlainObject, isPositiveNumber, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isType, isUndefined, isWeakMap, isWeakSet };\n","import { isArray, isPlainObject } from 'is-what';\n\nfunction assignProp(carry, key, newVal, originalObject, includeNonenumerable) {\n const propType = {}.propertyIsEnumerable.call(originalObject, key) ? \"enumerable\" : \"nonenumerable\";\n if (propType === \"enumerable\")\n carry[key] = newVal;\n if (includeNonenumerable && propType === \"nonenumerable\") {\n Object.defineProperty(carry, key, {\n value: newVal,\n enumerable: false,\n writable: true,\n configurable: true\n });\n }\n}\nfunction copy(target, options = {}) {\n if (isArray(target)) {\n return target.map((item) => copy(item, options));\n }\n if (!isPlainObject(target)) {\n return target;\n }\n const props = Object.getOwnPropertyNames(target);\n const symbols = Object.getOwnPropertySymbols(target);\n return [...props, ...symbols].reduce((carry, key) => {\n if (isArray(options.props) && !options.props.includes(key)) {\n return carry;\n }\n const val = target[key];\n const newVal = copy(val, options);\n assignProp(carry, key, newVal, target, options.nonenumerable);\n return carry;\n }, {});\n}\n\nexport { copy };\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n to[j] = from[i];\n return to;\n};\nimport { ClassRegistry } from './class-registry';\nimport { Registry } from './registry';\nimport { CustomTransformerRegistry, } from './custom-transformer-registry';\nimport { applyReferentialEqualityAnnotations, applyValueAnnotations, generateReferentialEqualityAnnotations, walker, } from './plainer';\nimport { copy } from 'copy-anything';\nvar SuperJSON = /** @class */ (function () {\n /**\n * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.\n */\n function SuperJSON(_a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.dedupe, dedupe = _c === void 0 ? false : _c;\n this.classRegistry = new ClassRegistry();\n this.symbolRegistry = new Registry(function (s) { var _a; return (_a = s.description) !== null && _a !== void 0 ? _a : ''; });\n this.customTransformerRegistry = new CustomTransformerRegistry();\n this.allowedErrorProps = [];\n this.dedupe = dedupe;\n }\n SuperJSON.prototype.serialize = function (object) {\n var identities = new Map();\n var output = walker(object, identities, this, this.dedupe);\n var res = {\n json: output.transformedValue\n };\n if (output.annotations) {\n res.meta = __assign(__assign({}, res.meta), { values: output.annotations });\n }\n var equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);\n if (equalityAnnotations) {\n res.meta = __assign(__assign({}, res.meta), { referentialEqualities: equalityAnnotations });\n }\n return res;\n };\n SuperJSON.prototype.deserialize = function (payload) {\n var json = payload.json, meta = payload.meta;\n var result = copy(json);\n if (meta === null || meta === void 0 ? void 0 : meta.values) {\n result = applyValueAnnotations(result, meta.values, this);\n }\n if (meta === null || meta === void 0 ? void 0 : meta.referentialEqualities) {\n result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities);\n }\n return result;\n };\n SuperJSON.prototype.stringify = function (object) {\n return JSON.stringify(this.serialize(object));\n };\n SuperJSON.prototype.parse = function (string) {\n return this.deserialize(JSON.parse(string));\n };\n SuperJSON.prototype.registerClass = function (v, options) {\n this.classRegistry.register(v, options);\n };\n SuperJSON.prototype.registerSymbol = function (v, identifier) {\n this.symbolRegistry.register(v, identifier);\n };\n SuperJSON.prototype.registerCustom = function (transformer, name) {\n this.customTransformerRegistry.register(__assign({ name: name }, transformer));\n };\n SuperJSON.prototype.allowErrorProps = function () {\n var _a;\n var props = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n props[_i] = arguments[_i];\n }\n (_a = this.allowedErrorProps).push.apply(_a, __spreadArray([], __read(props)));\n };\n SuperJSON.defaultInstance = new SuperJSON();\n SuperJSON.serialize = SuperJSON.defaultInstance.serialize.bind(SuperJSON.defaultInstance);\n SuperJSON.deserialize = SuperJSON.defaultInstance.deserialize.bind(SuperJSON.defaultInstance);\n SuperJSON.stringify = SuperJSON.defaultInstance.stringify.bind(SuperJSON.defaultInstance);\n SuperJSON.parse = SuperJSON.defaultInstance.parse.bind(SuperJSON.defaultInstance);\n SuperJSON.registerClass = SuperJSON.defaultInstance.registerClass.bind(SuperJSON.defaultInstance);\n SuperJSON.registerSymbol = SuperJSON.defaultInstance.registerSymbol.bind(SuperJSON.defaultInstance);\n SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJSON.defaultInstance);\n SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);\n return SuperJSON;\n}());\nexport default SuperJSON;\nexport { SuperJSON };\nexport var serialize = SuperJSON.serialize;\nexport var deserialize = SuperJSON.deserialize;\nexport var stringify = SuperJSON.stringify;\nexport var parse = SuperJSON.parse;\nexport var registerClass = SuperJSON.registerClass;\nexport var registerCustom = SuperJSON.registerCustom;\nexport var registerSymbol = SuperJSON.registerSymbol;\nexport var allowErrorProps = SuperJSON.allowErrorProps;\n//# sourceMappingURL=index.js.map","function identity(x) {\n return x;\n}\n\n/** @internal */ function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce((prev, fn)=>fn(prev), input);\n };\n}\n\nfunction isObservable(x) {\n return typeof x === 'object' && x !== null && 'subscribe' in x;\n}\nfunction observable(subscribe) {\n const self = {\n subscribe (observer) {\n let teardownRef = null;\n let isDone = false;\n let unsubscribed = false;\n let teardownImmediately = false;\n function unsubscribe() {\n if (teardownRef === null) {\n teardownImmediately = true;\n return;\n }\n if (unsubscribed) {\n return;\n }\n unsubscribed = true;\n if (typeof teardownRef === 'function') {\n teardownRef();\n } else if (teardownRef) {\n teardownRef.unsubscribe();\n }\n }\n teardownRef = subscribe({\n next (value) {\n if (isDone) {\n return;\n }\n observer.next?.(value);\n },\n error (err) {\n if (isDone) {\n return;\n }\n isDone = true;\n observer.error?.(err);\n unsubscribe();\n },\n complete () {\n if (isDone) {\n return;\n }\n isDone = true;\n observer.complete?.();\n unsubscribe();\n }\n });\n if (teardownImmediately) {\n unsubscribe();\n }\n return {\n unsubscribe\n };\n },\n pipe (...operations) {\n return pipeFromArray(operations)(self);\n }\n };\n return self;\n}\n\nexport { isObservable as i, observable as o };\n","export { i as isObservable, o as observable } from '../observable-ade1bad8.mjs';\n\nfunction share(_opts) {\n return (originalObserver)=>{\n let refCount = 0;\n let subscription = null;\n const observers = [];\n function startIfNeeded() {\n if (subscription) {\n return;\n }\n subscription = originalObserver.subscribe({\n next (value) {\n for (const observer of observers){\n observer.next?.(value);\n }\n },\n error (error) {\n for (const observer of observers){\n observer.error?.(error);\n }\n },\n complete () {\n for (const observer of observers){\n observer.complete?.();\n }\n }\n });\n }\n function resetIfNeeded() {\n // \"resetOnRefCountZero\"\n if (refCount === 0 && subscription) {\n const _sub = subscription;\n subscription = null;\n _sub.unsubscribe();\n }\n }\n return {\n subscribe (observer) {\n refCount++;\n observers.push(observer);\n startIfNeeded();\n return {\n unsubscribe () {\n refCount--;\n resetIfNeeded();\n const index = observers.findIndex((v)=>v === observer);\n if (index > -1) {\n observers.splice(index, 1);\n }\n }\n };\n }\n };\n };\n}\n\nfunction map(project) {\n return (originalObserver)=>{\n return {\n subscribe (observer) {\n let index = 0;\n const subscription = originalObserver.subscribe({\n next (value) {\n observer.next?.(project(value, index++));\n },\n error (error) {\n observer.error?.(error);\n },\n complete () {\n observer.complete?.();\n }\n });\n return subscription;\n }\n };\n };\n}\n\nfunction tap(observer) {\n return (originalObserver)=>{\n return {\n subscribe (observer2) {\n return originalObserver.subscribe({\n next (v) {\n observer.next?.(v);\n observer2.next?.(v);\n },\n error (v) {\n observer.error?.(v);\n observer2.error?.(v);\n },\n complete () {\n observer.complete?.();\n observer2.complete?.();\n }\n });\n }\n };\n };\n}\n\nclass ObservableAbortError extends Error {\n constructor(message){\n super(message);\n this.name = 'ObservableAbortError';\n Object.setPrototypeOf(this, ObservableAbortError.prototype);\n }\n}\n/** @internal */ function observableToPromise(observable) {\n let abort;\n const promise = new Promise((resolve, reject)=>{\n let isDone = false;\n function onDone() {\n if (isDone) {\n return;\n }\n isDone = true;\n reject(new ObservableAbortError('This operation was aborted.'));\n obs$.unsubscribe();\n }\n const obs$ = observable.subscribe({\n next (data) {\n isDone = true;\n resolve(data);\n onDone();\n },\n error (data) {\n isDone = true;\n reject(data);\n onDone();\n },\n complete () {\n isDone = true;\n onDone();\n }\n });\n abort = onDone;\n });\n return {\n promise,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n abort: abort\n };\n}\n\nexport { map, observableToPromise, share, tap };\n","import { observable } from '@trpc/server/observable';\n\n/** @internal */ function createChain(opts) {\n return observable((observer)=>{\n function execute(index = 0, op = opts.op) {\n const next = opts.links[index];\n if (!next) {\n throw new Error('No more links to execute - did you forget to add an ending link?');\n }\n const subscription = next({\n op,\n next (nextOp) {\n const nextObserver = execute(index + 1, nextOp);\n return nextObserver;\n }\n });\n return subscription;\n }\n const obs$ = execute();\n return obs$.subscribe(observer);\n });\n}\n\nfunction asArray(value) {\n return Array.isArray(value) ? value : [\n value\n ];\n}\nfunction splitLink(opts) {\n return (runtime)=>{\n const yes = asArray(opts.true).map((link)=>link(runtime));\n const no = asArray(opts.false).map((link)=>link(runtime));\n return (props)=>{\n return observable((observer)=>{\n const links = opts.condition(props.op) ? yes : no;\n return createChain({\n op: props.op,\n links\n }).subscribe(observer);\n });\n };\n };\n}\n\nexport { createChain as c, splitLink as s };\n","function isTRPCClientError(cause) {\n return cause instanceof TRPCClientError || /**\n * @deprecated\n * Delete in next major\n */ cause.name === 'TRPCClientError';\n}\nclass TRPCClientError extends Error {\n static from(cause, opts = {}) {\n if (!(cause instanceof Error)) {\n return new TRPCClientError(cause.error.message ?? '', {\n ...opts,\n cause: undefined,\n result: cause\n });\n }\n if (isTRPCClientError(cause)) {\n if (opts.meta) {\n // Decorate with meta error data\n cause.meta = {\n ...cause.meta,\n ...opts.meta\n };\n }\n return cause;\n }\n return new TRPCClientError(cause.message, {\n ...opts,\n cause,\n result: null\n });\n }\n constructor(message, opts){\n const cause = opts?.cause;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore https://github.com/tc39/proposal-error-cause\n super(message, {\n cause\n });\n this.meta = opts?.meta;\n this.cause = cause;\n this.shape = opts?.result?.error;\n this.data = opts?.result?.error.data;\n this.name = 'TRPCClientError';\n Object.setPrototypeOf(this, TRPCClientError.prototype);\n }\n}\n\nexport { TRPCClientError as T };\n","import { T as TRPCClientError } from './TRPCClientError-fef6cf44.mjs';\n\nconst isFunction = (fn)=>typeof fn === 'function';\nfunction getFetch(customFetchImpl) {\n if (customFetchImpl) {\n return customFetchImpl;\n }\n if (typeof window !== 'undefined' && isFunction(window.fetch)) {\n return window.fetch;\n }\n if (typeof globalThis !== 'undefined' && isFunction(globalThis.fetch)) {\n return globalThis.fetch;\n }\n throw new Error('No fetch implementation found');\n}\n\nfunction getAbortController(customAbortControllerImpl) {\n if (customAbortControllerImpl) {\n return customAbortControllerImpl;\n }\n if (typeof window !== 'undefined' && window.AbortController) {\n return window.AbortController;\n }\n if (typeof globalThis !== 'undefined' && globalThis.AbortController) {\n return globalThis.AbortController;\n }\n return null;\n}\n\nfunction resolveHTTPLinkOptions(opts) {\n return {\n url: opts.url,\n fetch: opts.fetch,\n AbortController: getAbortController(opts.AbortController)\n };\n}\n// https://github.com/trpc/trpc/pull/669\nfunction arrayToDict(array) {\n const dict = {};\n for(let index = 0; index < array.length; index++){\n const element = array[index];\n dict[index] = element;\n }\n return dict;\n}\nconst METHOD = {\n query: 'GET',\n mutation: 'POST'\n};\nfunction getInput(opts) {\n return 'input' in opts ? opts.runtime.transformer.serialize(opts.input) : arrayToDict(opts.inputs.map((_input)=>opts.runtime.transformer.serialize(_input)));\n}\nconst getUrl = (opts)=>{\n let url = opts.url + '/' + opts.path;\n const queryParts = [];\n if ('inputs' in opts) {\n queryParts.push('batch=1');\n }\n if (opts.type === 'query') {\n const input = getInput(opts);\n if (input !== undefined) {\n queryParts.push(`input=${encodeURIComponent(JSON.stringify(input))}`);\n }\n }\n if (queryParts.length) {\n url += '?' + queryParts.join('&');\n }\n return url;\n};\nconst getBody = (opts)=>{\n if (opts.type === 'query') {\n return undefined;\n }\n const input = getInput(opts);\n return input !== undefined ? JSON.stringify(input) : undefined;\n};\nconst jsonHttpRequester = (opts)=>{\n return httpRequest({\n ...opts,\n contentTypeHeader: 'application/json',\n getUrl,\n getBody\n });\n};\nasync function fetchHTTPResponse(opts, ac) {\n const url = opts.getUrl(opts);\n const body = opts.getBody(opts);\n const { type } = opts;\n const resolvedHeaders = await opts.headers();\n /* istanbul ignore if -- @preserve */ if (type === 'subscription') {\n throw new Error('Subscriptions should use wsLink');\n }\n const headers = {\n ...opts.contentTypeHeader ? {\n 'content-type': opts.contentTypeHeader\n } : {},\n ...opts.batchModeHeader ? {\n 'trpc-batch-mode': opts.batchModeHeader\n } : {},\n ...resolvedHeaders\n };\n return getFetch(opts.fetch)(url, {\n method: METHOD[type],\n signal: ac?.signal,\n body: body,\n headers\n });\n}\nfunction httpRequest(opts) {\n const ac = opts.AbortController ? new opts.AbortController() : null;\n const meta = {};\n const promise = new Promise((resolve, reject)=>{\n fetchHTTPResponse(opts, ac).then((_res)=>{\n meta.response = _res;\n return _res.json();\n }).then((json)=>{\n meta.responseJSON = json;\n resolve({\n json: json,\n meta\n });\n }).catch((err)=>{\n reject(TRPCClientError.from(err, {\n meta\n }));\n });\n });\n const cancel = ()=>{\n ac?.abort();\n };\n return {\n promise,\n cancel\n };\n}\n\nexport { getBody as a, getFetch as b, fetchHTTPResponse as f, getUrl as g, httpRequest as h, jsonHttpRequester as j, resolveHTTPLinkOptions as r };\n","function isObject(value) {\n // check that value is object\n return !!value && !Array.isArray(value) && typeof value === 'object';\n}\n\n// FIXME:\n// - the generics here are probably unnecessary\n// - the RPC-spec could probably be simplified to combine HTTP + WS\n/** @internal */ function transformResultInner(response, runtime) {\n if ('error' in response) {\n const error = runtime.transformer.deserialize(response.error);\n return {\n ok: false,\n error: {\n ...response,\n error\n }\n };\n }\n const result = {\n ...response.result,\n ...(!response.result.type || response.result.type === 'data') && {\n type: 'data',\n data: runtime.transformer.deserialize(response.result.data)\n }\n };\n return {\n ok: true,\n result\n };\n}\nclass TransformResultError extends Error {\n constructor(){\n super('Unable to transform response from server');\n }\n}\n/**\n * Transforms and validates that the result is a valid TRPCResponse\n * @internal\n */ function transformResult(response, runtime) {\n let result;\n try {\n // Use the data transformers on the JSON-response\n result = transformResultInner(response, runtime);\n } catch (err) {\n throw new TransformResultError();\n }\n // check that output of the transformers is a valid TRPCResponse\n if (!result.ok && (!isObject(result.error.error) || typeof result.error.error.code !== 'number')) {\n throw new TransformResultError();\n }\n if (result.ok && !isObject(result.result)) {\n throw new TransformResultError();\n }\n return result;\n}\n\nexport { transformResult as t };\n","import { observable } from '@trpc/server/observable';\nimport { t as transformResult } from './transformResult-7ab522e6.mjs';\nimport { T as TRPCClientError } from './TRPCClientError-fef6cf44.mjs';\nimport { r as resolveHTTPLinkOptions, g as getUrl, j as jsonHttpRequester } from './httpUtils-1efcb902.mjs';\n\n/* eslint-disable @typescript-eslint/no-non-null-assertion */ /**\n * A function that should never be called unless we messed something up.\n */ const throwFatalError = ()=>{\n throw new Error('Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new');\n};\n/**\n * Dataloader that's very inspired by https://github.com/graphql/dataloader\n * Less configuration, no caching, and allows you to cancel requests\n * When cancelling a single fetch the whole batch will be cancelled only when _all_ items are cancelled\n */ function dataLoader(batchLoader) {\n let pendingItems = null;\n let dispatchTimer = null;\n const destroyTimerAndPendingItems = ()=>{\n clearTimeout(dispatchTimer);\n dispatchTimer = null;\n pendingItems = null;\n };\n /**\n * Iterate through the items and split them into groups based on the `batchLoader`'s validate function\n */ function groupItems(items) {\n const groupedItems = [\n []\n ];\n let index = 0;\n while(true){\n const item = items[index];\n if (!item) {\n break;\n }\n const lastGroup = groupedItems[groupedItems.length - 1];\n if (item.aborted) {\n // Item was aborted before it was dispatched\n item.reject?.(new Error('Aborted'));\n index++;\n continue;\n }\n const isValid = batchLoader.validate(lastGroup.concat(item).map((it)=>it.key));\n if (isValid) {\n lastGroup.push(item);\n index++;\n continue;\n }\n if (lastGroup.length === 0) {\n item.reject?.(new Error('Input is too big for a single dispatch'));\n index++;\n continue;\n }\n // Create new group, next iteration will try to add the item to that\n groupedItems.push([]);\n }\n return groupedItems;\n }\n function dispatch() {\n const groupedItems = groupItems(pendingItems);\n destroyTimerAndPendingItems();\n // Create batches for each group of items\n for (const items of groupedItems){\n if (!items.length) {\n continue;\n }\n const batch = {\n items,\n cancel: throwFatalError\n };\n for (const item of items){\n item.batch = batch;\n }\n const unitResolver = (index, value)=>{\n const item = batch.items[index];\n item.resolve?.(value);\n item.batch = null;\n item.reject = null;\n item.resolve = null;\n };\n const { promise , cancel } = batchLoader.fetch(batch.items.map((_item)=>_item.key), unitResolver);\n batch.cancel = cancel;\n promise.then((result)=>{\n for(let i = 0; i < result.length; i++){\n const value = result[i];\n unitResolver(i, value);\n }\n for (const item of batch.items){\n item.reject?.(new Error('Missing result'));\n item.batch = null;\n }\n }).catch((cause)=>{\n for (const item of batch.items){\n item.reject?.(cause);\n item.batch = null;\n }\n });\n }\n }\n function load(key) {\n const item = {\n aborted: false,\n key,\n batch: null,\n resolve: throwFatalError,\n reject: throwFatalError\n };\n const promise = new Promise((resolve, reject)=>{\n item.reject = reject;\n item.resolve = resolve;\n if (!pendingItems) {\n pendingItems = [];\n }\n pendingItems.push(item);\n });\n if (!dispatchTimer) {\n dispatchTimer = setTimeout(dispatch);\n }\n const cancel = ()=>{\n item.aborted = true;\n if (item.batch?.items.every((item)=>item.aborted)) {\n // All items in the batch have been cancelled\n item.batch.cancel();\n item.batch = null;\n }\n };\n return {\n promise,\n cancel\n };\n }\n return {\n load\n };\n}\n\n/**\n * @internal\n */ function createHTTPBatchLink(requester) {\n return function httpBatchLink(opts) {\n const resolvedOpts = resolveHTTPLinkOptions(opts);\n const maxURLLength = opts.maxURLLength ?? Infinity;\n // initialized config\n return (runtime)=>{\n const batchLoader = (type)=>{\n const validate = (batchOps)=>{\n if (maxURLLength === Infinity) {\n // escape hatch for quick calcs\n return true;\n }\n const path = batchOps.map((op)=>op.path).join(',');\n const inputs = batchOps.map((op)=>op.input);\n const url = getUrl({\n ...resolvedOpts,\n runtime,\n type,\n path,\n inputs\n });\n return url.length <= maxURLLength;\n };\n const fetch = requester({\n ...resolvedOpts,\n runtime,\n type,\n opts\n });\n return {\n validate,\n fetch\n };\n };\n const query = dataLoader(batchLoader('query'));\n const mutation = dataLoader(batchLoader('mutation'));\n const subscription = dataLoader(batchLoader('subscription'));\n const loaders = {\n query,\n subscription,\n mutation\n };\n return ({ op })=>{\n return observable((observer)=>{\n const loader = loaders[op.type];\n const { promise , cancel } = loader.load(op);\n let _res = undefined;\n promise.then((res)=>{\n _res = res;\n const transformed = transformResult(res.json, runtime);\n if (!transformed.ok) {\n observer.error(TRPCClientError.from(transformed.error, {\n meta: res.meta\n }));\n return;\n }\n observer.next({\n context: res.meta,\n result: transformed.result\n });\n observer.complete();\n }).catch((err)=>{\n observer.error(TRPCClientError.from(err, {\n meta: _res?.meta\n }));\n });\n return ()=>{\n cancel();\n };\n });\n };\n };\n };\n}\n\nconst batchRequester = (requesterOpts)=>{\n return (batchOps)=>{\n const path = batchOps.map((op)=>op.path).join(',');\n const inputs = batchOps.map((op)=>op.input);\n const { promise , cancel } = jsonHttpRequester({\n ...requesterOpts,\n path,\n inputs,\n headers () {\n if (!requesterOpts.opts.headers) {\n return {};\n }\n if (typeof requesterOpts.opts.headers === 'function') {\n return requesterOpts.opts.headers({\n opList: batchOps\n });\n }\n return requesterOpts.opts.headers;\n }\n });\n return {\n promise: promise.then((res)=>{\n const resJSON = Array.isArray(res.json) ? res.json : batchOps.map(()=>res.json);\n const result = resJSON.map((item)=>({\n meta: res.meta,\n json: item\n }));\n return result;\n }),\n cancel\n };\n };\n};\nconst httpBatchLink = createHTTPBatchLink(batchRequester);\n\nexport { createHTTPBatchLink as c, httpBatchLink as h };\n","import { share, observableToPromise } from '@trpc/server/observable';\nimport { c as createChain } from './splitLink-4c75f7be.mjs';\nexport { s as splitLink } from './splitLink-4c75f7be.mjs';\nimport { T as TRPCClientError } from './TRPCClientError-fef6cf44.mjs';\nexport { T as TRPCClientError } from './TRPCClientError-fef6cf44.mjs';\nimport { createFlatProxy, createRecursiveProxy } from '@trpc/server/shared';\nimport { f as fetchHTTPResponse, g as getUrl, a as getBody$1, h as httpRequest } from './httpUtils-1efcb902.mjs';\nexport { b as getFetch } from './httpUtils-1efcb902.mjs';\nimport { c as createHTTPBatchLink } from './httpBatchLink-fbd7b43c.mjs';\nexport { h as httpBatchLink } from './httpBatchLink-fbd7b43c.mjs';\nimport { httpLinkFactory } from './links/httpLink.mjs';\nexport { httpLink, httpLinkFactory } from './links/httpLink.mjs';\nexport { loggerLink } from './links/loggerLink.mjs';\nexport { createWSClient, wsLink } from './links/wsLink.mjs';\nimport './transformResult-7ab522e6.mjs';\n\nclass TRPCUntypedClient {\n $request({ type , input , path , context ={} }) {\n const chain$ = createChain({\n links: this.links,\n op: {\n id: ++this.requestId,\n type,\n path,\n input,\n context\n }\n });\n return chain$.pipe(share());\n }\n requestAsPromise(opts) {\n const req$ = this.$request(opts);\n const { promise , abort } = observableToPromise(req$);\n const abortablePromise = new Promise((resolve, reject)=>{\n opts.signal?.addEventListener('abort', abort);\n promise.then((envelope)=>{\n resolve(envelope.result.data);\n }).catch((err)=>{\n reject(TRPCClientError.from(err));\n });\n });\n return abortablePromise;\n }\n query(path, input, opts) {\n return this.requestAsPromise({\n type: 'query',\n path,\n input,\n context: opts?.context,\n signal: opts?.signal\n });\n }\n mutation(path, input, opts) {\n return this.requestAsPromise({\n type: 'mutation',\n path,\n input,\n context: opts?.context,\n signal: opts?.signal\n });\n }\n subscription(path, input, opts) {\n const observable$ = this.$request({\n type: 'subscription',\n path,\n input,\n context: opts?.context\n });\n return observable$.subscribe({\n next (envelope) {\n if (envelope.result.type === 'started') {\n opts.onStarted?.();\n } else if (envelope.result.type === 'stopped') {\n opts.onStopped?.();\n } else {\n opts.onData?.(envelope.result.data);\n }\n },\n error (err) {\n opts.onError?.(err);\n },\n complete () {\n opts.onComplete?.();\n }\n });\n }\n constructor(opts){\n this.requestId = 0;\n const combinedTransformer = (()=>{\n const transformer = opts.transformer;\n if (!transformer) {\n return {\n input: {\n serialize: (data)=>data,\n deserialize: (data)=>data\n },\n output: {\n serialize: (data)=>data,\n deserialize: (data)=>data\n }\n };\n }\n if ('input' in transformer) {\n return opts.transformer;\n }\n return {\n input: transformer,\n output: transformer\n };\n })();\n this.runtime = {\n transformer: {\n serialize: (data)=>combinedTransformer.input.serialize(data),\n deserialize: (data)=>combinedTransformer.output.deserialize(data)\n },\n combinedTransformer\n };\n // Initialize the links\n this.links = opts.links.map((link)=>link(this.runtime));\n }\n}\n\nfunction createTRPCUntypedClient(opts) {\n return new TRPCUntypedClient(opts);\n}\n\n/**\n * @deprecated use `createTRPCProxyClient` instead\n */ function createTRPCClient(opts) {\n const client = new TRPCUntypedClient(opts);\n return client;\n}\n\nconst clientCallTypeMap = {\n query: 'query',\n mutate: 'mutation',\n subscribe: 'subscription'\n};\n/** @internal */ const clientCallTypeToProcedureType = (clientCallType)=>{\n return clientCallTypeMap[clientCallType];\n};\n/**\n * @deprecated use `createTRPCProxyClient` instead\n * @internal\n */ function createTRPCClientProxy(client) {\n return createFlatProxy((key)=>{\n if (client.hasOwnProperty(key)) {\n return client[key];\n }\n if (key === '__untypedClient') {\n return client;\n }\n return createRecursiveProxy(({ path , args })=>{\n const pathCopy = [\n key,\n ...path\n ];\n const procedureType = clientCallTypeToProcedureType(pathCopy.pop());\n const fullPath = pathCopy.join('.');\n return client[procedureType](fullPath, ...args);\n });\n });\n}\nfunction createTRPCProxyClient(opts) {\n const client = new TRPCUntypedClient(opts);\n const proxy = createTRPCClientProxy(client);\n return proxy;\n}\n/**\n * Get an untyped client from a proxy client\n * @internal\n */ function getUntypedClient(client) {\n return client.__untypedClient;\n}\n\nfunction getTextDecoder(customTextDecoder) {\n if (customTextDecoder) {\n return customTextDecoder;\n }\n if (typeof window !== 'undefined' && window.TextDecoder) {\n return new window.TextDecoder();\n }\n if (typeof globalThis !== 'undefined' && globalThis.TextDecoder) {\n return new globalThis.TextDecoder();\n }\n throw new Error('No TextDecoder implementation found');\n}\n\n// Stream parsing adapted from https://www.loginradius.com/blog/engineering/guest-post/http-streaming-with-nodejs-and-fetch-api/\n/**\n * @internal\n * @description Take a stream of bytes and call `onLine` with\n * a JSON object for each line in the stream. Expected stream\n * format is:\n * ```json\n * {\"1\": {...}\n * ,\"0\": {...}\n * }\n * ```\n */ async function parseJSONStream(opts) {\n const parse = opts.parse ?? JSON.parse;\n const onLine = (line)=>{\n if (opts.signal?.aborted) return;\n if (!line || line === '}') {\n return;\n }\n /**\n * At this point, `line` can be one of two things:\n * - The first line of the stream `{\"2\":{...}`\n * - A line in the middle of the stream `,\"2\":{...}`\n */ const indexOfColon = line.indexOf(':');\n const indexAsStr = line.substring(2, indexOfColon - 1);\n const text = line.substring(indexOfColon + 1);\n opts.onSingle(Number(indexAsStr), parse(text));\n };\n await readLines(opts.readableStream, onLine, opts.textDecoder);\n}\n/**\n * Handle transforming a stream of bytes into lines of text.\n * To avoid using AsyncIterators / AsyncGenerators,\n * we use a callback for each line.\n *\n * @param readableStream can be a NodeJS stream or a WebAPI stream\n * @param onLine will be called for every line ('\\n' delimited) in the stream\n */ async function readLines(readableStream, onLine, textDecoder) {\n let partOfLine = '';\n const onChunk = (chunk)=>{\n const chunkText = textDecoder.decode(chunk);\n const chunkLines = chunkText.split('\\n');\n if (chunkLines.length === 1) {\n partOfLine += chunkLines[0];\n } else if (chunkLines.length > 1) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- length checked on line above\n onLine(partOfLine + chunkLines[0]);\n for(let i = 1; i < chunkLines.length - 1; i++){\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- length checked on line above\n onLine(chunkLines[i]);\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- length doesn't change, so is necessarily > 1\n partOfLine = chunkLines[chunkLines.length - 1];\n }\n };\n // we handle 2 different types of streams, this if where we figure out which one we have\n if ('getReader' in readableStream) {\n await readStandardChunks(readableStream, onChunk);\n } else {\n await readNodeChunks(readableStream, onChunk);\n }\n onLine(partOfLine);\n}\n/**\n * Handle NodeJS stream\n */ function readNodeChunks(stream, onChunk) {\n return new Promise((resolve)=>{\n stream.on('data', onChunk);\n stream.on('end', resolve);\n });\n}\n/**\n * Handle WebAPI stream\n */ async function readStandardChunks(stream, onChunk) {\n const reader = stream.getReader();\n let readResult = await reader.read();\n while(!readResult.done){\n onChunk(readResult.value);\n readResult = await reader.read();\n }\n}\nconst streamingJsonHttpRequester = (opts, onSingle)=>{\n const ac = opts.AbortController ? new opts.AbortController() : null;\n const responsePromise = fetchHTTPResponse({\n ...opts,\n contentTypeHeader: 'application/json',\n batchModeHeader: 'stream',\n getUrl,\n getBody: getBody$1\n }, ac);\n const cancel = ()=>ac?.abort();\n const promise = responsePromise.then(async (res)=>{\n if (!res.body) throw new Error('Received response without body');\n const meta = {\n response: res\n };\n return parseJSONStream({\n readableStream: res.body,\n onSingle,\n parse: (string)=>({\n json: JSON.parse(string),\n meta\n }),\n signal: ac?.signal,\n textDecoder: opts.textDecoder\n });\n });\n return {\n cancel,\n promise\n };\n};\n\nconst streamRequester = (requesterOpts)=>{\n const textDecoder = getTextDecoder(requesterOpts.opts.textDecoder);\n return (batchOps, unitResolver)=>{\n const path = batchOps.map((op)=>op.path).join(',');\n const inputs = batchOps.map((op)=>op.input);\n const { cancel , promise } = streamingJsonHttpRequester({\n ...requesterOpts,\n textDecoder,\n path,\n inputs,\n headers () {\n if (!requesterOpts.opts.headers) {\n return {};\n }\n if (typeof requesterOpts.opts.headers === 'function') {\n return requesterOpts.opts.headers({\n opList: batchOps\n });\n }\n return requesterOpts.opts.headers;\n }\n }, (index, res)=>{\n unitResolver(index, res);\n });\n return {\n /**\n * return an empty array because the batchLoader expects an array of results\n * but we've already called the `unitResolver` for each of them, there's\n * nothing left to do here.\n */ promise: promise.then(()=>[]),\n cancel\n };\n };\n};\nconst unstable_httpBatchStreamLink = createHTTPBatchLink(streamRequester);\n\nconst getBody = (opts)=>{\n if (!('input' in opts)) {\n return undefined;\n }\n if (!(opts.input instanceof FormData)) {\n throw new Error('Input is not FormData');\n }\n return opts.input;\n};\nconst formDataRequester = (opts)=>{\n if (opts.type !== 'mutation') {\n // TODO(?) handle formdata queries\n throw new Error('We only handle mutations with formdata');\n }\n return httpRequest({\n ...opts,\n getUrl () {\n return `${opts.url}/${opts.path}`;\n },\n getBody\n });\n};\nconst experimental_formDataLink = httpLinkFactory({\n requester: formDataRequester\n});\n\nexport { clientCallTypeToProcedureType, createTRPCClient, createTRPCClientProxy, createTRPCProxyClient, createTRPCUntypedClient, experimental_formDataLink, getUntypedClient, unstable_httpBatchStreamLink };\n","import{z as e}from\"zod\";import{isHex as i}from\"viem\";import{initTRPC as a}from\"@trpc/server\";import u from\"superjson\";function A(){let r=a.context().create({transformer:u});return r.router({findAll:r.procedure.input(e.object({chainId:e.number(),address:e.string().refine(i).optional()})).query(async t=>{let{storageAdapter:o}=t.ctx,{chainId:p,address:n}=t.input;return o.findAll(p,n)})})}import{createTRPCProxyClient as m,httpBatchLink as s}from\"@trpc/client\";import f from\"superjson\";function P({url:r}){return m({transformer:f,links:[s({url:r})]})}export{A as a,P as b};\n//# sourceMappingURL=chunk-A2BQSIM3.js.map","import{a as o,b as r,c as s,d as b,e as n,f as y,g as a,h as p,i}from\"../chunk-5AKM5HGJ.js\";var e=[\"event StoreDeleteRecord(bytes32 table, bytes32[] key)\",\"event StoreSetField(bytes32 table, bytes32[] key, uint8 schemaIndex, bytes data)\",\"event StoreSetRecord(bytes32 table, bytes32[] key, bytes data)\",\"event StoreEphemeralRecord(bytes32 table, bytes32[] key, bytes data)\"];import{parseAbi as t}from\"abitype\";var f=t(e);export{r as DEFAULTS,o as PATH_DEFAULTS,s as TABLE_DEFAULTS,e as storeEvents,f as storeEventsAbi,a as zEnumsConfig,i as zPluginStoreConfig,b as zSchemaConfig,p as zStoreConfig,n as zTableConfig,y as zTablesConfig};\n//# sourceMappingURL=index.js.map","import{EMPTY as p,concatMap as B,from as d,pipe as f,tap as m}from\"rxjs\";import{bigIntMin as b,wait as k}from\"@latticexyz/common/utils\";import g from\"debug\";var u=g(\"mud:block-events-stream\");async function*a({maxBlockRange:c=1000n,maxRetryCount:i=3,publicClient:l,...t}){let e=t.fromBlock,r=b(c,t.toBlock-e),n=0;for(;e<=t.toBlock;)try{let o=e+r,s=await l.getLogs({...t,fromBlock:e,toBlock:o,strict:!0});yield{fromBlock:e,toBlock:o,logs:s},e=o+1n,r=b(c,t.toBlock-e)}catch(o){if(!(o instanceof Error))throw o;if(o.message.includes(\"rate limit exceeded\")&&n{e??=o,r=n}),B(()=>e>r?p:d(a({publicClient:c,address:i,events:l,fromBlock:e,toBlock:r,maxBlockRange:t})).pipe(m(({toBlock:n})=>{e=n+1n}))))}import{Observable as T}from\"rxjs\";function O({publicClient:c,blockTag:i}){return new T(function(t){return c.watchBlocks({blockTag:i,emitOnBegin:!0,onBlock:e=>t.next(e),onError:e=>t.error(e)})})}import{bigIntSort as x,isDefined as y}from\"@latticexyz/common/utils\";function M(c,i){let l=Array.from(new Set(c.map(r=>r.blockNumber)));l.sort(x);let t=l.map(r=>{let n=c.filter(o=>o.blockNumber===r);if(n.length&&(n.sort((o,s)=>o.logIndexs.logIndex?1:0),!!n.length))return{blockNumber:r,logs:n}}).filter(y),e=l.length>0?l[l.length-1]:null;return i!=null&&(e==null||i>e)&&t.push({blockNumber:i,logs:[]}),t}export{P as blockRangeToLogs,O as createBlockStream,a as fetchLogs,M as groupLogsByBlockNumber};\n//# sourceMappingURL=index.js.map","import{a as O,b as R}from\"./chunk-SNWOSPCV.js\";import{b as x}from\"./chunk-A2BQSIM3.js\";import{schemaAbiTypeToDefaultValue as $}from\"@latticexyz/schema-type\";function U(l){return Object.fromEntries(Object.entries(l).map(([n,p])=>[n,$[p]]))}import{storeEventsAbi as E}from\"@latticexyz/store\";import{WaitForTransactionReceiptTimeoutError as I}from\"viem\";import{createBlockStream as M,blockRangeToLogs as W,groupLogsByBlockNumber as D}from\"@latticexyz/block-logs-stream\";import{filter as v,map as b,tap as g,mergeMap as j,from as K,concat as q,concatMap as w,share as H,firstValueFrom as z,defer as G,of as J,catchError as Q,shareReplay as u,combineLatest as X}from\"rxjs\";import Y from\"p-retry\";import{chunk as Z}from\"@latticexyz/common/utils\";var r=O.extend(\"createStoreSync\");async function be({storageAdapter:l,onProgress:n,address:p,publicClient:s,startBlock:h=0n,maxBlockRange:A,initialState:k,indexerUrl:S}){let T=G(async()=>{if(k)return k;if(!S)return;r(\"fetching initial state from indexer\",S),n?.({step:\"snapshot\",percentage:0,latestBlockNumber:0n,lastBlockNumberProcessed:0n,message:\"Fetching snapshot from indexer\"});let e=x({url:S}),t=s.chain?.id??await s.getChainId(),o=await e.findAll.query({chainId:t,address:p});return n?.({step:\"snapshot\",percentage:100,latestBlockNumber:0n,lastBlockNumberProcessed:0n,message:\"Fetched snapshot from indexer\"}),o}).pipe(Q(e=>(r(\"error fetching initial state from indexer\",e),n?.({step:\"snapshot\",percentage:100,latestBlockNumber:0n,lastBlockNumberProcessed:h,message:\"Failed to fetch snapshot from indexer\"}),J(void 0))),u(1)),F=T.pipe(b(e=>e?.blockNumber??h),g(e=>r(\"starting sync from block\",e))),L=T.pipe(v(e=>e!=null&&e.blockNumber!=null&&e.tables.length>0),w(async({blockNumber:e,tables:t})=>{r(\"hydrating from initial state to block\",e),n?.({step:\"snapshot\",percentage:0,latestBlockNumber:0n,lastBlockNumberProcessed:e,message:\"Hydrating from snapshot\"}),await l.registerTables({blockNumber:e,tables:t});let o=t.flatMap(c=>c.records.map(m=>({type:\"SetRecord\",address:c.address,namespace:c.namespace,name:c.name,key:m.key,value:m.value}))),d=Math.max(100,Math.floor(o.length/50)),P=Array.from(Z(o,d));for(let[c,m]of P.entries())await l.storeOperations({blockNumber:e,operations:m}),n?.({step:\"snapshot\",percentage:(c+m.length)/P.length,latestBlockNumber:0n,lastBlockNumberProcessed:e,message:\"Hydrating from snapshot\"});return n?.({step:\"snapshot\",percentage:100,latestBlockNumber:0n,lastBlockNumberProcessed:e,message:\"Hydrated from snapshot\"}),{blockNumber:e,operations:o}}),u(1)),y=M({publicClient:s,blockTag:\"latest\"}).pipe(u(1)),B=y.pipe(b(e=>e.number),g(e=>{r(\"latest block number\",e)}),u(1)),f=null,a=null,N=X([F,B]).pipe(b(([e,t])=>({startBlock:e,endBlock:t})),g(e=>{f=e.startBlock,a=e.endBlock}),W({publicClient:s,address:p,events:E,maxBlockRange:A}),j(({toBlock:e,logs:t})=>K(D(t,e))),H()),i=null,C=q(L,N.pipe(w(R(l)),g(({blockNumber:e,operations:t})=>{if(r(\"stored\",t.length,\"operations for block\",e),i=e,f!=null&&a!=null)if(e(r(\"waiting for tx receipt\",e,\"attempt\",o),s.waitForTransactionReceipt({hash:e,timeout:s.pollingInterval*2*o})),{retries:3,onFailedAttempt:o=>{if(o instanceof I){r(\"timed out waiting for tx receipt, trying again\",e);return}throw o}});return r(\"got tx receipt\",e,t),(i==null||io>=t.blockNumber)))),r(\"tx block was processed\",e,t.blockNumber),{receipt:t}}return{latestBlock$:y,latestBlockNumber$:B,blockLogs$:N,blockStorageOperations$:C,waitForTransaction:V}}export{U as a,be as b};\n//# sourceMappingURL=chunk-IH5UMM4B.js.map","var d={registerFunctionSelector:!0,openAccess:!0,accessList:[]},o={worldContractName:void 0,worldInterfaceName:\"IWorld\",systems:{},excludeSystems:[],postDeployScript:\"PostDeploy\",deploysDirectory:\"./deploys\",worldsFile:\"./worlds.json\",worldgenDirectory:\"world\",worldImportPath:\"@latticexyz/world/src/\",modules:[]};import{getDuplicates as g,STORE_SELECTOR_MAX_LENGTH as w,UnrecognizedSystemErrorFactory as f}from\"@latticexyz/config\";import{MUDError as D}from\"@latticexyz/common/errors\";function R(r,s){let n=s?.filter(t=>t.endsWith(\"System\")&&t!==\"System\"&&!t.match(/^I[A-Z]/))??[],c=Object.keys(r.systems);if(s){for(let t of c)if(!s.includes(t)||t===\"World\")throw f([\"systems\",t],t)}let l=[...new Set([...n,...c])].filter(t=>!r.excludeSystems.includes(t)).reduce((t,u)=>({...t,[u]:b(u,r.systems[u],s)}),{}),i=Object.values(r.tables).map(({name:t})=>t),a=Object.values(l).map(({name:t})=>t),m=g([...i,...a]);if(m.length>0)throw new D(`Table and system names must be unique: ${m.join(\", \")}`);return{systems:l}}function b(r,s,n){let c=s?.name??r.slice(0,w),p=s?.registerFunctionSelectors??!0,l=s?.openAccess??!0,i=[],a=[],m=s&&!s.openAccess?s.accessList:[];for(let t of m)if(t.startsWith(\"0x\"))i.push(t);else{if(n&&!n.includes(t))throw f([\"systems\",r,\"accessList\"],t);a.push(t)}return{name:c,registerFunctionSelectors:p,openAccess:l,accessListAddresses:i,accessListSystems:a}}import{z as e}from\"zod\";import{DynamicResolutionType as A,zEthereumAddress as L,zObjectName as S,zSelector as C}from\"@latticexyz/config\";var y=S,h=S,z=e.array(y.or(L)).default(d.accessList),v=e.intersection(e.object({name:C.optional(),registerFunctionSelectors:e.boolean().default(d.registerFunctionSelector)}),e.discriminatedUnion(\"openAccess\",[e.object({openAccess:e.literal(!0).default(d.openAccess)}),e.object({openAccess:e.literal(!1),accessList:z})])),x=e.object({value:e.union([e.string(),e.number(),e.instanceof(Uint8Array)]),type:e.string()}),E=e.object({type:e.nativeEnum(A),input:e.string()}),N=e.object({name:h,root:e.boolean().default(!1),args:e.array(e.union([x,E])).default([])}),T=e.object({worldContractName:e.string().optional(),worldInterfaceName:e.string().default(o.worldInterfaceName),systems:e.record(y,v).default(o.systems),excludeSystems:e.array(y).default(o.excludeSystems),postDeployScript:e.string().default(o.postDeployScript),deploysDirectory:e.string().default(o.deploysDirectory),worldsFile:e.string().default(o.worldsFile),worldgenDirectory:e.string().default(o.worldgenDirectory),worldImportPath:e.string().default(o.worldImportPath),modules:e.array(N).default(o.modules)}),M=T.catchall(e.any());export{d as a,o as b,R as c,b as d,T as e,M as f};\n//# sourceMappingURL=chunk-JOQBBVRS.js.map","import{f as e}from\"./chunk-JOQBBVRS.js\";import\"@latticexyz/store/register\";import{mudConfig as c,mudCoreConfig as C,resolveTableId as g}from\"@latticexyz/store/register\";import{extendMUDCoreConfig as t,fromZodErrorCustom as i}from\"@latticexyz/config\";import{ZodError as s}from\"zod\";t(r=>{try{return e.parse(r)}catch(o){throw o instanceof s?i(o,\"WorldConfig Validation Error\"):o}});import\"@latticexyz/store/register\";export{c as a,C as b,g as c};\n//# sourceMappingURL=chunk-24XAL2ND.js.map","import{a as e}from\"./chunk-24XAL2ND.js\";import\"./chunk-OWSPJIEF.js\";import\"./chunk-JOQBBVRS.js\";var t=e({worldImportPath:\"../\",worldgenDirectory:\"interfaces\",worldInterfaceName:\"IBaseWorld\",codegenDirectory:\"\",tables:{NamespaceOwner:{keySchema:{namespace:\"bytes16\"},schema:{owner:\"address\"}},ResourceAccess:{keySchema:{resourceSelector:\"bytes32\",caller:\"address\"},schema:{access:\"bool\"}},InstalledModules:{keySchema:{moduleName:\"bytes16\",argumentsHash:\"bytes32\"},schema:{moduleAddress:\"address\"},dataStruct:!0},Systems:{directory:\"modules/core/tables\",keySchema:{resourceSelector:\"bytes32\"},schema:{system:\"address\",publicAccess:\"bool\"},dataStruct:!1},SystemRegistry:{directory:\"modules/core/tables\",keySchema:{system:\"address\"},schema:{resourceSelector:\"bytes32\"}},SystemHooks:{directory:\"modules/core/tables\",keySchema:{resourceSelector:\"bytes32\"},schema:\"address[]\"},ResourceType:{directory:\"modules/core/tables\",keySchema:{resourceSelector:\"bytes32\"},schema:{resourceType:\"Resource\"}},FunctionSelectors:{directory:\"modules/core/tables\",keySchema:{functionSelector:\"bytes4\"},schema:{resourceSelector:\"bytes32\",systemFunctionSelector:\"bytes4\"},dataStruct:!1},KeysWithValue:{directory:\"modules/keyswithvalue/tables\",keySchema:{valueHash:\"bytes32\"},schema:{keysWithValue:\"bytes32[]\"},tableIdArgument:!0},KeysInTable:{directory:\"modules/keysintable/tables\",keySchema:{sourceTable:\"bytes32\"},schema:{keys0:\"bytes32[]\",keys1:\"bytes32[]\",keys2:\"bytes32[]\",keys3:\"bytes32[]\",keys4:\"bytes32[]\"}},UsedKeysIndex:{directory:\"modules/keysintable/tables\",keySchema:{sourceTable:\"bytes32\",keysHash:\"bytes32\"},schema:{has:\"bool\",index:\"uint40\"},dataStruct:!1},UniqueEntity:{directory:\"modules/uniqueentity/tables\",keySchema:{},schema:\"uint256\",tableIdArgument:!0,storeArgument:!0},Bool:{directory:\"../test/tables\",keySchema:{},schema:{value:\"bool\"},tableIdArgument:!0},AddressArray:{directory:\"../test/tables\",schema:\"address[]\",tableIdArgument:!0}},enums:{Resource:[\"NONE\",\"NAMESPACE\",\"TABLE\",\"SYSTEM\"]},excludeSystems:[\"UniqueEntitySystem\",\"StoreRegistrationSystem\",\"EphemeralRecordSystem\"]});export{t as default};\n//# sourceMappingURL=mud.config.js.map","import{a as l,b as d}from\"../chunk-IH5UMM4B.js\";import{a as B}from\"../chunk-SNWOSPCV.js\";import\"../chunk-A2BQSIM3.js\";import{decodeAbiParameters as W}from\"viem\";import{sliceHex as w,size as V,isHex as M}from\"viem\";function T(e){if(!M(e))throw new Error(`entity ${e} is not a hex string`);let i=V(e);if(i%32!==0)throw new Error(`entity length ${i} is not a multiple of 32 bytes`);return new Array(i/32).fill(0).map((r,n)=>w(e,n*32,(n+1)*32))}function ot(e,i){let r=T(i);if(r.length!==Object.keys(e).length)throw new Error(`entity key tuple length ${r.length} does not match key schema length ${Object.keys(e).length}`);return Object.fromEntries(Object.entries(e).map(([n,a],o)=>[n,W([{type:a}],r[o])[0]]))}import{encodeAbiParameters as L}from\"viem\";import{concatHex as D}from\"viem\";function c(e){return D(e)}function u(e,i){if(Object.keys(e).length!==Object.keys(i).length)throw new Error(`key length ${Object.keys(i).length} does not match key schema length ${Object.keys(e).length}`);return c(Object.entries(e).map(([r,n])=>L([{type:n}],[i[r]])))}function ut(e){return e.metadata?.componentName!=null&&e.metadata?.tableName!=null&&e.metadata?.keySchema!=null&&e.metadata?.valueSchema!=null}var g=B.extend(\"recs\");import{getComponentValue as h,removeComponent as z,setComponent as x,updateComponent as F}from\"@latticexyz/recs\";import{isDefined as _}from\"@latticexyz/common/utils\";import{stringToHex as C}from\"viem\";function b(e){return u({address:\"address\",namespace:\"bytes16\",name:\"bytes16\"},{address:e.address,namespace:C(e.namespace,{size:16}),name:C(e.name,{size:16})})}import{tableIdToHex as q}from\"@latticexyz/common\";function R({components:e}){let i=Object.fromEntries(Object.entries(e).map(([r,n])=>[n.id,n]));return{async registerTables({tables:r}){for(let n of r)x(e.RegisteredTables,b(n),{table:n})},async getTables({tables:r}){return r.map(n=>h(e.RegisteredTables,b(n))?.table).filter(_)},async storeOperations({operations:r}){for(let n of r){let a=h(e.RegisteredTables,b({address:n.address,namespace:n.namespace,name:n.name}))?.table;if(!a){g(`skipping update for unknown table: ${n.namespace}:${n.name} at ${n.address}`);continue}let o=q(n.namespace,n.name),m=i[o];if(!m){g(`skipping update for unknown component: ${o}. Available components: ${Object.keys(e)}`);continue}let s=u(a.keySchema,n.key);n.type===\"SetRecord\"?(g(\"setting component\",o,s,n.value),x(m,s,n.value)):n.type===\"SetField\"?(g(\"updating component\",o,s,{[n.fieldName]:n.fieldValue}),F(m,s,{[n.fieldName]:n.fieldValue},l(a.valueSchema))):n.type===\"DeleteRecord\"&&(g(\"deleting component\",o,s),z(m,s))}}}}var f=c([]);import{getComponentValue as Q,setComponent as U}from\"@latticexyz/recs\";import{defineComponent as E,Type as y}from\"@latticexyz/recs\";function N(e){return{RegisteredTables:E(e,{table:y.T},{metadata:{componentName:\"RegisteredTables\"}}),SyncProgress:E(e,{step:y.String,message:y.String,percentage:y.Number,latestBlockNumber:y.BigInt,lastBlockNumberProcessed:y.BigInt},{metadata:{componentName:\"SyncProgress\"}})}}import X from\"@latticexyz/store/mud.config\";import Y from\"@latticexyz/world/mud.config\";import{tableIdToHex as G}from\"@latticexyz/common\";import{defineComponent as J}from\"@latticexyz/recs\";import{Type as t}from\"@latticexyz/recs\";var O={uint8:t.Number,uint16:t.Number,uint24:t.Number,uint32:t.Number,uint40:t.Number,uint48:t.Number,uint56:t.BigInt,uint64:t.BigInt,uint72:t.BigInt,uint80:t.BigInt,uint88:t.BigInt,uint96:t.BigInt,uint104:t.BigInt,uint112:t.BigInt,uint120:t.BigInt,uint128:t.BigInt,uint136:t.BigInt,uint144:t.BigInt,uint152:t.BigInt,uint160:t.BigInt,uint168:t.BigInt,uint176:t.BigInt,uint184:t.BigInt,uint192:t.BigInt,uint200:t.BigInt,uint208:t.BigInt,uint216:t.BigInt,uint224:t.BigInt,uint232:t.BigInt,uint240:t.BigInt,uint248:t.BigInt,uint256:t.BigInt,int8:t.Number,int16:t.Number,int24:t.Number,int32:t.Number,int40:t.Number,int48:t.Number,int56:t.BigInt,int64:t.BigInt,int72:t.BigInt,int80:t.BigInt,int88:t.BigInt,int96:t.BigInt,int104:t.BigInt,int112:t.BigInt,int120:t.BigInt,int128:t.BigInt,int136:t.BigInt,int144:t.BigInt,int152:t.BigInt,int160:t.BigInt,int168:t.BigInt,int176:t.BigInt,int184:t.BigInt,int192:t.BigInt,int200:t.BigInt,int208:t.BigInt,int216:t.BigInt,int224:t.BigInt,int232:t.BigInt,int240:t.BigInt,int248:t.BigInt,int256:t.BigInt,bytes1:t.String,bytes2:t.String,bytes3:t.String,bytes4:t.String,bytes5:t.String,bytes6:t.String,bytes7:t.String,bytes8:t.String,bytes9:t.String,bytes10:t.String,bytes11:t.String,bytes12:t.String,bytes13:t.String,bytes14:t.String,bytes15:t.String,bytes16:t.String,bytes17:t.String,bytes18:t.String,bytes19:t.String,bytes20:t.String,bytes21:t.String,bytes22:t.String,bytes23:t.String,bytes24:t.String,bytes25:t.String,bytes26:t.String,bytes27:t.String,bytes28:t.String,bytes29:t.String,bytes30:t.String,bytes31:t.String,bytes32:t.String,bool:t.Boolean,address:t.String,\"uint8[]\":t.NumberArray,\"uint16[]\":t.NumberArray,\"uint24[]\":t.NumberArray,\"uint32[]\":t.NumberArray,\"uint40[]\":t.NumberArray,\"uint48[]\":t.NumberArray,\"uint56[]\":t.BigIntArray,\"uint64[]\":t.BigIntArray,\"uint72[]\":t.BigIntArray,\"uint80[]\":t.BigIntArray,\"uint88[]\":t.BigIntArray,\"uint96[]\":t.BigIntArray,\"uint104[]\":t.BigIntArray,\"uint112[]\":t.BigIntArray,\"uint120[]\":t.BigIntArray,\"uint128[]\":t.BigIntArray,\"uint136[]\":t.BigIntArray,\"uint144[]\":t.BigIntArray,\"uint152[]\":t.BigIntArray,\"uint160[]\":t.BigIntArray,\"uint168[]\":t.BigIntArray,\"uint176[]\":t.BigIntArray,\"uint184[]\":t.BigIntArray,\"uint192[]\":t.BigIntArray,\"uint200[]\":t.BigIntArray,\"uint208[]\":t.BigIntArray,\"uint216[]\":t.BigIntArray,\"uint224[]\":t.BigIntArray,\"uint232[]\":t.BigIntArray,\"uint240[]\":t.BigIntArray,\"uint248[]\":t.BigIntArray,\"uint256[]\":t.BigIntArray,\"int8[]\":t.NumberArray,\"int16[]\":t.NumberArray,\"int24[]\":t.NumberArray,\"int32[]\":t.NumberArray,\"int40[]\":t.NumberArray,\"int48[]\":t.NumberArray,\"int56[]\":t.BigIntArray,\"int64[]\":t.BigIntArray,\"int72[]\":t.BigIntArray,\"int80[]\":t.BigIntArray,\"int88[]\":t.BigIntArray,\"int96[]\":t.BigIntArray,\"int104[]\":t.BigIntArray,\"int112[]\":t.BigIntArray,\"int120[]\":t.BigIntArray,\"int128[]\":t.BigIntArray,\"int136[]\":t.BigIntArray,\"int144[]\":t.BigIntArray,\"int152[]\":t.BigIntArray,\"int160[]\":t.BigIntArray,\"int168[]\":t.BigIntArray,\"int176[]\":t.BigIntArray,\"int184[]\":t.BigIntArray,\"int192[]\":t.BigIntArray,\"int200[]\":t.BigIntArray,\"int208[]\":t.BigIntArray,\"int216[]\":t.BigIntArray,\"int224[]\":t.BigIntArray,\"int232[]\":t.BigIntArray,\"int240[]\":t.BigIntArray,\"int248[]\":t.BigIntArray,\"int256[]\":t.BigIntArray,\"bytes1[]\":t.StringArray,\"bytes2[]\":t.StringArray,\"bytes3[]\":t.StringArray,\"bytes4[]\":t.StringArray,\"bytes5[]\":t.StringArray,\"bytes6[]\":t.StringArray,\"bytes7[]\":t.StringArray,\"bytes8[]\":t.StringArray,\"bytes9[]\":t.StringArray,\"bytes10[]\":t.StringArray,\"bytes11[]\":t.StringArray,\"bytes12[]\":t.StringArray,\"bytes13[]\":t.StringArray,\"bytes14[]\":t.StringArray,\"bytes15[]\":t.StringArray,\"bytes16[]\":t.StringArray,\"bytes17[]\":t.StringArray,\"bytes18[]\":t.StringArray,\"bytes19[]\":t.StringArray,\"bytes20[]\":t.StringArray,\"bytes21[]\":t.StringArray,\"bytes22[]\":t.StringArray,\"bytes23[]\":t.StringArray,\"bytes24[]\":t.StringArray,\"bytes25[]\":t.StringArray,\"bytes26[]\":t.StringArray,\"bytes27[]\":t.StringArray,\"bytes28[]\":t.StringArray,\"bytes29[]\":t.StringArray,\"bytes30[]\":t.StringArray,\"bytes31[]\":t.StringArray,\"bytes32[]\":t.StringArray,\"bool[]\":t.T,\"address[]\":t.StringArray,bytes:t.String,string:t.String};function S(e,i){return Object.fromEntries(Object.entries(i.tables).map(([r,n])=>[r,J(e,Object.fromEntries(Object.entries(n.schema).map(([a,o])=>[a,O[o]])),{id:G(i.namespace,r),metadata:{componentName:r,tableName:`${i.namespace}:${r}`,keySchema:n.keySchema,valueSchema:n.schema}})]))}async function ae({world:e,config:i,address:r,publicClient:n,startBlock:a,maxBlockRange:o,initialState:m,indexerUrl:s,startSync:k=!0}){let p={...S(e,i),...S(e,X),...S(e,Y),...N(e)};e.registerEntity({id:f});let A=await d({storageAdapter:R({components:p,config:i}),config:i,address:r,publicClient:n,startBlock:a,maxBlockRange:o,indexerUrl:s,initialState:m,onProgress:({step:H,percentage:P,latestBlockNumber:v,lastBlockNumberProcessed:$,message:K})=>{Q(p.SyncProgress,f)?.step!==\"live\"&&U(p.SyncProgress,f,{step:H,percentage:P,latestBlockNumber:v,lastBlockNumberProcessed:$,message:K})}}),j=k?A.blockStorageOperations$.subscribe():null,I=()=>{j?.unsubscribe()};return e.registerDisposer(I),{...A,components:p,stopSync:I}}export{ot as decodeEntity,u as encodeEntity,T as entityToHexKeyTuple,c as hexKeyTupleToEntity,ut as isStoreComponent,R as recsStorage,f as singletonEntity,ae as syncToRecs};\n//# sourceMappingURL=index.js.map","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","import React from 'react';\nimport { isFragment } from 'react-is';\nexport default function toArray(children) {\n var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var ret = [];\n React.Children.forEach(children, function (child) {\n if ((child === undefined || child === null) && !option.keepEmpty) {\n return;\n }\n if (Array.isArray(child)) {\n ret = ret.concat(toArray(child));\n } else if (isFragment(child) && child.props) {\n ret = ret.concat(toArray(child.props.children, option));\n } else {\n ret.push(child);\n }\n });\n return ret;\n}","/* eslint-disable no-console */\nvar warned = {};\nvar preWarningFns = [];\n\n/**\n * Pre warning enable you to parse content before console.error.\n * Modify to null will prevent warning.\n */\nexport var preMessage = function preMessage(fn) {\n preWarningFns.push(fn);\n};\nexport function warning(valid, message) {\n // Support uglify\n if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'warning');\n }, message);\n if (finalMessage) {\n console.error(\"Warning: \".concat(finalMessage));\n }\n }\n}\nexport function note(valid, message) {\n // Support uglify\n if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {\n var finalMessage = preWarningFns.reduce(function (msg, preMessageFn) {\n return preMessageFn(msg !== null && msg !== void 0 ? msg : '', 'note');\n }, message);\n if (finalMessage) {\n console.warn(\"Note: \".concat(finalMessage));\n }\n }\n}\nexport function resetWarned() {\n warned = {};\n}\nexport function call(method, valid, message) {\n if (!valid && !warned[message]) {\n method(false, message);\n warned[message] = true;\n }\n}\nexport function warningOnce(valid, message) {\n call(warning, valid, message);\n}\nexport function noteOnce(valid, message) {\n call(note, valid, message);\n}\nwarningOnce.preMessage = preMessage;\nwarningOnce.resetWarned = resetWarned;\nwarningOnce.noteOnce = noteOnce;\nexport default warningOnce;\n/* eslint-enable */","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n}\nexport default function _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n}","import * as React from 'react';\nexport default function useMemo(getValue, condition, shouldUpdate) {\n var cacheRef = React.useRef({});\n if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {\n cacheRef.current.value = getValue();\n cacheRef.current.condition = condition;\n }\n return cacheRef.current.value;\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\n/* eslint-disable no-param-reassign */\n\nimport { isValidElement } from 'react';\nimport { isFragment, isMemo } from 'react-is';\nimport useMemo from \"./hooks/useMemo\";\nexport function fillRef(ref, node) {\n if (typeof ref === 'function') {\n ref(node);\n } else if (_typeof(ref) === 'object' && ref && 'current' in ref) {\n ref.current = node;\n }\n}\n\n/**\n * Merge refs into one ref function to support ref passing.\n */\nexport function composeRef() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n var refList = refs.filter(function (ref) {\n return ref;\n });\n if (refList.length <= 1) {\n return refList[0];\n }\n return function (node) {\n refs.forEach(function (ref) {\n fillRef(ref, node);\n });\n };\n}\nexport function useComposeRef() {\n for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n refs[_key2] = arguments[_key2];\n }\n return useMemo(function () {\n return composeRef.apply(void 0, refs);\n }, refs, function (prev, next) {\n return prev.length !== next.length || prev.every(function (ref, i) {\n return ref !== next[i];\n });\n });\n}\nexport function supportRef(nodeOrComponent) {\n var _type$prototype, _nodeOrComponent$prot;\n var type = isMemo(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;\n\n // Function component node\n if (typeof type === 'function' && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render)) {\n return false;\n }\n\n // Class component\n if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render)) {\n return false;\n }\n return true;\n}\nexport function supportNodeRef(node) {\n if (! /*#__PURE__*/isValidElement(node)) {\n return false;\n }\n if (isFragment(node)) {\n return false;\n }\n return supportRef(node);\n}\n/* eslint-enable */","/**\n * @license React\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';function f(a,b){var c=a.length;a.push(b);a:for(;0>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}\nfunction Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);\nfunction Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];\nfunction Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}\nfunction Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}\nfunction ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}\nfunction Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,\n4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=\nci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,\nf,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Uh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),\nnull;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;\nfunction Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}\nfunction Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}\nfunction Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}\nfunction ak(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;\nZj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}\nfunction ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;\nWk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\nhj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}\nfunction al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction $k(a){if(\"function\"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction yh(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)bj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3 arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","var raf = function raf(callback) {\n return +setTimeout(callback, 16);\n};\nvar caf = function caf(num) {\n return clearTimeout(num);\n};\nif (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {\n raf = function raf(callback) {\n return window.requestAnimationFrame(callback);\n };\n caf = function caf(handle) {\n return window.cancelAnimationFrame(handle);\n };\n}\nvar rafUUID = 0;\nvar rafIds = new Map();\nfunction cleanup(id) {\n rafIds.delete(id);\n}\nvar wrapperRaf = function wrapperRaf(callback) {\n var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n rafUUID += 1;\n var id = rafUUID;\n function callRef(leftTimes) {\n if (leftTimes === 0) {\n // Clean up\n cleanup(id);\n\n // Trigger\n callback();\n } else {\n // Next raf\n var realId = raf(function () {\n callRef(leftTimes - 1);\n });\n\n // Bind real raf id\n rafIds.set(id, realId);\n }\n }\n callRef(times);\n return id;\n};\nwrapperRaf.cancel = function (id) {\n var realId = rafIds.get(id);\n cleanup(realId);\n return caf(realId);\n};\nexport default wrapperRaf;","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport default murmur2;\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport warning from \"./warning\";\n\n/**\n * Deeply compares two object literals.\n * @param obj1 object 1\n * @param obj2 object 2\n * @param shallow shallow compare\n * @returns\n */\nfunction isEqual(obj1, obj2) {\n var shallow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n // https://github.com/mapbox/mapbox-gl-js/pull/5979/files#diff-fde7145050c47cc3a306856efd5f9c3016e86e859de9afbd02c879be5067e58f\n var refSet = new Set();\n function deepEqual(a, b) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var circular = refSet.has(a);\n warning(!circular, 'Warning: There may be circular references');\n if (circular) {\n return false;\n }\n if (a === b) {\n return true;\n }\n if (shallow && level > 1) {\n return false;\n }\n refSet.add(a);\n var newLevel = level + 1;\n if (Array.isArray(a)) {\n if (!Array.isArray(b) || a.length !== b.length) {\n return false;\n }\n for (var i = 0; i < a.length; i++) {\n if (!deepEqual(a[i], b[i], newLevel)) {\n return false;\n }\n }\n return true;\n }\n if (a && b && _typeof(a) === 'object' && _typeof(b) === 'object') {\n var keys = Object.keys(a);\n if (keys.length !== Object.keys(b).length) {\n return false;\n }\n return keys.every(function (key) {\n return deepEqual(a[key], b[key], newLevel);\n });\n }\n // other\n return false;\n }\n return deepEqual(obj1, obj2);\n}\nexport default isEqual;","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n// [times, realValue]\n\nvar SPLIT = '%';\nvar Entity = /*#__PURE__*/function () {\n function Entity(instanceId) {\n _classCallCheck(this, Entity);\n _defineProperty(this, \"instanceId\", void 0);\n /** @private Internal cache map. Do not access this directly */\n _defineProperty(this, \"cache\", new Map());\n this.instanceId = instanceId;\n }\n _createClass(Entity, [{\n key: \"get\",\n value: function get(keys) {\n return this.cache.get(keys.join(SPLIT)) || null;\n }\n }, {\n key: \"update\",\n value: function update(keys, valueFn) {\n var path = keys.join(SPLIT);\n var prevValue = this.cache.get(path);\n var nextValue = valueFn(prevValue);\n if (nextValue === null) {\n this.cache.delete(path);\n } else {\n this.cache.set(path, nextValue);\n }\n }\n }]);\n return Entity;\n}();\nexport default Entity;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport useMemo from \"rc-util/es/hooks/useMemo\";\nimport isEqual from \"rc-util/es/isEqual\";\nimport * as React from 'react';\nimport CacheEntity from \"./Cache\";\nexport var ATTR_TOKEN = 'data-token-hash';\nexport var ATTR_MARK = 'data-css-hash';\nexport var ATTR_CACHE_PATH = 'data-cache-path';\n\n// Mark css-in-js instance in style element\nexport var CSS_IN_JS_INSTANCE = '__cssinjs_instance__';\nexport function createCache() {\n var cssinjsInstanceId = Math.random().toString(12).slice(2);\n\n // Tricky SSR: Move all inline style to the head.\n // PS: We do not recommend tricky mode.\n if (typeof document !== 'undefined' && document.head && document.body) {\n var styles = document.body.querySelectorAll(\"style[\".concat(ATTR_MARK, \"]\")) || [];\n var firstChild = document.head.firstChild;\n Array.from(styles).forEach(function (style) {\n style[CSS_IN_JS_INSTANCE] = style[CSS_IN_JS_INSTANCE] || cssinjsInstanceId;\n\n // Not force move if no head\n if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {\n document.head.insertBefore(style, firstChild);\n }\n });\n\n // Deduplicate of moved styles\n var styleHash = {};\n Array.from(document.querySelectorAll(\"style[\".concat(ATTR_MARK, \"]\"))).forEach(function (style) {\n var hash = style.getAttribute(ATTR_MARK);\n if (styleHash[hash]) {\n if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {\n var _style$parentNode;\n (_style$parentNode = style.parentNode) === null || _style$parentNode === void 0 ? void 0 : _style$parentNode.removeChild(style);\n }\n } else {\n styleHash[hash] = true;\n }\n });\n }\n return new CacheEntity(cssinjsInstanceId);\n}\nvar StyleContext = /*#__PURE__*/React.createContext({\n hashPriority: 'low',\n cache: createCache(),\n defaultCache: true\n});\nexport var StyleProvider = function StyleProvider(props) {\n var children = props.children,\n restProps = _objectWithoutProperties(props, _excluded);\n var parentContext = React.useContext(StyleContext);\n var context = useMemo(function () {\n var mergedContext = _objectSpread({}, parentContext);\n Object.keys(restProps).forEach(function (key) {\n var value = restProps[key];\n if (restProps[key] !== undefined) {\n mergedContext[key] = value;\n }\n });\n var cache = restProps.cache;\n mergedContext.cache = mergedContext.cache || createCache();\n mergedContext.defaultCache = !cache && parentContext.defaultCache;\n return mergedContext;\n }, [parentContext, restProps], function (prev, next) {\n return !isEqual(prev[0], next[0], true) || !isEqual(prev[1], next[1], true);\n });\n return /*#__PURE__*/React.createElement(StyleContext.Provider, {\n value: context\n }, children);\n};\nexport default StyleContext;","export default function canUseDom() {\n return !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n}","export default function contains(root, n) {\n if (!root) {\n return false;\n }\n\n // Use native if support\n if (root.contains) {\n return root.contains(n);\n }\n\n // `document.contains` not support with IE11\n var node = n;\n while (node) {\n if (node === root) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}","import canUseDom from \"./canUseDom\";\nimport contains from \"./contains\";\nvar APPEND_ORDER = 'data-rc-order';\nvar APPEND_PRIORITY = 'data-rc-priority';\nvar MARK_KEY = \"rc-util-key\";\nvar containerCache = new Map();\nfunction getMark() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n mark = _ref.mark;\n if (mark) {\n return mark.startsWith('data-') ? mark : \"data-\".concat(mark);\n }\n return MARK_KEY;\n}\nfunction getContainer(option) {\n if (option.attachTo) {\n return option.attachTo;\n }\n var head = document.querySelector('head');\n return head || document.body;\n}\nfunction getOrder(prepend) {\n if (prepend === 'queue') {\n return 'prependQueue';\n }\n return prepend ? 'prepend' : 'append';\n}\n\n/**\n * Find style which inject by rc-util\n */\nfunction findStyles(container) {\n return Array.from((containerCache.get(container) || container).children).filter(function (node) {\n return node.tagName === 'STYLE';\n });\n}\nexport function injectCSS(css) {\n var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!canUseDom()) {\n return null;\n }\n var csp = option.csp,\n prepend = option.prepend,\n _option$priority = option.priority,\n priority = _option$priority === void 0 ? 0 : _option$priority;\n var mergedOrder = getOrder(prepend);\n var isPrependQueue = mergedOrder === 'prependQueue';\n var styleNode = document.createElement('style');\n styleNode.setAttribute(APPEND_ORDER, mergedOrder);\n if (isPrependQueue && priority) {\n styleNode.setAttribute(APPEND_PRIORITY, \"\".concat(priority));\n }\n if (csp !== null && csp !== void 0 && csp.nonce) {\n styleNode.nonce = csp === null || csp === void 0 ? void 0 : csp.nonce;\n }\n styleNode.innerHTML = css;\n var container = getContainer(option);\n var firstChild = container.firstChild;\n if (prepend) {\n // If is queue `prepend`, it will prepend first style and then append rest style\n if (isPrependQueue) {\n var existStyle = findStyles(container).filter(function (node) {\n // Ignore style which not injected by rc-util with prepend\n if (!['prepend', 'prependQueue'].includes(node.getAttribute(APPEND_ORDER))) {\n return false;\n }\n\n // Ignore style which priority less then new style\n var nodePriority = Number(node.getAttribute(APPEND_PRIORITY) || 0);\n return priority >= nodePriority;\n });\n if (existStyle.length) {\n container.insertBefore(styleNode, existStyle[existStyle.length - 1].nextSibling);\n return styleNode;\n }\n }\n\n // Use `insertBefore` as `prepend`\n container.insertBefore(styleNode, firstChild);\n } else {\n container.appendChild(styleNode);\n }\n return styleNode;\n}\nfunction findExistNode(key) {\n var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var container = getContainer(option);\n return findStyles(container).find(function (node) {\n return node.getAttribute(getMark(option)) === key;\n });\n}\nexport function removeCSS(key) {\n var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var existNode = findExistNode(key, option);\n if (existNode) {\n var container = getContainer(option);\n container.removeChild(existNode);\n }\n}\n\n/**\n * qiankun will inject `appendChild` to insert into other\n */\nfunction syncRealContainer(container, option) {\n var cachedRealContainer = containerCache.get(container);\n\n // Find real container when not cached or cached container removed\n if (!cachedRealContainer || !contains(document, cachedRealContainer)) {\n var placeholderStyle = injectCSS('', option);\n var parentNode = placeholderStyle.parentNode;\n containerCache.set(container, parentNode);\n container.removeChild(placeholderStyle);\n }\n}\n\n/**\n * manually clear container cache to avoid global cache in unit testes\n */\nexport function clearContainerCache() {\n containerCache.clear();\n}\nexport function updateCSS(css, key) {\n var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var container = getContainer(option);\n\n // Sync real parent\n syncRealContainer(container, option);\n var existNode = findExistNode(key, option);\n if (existNode) {\n var _option$csp, _option$csp2;\n if ((_option$csp = option.csp) !== null && _option$csp !== void 0 && _option$csp.nonce && existNode.nonce !== ((_option$csp2 = option.csp) === null || _option$csp2 === void 0 ? void 0 : _option$csp2.nonce)) {\n var _option$csp3;\n existNode.nonce = (_option$csp3 = option.csp) === null || _option$csp3 === void 0 ? void 0 : _option$csp3.nonce;\n }\n if (existNode.innerHTML !== css) {\n existNode.innerHTML = css;\n }\n return existNode;\n }\n var newNode = injectCSS(css, option);\n newNode.setAttribute(getMark(option), key);\n return newNode;\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n// ================================== Cache ==================================\n\nexport function sameDerivativeOption(left, right) {\n if (left.length !== right.length) {\n return false;\n }\n for (var i = 0; i < left.length; i++) {\n if (left[i] !== right[i]) {\n return false;\n }\n }\n return true;\n}\nvar ThemeCache = /*#__PURE__*/function () {\n function ThemeCache() {\n _classCallCheck(this, ThemeCache);\n _defineProperty(this, \"cache\", void 0);\n _defineProperty(this, \"keys\", void 0);\n _defineProperty(this, \"cacheCallTimes\", void 0);\n this.cache = new Map();\n this.keys = [];\n this.cacheCallTimes = 0;\n }\n _createClass(ThemeCache, [{\n key: \"size\",\n value: function size() {\n return this.keys.length;\n }\n }, {\n key: \"internalGet\",\n value: function internalGet(derivativeOption) {\n var _cache2, _cache3;\n var updateCallTimes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var cache = {\n map: this.cache\n };\n derivativeOption.forEach(function (derivative) {\n if (!cache) {\n cache = undefined;\n } else {\n var _cache, _cache$map;\n cache = (_cache = cache) === null || _cache === void 0 ? void 0 : (_cache$map = _cache.map) === null || _cache$map === void 0 ? void 0 : _cache$map.get(derivative);\n }\n });\n if ((_cache2 = cache) !== null && _cache2 !== void 0 && _cache2.value && updateCallTimes) {\n cache.value[1] = this.cacheCallTimes++;\n }\n return (_cache3 = cache) === null || _cache3 === void 0 ? void 0 : _cache3.value;\n }\n }, {\n key: \"get\",\n value: function get(derivativeOption) {\n var _this$internalGet;\n return (_this$internalGet = this.internalGet(derivativeOption, true)) === null || _this$internalGet === void 0 ? void 0 : _this$internalGet[0];\n }\n }, {\n key: \"has\",\n value: function has(derivativeOption) {\n return !!this.internalGet(derivativeOption);\n }\n }, {\n key: \"set\",\n value: function set(derivativeOption, value) {\n var _this = this;\n // New cache\n if (!this.has(derivativeOption)) {\n if (this.size() + 1 > ThemeCache.MAX_CACHE_SIZE + ThemeCache.MAX_CACHE_OFFSET) {\n var _this$keys$reduce = this.keys.reduce(function (result, key) {\n var _result = _slicedToArray(result, 2),\n callTimes = _result[1];\n if (_this.internalGet(key)[1] < callTimes) {\n return [key, _this.internalGet(key)[1]];\n }\n return result;\n }, [this.keys[0], this.cacheCallTimes]),\n _this$keys$reduce2 = _slicedToArray(_this$keys$reduce, 1),\n targetKey = _this$keys$reduce2[0];\n this.delete(targetKey);\n }\n this.keys.push(derivativeOption);\n }\n var cache = this.cache;\n derivativeOption.forEach(function (derivative, index) {\n if (index === derivativeOption.length - 1) {\n cache.set(derivative, {\n value: [value, _this.cacheCallTimes++]\n });\n } else {\n var cacheValue = cache.get(derivative);\n if (!cacheValue) {\n cache.set(derivative, {\n map: new Map()\n });\n } else if (!cacheValue.map) {\n cacheValue.map = new Map();\n }\n cache = cache.get(derivative).map;\n }\n });\n }\n }, {\n key: \"deleteByPath\",\n value: function deleteByPath(currentCache, derivatives) {\n var cache = currentCache.get(derivatives[0]);\n if (derivatives.length === 1) {\n var _cache$value;\n if (!cache.map) {\n currentCache.delete(derivatives[0]);\n } else {\n currentCache.set(derivatives[0], {\n map: cache.map\n });\n }\n return (_cache$value = cache.value) === null || _cache$value === void 0 ? void 0 : _cache$value[0];\n }\n var result = this.deleteByPath(cache.map, derivatives.slice(1));\n if ((!cache.map || cache.map.size === 0) && !cache.value) {\n currentCache.delete(derivatives[0]);\n }\n return result;\n }\n }, {\n key: \"delete\",\n value: function _delete(derivativeOption) {\n // If cache exists\n if (this.has(derivativeOption)) {\n this.keys = this.keys.filter(function (item) {\n return !sameDerivativeOption(item, derivativeOption);\n });\n return this.deleteByPath(this.cache, derivativeOption);\n }\n return undefined;\n }\n }]);\n return ThemeCache;\n}();\n_defineProperty(ThemeCache, \"MAX_CACHE_SIZE\", 20);\n_defineProperty(ThemeCache, \"MAX_CACHE_OFFSET\", 5);\nexport { ThemeCache as default };","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { warning } from \"rc-util/es/warning\";\nvar uuid = 0;\n\n/**\n * Theme with algorithms to derive tokens from design tokens.\n * Use `createTheme` first which will help to manage the theme instance cache.\n */\nvar Theme = /*#__PURE__*/function () {\n function Theme(derivatives) {\n _classCallCheck(this, Theme);\n _defineProperty(this, \"derivatives\", void 0);\n _defineProperty(this, \"id\", void 0);\n this.derivatives = Array.isArray(derivatives) ? derivatives : [derivatives];\n this.id = uuid;\n if (derivatives.length === 0) {\n warning(derivatives.length > 0, '[Ant Design CSS-in-JS] Theme should have at least one derivative function.');\n }\n uuid += 1;\n }\n _createClass(Theme, [{\n key: \"getDerivativeToken\",\n value: function getDerivativeToken(token) {\n return this.derivatives.reduce(function (result, derivative) {\n return derivative(token, result);\n }, undefined);\n }\n }]);\n return Theme;\n}();\nexport { Theme as default };","import ThemeCache from \"./ThemeCache\";\nimport Theme from \"./Theme\";\nvar cacheThemes = new ThemeCache();\n\n/**\n * Same as new Theme, but will always return same one if `derivative` not changed.\n */\nexport default function createTheme(derivatives) {\n var derivativeArr = Array.isArray(derivatives) ? derivatives : [derivatives];\n // Create new theme if not exist\n if (!cacheThemes.has(derivativeArr)) {\n cacheThemes.set(derivativeArr, new Theme(derivativeArr));\n }\n\n // Get theme from cache and return\n return cacheThemes.get(derivativeArr);\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport hash from '@emotion/hash';\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport { removeCSS, updateCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport { Theme } from \"./theme\";\n\n// Create a cache for memo concat\n\nvar resultCache = new WeakMap();\nvar RESULT_VALUE = {};\nexport function memoResult(callback, deps) {\n var current = resultCache;\n for (var i = 0; i < deps.length; i += 1) {\n var dep = deps[i];\n if (!current.has(dep)) {\n current.set(dep, new WeakMap());\n }\n current = current.get(dep);\n }\n if (!current.has(RESULT_VALUE)) {\n current.set(RESULT_VALUE, callback());\n }\n return current.get(RESULT_VALUE);\n}\n\n// Create a cache here to avoid always loop generate\nvar flattenTokenCache = new WeakMap();\n\n/**\n * Flatten token to string, this will auto cache the result when token not change\n */\nexport function flattenToken(token) {\n var str = flattenTokenCache.get(token) || '';\n if (!str) {\n Object.keys(token).forEach(function (key) {\n var value = token[key];\n str += key;\n if (value instanceof Theme) {\n str += value.id;\n } else if (value && _typeof(value) === 'object') {\n str += flattenToken(value);\n } else {\n str += value;\n }\n });\n\n // Put in cache\n flattenTokenCache.set(token, str);\n }\n return str;\n}\n\n/**\n * Convert derivative token to key string\n */\nexport function token2key(token, salt) {\n return hash(\"\".concat(salt, \"_\").concat(flattenToken(token)));\n}\nvar randomSelectorKey = \"random-\".concat(Date.now(), \"-\").concat(Math.random()).replace(/\\./g, '');\n\n// Magic `content` for detect selector support\nvar checkContent = '_bAmBoO_';\nfunction supportSelector(styleStr, handleElement, supportCheck) {\n if (canUseDom()) {\n var _getComputedStyle$con, _ele$parentNode;\n updateCSS(styleStr, randomSelectorKey);\n var _ele = document.createElement('div');\n _ele.style.position = 'fixed';\n _ele.style.left = '0';\n _ele.style.top = '0';\n handleElement === null || handleElement === void 0 ? void 0 : handleElement(_ele);\n document.body.appendChild(_ele);\n if (process.env.NODE_ENV !== 'production') {\n _ele.innerHTML = 'Test';\n _ele.style.zIndex = '9999999';\n }\n var support = supportCheck ? supportCheck(_ele) : (_getComputedStyle$con = getComputedStyle(_ele).content) === null || _getComputedStyle$con === void 0 ? void 0 : _getComputedStyle$con.includes(checkContent);\n (_ele$parentNode = _ele.parentNode) === null || _ele$parentNode === void 0 ? void 0 : _ele$parentNode.removeChild(_ele);\n removeCSS(randomSelectorKey);\n return support;\n }\n return false;\n}\nvar canLayer = undefined;\nexport function supportLayer() {\n if (canLayer === undefined) {\n canLayer = supportSelector(\"@layer \".concat(randomSelectorKey, \" { .\").concat(randomSelectorKey, \" { content: \\\"\").concat(checkContent, \"\\\"!important; } }\"), function (ele) {\n ele.className = randomSelectorKey;\n });\n }\n return canLayer;\n}\nvar canWhere = undefined;\nexport function supportWhere() {\n if (canWhere === undefined) {\n canWhere = supportSelector(\":where(.\".concat(randomSelectorKey, \") { content: \\\"\").concat(checkContent, \"\\\"!important; }\"), function (ele) {\n ele.className = randomSelectorKey;\n });\n }\n return canWhere;\n}\nvar canLogic = undefined;\nexport function supportLogicProps() {\n if (canLogic === undefined) {\n canLogic = supportSelector(\".\".concat(randomSelectorKey, \" { inset-block: 93px !important; }\"), function (ele) {\n ele.className = randomSelectorKey;\n }, function (ele) {\n return getComputedStyle(ele).bottom === '93px';\n });\n }\n return canLogic;\n}","import * as React from 'react';\nimport canUseDom from \"../Dom/canUseDom\";\n\n/**\n * Wrap `React.useLayoutEffect` which will not throw warning message in test env\n */\nvar useInternalLayoutEffect = process.env.NODE_ENV !== 'test' && canUseDom() ? React.useLayoutEffect : React.useEffect;\nvar useLayoutEffect = function useLayoutEffect(callback, deps) {\n var firstMountRef = React.useRef(true);\n useInternalLayoutEffect(function () {\n return callback(firstMountRef.current);\n }, deps);\n\n // We tell react that first mount has passed\n useInternalLayoutEffect(function () {\n firstMountRef.current = false;\n return function () {\n firstMountRef.current = true;\n };\n }, []);\n};\nexport var useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {\n useLayoutEffect(function (firstMount) {\n if (!firstMount) {\n return callback();\n }\n }, deps);\n};\nexport default useLayoutEffect;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n// import canUseDom from 'rc-util/lib/Dom/canUseDom';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport * as React from 'react';\n\n// We need fully clone React function here\n// to avoid webpack warning React 17 do not export `useId`\nvar fullClone = _objectSpread({}, React);\nvar useInsertionEffect = fullClone.useInsertionEffect;\n/**\n * Polyfill `useInsertionEffect` for React < 18\n * @param renderEffect will be executed in `useMemo`, and do not have callback\n * @param effect will be executed in `useLayoutEffect`\n * @param deps\n */\nvar useInsertionEffectPolyfill = function useInsertionEffectPolyfill(renderEffect, effect, deps) {\n React.useMemo(renderEffect, deps);\n useLayoutEffect(function () {\n return effect(true);\n }, deps);\n};\n\n/**\n * Compatible `useInsertionEffect`\n * will use `useInsertionEffect` if React version >= 18,\n * otherwise use `useInsertionEffectPolyfill`.\n */\nvar useCompatibleInsertionEffect = useInsertionEffect ? function (renderEffect, effect, deps) {\n return useInsertionEffect(function () {\n renderEffect();\n return effect();\n }, deps);\n} : useInsertionEffectPolyfill;\nexport default useCompatibleInsertionEffect;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport { warning } from \"rc-util/es/warning\";\nimport * as React from 'react';\nvar fullClone = _objectSpread({}, React);\nvar useInsertionEffect = fullClone.useInsertionEffect;\n\n// DO NOT register functions in useEffect cleanup function, or functions that registered will never be called.\nvar useCleanupRegister = function useCleanupRegister(deps) {\n var effectCleanups = [];\n var cleanupFlag = false;\n function register(fn) {\n if (cleanupFlag) {\n if (process.env.NODE_ENV !== 'production') {\n warning(false, '[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.');\n }\n return;\n }\n effectCleanups.push(fn);\n }\n React.useEffect(function () {\n // Compatible with strict mode\n cleanupFlag = false;\n return function () {\n cleanupFlag = true;\n if (effectCleanups.length) {\n effectCleanups.forEach(function (fn) {\n return fn();\n });\n }\n };\n }, deps);\n return register;\n};\nvar useRun = function useRun() {\n return function (fn) {\n fn();\n };\n};\n\n// Only enable register in React 18\nvar useEffectCleanupRegister = typeof useInsertionEffect !== 'undefined' ? useCleanupRegister : useRun;\nexport default useEffectCleanupRegister;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport StyleContext from \"../StyleContext\";\nimport useCompatibleInsertionEffect from \"./useCompatibleInsertionEffect\";\nimport useEffectCleanupRegister from \"./useEffectCleanupRegister\";\nimport useHMR from \"./useHMR\";\nexport default function useGlobalCache(prefix, keyPath, cacheFn, onCacheRemove,\n// Add additional effect trigger by `useInsertionEffect`\nonCacheEffect) {\n var _React$useContext = React.useContext(StyleContext),\n globalCache = _React$useContext.cache;\n var fullPath = [prefix].concat(_toConsumableArray(keyPath));\n var deps = fullPath.join('_');\n var register = useEffectCleanupRegister([deps]);\n var HMRUpdate = useHMR();\n var buildCache = function buildCache(updater) {\n globalCache.update(fullPath, function (prevCache) {\n var _ref = prevCache || [],\n _ref2 = _slicedToArray(_ref, 2),\n _ref2$ = _ref2[0],\n times = _ref2$ === void 0 ? 0 : _ref2$,\n cache = _ref2[1];\n\n // HMR should always ignore cache since developer may change it\n var tmpCache = cache;\n if (process.env.NODE_ENV !== 'production' && cache && HMRUpdate) {\n onCacheRemove === null || onCacheRemove === void 0 ? void 0 : onCacheRemove(tmpCache, HMRUpdate);\n tmpCache = null;\n }\n var mergedCache = tmpCache || cacheFn();\n var data = [times, mergedCache];\n\n // Call updater if need additional logic\n return updater ? updater(data) : data;\n });\n };\n\n // Create cache\n React.useMemo(function () {\n buildCache();\n }, /* eslint-disable react-hooks/exhaustive-deps */\n [deps]\n /* eslint-enable */);\n\n var cacheEntity = globalCache.get(fullPath);\n\n // HMR clean the cache but not trigger `useMemo` again\n // Let's fallback of this\n // ref https://github.com/ant-design/cssinjs/issues/127\n if (process.env.NODE_ENV !== 'production' && !cacheEntity) {\n buildCache();\n cacheEntity = globalCache.get(fullPath);\n }\n var cacheContent = cacheEntity[1];\n\n // Remove if no need anymore\n useCompatibleInsertionEffect(function () {\n onCacheEffect === null || onCacheEffect === void 0 ? void 0 : onCacheEffect(cacheContent);\n }, function (polyfill) {\n // It's bad to call build again in effect.\n // But we have to do this since StrictMode will call effect twice\n // which will clear cache on the first time.\n buildCache(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n times = _ref4[0],\n cache = _ref4[1];\n if (polyfill && times === 0) {\n onCacheEffect === null || onCacheEffect === void 0 ? void 0 : onCacheEffect(cacheContent);\n }\n return [times + 1, cache];\n });\n return function () {\n globalCache.update(fullPath, function (prevCache) {\n var _ref5 = prevCache || [],\n _ref6 = _slicedToArray(_ref5, 2),\n _ref6$ = _ref6[0],\n times = _ref6$ === void 0 ? 0 : _ref6$,\n cache = _ref6[1];\n var nextCount = times - 1;\n if (nextCount === 0) {\n // Always remove styles in useEffect callback\n register(function () {\n return onCacheRemove === null || onCacheRemove === void 0 ? void 0 : onCacheRemove(cache, false);\n });\n return null;\n }\n return [times - 1, cache];\n });\n };\n }, [deps]);\n return cacheContent;\n}","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport hash from '@emotion/hash';\nimport { useContext } from 'react';\nimport StyleContext, { ATTR_TOKEN, CSS_IN_JS_INSTANCE } from \"../StyleContext\";\nimport { flattenToken, memoResult, token2key } from \"../util\";\nimport useGlobalCache from \"./useGlobalCache\";\nvar EMPTY_OVERRIDE = {};\n\n// Generate different prefix to make user selector break in production env.\n// This helps developer not to do style override directly on the hash id.\nvar hashPrefix = process.env.NODE_ENV !== 'production' ? 'css-dev-only-do-not-override' : 'css';\nvar tokenKeys = new Map();\nfunction recordCleanToken(tokenKey) {\n tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) + 1);\n}\nfunction removeStyleTags(key, instanceId) {\n if (typeof document !== 'undefined') {\n var styles = document.querySelectorAll(\"style[\".concat(ATTR_TOKEN, \"=\\\"\").concat(key, \"\\\"]\"));\n styles.forEach(function (style) {\n if (style[CSS_IN_JS_INSTANCE] === instanceId) {\n var _style$parentNode;\n (_style$parentNode = style.parentNode) === null || _style$parentNode === void 0 ? void 0 : _style$parentNode.removeChild(style);\n }\n });\n }\n}\nvar TOKEN_THRESHOLD = 0;\n\n// Remove will check current keys first\nfunction cleanTokenStyle(tokenKey, instanceId) {\n tokenKeys.set(tokenKey, (tokenKeys.get(tokenKey) || 0) - 1);\n var tokenKeyList = Array.from(tokenKeys.keys());\n var cleanableKeyList = tokenKeyList.filter(function (key) {\n var count = tokenKeys.get(key) || 0;\n return count <= 0;\n });\n\n // Should keep tokens under threshold for not to insert style too often\n if (tokenKeyList.length - cleanableKeyList.length > TOKEN_THRESHOLD) {\n cleanableKeyList.forEach(function (key) {\n removeStyleTags(key, instanceId);\n tokenKeys.delete(key);\n });\n }\n}\nexport var getComputedToken = function getComputedToken(originToken, overrideToken, theme, format) {\n var derivativeToken = theme.getDerivativeToken(originToken);\n\n // Merge with override\n var mergedDerivativeToken = _objectSpread(_objectSpread({}, derivativeToken), overrideToken);\n\n // Format if needed\n if (format) {\n mergedDerivativeToken = format(mergedDerivativeToken);\n }\n return mergedDerivativeToken;\n};\n\n/**\n * Cache theme derivative token as global shared one\n * @param theme Theme entity\n * @param tokens List of tokens, used for cache. Please do not dynamic generate object directly\n * @param option Additional config\n * @returns Call Theme.getDerivativeToken(tokenObject) to get token\n */\nexport default function useCacheToken(theme, tokens) {\n var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var _useContext = useContext(StyleContext),\n instanceId = _useContext.cache.instanceId;\n var _option$salt = option.salt,\n salt = _option$salt === void 0 ? '' : _option$salt,\n _option$override = option.override,\n override = _option$override === void 0 ? EMPTY_OVERRIDE : _option$override,\n formatToken = option.formatToken,\n compute = option.getComputedToken;\n\n // Basic - We do basic cache here\n var mergedToken = memoResult(function () {\n return Object.assign.apply(Object, [{}].concat(_toConsumableArray(tokens)));\n }, tokens);\n var tokenStr = flattenToken(mergedToken);\n var overrideTokenStr = flattenToken(override);\n var cachedToken = useGlobalCache('token', [salt, theme.id, tokenStr, overrideTokenStr], function () {\n var mergedDerivativeToken = compute ? compute(mergedToken, override, theme) : getComputedToken(mergedToken, override, theme, formatToken);\n\n // Optimize for `useStyleRegister` performance\n var tokenKey = token2key(mergedDerivativeToken, salt);\n mergedDerivativeToken._tokenKey = tokenKey;\n recordCleanToken(tokenKey);\n var hashId = \"\".concat(hashPrefix, \"-\").concat(hash(tokenKey));\n mergedDerivativeToken._hashId = hashId; // Not used\n\n return [mergedDerivativeToken, hashId];\n }, function (cache) {\n // Remove token will remove all related style\n cleanTokenStyle(cache[0]._tokenKey, instanceId);\n });\n return cachedToken;\n}","var unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport default unitlessKeys;\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n\n/**\n * @param {string[]} array\n * @param {RegExp} pattern\n * @return {string[]}\n */\nexport function filter (array, pattern) {\n\treturn array.filter(function (value) { return !match(value, pattern) })\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {object[]} siblings\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length, siblings) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)\n}\n\n/**\n * @param {object} root\n */\nexport function lift (root) {\n\twhile (root.root)\n\t\troot = copy(root.root, {children: [root]})\n\n\tappend(root, root.siblings)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent, declarations), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @param {object[]} siblings\n * @return {object}\n */\nexport function comment (value, root, parent, siblings) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function declaration (value, root, parent, length, siblings) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings)\n}\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\n\tfor (var i = 0; i < children.length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: if (!strlen(element.value = element.props.join(','))) return ''\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport { ATTR_MARK } from \"../../StyleContext\";\nexport var ATTR_CACHE_MAP = 'data-ant-cssinjs-cache-path';\n\n/**\n * This marks style from the css file.\n * Which means not exist in `\");\n }\n\n // ====================== Fill Style ======================\n\n var orderStyles = styleKeys.map(function (key) {\n var cachePath = key.slice(matchPrefix.length).replace(/%/g, '|');\n var _2 = _slicedToArray(cache.cache.get(key)[1], 6),\n styleStr = _2[0],\n tokenKey = _2[1],\n styleId = _2[2],\n effectStyle = _2[3],\n clientOnly = _2[4],\n order = _2[5];\n\n // Skip client only style\n if (clientOnly) {\n return null;\n }\n\n // ====================== Style ======================\n // Used for rc-util\n var sharedAttrs = {\n 'data-rc-order': 'prependQueue',\n 'data-rc-priority': \"\".concat(order)\n };\n var keyStyleText = toStyleStr(styleStr, tokenKey, styleId, sharedAttrs);\n\n // Save cache path with hash mapping\n cachePathMap[cachePath] = styleId;\n\n // =============== Create effect style ===============\n if (effectStyle) {\n Object.keys(effectStyle).forEach(function (effectKey) {\n // Effect style can be reused\n if (!effectStyles[effectKey]) {\n effectStyles[effectKey] = true;\n keyStyleText += toStyleStr(normalizeStyle(effectStyle[effectKey]), tokenKey, \"_effect-\".concat(effectKey), sharedAttrs);\n }\n });\n }\n var ret = [order, keyStyleText];\n return ret;\n }).filter(function (o) {\n return o;\n });\n orderStyles.sort(function (o1, o2) {\n return o1[0] - o2[0];\n }).forEach(function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n style = _ref8[1];\n styleText += style;\n });\n\n // ==================== Fill Cache Path ====================\n styleText += toStyleStr(\".\".concat(ATTR_CACHE_MAP, \"{content:\\\"\").concat(serializeCacheMap(cachePathMap), \"\\\";}\"), undefined, undefined, _defineProperty({}, ATTR_CACHE_MAP, ATTR_CACHE_MAP));\n return styleText;\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar Keyframe = /*#__PURE__*/function () {\n function Keyframe(name, style) {\n _classCallCheck(this, Keyframe);\n _defineProperty(this, \"name\", void 0);\n _defineProperty(this, \"style\", void 0);\n _defineProperty(this, \"_keyframe\", true);\n this.name = name;\n this.style = style;\n }\n _createClass(Keyframe, [{\n key: \"getName\",\n value: function getName() {\n var hashId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n return hashId ? \"\".concat(hashId, \"-\").concat(this.name) : this.name;\n }\n }]);\n return Keyframe;\n}();\nexport default Keyframe;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nfunction splitValues(value) {\n if (typeof value === 'number') {\n return [[value], false];\n }\n var rawStyle = String(value).trim();\n var importantCells = rawStyle.match(/(.*)(!important)/);\n var splitStyle = (importantCells ? importantCells[1] : rawStyle).trim().split(/\\s+/);\n\n // Combine styles split in brackets, like `calc(1px + 2px)`\n var temp = '';\n var brackets = 0;\n return [splitStyle.reduce(function (list, item) {\n if (item.includes('(')) {\n temp += item;\n brackets += item.split('(').length - 1;\n } else if (item.includes(')')) {\n temp += item;\n brackets -= item.split(')').length - 1;\n if (brackets === 0) {\n list.push(temp);\n temp = '';\n }\n } else if (brackets > 0) {\n temp += item;\n } else {\n list.push(item);\n }\n return list;\n }, []), !!importantCells];\n}\nfunction noSplit(list) {\n list.notSplit = true;\n return list;\n}\nvar keyMap = {\n // Inset\n inset: ['top', 'right', 'bottom', 'left'],\n insetBlock: ['top', 'bottom'],\n insetBlockStart: ['top'],\n insetBlockEnd: ['bottom'],\n insetInline: ['left', 'right'],\n insetInlineStart: ['left'],\n insetInlineEnd: ['right'],\n // Margin\n marginBlock: ['marginTop', 'marginBottom'],\n marginBlockStart: ['marginTop'],\n marginBlockEnd: ['marginBottom'],\n marginInline: ['marginLeft', 'marginRight'],\n marginInlineStart: ['marginLeft'],\n marginInlineEnd: ['marginRight'],\n // Padding\n paddingBlock: ['paddingTop', 'paddingBottom'],\n paddingBlockStart: ['paddingTop'],\n paddingBlockEnd: ['paddingBottom'],\n paddingInline: ['paddingLeft', 'paddingRight'],\n paddingInlineStart: ['paddingLeft'],\n paddingInlineEnd: ['paddingRight'],\n // Border\n borderBlock: noSplit(['borderTop', 'borderBottom']),\n borderBlockStart: noSplit(['borderTop']),\n borderBlockEnd: noSplit(['borderBottom']),\n borderInline: noSplit(['borderLeft', 'borderRight']),\n borderInlineStart: noSplit(['borderLeft']),\n borderInlineEnd: noSplit(['borderRight']),\n // Border width\n borderBlockWidth: ['borderTopWidth', 'borderBottomWidth'],\n borderBlockStartWidth: ['borderTopWidth'],\n borderBlockEndWidth: ['borderBottomWidth'],\n borderInlineWidth: ['borderLeftWidth', 'borderRightWidth'],\n borderInlineStartWidth: ['borderLeftWidth'],\n borderInlineEndWidth: ['borderRightWidth'],\n // Border style\n borderBlockStyle: ['borderTopStyle', 'borderBottomStyle'],\n borderBlockStartStyle: ['borderTopStyle'],\n borderBlockEndStyle: ['borderBottomStyle'],\n borderInlineStyle: ['borderLeftStyle', 'borderRightStyle'],\n borderInlineStartStyle: ['borderLeftStyle'],\n borderInlineEndStyle: ['borderRightStyle'],\n // Border color\n borderBlockColor: ['borderTopColor', 'borderBottomColor'],\n borderBlockStartColor: ['borderTopColor'],\n borderBlockEndColor: ['borderBottomColor'],\n borderInlineColor: ['borderLeftColor', 'borderRightColor'],\n borderInlineStartColor: ['borderLeftColor'],\n borderInlineEndColor: ['borderRightColor'],\n // Border radius\n borderStartStartRadius: ['borderTopLeftRadius'],\n borderStartEndRadius: ['borderTopRightRadius'],\n borderEndStartRadius: ['borderBottomLeftRadius'],\n borderEndEndRadius: ['borderBottomRightRadius']\n};\nfunction wrapImportantAndSkipCheck(value, important) {\n var parsedValue = value;\n if (important) {\n parsedValue = \"\".concat(parsedValue, \" !important\");\n }\n return {\n _skip_check_: true,\n value: parsedValue\n };\n}\n\n/**\n * Convert css logical properties to legacy properties.\n * Such as: `margin-block-start` to `margin-top`.\n * Transform list:\n * - inset\n * - margin\n * - padding\n * - border\n */\nvar transform = {\n visit: function visit(cssObj) {\n var clone = {};\n Object.keys(cssObj).forEach(function (key) {\n var value = cssObj[key];\n var matchValue = keyMap[key];\n if (matchValue && (typeof value === 'number' || typeof value === 'string')) {\n var _splitValues = splitValues(value),\n _splitValues2 = _slicedToArray(_splitValues, 2),\n _values = _splitValues2[0],\n _important = _splitValues2[1];\n if (matchValue.length && matchValue.notSplit) {\n // not split means always give same value like border\n matchValue.forEach(function (matchKey) {\n clone[matchKey] = wrapImportantAndSkipCheck(value, _important);\n });\n } else if (matchValue.length === 1) {\n // Handle like `marginBlockStart` => `marginTop`\n clone[matchValue[0]] = wrapImportantAndSkipCheck(value, _important);\n } else if (matchValue.length === 2) {\n // Handle like `marginBlock` => `marginTop` & `marginBottom`\n matchValue.forEach(function (matchKey, index) {\n var _values$index;\n clone[matchKey] = wrapImportantAndSkipCheck((_values$index = _values[index]) !== null && _values$index !== void 0 ? _values$index : _values[0], _important);\n });\n } else if (matchValue.length === 4) {\n // Handle like `inset` => `top` & `right` & `bottom` & `left`\n matchValue.forEach(function (matchKey, index) {\n var _ref, _values$index2;\n clone[matchKey] = wrapImportantAndSkipCheck((_ref = (_values$index2 = _values[index]) !== null && _values$index2 !== void 0 ? _values$index2 : _values[index - 2]) !== null && _ref !== void 0 ? _ref : _values[0], _important);\n });\n } else {\n clone[key] = value;\n }\n } else {\n clone[key] = value;\n }\n });\n return clone;\n }\n};\nexport default transform;","import { createContext } from 'react';\nvar IconContext = /*#__PURE__*/createContext({});\nexport default IconContext;","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}","export default function get(entity, path) {\n var current = entity;\n for (var i = 0; i < path.length; i += 1) {\n if (current === null || current === undefined) {\n return undefined;\n }\n current = current[path[i]];\n }\n return current;\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _toArray from \"@babel/runtime/helpers/esm/toArray\";\nimport get from \"./get\";\nfunction internalSet(entity, paths, value, removeIfUndefined) {\n if (!paths.length) {\n return value;\n }\n var _paths = _toArray(paths),\n path = _paths[0],\n restPath = _paths.slice(1);\n var clone;\n if (!entity && typeof path === 'number') {\n clone = [];\n } else if (Array.isArray(entity)) {\n clone = _toConsumableArray(entity);\n } else {\n clone = _objectSpread({}, entity);\n }\n\n // Delete prop if `removeIfUndefined` and value is undefined\n if (removeIfUndefined && value === undefined && restPath.length === 1) {\n delete clone[path][restPath[0]];\n } else {\n clone[path] = internalSet(clone[path], restPath, value, removeIfUndefined);\n }\n return clone;\n}\nexport default function set(entity, paths, value) {\n var removeIfUndefined = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n // Do nothing if `removeIfUndefined` and parent object not exist\n if (paths.length && removeIfUndefined && value === undefined && !get(entity, paths.slice(0, -1))) {\n return entity;\n }\n return internalSet(entity, paths, value, removeIfUndefined);\n}\nfunction isObject(obj) {\n return _typeof(obj) === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;\n}\nfunction createEmpty(source) {\n return Array.isArray(source) ? [] : {};\n}\nvar keys = typeof Reflect === 'undefined' ? Object.keys : Reflect.ownKeys;\n\n/**\n * Merge objects which will create\n */\nexport function merge() {\n for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {\n sources[_key] = arguments[_key];\n }\n var clone = createEmpty(sources[0]);\n sources.forEach(function (src) {\n function internalMerge(path, parentLoopSet) {\n var loopSet = new Set(parentLoopSet);\n var value = get(src, path);\n var isArr = Array.isArray(value);\n if (isArr || isObject(value)) {\n // Only add not loop obj\n if (!loopSet.has(value)) {\n loopSet.add(value);\n var originValue = get(clone, path);\n if (isArr) {\n // Array will always be override\n clone = set(clone, path, []);\n } else if (!originValue || _typeof(originValue) !== 'object') {\n // Init container if not exist\n clone = set(clone, path, createEmpty(value));\n }\n keys(value).forEach(function (key) {\n internalMerge([].concat(_toConsumableArray(path), [key]), loopSet);\n });\n }\n } else {\n clone = set(clone, path, value);\n }\n }\n internalMerge([]);\n });\n return clone;\n}","import * as React from 'react';\nimport rcWarning, { resetWarned as rcResetWarned } from \"rc-util/es/warning\";\nexport function noop() {}\nlet deprecatedWarnList = null;\nexport function resetWarned() {\n deprecatedWarnList = null;\n rcResetWarned();\n}\n// eslint-disable-next-line import/no-mutable-exports\nlet warning = noop;\nif (process.env.NODE_ENV !== 'production') {\n warning = (valid, component, message) => {\n rcWarning(valid, `[antd: ${component}] ${message}`);\n // StrictMode will inject console which will not throw warning in React 17.\n if (process.env.NODE_ENV === 'test') {\n resetWarned();\n }\n };\n}\nexport const WarningContext = /*#__PURE__*/React.createContext({});\n/**\n * This is a hook but we not named as `useWarning`\n * since this is only used in development.\n * We should always wrap this in `if (process.env.NODE_ENV !== 'production')` condition\n */\nexport const devUseWarning = process.env.NODE_ENV !== 'production' ? component => {\n const {\n strict\n } = React.useContext(WarningContext);\n const typeWarning = (valid, type, message) => {\n if (!valid) {\n if (strict === false && type === 'deprecated') {\n const existWarning = deprecatedWarnList;\n if (!deprecatedWarnList) {\n deprecatedWarnList = {};\n }\n deprecatedWarnList[component] = deprecatedWarnList[component] || [];\n if (!deprecatedWarnList[component].includes(message || '')) {\n deprecatedWarnList[component].push(message || '');\n }\n // Warning for the first time\n if (!existWarning) {\n // eslint-disable-next-line no-console\n console.warn('[antd] There exists deprecated usage in your code:', deprecatedWarnList);\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(valid, component, message) : void 0;\n }\n }\n };\n typeWarning.deprecated = (valid, oldProp, newProp, message) => {\n typeWarning(valid, 'deprecated', `\\`${oldProp}\\` is deprecated. Please use \\`${newProp}\\` instead.${message ? ` ${message}` : ''}`);\n };\n return typeWarning;\n} : () => {\n const noopWarning = () => {};\n noopWarning.deprecated = noop;\n return noopWarning;\n};\nexport default warning;","\"use client\";\n\nimport { createContext } from 'react';\n// ZombieJ: We export single file here since\n// ConfigProvider use this which will make loop deps\n// to import whole `rc-field-form`\nexport default /*#__PURE__*/createContext(undefined);","export default {\n // Options.jsx\n items_per_page: '/ page',\n jump_to: 'Go to',\n jump_to_confirm: 'confirm',\n page: 'Page',\n // Pagination.jsx\n prev_page: 'Previous Page',\n next_page: 'Next Page',\n prev_5: 'Previous 5 Pages',\n next_5: 'Next 5 Pages',\n prev_3: 'Previous 3 Pages',\n next_3: 'Next 3 Pages',\n page_size: 'Page Size'\n};","var locale = {\n locale: 'en_US',\n today: 'Today',\n now: 'Now',\n backToToday: 'Back to today',\n ok: 'OK',\n clear: 'Clear',\n month: 'Month',\n year: 'Year',\n timeSelect: 'select time',\n dateSelect: 'select date',\n weekSelect: 'Choose a week',\n monthSelect: 'Choose a month',\n yearSelect: 'Choose a year',\n decadeSelect: 'Choose a decade',\n yearFormat: 'YYYY',\n dateFormat: 'M/D/YYYY',\n dayFormat: 'D',\n dateTimeFormat: 'M/D/YYYY HH:mm:ss',\n monthBeforeYear: true,\n previousMonth: 'Previous month (PageUp)',\n nextMonth: 'Next month (PageDown)',\n previousYear: 'Last year (Control + left)',\n nextYear: 'Next year (Control + right)',\n previousDecade: 'Last decade',\n nextDecade: 'Next decade',\n previousCentury: 'Last century',\n nextCentury: 'Next century'\n};\nexport default locale;","const locale = {\n placeholder: 'Select time',\n rangePlaceholder: ['Start time', 'End time']\n};\nexport default locale;","import CalendarLocale from \"rc-picker/es/locale/en_US\";\nimport TimePickerLocale from '../../time-picker/locale/en_US';\n// Merge into a locale object\nconst locale = {\n lang: Object.assign({\n placeholder: 'Select date',\n yearPlaceholder: 'Select year',\n quarterPlaceholder: 'Select quarter',\n monthPlaceholder: 'Select month',\n weekPlaceholder: 'Select week',\n rangePlaceholder: ['Start date', 'End date'],\n rangeYearPlaceholder: ['Start year', 'End year'],\n rangeQuarterPlaceholder: ['Start quarter', 'End quarter'],\n rangeMonthPlaceholder: ['Start month', 'End month'],\n rangeWeekPlaceholder: ['Start week', 'End week']\n }, CalendarLocale),\n timePickerLocale: Object.assign({}, TimePickerLocale)\n};\n// All settings at:\n// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json\nexport default locale;","/* eslint-disable no-template-curly-in-string */\nimport Pagination from \"rc-pagination/es/locale/en_US\";\nimport Calendar from '../calendar/locale/en_US';\nimport DatePicker from '../date-picker/locale/en_US';\nimport TimePicker from '../time-picker/locale/en_US';\nconst typeTemplate = '${label} is not a valid ${type}';\nconst localeValues = {\n locale: 'en',\n Pagination,\n DatePicker,\n TimePicker,\n Calendar,\n global: {\n placeholder: 'Please select'\n },\n Table: {\n filterTitle: 'Filter menu',\n filterConfirm: 'OK',\n filterReset: 'Reset',\n filterEmptyText: 'No filters',\n filterCheckall: 'Select all items',\n filterSearchPlaceholder: 'Search in filters',\n emptyText: 'No data',\n selectAll: 'Select current page',\n selectInvert: 'Invert current page',\n selectNone: 'Clear all data',\n selectionAll: 'Select all data',\n sortTitle: 'Sort',\n expand: 'Expand row',\n collapse: 'Collapse row',\n triggerDesc: 'Click to sort descending',\n triggerAsc: 'Click to sort ascending',\n cancelSort: 'Click to cancel sorting'\n },\n Tour: {\n Next: 'Next',\n Previous: 'Previous',\n Finish: 'Finish'\n },\n Modal: {\n okText: 'OK',\n cancelText: 'Cancel',\n justOkText: 'OK'\n },\n Popconfirm: {\n okText: 'OK',\n cancelText: 'Cancel'\n },\n Transfer: {\n titles: ['', ''],\n searchPlaceholder: 'Search here',\n itemUnit: 'item',\n itemsUnit: 'items',\n remove: 'Remove',\n selectCurrent: 'Select current page',\n removeCurrent: 'Remove current page',\n selectAll: 'Select all data',\n removeAll: 'Remove all data',\n selectInvert: 'Invert current page'\n },\n Upload: {\n uploading: 'Uploading...',\n removeFile: 'Remove file',\n uploadError: 'Upload error',\n previewFile: 'Preview file',\n downloadFile: 'Download file'\n },\n Empty: {\n description: 'No data'\n },\n Icon: {\n icon: 'icon'\n },\n Text: {\n edit: 'Edit',\n copy: 'Copy',\n copied: 'Copied',\n expand: 'Expand'\n },\n PageHeader: {\n back: 'Back'\n },\n Form: {\n optional: '(optional)',\n defaultValidateMessages: {\n default: 'Field validation error for ${label}',\n required: 'Please enter ${label}',\n enum: '${label} must be one of [${enum}]',\n whitespace: '${label} cannot be a blank character',\n date: {\n format: '${label} date format is invalid',\n parse: '${label} cannot be converted to a date',\n invalid: '${label} is an invalid date'\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n boolean: typeTemplate,\n integer: typeTemplate,\n float: typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: '${label} must be ${len} characters',\n min: '${label} must be at least ${min} characters',\n max: '${label} must be up to ${max} characters',\n range: '${label} must be between ${min}-${max} characters'\n },\n number: {\n len: '${label} must be equal to ${len}',\n min: '${label} must be minimum ${min}',\n max: '${label} must be maximum ${max}',\n range: '${label} must be between ${min}-${max}'\n },\n array: {\n len: 'Must be ${len} ${label}',\n min: 'At least ${min} ${label}',\n max: 'At most ${max} ${label}',\n range: 'The amount of ${label} must be between ${min}-${max}'\n },\n pattern: {\n mismatch: '${label} does not match the pattern ${pattern}'\n }\n }\n },\n Image: {\n preview: 'Preview'\n },\n QRCode: {\n expired: 'QR code expired',\n refresh: 'Refresh'\n },\n ColorPicker: {\n presetEmpty: 'Empty'\n }\n};\nexport default localeValues;","\"use client\";\n\nimport defaultLocale from '../locale/en_US';\nlet runtimeLocale = Object.assign({}, defaultLocale.Modal);\nlet localeList = [];\nconst generateLocale = () => localeList.reduce((merged, locale) => Object.assign(Object.assign({}, merged), locale), defaultLocale.Modal);\nexport function changeConfirmLocale(newLocale) {\n if (newLocale) {\n const cloneLocale = Object.assign({}, newLocale);\n localeList.push(cloneLocale);\n runtimeLocale = generateLocale();\n return () => {\n localeList = localeList.filter(locale => locale !== cloneLocale);\n runtimeLocale = generateLocale();\n };\n }\n runtimeLocale = Object.assign({}, defaultLocale.Modal);\n}\nexport function getConfirmLocale() {\n return runtimeLocale;\n}","import { createContext } from 'react';\nconst LocaleContext = /*#__PURE__*/createContext(undefined);\nexport default LocaleContext;","import * as React from 'react';\nimport LocaleContext from './context';\nimport defaultLocaleData from './en_US';\nconst useLocale = (componentName, defaultLocale) => {\n const fullLocale = React.useContext(LocaleContext);\n const getLocale = React.useMemo(() => {\n var _a;\n const locale = defaultLocale || defaultLocaleData[componentName];\n const localeFromContext = (_a = fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale[componentName]) !== null && _a !== void 0 ? _a : {};\n return Object.assign(Object.assign({}, typeof locale === 'function' ? locale() : locale), localeFromContext || {});\n }, [componentName, defaultLocale, fullLocale]);\n const getLocaleCode = React.useMemo(() => {\n const localeCode = fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale.locale;\n // Had use LocaleProvide but didn't set locale\n if ((fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale.exist) && !localeCode) {\n return defaultLocaleData.locale;\n }\n return localeCode;\n }, [fullLocale]);\n return [getLocale, getLocaleCode];\n};\nexport default useLocale;","\"use client\";\n\nimport * as React from 'react';\nimport { devUseWarning } from '../_util/warning';\nimport { changeConfirmLocale } from '../modal/locale';\nimport LocaleContext from './context';\nexport { default as useLocale } from './useLocale';\nexport const ANT_MARK = 'internalMark';\nconst LocaleProvider = props => {\n const {\n locale = {},\n children,\n _ANT_MARK__\n } = props;\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('LocaleProvider');\n process.env.NODE_ENV !== \"production\" ? warning(_ANT_MARK__ === ANT_MARK, 'deprecated', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale') : void 0;\n }\n React.useEffect(() => {\n const clearLocale = changeConfirmLocale(locale && locale.Modal);\n return clearLocale;\n }, [locale]);\n const getMemoizedContextValue = React.useMemo(() => Object.assign(Object.assign({}, locale), {\n exist: true\n }), [locale]);\n return /*#__PURE__*/React.createElement(LocaleContext.Provider, {\n value: getMemoizedContextValue\n }, children);\n};\nif (process.env.NODE_ENV !== 'production') {\n LocaleProvider.displayName = 'LocaleProvider';\n}\nexport default LocaleProvider;","/**\n * Take input from [0, n] and return it as [0, 1]\n * @hidden\n */\nexport function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n var isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}\n/**\n * Force a number between 0 and 1\n * @hidden\n */\nexport function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}\n/**\n * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n * \n * @hidden\n */\nexport function isOnePointZero(n) {\n return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;\n}\n/**\n * Check to see if string passed in is a percentage\n * @hidden\n */\nexport function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}\n/**\n * Return a valid alpha value [0,1] with all invalid values being set to 1\n * @hidden\n */\nexport function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}\n/**\n * Replace a decimal with it's percentage value\n * @hidden\n */\nexport function convertToPercentage(n) {\n if (n <= 1) {\n return \"\".concat(Number(n) * 100, \"%\");\n }\n return n;\n}\n/**\n * Force a hex value to have 2 characters\n * @hidden\n */\nexport function pad2(c) {\n return c.length === 1 ? '0' + c : String(c);\n}\n","import { bound01, pad2 } from './util.js';\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// \n/**\n * Handle bounds / percentage checking to conform to CSS color spec\n * \n * *Assumes:* r, g, b in [0, 255] or [0, 1]\n * *Returns:* { r, g, b } in [0, 255]\n */\nexport function rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255,\n };\n}\n/**\n * Converts an RGB color value to HSL.\n * *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n * *Returns:* { h, s, l } in [0,1]\n */\nexport function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var s = 0;\n var l = (max + min) / 2;\n if (max === min) {\n s = 0;\n h = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, l: l };\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * (6 * t);\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n/**\n * Converts an HSL color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hslToRgb(h, s, l) {\n var r;\n var g;\n var b;\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n if (s === 0) {\n // achromatic\n g = l;\n b = l;\n r = l;\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color value to HSV\n *\n * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n * *Returns:* { h, s, v } in [0,1]\n */\nexport function rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var h = 0;\n var v = max;\n var d = max - min;\n var s = max === 0 ? 0 : d / max;\n if (max === min) {\n h = 0; // achromatic\n }\n else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n default:\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n/**\n * Converts an HSV color value to RGB.\n *\n * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n * *Returns:* { r, g, b } in the set [0, 255]\n */\nexport function hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n var i = Math.floor(h);\n var f = h - i;\n var p = v * (1 - s);\n var q = v * (1 - f * s);\n var t = v * (1 - (1 - f) * s);\n var mod = i % 6;\n var r = [v, q, p, p, t, v][mod];\n var g = [t, v, v, q, p, p][mod];\n var b = [p, p, t, v, v, q][mod];\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n/**\n * Converts an RGB color to hex\n *\n * Assumes r, g, and b are contained in the set [0, 255]\n * Returns a 3 or 6 character hex\n */\nexport function rgbToHex(r, g, b, allow3Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n // Return a 3 character hex if possible\n if (allow3Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color plus alpha transparency to hex\n *\n * Assumes r, g, b are contained in the set [0, 255] and\n * a in [0, 1]. Returns a 4 or 8 character rgba hex\n */\n// eslint-disable-next-line max-params\nexport function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n pad2(convertDecimalToHex(a)),\n ];\n // Return a 4 character hex if possible\n if (allow4Char &&\n hex[0].startsWith(hex[0].charAt(1)) &&\n hex[1].startsWith(hex[1].charAt(1)) &&\n hex[2].startsWith(hex[2].charAt(1)) &&\n hex[3].startsWith(hex[3].charAt(1))) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join('');\n}\n/**\n * Converts an RGBA color to an ARGB Hex8 string\n * Rarely used, but required for \"toFilter()\"\n */\nexport function rgbaToArgbHex(r, g, b, a) {\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(Math.round(r).toString(16)),\n pad2(Math.round(g).toString(16)),\n pad2(Math.round(b).toString(16)),\n ];\n return hex.join('');\n}\n/** Converts a decimal to a hex value */\nexport function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n/** Converts a hex value to a decimal */\nexport function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n}\n/** Parse a base-16 hex value into a base-10 integer */\nexport function parseIntFromHex(val) {\n return parseInt(val, 16);\n}\nexport function numberInputToObject(color) {\n return {\n r: color >> 16,\n g: (color & 0xff00) >> 8,\n b: color & 0xff,\n };\n}\n","// https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json\n/**\n * @hidden\n */\nexport var names = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n goldenrod: '#daa520',\n gold: '#ffd700',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavenderblush: '#fff0f5',\n lavender: '#e6e6fa',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32',\n};\n","/* eslint-disable @typescript-eslint/no-redundant-type-constituents */\nimport { convertHexToDecimal, hslToRgb, hsvToRgb, parseIntFromHex, rgbToRgb, } from './conversion.js';\nimport { names } from './css-color-names.js';\nimport { boundAlpha, convertToPercentage } from './util.js';\n/**\n * Given a string or object, convert that input to RGB\n *\n * Possible string inputs:\n * ```\n * \"red\"\n * \"#f00\" or \"f00\"\n * \"#ff0000\" or \"ff0000\"\n * \"#ff000000\" or \"ff000000\"\n * \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n * \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n * \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n * \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n * \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n * \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n * \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n * ```\n */\nexport function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color === 'string') {\n color = stringInputToObject(color);\n }\n if (typeof color === 'object') {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = 'hsv';\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = 'hsl';\n }\n if (Object.prototype.hasOwnProperty.call(color, 'a')) {\n a = color.a;\n }\n }\n a = boundAlpha(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a,\n };\n}\n// \nvar CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\n// \nvar CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\n// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\nvar CSS_UNIT = \"(?:\".concat(CSS_NUMBER, \")|(?:\").concat(CSS_INTEGER, \")\");\n// Actual matching.\n// Parentheses and commas are optional, but not required.\n// Whitespace can take the place of commas or opening paren\nvar PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\".concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")[,|\\\\s]+(\").concat(CSS_UNIT, \")\\\\s*\\\\)?\");\nvar matchers = {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n};\n/**\n * Permissive string parsing. Take in a number of formats, and output an object\n * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n */\nexport function stringInputToObject(color) {\n color = color.trim().toLowerCase();\n if (color.length === 0) {\n return false;\n }\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color === 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: 'name' };\n }\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match = matchers.rgb.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n match = matchers.rgba.exec(color);\n if (match) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n match = matchers.hsl.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n match = matchers.hsla.exec(color);\n if (match) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n match = matchers.hsv.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n match = matchers.hsva.exec(color);\n if (match) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n match = matchers.hex8.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex6.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n match = matchers.hex4.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n a: convertHexToDecimal(match[4] + match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n match = matchers.hex3.exec(color);\n if (match) {\n return {\n r: parseIntFromHex(match[1] + match[1]),\n g: parseIntFromHex(match[2] + match[2]),\n b: parseIntFromHex(match[3] + match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n return false;\n}\n/**\n * Check to see if it looks like a CSS unit\n * (see `matchers` above for definition).\n */\nexport function isValidCSSUnit(color) {\n return Boolean(matchers.CSS_UNIT.exec(String(color)));\n}\n","import { numberInputToObject, rgbaToHex, rgbToHex, rgbToHsl, rgbToHsv } from './conversion.js';\nimport { names } from './css-color-names.js';\nimport { inputToRGB } from './format-input';\nimport { bound01, boundAlpha, clamp01 } from './util.js';\nvar TinyColor = /** @class */ (function () {\n function TinyColor(color, opts) {\n if (color === void 0) { color = ''; }\n if (opts === void 0) { opts = {}; }\n var _a;\n // If input is already a tinycolor, return itself\n if (color instanceof TinyColor) {\n // eslint-disable-next-line no-constructor-return\n return color;\n }\n if (typeof color === 'number') {\n color = numberInputToObject(color);\n }\n this.originalInput = color;\n var rgb = inputToRGB(color);\n this.originalInput = color;\n this.r = rgb.r;\n this.g = rgb.g;\n this.b = rgb.b;\n this.a = rgb.a;\n this.roundA = Math.round(100 * this.a) / 100;\n this.format = (_a = opts.format) !== null && _a !== void 0 ? _a : rgb.format;\n this.gradientType = opts.gradientType;\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this.r < 1) {\n this.r = Math.round(this.r);\n }\n if (this.g < 1) {\n this.g = Math.round(this.g);\n }\n if (this.b < 1) {\n this.b = Math.round(this.b);\n }\n this.isValid = rgb.ok;\n }\n TinyColor.prototype.isDark = function () {\n return this.getBrightness() < 128;\n };\n TinyColor.prototype.isLight = function () {\n return !this.isDark();\n };\n /**\n * Returns the perceived brightness of the color, from 0-255.\n */\n TinyColor.prototype.getBrightness = function () {\n // http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n };\n /**\n * Returns the perceived luminance of a color, from 0-1.\n */\n TinyColor.prototype.getLuminance = function () {\n // http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var R;\n var G;\n var B;\n var RsRGB = rgb.r / 255;\n var GsRGB = rgb.g / 255;\n var BsRGB = rgb.b / 255;\n if (RsRGB <= 0.03928) {\n R = RsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);\n }\n if (GsRGB <= 0.03928) {\n G = GsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);\n }\n if (BsRGB <= 0.03928) {\n B = BsRGB / 12.92;\n }\n else {\n // eslint-disable-next-line prefer-exponentiation-operator\n B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);\n }\n return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n };\n /**\n * Returns the alpha value of a color, from 0-1.\n */\n TinyColor.prototype.getAlpha = function () {\n return this.a;\n };\n /**\n * Sets the alpha value on the current color.\n *\n * @param alpha - The new alpha value. The accepted range is 0-1.\n */\n TinyColor.prototype.setAlpha = function (alpha) {\n this.a = boundAlpha(alpha);\n this.roundA = Math.round(100 * this.a) / 100;\n return this;\n };\n /**\n * Returns whether the color is monochrome.\n */\n TinyColor.prototype.isMonochrome = function () {\n var s = this.toHsl().s;\n return s === 0;\n };\n /**\n * Returns the object as a HSVA object.\n */\n TinyColor.prototype.toHsv = function () {\n var hsv = rgbToHsv(this.r, this.g, this.b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };\n };\n /**\n * Returns the hsva values interpolated into a string with the following format:\n * \"hsva(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toHsvString = function () {\n var hsv = rgbToHsv(this.r, this.g, this.b);\n var h = Math.round(hsv.h * 360);\n var s = Math.round(hsv.s * 100);\n var v = Math.round(hsv.v * 100);\n return this.a === 1 ? \"hsv(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%)\") : \"hsva(\".concat(h, \", \").concat(s, \"%, \").concat(v, \"%, \").concat(this.roundA, \")\");\n };\n /**\n * Returns the object as a HSLA object.\n */\n TinyColor.prototype.toHsl = function () {\n var hsl = rgbToHsl(this.r, this.g, this.b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a };\n };\n /**\n * Returns the hsla values interpolated into a string with the following format:\n * \"hsla(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toHslString = function () {\n var hsl = rgbToHsl(this.r, this.g, this.b);\n var h = Math.round(hsl.h * 360);\n var s = Math.round(hsl.s * 100);\n var l = Math.round(hsl.l * 100);\n return this.a === 1 ? \"hsl(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%)\") : \"hsla(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%, \").concat(this.roundA, \")\");\n };\n /**\n * Returns the hex value of the color.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n TinyColor.prototype.toHex = function (allow3Char) {\n if (allow3Char === void 0) { allow3Char = false; }\n return rgbToHex(this.r, this.g, this.b, allow3Char);\n };\n /**\n * Returns the hex value of the color -with a # prefixed.\n * @param allow3Char will shorten hex value to 3 char if possible\n */\n TinyColor.prototype.toHexString = function (allow3Char) {\n if (allow3Char === void 0) { allow3Char = false; }\n return '#' + this.toHex(allow3Char);\n };\n /**\n * Returns the hex 8 value of the color.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n TinyColor.prototype.toHex8 = function (allow4Char) {\n if (allow4Char === void 0) { allow4Char = false; }\n return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);\n };\n /**\n * Returns the hex 8 value of the color -with a # prefixed.\n * @param allow4Char will shorten hex value to 4 char if possible\n */\n TinyColor.prototype.toHex8String = function (allow4Char) {\n if (allow4Char === void 0) { allow4Char = false; }\n return '#' + this.toHex8(allow4Char);\n };\n /**\n * Returns the shorter hex value of the color depends on its alpha -with a # prefixed.\n * @param allowShortChar will shorten hex value to 3 or 4 char if possible\n */\n TinyColor.prototype.toHexShortString = function (allowShortChar) {\n if (allowShortChar === void 0) { allowShortChar = false; }\n return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);\n };\n /**\n * Returns the object as a RGBA object.\n */\n TinyColor.prototype.toRgb = function () {\n return {\n r: Math.round(this.r),\n g: Math.round(this.g),\n b: Math.round(this.b),\n a: this.a,\n };\n };\n /**\n * Returns the RGBA values interpolated into a string with the following format:\n * \"RGBA(xxx, xxx, xxx, xx)\".\n */\n TinyColor.prototype.toRgbString = function () {\n var r = Math.round(this.r);\n var g = Math.round(this.g);\n var b = Math.round(this.b);\n return this.a === 1 ? \"rgb(\".concat(r, \", \").concat(g, \", \").concat(b, \")\") : \"rgba(\".concat(r, \", \").concat(g, \", \").concat(b, \", \").concat(this.roundA, \")\");\n };\n /**\n * Returns the object as a RGBA object.\n */\n TinyColor.prototype.toPercentageRgb = function () {\n var fmt = function (x) { return \"\".concat(Math.round(bound01(x, 255) * 100), \"%\"); };\n return {\n r: fmt(this.r),\n g: fmt(this.g),\n b: fmt(this.b),\n a: this.a,\n };\n };\n /**\n * Returns the RGBA relative values interpolated into a string\n */\n TinyColor.prototype.toPercentageRgbString = function () {\n var rnd = function (x) { return Math.round(bound01(x, 255) * 100); };\n return this.a === 1\n ? \"rgb(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%)\")\n : \"rgba(\".concat(rnd(this.r), \"%, \").concat(rnd(this.g), \"%, \").concat(rnd(this.b), \"%, \").concat(this.roundA, \")\");\n };\n /**\n * The 'real' name of the color -if there is one.\n */\n TinyColor.prototype.toName = function () {\n if (this.a === 0) {\n return 'transparent';\n }\n if (this.a < 1) {\n return false;\n }\n var hex = '#' + rgbToHex(this.r, this.g, this.b, false);\n for (var _i = 0, _a = Object.entries(names); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], value = _b[1];\n if (hex === value) {\n return key;\n }\n }\n return false;\n };\n TinyColor.prototype.toString = function (format) {\n var formatSet = Boolean(format);\n format = format !== null && format !== void 0 ? format : this.format;\n var formattedString = false;\n var hasAlpha = this.a < 1 && this.a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith('hex') || format === 'name');\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === 'name' && this.a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === 'rgb') {\n formattedString = this.toRgbString();\n }\n if (format === 'prgb') {\n formattedString = this.toPercentageRgbString();\n }\n if (format === 'hex' || format === 'hex6') {\n formattedString = this.toHexString();\n }\n if (format === 'hex3') {\n formattedString = this.toHexString(true);\n }\n if (format === 'hex4') {\n formattedString = this.toHex8String(true);\n }\n if (format === 'hex8') {\n formattedString = this.toHex8String();\n }\n if (format === 'name') {\n formattedString = this.toName();\n }\n if (format === 'hsl') {\n formattedString = this.toHslString();\n }\n if (format === 'hsv') {\n formattedString = this.toHsvString();\n }\n return formattedString || this.toHexString();\n };\n TinyColor.prototype.toNumber = function () {\n return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);\n };\n TinyColor.prototype.clone = function () {\n return new TinyColor(this.toString());\n };\n /**\n * Lighten the color a given amount. Providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.lighten = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return new TinyColor(hsl);\n };\n /**\n * Brighten the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.brighten = function (amount) {\n if (amount === void 0) { amount = 10; }\n var rgb = this.toRgb();\n rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n return new TinyColor(rgb);\n };\n /**\n * Darken the color a given amount, from 0 to 100.\n * Providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.darken = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return new TinyColor(hsl);\n };\n /**\n * Mix the color with pure white, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return white.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.tint = function (amount) {\n if (amount === void 0) { amount = 10; }\n return this.mix('white', amount);\n };\n /**\n * Mix the color with pure black, from 0 to 100.\n * Providing 0 will do nothing, providing 100 will always return black.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.shade = function (amount) {\n if (amount === void 0) { amount = 10; }\n return this.mix('black', amount);\n };\n /**\n * Desaturate the color a given amount, from 0 to 100.\n * Providing 100 will is the same as calling greyscale\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.desaturate = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return new TinyColor(hsl);\n };\n /**\n * Saturate the color a given amount, from 0 to 100.\n * @param amount - valid between 1-100\n */\n TinyColor.prototype.saturate = function (amount) {\n if (amount === void 0) { amount = 10; }\n var hsl = this.toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return new TinyColor(hsl);\n };\n /**\n * Completely desaturates a color into greyscale.\n * Same as calling `desaturate(100)`\n */\n TinyColor.prototype.greyscale = function () {\n return this.desaturate(100);\n };\n /**\n * Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n * Values outside of this range will be wrapped into this range.\n */\n TinyColor.prototype.spin = function (amount) {\n var hsl = this.toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return new TinyColor(hsl);\n };\n /**\n * Mix the current color a given amount with another color, from 0 to 100.\n * 0 means no mixing (return current color).\n */\n TinyColor.prototype.mix = function (color, amount) {\n if (amount === void 0) { amount = 50; }\n var rgb1 = this.toRgb();\n var rgb2 = new TinyColor(color).toRgb();\n var p = amount / 100;\n var rgba = {\n r: (rgb2.r - rgb1.r) * p + rgb1.r,\n g: (rgb2.g - rgb1.g) * p + rgb1.g,\n b: (rgb2.b - rgb1.b) * p + rgb1.b,\n a: (rgb2.a - rgb1.a) * p + rgb1.a,\n };\n return new TinyColor(rgba);\n };\n TinyColor.prototype.analogous = function (results, slices) {\n if (results === void 0) { results = 6; }\n if (slices === void 0) { slices = 30; }\n var hsl = this.toHsl();\n var part = 360 / slices;\n var ret = [this];\n for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results;) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(new TinyColor(hsl));\n }\n return ret;\n };\n /**\n * taken from https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js\n */\n TinyColor.prototype.complement = function () {\n var hsl = this.toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return new TinyColor(hsl);\n };\n TinyColor.prototype.monochromatic = function (results) {\n if (results === void 0) { results = 6; }\n var hsv = this.toHsv();\n var h = hsv.h;\n var s = hsv.s;\n var v = hsv.v;\n var res = [];\n var modification = 1 / results;\n while (results--) {\n res.push(new TinyColor({ h: h, s: s, v: v }));\n v = (v + modification) % 1;\n }\n return res;\n };\n TinyColor.prototype.splitcomplement = function () {\n var hsl = this.toHsl();\n var h = hsl.h;\n return [\n this,\n new TinyColor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),\n new TinyColor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }),\n ];\n };\n /**\n * Compute how the color would appear on a background\n */\n TinyColor.prototype.onBackground = function (background) {\n var fg = this.toRgb();\n var bg = new TinyColor(background).toRgb();\n var alpha = fg.a + bg.a * (1 - fg.a);\n return new TinyColor({\n r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,\n g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,\n b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,\n a: alpha,\n });\n };\n /**\n * Alias for `polyad(3)`\n */\n TinyColor.prototype.triad = function () {\n return this.polyad(3);\n };\n /**\n * Alias for `polyad(4)`\n */\n TinyColor.prototype.tetrad = function () {\n return this.polyad(4);\n };\n /**\n * Get polyad colors, like (for 1, 2, 3, 4, 5, 6, 7, 8, etc...)\n * monad, dyad, triad, tetrad, pentad, hexad, heptad, octad, etc...\n */\n TinyColor.prototype.polyad = function (n) {\n var hsl = this.toHsl();\n var h = hsl.h;\n var result = [this];\n var increment = 360 / n;\n for (var i = 1; i < n; i++) {\n result.push(new TinyColor({ h: (h + i * increment) % 360, s: hsl.s, l: hsl.l }));\n }\n return result;\n };\n /**\n * compare color vs current color\n */\n TinyColor.prototype.equals = function (color) {\n return this.toRgbString() === new TinyColor(color).toRgbString();\n };\n return TinyColor;\n}());\nexport { TinyColor };\n// kept for backwards compatability with v1\nexport function tinycolor(color, opts) {\n if (color === void 0) { color = ''; }\n if (opts === void 0) { opts = {}; }\n return new TinyColor(color, opts);\n}\n","import { inputToRGB, rgbToHex, rgbToHsv } from '@ctrl/tinycolor';\nvar hueStep = 2; // 色相阶梯\n\nvar saturationStep = 0.16; // 饱和度阶梯,浅色部分\n\nvar saturationStep2 = 0.05; // 饱和度阶梯,深色部分\n\nvar brightnessStep1 = 0.05; // 亮度阶梯,浅色部分\n\nvar brightnessStep2 = 0.15; // 亮度阶梯,深色部分\n\nvar lightColorCount = 5; // 浅色数量,主色上\n\nvar darkColorCount = 4; // 深色数量,主色下\n// 暗色主题颜色映射关系表\n\nvar darkColorMap = [{\n index: 7,\n opacity: 0.15\n}, {\n index: 6,\n opacity: 0.25\n}, {\n index: 5,\n opacity: 0.3\n}, {\n index: 5,\n opacity: 0.45\n}, {\n index: 5,\n opacity: 0.65\n}, {\n index: 5,\n opacity: 0.85\n}, {\n index: 4,\n opacity: 0.9\n}, {\n index: 3,\n opacity: 0.95\n}, {\n index: 2,\n opacity: 0.97\n}, {\n index: 1,\n opacity: 0.98\n}];\n\n// Wrapper function ported from TinyColor.prototype.toHsv\n// Keep it here because of `hsv.h * 360`\nfunction toHsv(_ref) {\n var r = _ref.r,\n g = _ref.g,\n b = _ref.b;\n var hsv = rgbToHsv(r, g, b);\n return {\n h: hsv.h * 360,\n s: hsv.s,\n v: hsv.v\n };\n} // Wrapper function ported from TinyColor.prototype.toHexString\n// Keep it here because of the prefix `#`\n\n\nfunction toHex(_ref2) {\n var r = _ref2.r,\n g = _ref2.g,\n b = _ref2.b;\n return \"#\".concat(rgbToHex(r, g, b, false));\n} // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.\n// Amount in range [0, 1]\n// Assume color1 & color2 has no alpha, since the following src code did so.\n\n\nfunction mix(rgb1, rgb2, amount) {\n var p = amount / 100;\n var rgb = {\n r: (rgb2.r - rgb1.r) * p + rgb1.r,\n g: (rgb2.g - rgb1.g) * p + rgb1.g,\n b: (rgb2.b - rgb1.b) * p + rgb1.b\n };\n return rgb;\n}\n\nfunction getHue(hsv, i, light) {\n var hue; // 根据色相不同,色相转向不同\n\n if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {\n hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;\n } else {\n hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;\n }\n\n if (hue < 0) {\n hue += 360;\n } else if (hue >= 360) {\n hue -= 360;\n }\n\n return hue;\n}\n\nfunction getSaturation(hsv, i, light) {\n // grey color don't change saturation\n if (hsv.h === 0 && hsv.s === 0) {\n return hsv.s;\n }\n\n var saturation;\n\n if (light) {\n saturation = hsv.s - saturationStep * i;\n } else if (i === darkColorCount) {\n saturation = hsv.s + saturationStep;\n } else {\n saturation = hsv.s + saturationStep2 * i;\n } // 边界值修正\n\n\n if (saturation > 1) {\n saturation = 1;\n } // 第一格的 s 限制在 0.06-0.1 之间\n\n\n if (light && i === lightColorCount && saturation > 0.1) {\n saturation = 0.1;\n }\n\n if (saturation < 0.06) {\n saturation = 0.06;\n }\n\n return Number(saturation.toFixed(2));\n}\n\nfunction getValue(hsv, i, light) {\n var value;\n\n if (light) {\n value = hsv.v + brightnessStep1 * i;\n } else {\n value = hsv.v - brightnessStep2 * i;\n }\n\n if (value > 1) {\n value = 1;\n }\n\n return Number(value.toFixed(2));\n}\n\nexport default function generate(color) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var patterns = [];\n var pColor = inputToRGB(color);\n\n for (var i = lightColorCount; i > 0; i -= 1) {\n var hsv = toHsv(pColor);\n var colorString = toHex(inputToRGB({\n h: getHue(hsv, i, true),\n s: getSaturation(hsv, i, true),\n v: getValue(hsv, i, true)\n }));\n patterns.push(colorString);\n }\n\n patterns.push(toHex(pColor));\n\n for (var _i = 1; _i <= darkColorCount; _i += 1) {\n var _hsv = toHsv(pColor);\n\n var _colorString = toHex(inputToRGB({\n h: getHue(_hsv, _i),\n s: getSaturation(_hsv, _i),\n v: getValue(_hsv, _i)\n }));\n\n patterns.push(_colorString);\n } // dark theme patterns\n\n\n if (opts.theme === 'dark') {\n return darkColorMap.map(function (_ref3) {\n var index = _ref3.index,\n opacity = _ref3.opacity;\n var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || '#141414'), inputToRGB(patterns[index]), opacity * 100));\n return darkColorString;\n });\n }\n\n return patterns;\n}","import generate from \"./generate\";\nvar presetPrimaryColors = {\n red: '#F5222D',\n volcano: '#FA541C',\n orange: '#FA8C16',\n gold: '#FAAD14',\n yellow: '#FADB14',\n lime: '#A0D911',\n green: '#52C41A',\n cyan: '#13C2C2',\n blue: '#1677FF',\n geekblue: '#2F54EB',\n purple: '#722ED1',\n magenta: '#EB2F96',\n grey: '#666666'\n};\nvar presetPalettes = {};\nvar presetDarkPalettes = {};\nObject.keys(presetPrimaryColors).forEach(function (key) {\n presetPalettes[key] = generate(presetPrimaryColors[key]);\n presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes\n\n presetDarkPalettes[key] = generate(presetPrimaryColors[key], {\n theme: 'dark',\n backgroundColor: '#141414'\n });\n presetDarkPalettes[key].primary = presetDarkPalettes[key][5];\n});\nvar red = presetPalettes.red;\nvar volcano = presetPalettes.volcano;\nvar gold = presetPalettes.gold;\nvar orange = presetPalettes.orange;\nvar yellow = presetPalettes.yellow;\nvar lime = presetPalettes.lime;\nvar green = presetPalettes.green;\nvar cyan = presetPalettes.cyan;\nvar blue = presetPalettes.blue;\nvar geekblue = presetPalettes.geekblue;\nvar purple = presetPalettes.purple;\nvar magenta = presetPalettes.magenta;\nvar grey = presetPalettes.grey;\nvar gray = presetPalettes.grey;\nexport { generate, presetPalettes, presetDarkPalettes, presetPrimaryColors, red, volcano, orange, gold, yellow, lime, green, cyan, blue, geekblue, purple, magenta, grey, gray };","const genControlHeight = token => {\n const {\n controlHeight\n } = token;\n return {\n controlHeightSM: controlHeight * 0.75,\n controlHeightXS: controlHeight * 0.5,\n controlHeightLG: controlHeight * 1.25\n };\n};\nexport default genControlHeight;","export default function genSizeMapToken(token) {\n const {\n sizeUnit,\n sizeStep\n } = token;\n return {\n sizeXXL: sizeUnit * (sizeStep + 8),\n sizeXL: sizeUnit * (sizeStep + 4),\n sizeLG: sizeUnit * (sizeStep + 2),\n sizeMD: sizeUnit * (sizeStep + 1),\n sizeMS: sizeUnit * sizeStep,\n size: sizeUnit * sizeStep,\n sizeSM: sizeUnit * (sizeStep - 1),\n sizeXS: sizeUnit * (sizeStep - 2),\n sizeXXS: sizeUnit * (sizeStep - 3) // 4\n };\n}","export const defaultPresetColors = {\n blue: '#1677ff',\n purple: '#722ED1',\n cyan: '#13C2C2',\n green: '#52C41A',\n magenta: '#EB2F96',\n pink: '#eb2f96',\n red: '#F5222D',\n orange: '#FA8C16',\n yellow: '#FADB14',\n volcano: '#FA541C',\n geekblue: '#2F54EB',\n gold: '#FAAD14',\n lime: '#A0D911'\n};\nconst seedToken = Object.assign(Object.assign({}, defaultPresetColors), {\n // Color\n colorPrimary: '#1677ff',\n colorSuccess: '#52c41a',\n colorWarning: '#faad14',\n colorError: '#ff4d4f',\n colorInfo: '#1677ff',\n colorLink: '',\n colorTextBase: '',\n colorBgBase: '',\n // Font\n fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n'Noto Color Emoji'`,\n fontFamilyCode: `'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace`,\n fontSize: 14,\n // Line\n lineWidth: 1,\n lineType: 'solid',\n // Motion\n motionUnit: 0.1,\n motionBase: 0,\n motionEaseOutCirc: 'cubic-bezier(0.08, 0.82, 0.17, 1)',\n motionEaseInOutCirc: 'cubic-bezier(0.78, 0.14, 0.15, 0.86)',\n motionEaseOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',\n motionEaseInOut: 'cubic-bezier(0.645, 0.045, 0.355, 1)',\n motionEaseOutBack: 'cubic-bezier(0.12, 0.4, 0.29, 1.46)',\n motionEaseInBack: 'cubic-bezier(0.71, -0.46, 0.88, 0.6)',\n motionEaseInQuint: 'cubic-bezier(0.755, 0.05, 0.855, 0.06)',\n motionEaseOutQuint: 'cubic-bezier(0.23, 1, 0.32, 1)',\n // Radius\n borderRadius: 6,\n // Size\n sizeUnit: 4,\n sizeStep: 4,\n sizePopupArrow: 16,\n // Control Base\n controlHeight: 32,\n // zIndex\n zIndexBase: 0,\n zIndexPopupBase: 1000,\n // Image\n opacityImage: 1,\n // Wireframe\n wireframe: false,\n // Motion\n motion: true\n});\nexport default seedToken;","import { TinyColor } from '@ctrl/tinycolor';\nexport default function genColorMapToken(seed, _ref) {\n let {\n generateColorPalettes,\n generateNeutralColorPalettes\n } = _ref;\n const {\n colorSuccess: colorSuccessBase,\n colorWarning: colorWarningBase,\n colorError: colorErrorBase,\n colorInfo: colorInfoBase,\n colorPrimary: colorPrimaryBase,\n colorBgBase,\n colorTextBase\n } = seed;\n const primaryColors = generateColorPalettes(colorPrimaryBase);\n const successColors = generateColorPalettes(colorSuccessBase);\n const warningColors = generateColorPalettes(colorWarningBase);\n const errorColors = generateColorPalettes(colorErrorBase);\n const infoColors = generateColorPalettes(colorInfoBase);\n const neutralColors = generateNeutralColorPalettes(colorBgBase, colorTextBase);\n // Color Link\n const colorLink = seed.colorLink || seed.colorInfo;\n const linkColors = generateColorPalettes(colorLink);\n return Object.assign(Object.assign({}, neutralColors), {\n colorPrimaryBg: primaryColors[1],\n colorPrimaryBgHover: primaryColors[2],\n colorPrimaryBorder: primaryColors[3],\n colorPrimaryBorderHover: primaryColors[4],\n colorPrimaryHover: primaryColors[5],\n colorPrimary: primaryColors[6],\n colorPrimaryActive: primaryColors[7],\n colorPrimaryTextHover: primaryColors[8],\n colorPrimaryText: primaryColors[9],\n colorPrimaryTextActive: primaryColors[10],\n colorSuccessBg: successColors[1],\n colorSuccessBgHover: successColors[2],\n colorSuccessBorder: successColors[3],\n colorSuccessBorderHover: successColors[4],\n colorSuccessHover: successColors[4],\n colorSuccess: successColors[6],\n colorSuccessActive: successColors[7],\n colorSuccessTextHover: successColors[8],\n colorSuccessText: successColors[9],\n colorSuccessTextActive: successColors[10],\n colorErrorBg: errorColors[1],\n colorErrorBgHover: errorColors[2],\n colorErrorBorder: errorColors[3],\n colorErrorBorderHover: errorColors[4],\n colorErrorHover: errorColors[5],\n colorError: errorColors[6],\n colorErrorActive: errorColors[7],\n colorErrorTextHover: errorColors[8],\n colorErrorText: errorColors[9],\n colorErrorTextActive: errorColors[10],\n colorWarningBg: warningColors[1],\n colorWarningBgHover: warningColors[2],\n colorWarningBorder: warningColors[3],\n colorWarningBorderHover: warningColors[4],\n colorWarningHover: warningColors[4],\n colorWarning: warningColors[6],\n colorWarningActive: warningColors[7],\n colorWarningTextHover: warningColors[8],\n colorWarningText: warningColors[9],\n colorWarningTextActive: warningColors[10],\n colorInfoBg: infoColors[1],\n colorInfoBgHover: infoColors[2],\n colorInfoBorder: infoColors[3],\n colorInfoBorderHover: infoColors[4],\n colorInfoHover: infoColors[4],\n colorInfo: infoColors[6],\n colorInfoActive: infoColors[7],\n colorInfoTextHover: infoColors[8],\n colorInfoText: infoColors[9],\n colorInfoTextActive: infoColors[10],\n colorLinkHover: linkColors[4],\n colorLink: linkColors[6],\n colorLinkActive: linkColors[7],\n colorBgMask: new TinyColor('#000').setAlpha(0.45).toRgbString(),\n colorWhite: '#fff'\n });\n}","const genRadius = radiusBase => {\n let radiusLG = radiusBase;\n let radiusSM = radiusBase;\n let radiusXS = radiusBase;\n let radiusOuter = radiusBase;\n // radiusLG\n if (radiusBase < 6 && radiusBase >= 5) {\n radiusLG = radiusBase + 1;\n } else if (radiusBase < 16 && radiusBase >= 6) {\n radiusLG = radiusBase + 2;\n } else if (radiusBase >= 16) {\n radiusLG = 16;\n }\n // radiusSM\n if (radiusBase < 7 && radiusBase >= 5) {\n radiusSM = 4;\n } else if (radiusBase < 8 && radiusBase >= 7) {\n radiusSM = 5;\n } else if (radiusBase < 14 && radiusBase >= 8) {\n radiusSM = 6;\n } else if (radiusBase < 16 && radiusBase >= 14) {\n radiusSM = 7;\n } else if (radiusBase >= 16) {\n radiusSM = 8;\n }\n // radiusXS\n if (radiusBase < 6 && radiusBase >= 2) {\n radiusXS = 1;\n } else if (radiusBase >= 6) {\n radiusXS = 2;\n }\n // radiusOuter\n if (radiusBase > 4 && radiusBase < 8) {\n radiusOuter = 4;\n } else if (radiusBase >= 8) {\n radiusOuter = 6;\n }\n return {\n borderRadius: radiusBase,\n borderRadiusXS: radiusXS,\n borderRadiusSM: radiusSM,\n borderRadiusLG: radiusLG,\n borderRadiusOuter: radiusOuter\n };\n};\nexport default genRadius;","import genRadius from './genRadius';\nexport default function genCommonMapToken(token) {\n const {\n motionUnit,\n motionBase,\n borderRadius,\n lineWidth\n } = token;\n return Object.assign({\n // motion\n motionDurationFast: `${(motionBase + motionUnit).toFixed(1)}s`,\n motionDurationMid: `${(motionBase + motionUnit * 2).toFixed(1)}s`,\n motionDurationSlow: `${(motionBase + motionUnit * 3).toFixed(1)}s`,\n // line\n lineWidthBold: lineWidth + 1\n }, genRadius(borderRadius));\n}","import { TinyColor } from '@ctrl/tinycolor';\nexport const getAlphaColor = (baseColor, alpha) => new TinyColor(baseColor).setAlpha(alpha).toRgbString();\nexport const getSolidColor = (baseColor, brightness) => {\n const instance = new TinyColor(baseColor);\n return instance.darken(brightness).toHexString();\n};","import { generate } from '@ant-design/colors';\nimport { getAlphaColor, getSolidColor } from './colorAlgorithm';\nexport const generateColorPalettes = baseColor => {\n const colors = generate(baseColor);\n return {\n 1: colors[0],\n 2: colors[1],\n 3: colors[2],\n 4: colors[3],\n 5: colors[4],\n 6: colors[5],\n 7: colors[6],\n 8: colors[4],\n 9: colors[5],\n 10: colors[6]\n // 8: colors[7],\n // 9: colors[8],\n // 10: colors[9],\n };\n};\n\nexport const generateNeutralColorPalettes = (bgBaseColor, textBaseColor) => {\n const colorBgBase = bgBaseColor || '#fff';\n const colorTextBase = textBaseColor || '#000';\n return {\n colorBgBase,\n colorTextBase,\n colorText: getAlphaColor(colorTextBase, 0.88),\n colorTextSecondary: getAlphaColor(colorTextBase, 0.65),\n colorTextTertiary: getAlphaColor(colorTextBase, 0.45),\n colorTextQuaternary: getAlphaColor(colorTextBase, 0.25),\n colorFill: getAlphaColor(colorTextBase, 0.15),\n colorFillSecondary: getAlphaColor(colorTextBase, 0.06),\n colorFillTertiary: getAlphaColor(colorTextBase, 0.04),\n colorFillQuaternary: getAlphaColor(colorTextBase, 0.02),\n colorBgLayout: getSolidColor(colorBgBase, 4),\n colorBgContainer: getSolidColor(colorBgBase, 0),\n colorBgElevated: getSolidColor(colorBgBase, 0),\n colorBgSpotlight: getAlphaColor(colorTextBase, 0.85),\n colorBgBlur: 'transparent',\n colorBorder: getSolidColor(colorBgBase, 15),\n colorBorderSecondary: getSolidColor(colorBgBase, 6)\n };\n};","// https://zhuanlan.zhihu.com/p/32746810\nexport default function getFontSizes(base) {\n const fontSizes = new Array(10).fill(null).map((_, index) => {\n const i = index - 1;\n const baseSize = base * Math.pow(2.71828, i / 5);\n const intSize = index > 1 ? Math.floor(baseSize) : Math.ceil(baseSize);\n // Convert to even\n return Math.floor(intSize / 2) * 2;\n });\n fontSizes[1] = base;\n return fontSizes.map(size => {\n const height = size + 8;\n return {\n size,\n lineHeight: height / size\n };\n });\n}","import genFontSizes from './genFontSizes';\nconst genFontMapToken = fontSize => {\n const fontSizePairs = genFontSizes(fontSize);\n const fontSizes = fontSizePairs.map(pair => pair.size);\n const lineHeights = fontSizePairs.map(pair => pair.lineHeight);\n return {\n fontSizeSM: fontSizes[0],\n fontSize: fontSizes[1],\n fontSizeLG: fontSizes[2],\n fontSizeXL: fontSizes[3],\n fontSizeHeading1: fontSizes[6],\n fontSizeHeading2: fontSizes[5],\n fontSizeHeading3: fontSizes[4],\n fontSizeHeading4: fontSizes[3],\n fontSizeHeading5: fontSizes[2],\n lineHeight: lineHeights[1],\n lineHeightLG: lineHeights[2],\n lineHeightSM: lineHeights[0],\n lineHeightHeading1: lineHeights[6],\n lineHeightHeading2: lineHeights[5],\n lineHeightHeading3: lineHeights[4],\n lineHeightHeading4: lineHeights[3],\n lineHeightHeading5: lineHeights[2]\n };\n};\nexport default genFontMapToken;","import { generate } from '@ant-design/colors';\nimport genControlHeight from '../shared/genControlHeight';\nimport genSizeMapToken from '../shared/genSizeMapToken';\nimport { defaultPresetColors } from '../seed';\nimport genColorMapToken from '../shared/genColorMapToken';\nimport genCommonMapToken from '../shared/genCommonMapToken';\nimport { generateColorPalettes, generateNeutralColorPalettes } from './colors';\nimport genFontMapToken from '../shared/genFontMapToken';\nexport default function derivative(token) {\n const colorPalettes = Object.keys(defaultPresetColors).map(colorKey => {\n const colors = generate(token[colorKey]);\n return new Array(10).fill(1).reduce((prev, _, i) => {\n prev[`${colorKey}-${i + 1}`] = colors[i];\n prev[`${colorKey}${i + 1}`] = colors[i];\n return prev;\n }, {});\n }).reduce((prev, cur) => {\n prev = Object.assign(Object.assign({}, prev), cur);\n return prev;\n }, {});\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, token), colorPalettes), genColorMapToken(token, {\n generateColorPalettes,\n generateNeutralColorPalettes\n })), genFontMapToken(token.fontSize)), genSizeMapToken(token)), genControlHeight(token)), genCommonMapToken(token));\n}","import { createTheme } from '@ant-design/cssinjs';\nimport React from 'react';\nimport defaultDerivative from './themes/default';\nimport defaultSeedToken from './themes/seed';\nexport const defaultTheme = createTheme(defaultDerivative);\n// ================================ Context =================================\n// To ensure snapshot stable. We disable hashed in test env.\nexport const defaultConfig = {\n token: defaultSeedToken,\n hashed: true\n};\nexport const DesignTokenContext = /*#__PURE__*/React.createContext(defaultConfig);","import * as React from 'react';\nexport const defaultIconPrefixCls = 'anticon';\nconst defaultGetPrefixCls = (suffixCls, customizePrefixCls) => {\n if (customizePrefixCls) {\n return customizePrefixCls;\n }\n return suffixCls ? `ant-${suffixCls}` : 'ant';\n};\n// zombieJ: 🚨 Do not pass `defaultRenderEmpty` here since it will cause circular dependency.\nexport const ConfigContext = /*#__PURE__*/React.createContext({\n // We provide a default function for Context without provider\n getPrefixCls: defaultGetPrefixCls,\n iconPrefixCls: defaultIconPrefixCls\n});\nexport const {\n Consumer: ConfigConsumer\n} = ConfigContext;","/* eslint-disable import/prefer-default-export, prefer-destructuring */\nimport { generate } from '@ant-design/colors';\nimport { TinyColor } from '@ctrl/tinycolor';\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport { updateCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport warning from '../_util/warning';\nconst dynamicStyleMark = `-ant-${Date.now()}-${Math.random()}`;\nexport function getStyle(globalPrefixCls, theme) {\n const variables = {};\n const formatColor = (color, updater) => {\n let clone = color.clone();\n clone = (updater === null || updater === void 0 ? void 0 : updater(clone)) || clone;\n return clone.toRgbString();\n };\n const fillColor = (colorVal, type) => {\n const baseColor = new TinyColor(colorVal);\n const colorPalettes = generate(baseColor.toRgbString());\n variables[`${type}-color`] = formatColor(baseColor);\n variables[`${type}-color-disabled`] = colorPalettes[1];\n variables[`${type}-color-hover`] = colorPalettes[4];\n variables[`${type}-color-active`] = colorPalettes[6];\n variables[`${type}-color-outline`] = baseColor.clone().setAlpha(0.2).toRgbString();\n variables[`${type}-color-deprecated-bg`] = colorPalettes[0];\n variables[`${type}-color-deprecated-border`] = colorPalettes[2];\n };\n // ================ Primary Color ================\n if (theme.primaryColor) {\n fillColor(theme.primaryColor, 'primary');\n const primaryColor = new TinyColor(theme.primaryColor);\n const primaryColors = generate(primaryColor.toRgbString());\n // Legacy - We should use semantic naming standard\n primaryColors.forEach((color, index) => {\n variables[`primary-${index + 1}`] = color;\n });\n // Deprecated\n variables['primary-color-deprecated-l-35'] = formatColor(primaryColor, c => c.lighten(35));\n variables['primary-color-deprecated-l-20'] = formatColor(primaryColor, c => c.lighten(20));\n variables['primary-color-deprecated-t-20'] = formatColor(primaryColor, c => c.tint(20));\n variables['primary-color-deprecated-t-50'] = formatColor(primaryColor, c => c.tint(50));\n variables['primary-color-deprecated-f-12'] = formatColor(primaryColor, c => c.setAlpha(c.getAlpha() * 0.12));\n const primaryActiveColor = new TinyColor(primaryColors[0]);\n variables['primary-color-active-deprecated-f-30'] = formatColor(primaryActiveColor, c => c.setAlpha(c.getAlpha() * 0.3));\n variables['primary-color-active-deprecated-d-02'] = formatColor(primaryActiveColor, c => c.darken(2));\n }\n // ================ Success Color ================\n if (theme.successColor) {\n fillColor(theme.successColor, 'success');\n }\n // ================ Warning Color ================\n if (theme.warningColor) {\n fillColor(theme.warningColor, 'warning');\n }\n // ================= Error Color =================\n if (theme.errorColor) {\n fillColor(theme.errorColor, 'error');\n }\n // ================= Info Color ==================\n if (theme.infoColor) {\n fillColor(theme.infoColor, 'info');\n }\n // Convert to css variables\n const cssList = Object.keys(variables).map(key => `--${globalPrefixCls}-${key}: ${variables[key]};`);\n return `\n :root {\n ${cssList.join('\\n')}\n }\n `.trim();\n}\nexport function registerTheme(globalPrefixCls, theme) {\n const style = getStyle(globalPrefixCls, theme);\n if (canUseDom()) {\n updateCSS(style, `${dynamicStyleMark}-dynamic-theme`);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'ConfigProvider', 'SSR do not support dynamic theme with css variables.') : void 0;\n }\n}","\"use client\";\n\nimport * as React from 'react';\nconst DisabledContext = /*#__PURE__*/React.createContext(false);\nexport const DisabledContextProvider = _ref => {\n let {\n children,\n disabled\n } = _ref;\n const originDisabled = React.useContext(DisabledContext);\n return /*#__PURE__*/React.createElement(DisabledContext.Provider, {\n value: disabled !== null && disabled !== void 0 ? disabled : originDisabled\n }, children);\n};\nexport default DisabledContext;","\"use client\";\n\nimport * as React from 'react';\nconst SizeContext = /*#__PURE__*/React.createContext(undefined);\nexport const SizeContextProvider = _ref => {\n let {\n children,\n size\n } = _ref;\n const originSize = React.useContext(SizeContext);\n return /*#__PURE__*/React.createElement(SizeContext.Provider, {\n value: size || originSize\n }, children);\n};\nexport default SizeContext;","import { useContext } from 'react';\nimport DisabledContext from '../DisabledContext';\nimport SizeContext from '../SizeContext';\nfunction useConfig() {\n const componentDisabled = useContext(DisabledContext);\n const componentSize = useContext(SizeContext);\n return {\n componentDisabled,\n componentSize\n };\n}\nexport default useConfig;","export default '5.10.0';","import { TinyColor } from '@ctrl/tinycolor';\nfunction isStableColor(color) {\n return color >= 0 && color <= 255;\n}\nfunction getAlphaColor(frontColor, backgroundColor) {\n const {\n r: fR,\n g: fG,\n b: fB,\n a: originAlpha\n } = new TinyColor(frontColor).toRgb();\n if (originAlpha < 1) {\n return frontColor;\n }\n const {\n r: bR,\n g: bG,\n b: bB\n } = new TinyColor(backgroundColor).toRgb();\n for (let fA = 0.01; fA <= 1; fA += 0.01) {\n const r = Math.round((fR - bR * (1 - fA)) / fA);\n const g = Math.round((fG - bG * (1 - fA)) / fA);\n const b = Math.round((fB - bB * (1 - fA)) / fA);\n if (isStableColor(r) && isStableColor(g) && isStableColor(b)) {\n return new TinyColor({\n r,\n g,\n b,\n a: Math.round(fA * 100) / 100\n }).toRgbString();\n }\n }\n // fallback\n /* istanbul ignore next */\n return new TinyColor({\n r: fR,\n g: fG,\n b: fB,\n a: 1\n }).toRgbString();\n}\nexport default getAlphaColor;","var __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { TinyColor } from '@ctrl/tinycolor';\nimport seedToken from '../themes/seed';\nimport getAlphaColor from './getAlphaColor';\n/**\n * Seed (designer) > Derivative (designer) > Alias (developer).\n *\n * Merge seed & derivative & override token and generate alias token for developer.\n */\nexport default function formatToken(derivativeToken) {\n const {\n override\n } = derivativeToken,\n restToken = __rest(derivativeToken, [\"override\"]);\n const overrideTokens = Object.assign({}, override);\n Object.keys(seedToken).forEach(token => {\n delete overrideTokens[token];\n });\n const mergedToken = Object.assign(Object.assign({}, restToken), overrideTokens);\n const screenXS = 480;\n const screenSM = 576;\n const screenMD = 768;\n const screenLG = 992;\n const screenXL = 1200;\n const screenXXL = 1600;\n // Motion\n if (mergedToken.motion === false) {\n const fastDuration = '0s';\n mergedToken.motionDurationFast = fastDuration;\n mergedToken.motionDurationMid = fastDuration;\n mergedToken.motionDurationSlow = fastDuration;\n }\n // Generate alias token\n const aliasToken = Object.assign(Object.assign(Object.assign({}, mergedToken), {\n // ============== Background ============== //\n colorFillContent: mergedToken.colorFillSecondary,\n colorFillContentHover: mergedToken.colorFill,\n colorFillAlter: mergedToken.colorFillQuaternary,\n colorBgContainerDisabled: mergedToken.colorFillTertiary,\n // ============== Split ============== //\n colorBorderBg: mergedToken.colorBgContainer,\n colorSplit: getAlphaColor(mergedToken.colorBorderSecondary, mergedToken.colorBgContainer),\n // ============== Text ============== //\n colorTextPlaceholder: mergedToken.colorTextQuaternary,\n colorTextDisabled: mergedToken.colorTextQuaternary,\n colorTextHeading: mergedToken.colorText,\n colorTextLabel: mergedToken.colorTextSecondary,\n colorTextDescription: mergedToken.colorTextTertiary,\n colorTextLightSolid: mergedToken.colorWhite,\n colorHighlight: mergedToken.colorError,\n colorBgTextHover: mergedToken.colorFillSecondary,\n colorBgTextActive: mergedToken.colorFill,\n colorIcon: mergedToken.colorTextTertiary,\n colorIconHover: mergedToken.colorText,\n colorErrorOutline: getAlphaColor(mergedToken.colorErrorBg, mergedToken.colorBgContainer),\n colorWarningOutline: getAlphaColor(mergedToken.colorWarningBg, mergedToken.colorBgContainer),\n // Font\n fontSizeIcon: mergedToken.fontSizeSM,\n // Line\n lineWidthFocus: mergedToken.lineWidth * 4,\n // Control\n lineWidth: mergedToken.lineWidth,\n controlOutlineWidth: mergedToken.lineWidth * 2,\n // Checkbox size and expand icon size\n controlInteractiveSize: mergedToken.controlHeight / 2,\n controlItemBgHover: mergedToken.colorFillTertiary,\n controlItemBgActive: mergedToken.colorPrimaryBg,\n controlItemBgActiveHover: mergedToken.colorPrimaryBgHover,\n controlItemBgActiveDisabled: mergedToken.colorFill,\n controlTmpOutline: mergedToken.colorFillQuaternary,\n controlOutline: getAlphaColor(mergedToken.colorPrimaryBg, mergedToken.colorBgContainer),\n lineType: mergedToken.lineType,\n borderRadius: mergedToken.borderRadius,\n borderRadiusXS: mergedToken.borderRadiusXS,\n borderRadiusSM: mergedToken.borderRadiusSM,\n borderRadiusLG: mergedToken.borderRadiusLG,\n fontWeightStrong: 600,\n opacityLoading: 0.65,\n linkDecoration: 'none',\n linkHoverDecoration: 'none',\n linkFocusDecoration: 'none',\n controlPaddingHorizontal: 12,\n controlPaddingHorizontalSM: 8,\n paddingXXS: mergedToken.sizeXXS,\n paddingXS: mergedToken.sizeXS,\n paddingSM: mergedToken.sizeSM,\n padding: mergedToken.size,\n paddingMD: mergedToken.sizeMD,\n paddingLG: mergedToken.sizeLG,\n paddingXL: mergedToken.sizeXL,\n paddingContentHorizontalLG: mergedToken.sizeLG,\n paddingContentVerticalLG: mergedToken.sizeMS,\n paddingContentHorizontal: mergedToken.sizeMS,\n paddingContentVertical: mergedToken.sizeSM,\n paddingContentHorizontalSM: mergedToken.size,\n paddingContentVerticalSM: mergedToken.sizeXS,\n marginXXS: mergedToken.sizeXXS,\n marginXS: mergedToken.sizeXS,\n marginSM: mergedToken.sizeSM,\n margin: mergedToken.size,\n marginMD: mergedToken.sizeMD,\n marginLG: mergedToken.sizeLG,\n marginXL: mergedToken.sizeXL,\n marginXXL: mergedToken.sizeXXL,\n boxShadow: `\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n `,\n boxShadowSecondary: `\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n `,\n boxShadowTertiary: `\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n `,\n screenXS,\n screenXSMin: screenXS,\n screenXSMax: screenSM - 1,\n screenSM,\n screenSMMin: screenSM,\n screenSMMax: screenMD - 1,\n screenMD,\n screenMDMin: screenMD,\n screenMDMax: screenLG - 1,\n screenLG,\n screenLGMin: screenLG,\n screenLGMax: screenXL - 1,\n screenXL,\n screenXLMin: screenXL,\n screenXLMax: screenXXL - 1,\n screenXXL,\n screenXXLMin: screenXXL,\n boxShadowPopoverArrow: '2px 2px 5px rgba(0, 0, 0, 0.05)',\n boxShadowCard: `\n 0 1px 2px -2px ${new TinyColor('rgba(0, 0, 0, 0.16)').toRgbString()},\n 0 3px 6px 0 ${new TinyColor('rgba(0, 0, 0, 0.12)').toRgbString()},\n 0 5px 12px 4px ${new TinyColor('rgba(0, 0, 0, 0.09)').toRgbString()}\n `,\n boxShadowDrawerRight: `\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\n `,\n boxShadowDrawerLeft: `\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\n `,\n boxShadowDrawerUp: `\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n `,\n boxShadowDrawerDown: `\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\n `,\n boxShadowTabsOverflowLeft: 'inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)',\n boxShadowTabsOverflowRight: 'inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)',\n boxShadowTabsOverflowTop: 'inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)',\n boxShadowTabsOverflowBottom: 'inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)'\n }), overrideTokens);\n return aliasToken;\n}","var __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { useCacheToken } from '@ant-design/cssinjs';\nimport React from 'react';\nimport version from '../version';\nimport { defaultTheme, DesignTokenContext } from './context';\nimport defaultSeedToken from './themes/seed';\nimport formatToken from './util/alias';\nexport const getComputedToken = (originToken, overrideToken, theme) => {\n const derivativeToken = theme.getDerivativeToken(originToken);\n const {\n override\n } = overrideToken,\n components = __rest(overrideToken, [\"override\"]);\n // Merge with override\n let mergedDerivativeToken = Object.assign(Object.assign({}, derivativeToken), {\n override\n });\n // Format if needed\n mergedDerivativeToken = formatToken(mergedDerivativeToken);\n if (components) {\n Object.entries(components).forEach(_ref => {\n let [key, value] = _ref;\n const {\n theme: componentTheme\n } = value,\n componentTokens = __rest(value, [\"theme\"]);\n let mergedComponentToken = componentTokens;\n if (componentTheme) {\n mergedComponentToken = getComputedToken(Object.assign(Object.assign({}, mergedDerivativeToken), componentTokens), {\n override: componentTokens\n }, componentTheme);\n }\n mergedDerivativeToken[key] = mergedComponentToken;\n });\n }\n return mergedDerivativeToken;\n};\n// ================================== Hook ==================================\nexport default function useToken() {\n const {\n token: rootDesignToken,\n hashed,\n theme,\n components\n } = React.useContext(DesignTokenContext);\n const salt = `${version}-${hashed || ''}`;\n const mergedTheme = theme || defaultTheme;\n const [token, hashId] = useCacheToken(mergedTheme, [defaultSeedToken, rootDesignToken], {\n salt,\n override: Object.assign({\n override: rootDesignToken\n }, components),\n getComputedToken,\n // formatToken will not be consumed after 1.15.0 with getComputedToken.\n // But token will break if @ant-design/cssinjs is under 1.15.0 without it\n formatToken\n });\n return [mergedTheme, token, hashed ? hashId : ''];\n}","import * as React from 'react';\nexport default function useEvent(callback) {\n var fnRef = React.useRef();\n fnRef.current = callback;\n var memoFn = React.useCallback(function () {\n var _fnRef$current;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return (_fnRef$current = fnRef.current) === null || _fnRef$current === void 0 ? void 0 : _fnRef$current.call.apply(_fnRef$current, [fnRef].concat(args));\n }, []);\n return memoFn;\n}","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\n/**\n * Same as React.useState but `setState` accept `ignoreDestroy` param to not to setState after destroyed.\n * We do not make this auto is to avoid real memory leak.\n * Developer should confirm it's safe to ignore themselves.\n */\nexport default function useSafeState(defaultValue) {\n var destroyRef = React.useRef(false);\n var _React$useState = React.useState(defaultValue),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n value = _React$useState2[0],\n setValue = _React$useState2[1];\n React.useEffect(function () {\n destroyRef.current = false;\n return function () {\n destroyRef.current = true;\n };\n }, []);\n function safeSetState(updater, ignoreDestroy) {\n if (ignoreDestroy && destroyRef.current) {\n return;\n }\n setValue(updater);\n }\n return [value, safeSetState];\n}","\"use client\";\n\nexport { operationUnit } from './operationUnit';\nexport { roundedArrow } from './roundedArrow';\nexport const textEllipsis = {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n};\nexport const resetComponent = function (token) {\n let needInheritFontFamily = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return {\n boxSizing: 'border-box',\n margin: 0,\n padding: 0,\n color: token.colorText,\n fontSize: token.fontSize,\n // font-variant: @font-variant-base;\n lineHeight: token.lineHeight,\n listStyle: 'none',\n // font-feature-settings: @font-feature-settings-base;\n fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily\n };\n};\nexport const resetIcon = () => ({\n display: 'inline-flex',\n alignItems: 'center',\n color: 'inherit',\n fontStyle: 'normal',\n lineHeight: 0,\n textAlign: 'center',\n textTransform: 'none',\n // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4\n verticalAlign: '-0.125em',\n textRendering: 'optimizeLegibility',\n '-webkit-font-smoothing': 'antialiased',\n '-moz-osx-font-smoothing': 'grayscale',\n '> *': {\n lineHeight: 1\n },\n svg: {\n display: 'inline-block'\n }\n});\nexport const clearFix = () => ({\n // https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229\n '&::before': {\n display: 'table',\n content: '\"\"'\n },\n '&::after': {\n // https://github.com/ant-design/ant-design/issues/21864\n display: 'table',\n clear: 'both',\n content: '\"\"'\n }\n});\nexport const genLinkStyle = token => ({\n a: {\n color: token.colorLink,\n textDecoration: token.linkDecoration,\n backgroundColor: 'transparent',\n outline: 'none',\n cursor: 'pointer',\n transition: `color ${token.motionDurationSlow}`,\n '-webkit-text-decoration-skip': 'objects',\n '&:hover': {\n color: token.colorLinkHover\n },\n '&:active': {\n color: token.colorLinkActive\n },\n [`&:active,\n &:hover`]: {\n textDecoration: token.linkHoverDecoration,\n outline: 0\n },\n // https://github.com/ant-design/ant-design/issues/22503\n '&:focus': {\n textDecoration: token.linkFocusDecoration,\n outline: 0\n },\n '&[disabled]': {\n color: token.colorTextDisabled,\n cursor: 'not-allowed'\n }\n }\n});\nexport const genCommonStyle = (token, componentPrefixCls) => {\n const {\n fontFamily,\n fontSize\n } = token;\n const rootPrefixSelector = `[class^=\"${componentPrefixCls}\"], [class*=\" ${componentPrefixCls}\"]`;\n return {\n [rootPrefixSelector]: {\n fontFamily,\n fontSize,\n boxSizing: 'border-box',\n '&::before, &::after': {\n boxSizing: 'border-box'\n },\n [rootPrefixSelector]: {\n boxSizing: 'border-box',\n '&::before, &::after': {\n boxSizing: 'border-box'\n }\n }\n }\n };\n};\nexport const genFocusOutline = token => ({\n outline: `${token.lineWidthFocus}px solid ${token.colorPrimaryBorder}`,\n outlineOffset: 1,\n transition: 'outline-offset 0s, outline 0s'\n});\nexport const genFocusStyle = token => ({\n '&:focus-visible': Object.assign({}, genFocusOutline(token))\n});","const enableStatistic = process.env.NODE_ENV !== 'production' || typeof CSSINJS_STATISTIC !== 'undefined';\nlet recording = true;\n/**\n * This function will do as `Object.assign` in production. But will use Object.defineProperty:get to\n * pass all value access in development. To support statistic field usage with alias token.\n */\nexport function merge() {\n for (var _len = arguments.length, objs = new Array(_len), _key = 0; _key < _len; _key++) {\n objs[_key] = arguments[_key];\n }\n /* istanbul ignore next */\n if (!enableStatistic) {\n return Object.assign.apply(Object, [{}].concat(objs));\n }\n recording = false;\n const ret = {};\n objs.forEach(obj => {\n const keys = Object.keys(obj);\n keys.forEach(key => {\n Object.defineProperty(ret, key, {\n configurable: true,\n enumerable: true,\n get: () => obj[key]\n });\n });\n });\n recording = true;\n return ret;\n}\n/** @internal Internal Usage. Not use in your production. */\nexport const statistic = {};\n/** @internal Internal Usage. Not use in your production. */\n// eslint-disable-next-line camelcase\nexport const _statistic_build_ = {};\n/* istanbul ignore next */\nfunction noop() {}\n/** Statistic token usage case. Should use `merge` function if you do not want spread record. */\nexport default function statisticToken(token) {\n let tokenKeys;\n let proxy = token;\n let flush = noop;\n if (enableStatistic) {\n tokenKeys = new Set();\n proxy = new Proxy(token, {\n get(obj, prop) {\n if (recording) {\n tokenKeys.add(prop);\n }\n return obj[prop];\n }\n });\n flush = (componentName, componentToken) => {\n var _a;\n statistic[componentName] = {\n global: Array.from(tokenKeys),\n component: Object.assign(Object.assign({}, (_a = statistic[componentName]) === null || _a === void 0 ? void 0 : _a.component), componentToken)\n };\n };\n }\n return {\n token: proxy,\n keys: tokenKeys,\n flush\n };\n}","import { useStyleRegister } from '@ant-design/cssinjs';\nimport { resetIcon } from '../../style';\nimport useToken from '../useToken';\nconst useResetIconStyle = (iconPrefixCls, csp) => {\n const [theme, token] = useToken();\n // Generate style for icons\n return useStyleRegister({\n theme,\n token,\n hashId: '',\n path: ['ant-design-icons', iconPrefixCls],\n nonce: () => csp === null || csp === void 0 ? void 0 : csp.nonce\n }, () => [{\n [`.${iconPrefixCls}`]: Object.assign(Object.assign({}, resetIcon()), {\n [`.${iconPrefixCls} .${iconPrefixCls}-icon`]: {\n display: 'block'\n }\n })\n }]);\n};\nexport default useResetIconStyle;","/* eslint-disable no-redeclare */\nimport { useContext } from 'react';\nimport { useStyleRegister } from '@ant-design/cssinjs';\nimport { warning } from 'rc-util';\nimport { ConfigContext } from '../../config-provider/context';\nimport { genCommonStyle, genLinkStyle } from '../../style';\nimport useToken from '../useToken';\nimport statisticToken, { merge as mergeToken } from './statistic';\nimport useResetIconStyle from './useResetIconStyle';\nexport default function genComponentStyleHook(componentName, styleFn, getDefaultToken) {\n let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n const cells = Array.isArray(componentName) ? componentName : [componentName, componentName];\n const [component] = cells;\n const concatComponent = cells.join('-');\n return prefixCls => {\n const [theme, token, hashId] = useToken();\n const {\n getPrefixCls,\n iconPrefixCls,\n csp\n } = useContext(ConfigContext);\n const rootPrefixCls = getPrefixCls();\n // Shared config\n const sharedConfig = {\n theme,\n token,\n hashId,\n nonce: () => csp === null || csp === void 0 ? void 0 : csp.nonce,\n clientOnly: options.clientOnly,\n // antd is always at top of styles\n order: options.order || -999\n };\n // Generate style for all a tags in antd component.\n useStyleRegister(Object.assign(Object.assign({}, sharedConfig), {\n clientOnly: false,\n path: ['Shared', rootPrefixCls]\n }), () => [{\n // Link\n '&': genLinkStyle(token)\n }]);\n // Generate style for icons\n useResetIconStyle(iconPrefixCls);\n return [useStyleRegister(Object.assign(Object.assign({}, sharedConfig), {\n path: [concatComponent, prefixCls, iconPrefixCls]\n }), () => {\n const {\n token: proxyToken,\n flush\n } = statisticToken(token);\n const customComponentToken = Object.assign({}, token[component]);\n if (options.deprecatedTokens) {\n const {\n deprecatedTokens\n } = options;\n deprecatedTokens.forEach(_ref => {\n let [oldTokenKey, newTokenKey] = _ref;\n var _a;\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? warning(!(customComponentToken === null || customComponentToken === void 0 ? void 0 : customComponentToken[oldTokenKey]), `The token '${String(oldTokenKey)}' of ${component} had deprecated, use '${String(newTokenKey)}' instead.`) : void 0;\n }\n // Should wrap with `if` clause, or there will be `undefined` in object.\n if ((customComponentToken === null || customComponentToken === void 0 ? void 0 : customComponentToken[oldTokenKey]) || (customComponentToken === null || customComponentToken === void 0 ? void 0 : customComponentToken[newTokenKey])) {\n (_a = customComponentToken[newTokenKey]) !== null && _a !== void 0 ? _a : customComponentToken[newTokenKey] = customComponentToken === null || customComponentToken === void 0 ? void 0 : customComponentToken[oldTokenKey];\n }\n });\n }\n const defaultComponentToken = typeof getDefaultToken === 'function' ? getDefaultToken(mergeToken(proxyToken, customComponentToken !== null && customComponentToken !== void 0 ? customComponentToken : {})) : getDefaultToken;\n const mergedComponentToken = Object.assign(Object.assign({}, defaultComponentToken), customComponentToken);\n const componentCls = `.${prefixCls}`;\n const mergedToken = mergeToken(proxyToken, {\n componentCls,\n prefixCls,\n iconCls: `.${iconPrefixCls}`,\n antCls: `.${rootPrefixCls}`\n }, mergedComponentToken);\n const styleInterpolation = styleFn(mergedToken, {\n hashId,\n prefixCls,\n rootPrefixCls,\n iconPrefixCls,\n overrideComponentToken: customComponentToken\n });\n flush(component, mergedComponentToken);\n return [options.resetStyle === false ? null : genCommonStyle(token, prefixCls), styleInterpolation];\n }), hashId];\n };\n}\nexport const genSubStyleComponent = (componentName, styleFn, getDefaultToken, options) => {\n const useStyle = genComponentStyleHook(componentName, styleFn, getDefaultToken, Object.assign({\n resetStyle: false,\n // Sub Style should default after root one\n order: -998\n }, options));\n const StyledComponent = _ref2 => {\n let {\n prefixCls\n } = _ref2;\n useStyle(prefixCls);\n return null;\n };\n if (process.env.NODE_ENV !== 'production') {\n StyledComponent.displayName = `SubStyle_${Array.isArray(componentName) ? componentName.join('.') : componentName}`;\n }\n return StyledComponent;\n};","import useMemo from \"rc-util/es/hooks/useMemo\";\nimport isEqual from \"rc-util/es/isEqual\";\nimport { defaultConfig } from '../../theme/internal';\nexport default function useTheme(theme, parentTheme) {\n const themeConfig = theme || {};\n const parentThemeConfig = themeConfig.inherit === false || !parentTheme ? defaultConfig : parentTheme;\n return useMemo(() => {\n if (!theme) {\n return parentTheme;\n }\n // Override\n const mergedComponents = Object.assign({}, parentThemeConfig.components);\n Object.keys(theme.components || {}).forEach(componentName => {\n mergedComponents[componentName] = Object.assign(Object.assign({}, mergedComponents[componentName]), theme.components[componentName]);\n });\n // Base token\n return Object.assign(Object.assign(Object.assign({}, parentThemeConfig), themeConfig), {\n token: Object.assign(Object.assign({}, parentThemeConfig.token), themeConfig.token),\n components: mergedComponents\n });\n }, [themeConfig, parentThemeConfig], (prev, next) => prev.some((prevTheme, index) => {\n const nextTheme = next[index];\n return !isEqual(prevTheme, nextTheme, true);\n }));\n}","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport * as React from 'react';\nexport var Context = /*#__PURE__*/React.createContext({});\nexport default function MotionProvider(_ref) {\n var children = _ref.children,\n props = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Context.Provider, {\n value: props\n }, children);\n}","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport * as React from 'react';\nvar DomWrapper = /*#__PURE__*/function (_React$Component) {\n _inherits(DomWrapper, _React$Component);\n var _super = _createSuper(DomWrapper);\n function DomWrapper() {\n _classCallCheck(this, DomWrapper);\n return _super.apply(this, arguments);\n }\n _createClass(DomWrapper, [{\n key: \"render\",\n value: function render() {\n return this.props.children;\n }\n }]);\n return DomWrapper;\n}(React.Component);\nexport default DomWrapper;","export var STATUS_NONE = 'none';\nexport var STATUS_APPEAR = 'appear';\nexport var STATUS_ENTER = 'enter';\nexport var STATUS_LEAVE = 'leave';\nexport var STEP_NONE = 'none';\nexport var STEP_PREPARE = 'prepare';\nexport var STEP_START = 'start';\nexport var STEP_ACTIVE = 'active';\nexport var STEP_ACTIVATED = 'end';\n/**\n * Used for disabled motion case.\n * Prepare stage will still work but start & active will be skipped.\n */\nexport var STEP_PREPARED = 'prepared';","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport canUseDOM from \"rc-util/es/Dom/canUseDom\";\n// ================= Transition =================\n// Event wrapper. Copy from react source code\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes[\"Webkit\".concat(styleProp)] = \"webkit\".concat(eventName);\n prefixes[\"Moz\".concat(styleProp)] = \"moz\".concat(eventName);\n prefixes[\"ms\".concat(styleProp)] = \"MS\".concat(eventName);\n prefixes[\"O\".concat(styleProp)] = \"o\".concat(eventName.toLowerCase());\n return prefixes;\n}\nexport function getVendorPrefixes(domSupport, win) {\n var prefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n };\n if (domSupport) {\n if (!('AnimationEvent' in win)) {\n delete prefixes.animationend.animation;\n }\n if (!('TransitionEvent' in win)) {\n delete prefixes.transitionend.transition;\n }\n }\n return prefixes;\n}\nvar vendorPrefixes = getVendorPrefixes(canUseDOM(), typeof window !== 'undefined' ? window : {});\nvar style = {};\nif (canUseDOM()) {\n var _document$createEleme = document.createElement('div');\n style = _document$createEleme.style;\n}\nvar prefixedEventNames = {};\nexport function getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n }\n var prefixMap = vendorPrefixes[eventName];\n if (prefixMap) {\n var stylePropList = Object.keys(prefixMap);\n var len = stylePropList.length;\n for (var i = 0; i < len; i += 1) {\n var styleProp = stylePropList[i];\n if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) {\n prefixedEventNames[eventName] = prefixMap[styleProp];\n return prefixedEventNames[eventName];\n }\n }\n }\n return '';\n}\nvar internalAnimationEndName = getVendorPrefixedEventName('animationend');\nvar internalTransitionEndName = getVendorPrefixedEventName('transitionend');\nexport var supportTransition = !!(internalAnimationEndName && internalTransitionEndName);\nexport var animationEndName = internalAnimationEndName || 'animationend';\nexport var transitionEndName = internalTransitionEndName || 'transitionend';\nexport function getTransitionName(transitionName, transitionType) {\n if (!transitionName) return null;\n if (_typeof(transitionName) === 'object') {\n var type = transitionType.replace(/-\\w/g, function (match) {\n return match[1].toUpperCase();\n });\n return transitionName[type];\n }\n return \"\".concat(transitionName, \"-\").concat(transitionType);\n}","import * as React from 'react';\nimport { useRef } from 'react';\nimport { animationEndName, transitionEndName } from \"../util/motion\";\nexport default (function (callback) {\n var cacheElementRef = useRef();\n\n // Cache callback\n var callbackRef = useRef(callback);\n callbackRef.current = callback;\n\n // Internal motion event handler\n var onInternalMotionEnd = React.useCallback(function (event) {\n callbackRef.current(event);\n }, []);\n\n // Remove events\n function removeMotionEvents(element) {\n if (element) {\n element.removeEventListener(transitionEndName, onInternalMotionEnd);\n element.removeEventListener(animationEndName, onInternalMotionEnd);\n }\n }\n\n // Patch events\n function patchMotionEvents(element) {\n if (cacheElementRef.current && cacheElementRef.current !== element) {\n removeMotionEvents(cacheElementRef.current);\n }\n if (element && element !== cacheElementRef.current) {\n element.addEventListener(transitionEndName, onInternalMotionEnd);\n element.addEventListener(animationEndName, onInternalMotionEnd);\n\n // Save as cache in case dom removed trigger by `motionDeadline`\n cacheElementRef.current = element;\n }\n }\n\n // Clean up when removed\n React.useEffect(function () {\n return function () {\n removeMotionEvents(cacheElementRef.current);\n };\n }, []);\n return [patchMotionEvents, removeMotionEvents];\n});","import canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport { useEffect, useLayoutEffect } from 'react';\n\n// It's safe to use `useLayoutEffect` but the warning is annoying\nvar useIsomorphicLayoutEffect = canUseDom() ? useLayoutEffect : useEffect;\nexport default useIsomorphicLayoutEffect;","import raf from \"rc-util/es/raf\";\nimport * as React from 'react';\nexport default (function () {\n var nextFrameRef = React.useRef(null);\n function cancelNextFrame() {\n raf.cancel(nextFrameRef.current);\n }\n function nextFrame(callback) {\n var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n cancelNextFrame();\n var nextFrameId = raf(function () {\n if (delay <= 1) {\n callback({\n isCanceled: function isCanceled() {\n return nextFrameId !== nextFrameRef.current;\n }\n });\n } else {\n nextFrame(callback, delay - 1);\n }\n });\n nextFrameRef.current = nextFrameId;\n }\n React.useEffect(function () {\n return function () {\n cancelNextFrame();\n };\n }, []);\n return [nextFrame, cancelNextFrame];\n});","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport useState from \"rc-util/es/hooks/useState\";\nimport * as React from 'react';\nimport { STEP_ACTIVATED, STEP_ACTIVE, STEP_NONE, STEP_PREPARE, STEP_PREPARED, STEP_START } from \"../interface\";\nimport useIsomorphicLayoutEffect from \"./useIsomorphicLayoutEffect\";\nimport useNextFrame from \"./useNextFrame\";\nvar FULL_STEP_QUEUE = [STEP_PREPARE, STEP_START, STEP_ACTIVE, STEP_ACTIVATED];\nvar SIMPLE_STEP_QUEUE = [STEP_PREPARE, STEP_PREPARED];\n\n/** Skip current step */\nexport var SkipStep = false;\n/** Current step should be update in */\nexport var DoStep = true;\nexport function isActive(step) {\n return step === STEP_ACTIVE || step === STEP_ACTIVATED;\n}\nexport default (function (status, prepareOnly, callback) {\n var _useState = useState(STEP_NONE),\n _useState2 = _slicedToArray(_useState, 2),\n step = _useState2[0],\n setStep = _useState2[1];\n var _useNextFrame = useNextFrame(),\n _useNextFrame2 = _slicedToArray(_useNextFrame, 2),\n nextFrame = _useNextFrame2[0],\n cancelNextFrame = _useNextFrame2[1];\n function startQueue() {\n setStep(STEP_PREPARE, true);\n }\n var STEP_QUEUE = prepareOnly ? SIMPLE_STEP_QUEUE : FULL_STEP_QUEUE;\n useIsomorphicLayoutEffect(function () {\n if (step !== STEP_NONE && step !== STEP_ACTIVATED) {\n var index = STEP_QUEUE.indexOf(step);\n var nextStep = STEP_QUEUE[index + 1];\n var result = callback(step);\n if (result === SkipStep) {\n // Skip when no needed\n setStep(nextStep, true);\n } else if (nextStep) {\n // Do as frame for step update\n nextFrame(function (info) {\n function doNext() {\n // Skip since current queue is ood\n if (info.isCanceled()) return;\n setStep(nextStep, true);\n }\n if (result === true) {\n doNext();\n } else {\n // Only promise should be async\n Promise.resolve(result).then(doNext);\n }\n });\n }\n }\n }, [status, step]);\n React.useEffect(function () {\n return function () {\n cancelNextFrame();\n };\n }, []);\n return [startQueue, step];\n});","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport useState from \"rc-util/es/hooks/useState\";\nimport * as React from 'react';\nimport { useEffect, useRef } from 'react';\nimport { STATUS_APPEAR, STATUS_ENTER, STATUS_LEAVE, STATUS_NONE, STEP_ACTIVE, STEP_PREPARE, STEP_PREPARED, STEP_START } from \"../interface\";\nimport useDomMotionEvents from \"./useDomMotionEvents\";\nimport useIsomorphicLayoutEffect from \"./useIsomorphicLayoutEffect\";\nimport useStepQueue, { DoStep, isActive, SkipStep } from \"./useStepQueue\";\nexport default function useStatus(supportMotion, visible, getElement, _ref) {\n var _ref$motionEnter = _ref.motionEnter,\n motionEnter = _ref$motionEnter === void 0 ? true : _ref$motionEnter,\n _ref$motionAppear = _ref.motionAppear,\n motionAppear = _ref$motionAppear === void 0 ? true : _ref$motionAppear,\n _ref$motionLeave = _ref.motionLeave,\n motionLeave = _ref$motionLeave === void 0 ? true : _ref$motionLeave,\n motionDeadline = _ref.motionDeadline,\n motionLeaveImmediately = _ref.motionLeaveImmediately,\n onAppearPrepare = _ref.onAppearPrepare,\n onEnterPrepare = _ref.onEnterPrepare,\n onLeavePrepare = _ref.onLeavePrepare,\n onAppearStart = _ref.onAppearStart,\n onEnterStart = _ref.onEnterStart,\n onLeaveStart = _ref.onLeaveStart,\n onAppearActive = _ref.onAppearActive,\n onEnterActive = _ref.onEnterActive,\n onLeaveActive = _ref.onLeaveActive,\n onAppearEnd = _ref.onAppearEnd,\n onEnterEnd = _ref.onEnterEnd,\n onLeaveEnd = _ref.onLeaveEnd,\n onVisibleChanged = _ref.onVisibleChanged;\n // Used for outer render usage to avoid `visible: false & status: none` to render nothing\n var _useState = useState(),\n _useState2 = _slicedToArray(_useState, 2),\n asyncVisible = _useState2[0],\n setAsyncVisible = _useState2[1];\n var _useState3 = useState(STATUS_NONE),\n _useState4 = _slicedToArray(_useState3, 2),\n status = _useState4[0],\n setStatus = _useState4[1];\n var _useState5 = useState(null),\n _useState6 = _slicedToArray(_useState5, 2),\n style = _useState6[0],\n setStyle = _useState6[1];\n var mountedRef = useRef(false);\n var deadlineRef = useRef(null);\n\n // =========================== Dom Node ===========================\n function getDomElement() {\n return getElement();\n }\n\n // ========================== Motion End ==========================\n var activeRef = useRef(false);\n\n /**\n * Clean up status & style\n */\n function updateMotionEndStatus() {\n setStatus(STATUS_NONE, true);\n setStyle(null, true);\n }\n function onInternalMotionEnd(event) {\n var element = getDomElement();\n if (event && !event.deadline && event.target !== element) {\n // event exists\n // not initiated by deadline\n // transitionEnd not fired by inner elements\n return;\n }\n var currentActive = activeRef.current;\n var canEnd;\n if (status === STATUS_APPEAR && currentActive) {\n canEnd = onAppearEnd === null || onAppearEnd === void 0 ? void 0 : onAppearEnd(element, event);\n } else if (status === STATUS_ENTER && currentActive) {\n canEnd = onEnterEnd === null || onEnterEnd === void 0 ? void 0 : onEnterEnd(element, event);\n } else if (status === STATUS_LEAVE && currentActive) {\n canEnd = onLeaveEnd === null || onLeaveEnd === void 0 ? void 0 : onLeaveEnd(element, event);\n }\n\n // Only update status when `canEnd` and not destroyed\n if (status !== STATUS_NONE && currentActive && canEnd !== false) {\n updateMotionEndStatus();\n }\n }\n var _useDomMotionEvents = useDomMotionEvents(onInternalMotionEnd),\n _useDomMotionEvents2 = _slicedToArray(_useDomMotionEvents, 1),\n patchMotionEvents = _useDomMotionEvents2[0];\n\n // ============================= Step =============================\n var getEventHandlers = function getEventHandlers(targetStatus) {\n var _ref2, _ref3, _ref4;\n switch (targetStatus) {\n case STATUS_APPEAR:\n return _ref2 = {}, _defineProperty(_ref2, STEP_PREPARE, onAppearPrepare), _defineProperty(_ref2, STEP_START, onAppearStart), _defineProperty(_ref2, STEP_ACTIVE, onAppearActive), _ref2;\n case STATUS_ENTER:\n return _ref3 = {}, _defineProperty(_ref3, STEP_PREPARE, onEnterPrepare), _defineProperty(_ref3, STEP_START, onEnterStart), _defineProperty(_ref3, STEP_ACTIVE, onEnterActive), _ref3;\n case STATUS_LEAVE:\n return _ref4 = {}, _defineProperty(_ref4, STEP_PREPARE, onLeavePrepare), _defineProperty(_ref4, STEP_START, onLeaveStart), _defineProperty(_ref4, STEP_ACTIVE, onLeaveActive), _ref4;\n default:\n return {};\n }\n };\n var eventHandlers = React.useMemo(function () {\n return getEventHandlers(status);\n }, [status]);\n var _useStepQueue = useStepQueue(status, !supportMotion, function (newStep) {\n // Only prepare step can be skip\n if (newStep === STEP_PREPARE) {\n var onPrepare = eventHandlers[STEP_PREPARE];\n if (!onPrepare) {\n return SkipStep;\n }\n return onPrepare(getDomElement());\n }\n\n // Rest step is sync update\n if (step in eventHandlers) {\n var _eventHandlers$step;\n setStyle(((_eventHandlers$step = eventHandlers[step]) === null || _eventHandlers$step === void 0 ? void 0 : _eventHandlers$step.call(eventHandlers, getDomElement(), null)) || null);\n }\n if (step === STEP_ACTIVE) {\n // Patch events when motion needed\n patchMotionEvents(getDomElement());\n if (motionDeadline > 0) {\n clearTimeout(deadlineRef.current);\n deadlineRef.current = setTimeout(function () {\n onInternalMotionEnd({\n deadline: true\n });\n }, motionDeadline);\n }\n }\n if (step === STEP_PREPARED) {\n updateMotionEndStatus();\n }\n return DoStep;\n }),\n _useStepQueue2 = _slicedToArray(_useStepQueue, 2),\n startStep = _useStepQueue2[0],\n step = _useStepQueue2[1];\n var active = isActive(step);\n activeRef.current = active;\n\n // ============================ Status ============================\n // Update with new status\n useIsomorphicLayoutEffect(function () {\n setAsyncVisible(visible);\n var isMounted = mountedRef.current;\n mountedRef.current = true;\n\n // if (!supportMotion) {\n // return;\n // }\n\n var nextStatus;\n\n // Appear\n if (!isMounted && visible && motionAppear) {\n nextStatus = STATUS_APPEAR;\n }\n\n // Enter\n if (isMounted && visible && motionEnter) {\n nextStatus = STATUS_ENTER;\n }\n\n // Leave\n if (isMounted && !visible && motionLeave || !isMounted && motionLeaveImmediately && !visible && motionLeave) {\n nextStatus = STATUS_LEAVE;\n }\n var nextEventHandlers = getEventHandlers(nextStatus);\n\n // Update to next status\n if (nextStatus && (supportMotion || nextEventHandlers[STEP_PREPARE])) {\n setStatus(nextStatus);\n startStep();\n } else {\n // Set back in case no motion but prev status has prepare step\n setStatus(STATUS_NONE);\n }\n }, [visible]);\n\n // ============================ Effect ============================\n // Reset when motion changed\n useEffect(function () {\n if (\n // Cancel appear\n status === STATUS_APPEAR && !motionAppear ||\n // Cancel enter\n status === STATUS_ENTER && !motionEnter ||\n // Cancel leave\n status === STATUS_LEAVE && !motionLeave) {\n setStatus(STATUS_NONE);\n }\n }, [motionAppear, motionEnter, motionLeave]);\n useEffect(function () {\n return function () {\n mountedRef.current = false;\n clearTimeout(deadlineRef.current);\n };\n }, []);\n\n // Trigger `onVisibleChanged`\n var firstMountChangeRef = React.useRef(false);\n useEffect(function () {\n // [visible & motion not end] => [!visible & motion end] still need trigger onVisibleChanged\n if (asyncVisible) {\n firstMountChangeRef.current = true;\n }\n if (asyncVisible !== undefined && status === STATUS_NONE) {\n // Skip first render is invisible since it's nothing changed\n if (firstMountChangeRef.current || asyncVisible) {\n onVisibleChanged === null || onVisibleChanged === void 0 ? void 0 : onVisibleChanged(asyncVisible);\n }\n firstMountChangeRef.current = true;\n }\n }, [asyncVisible, status]);\n\n // ============================ Styles ============================\n var mergedStyle = style;\n if (eventHandlers[STEP_PREPARE] && step === STEP_START) {\n mergedStyle = _objectSpread({\n transition: 'none'\n }, mergedStyle);\n }\n return [status, step, mergedStyle, asyncVisible !== null && asyncVisible !== void 0 ? asyncVisible : visible];\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\n/* eslint-disable react/default-props-match-prop-types, react/no-multi-comp, react/prop-types */\nimport classNames from 'classnames';\nimport findDOMNode from \"rc-util/es/Dom/findDOMNode\";\nimport { fillRef, supportRef } from \"rc-util/es/ref\";\nimport * as React from 'react';\nimport { useRef } from 'react';\nimport { Context } from \"./context\";\nimport DomWrapper from \"./DomWrapper\";\nimport useStatus from \"./hooks/useStatus\";\nimport { isActive } from \"./hooks/useStepQueue\";\nimport { STATUS_NONE, STEP_PREPARE, STEP_START } from \"./interface\";\nimport { getTransitionName, supportTransition } from \"./util/motion\";\n/**\n * `transitionSupport` is used for none transition test case.\n * Default we use browser transition event support check.\n */\nexport function genCSSMotion(config) {\n var transitionSupport = config;\n if (_typeof(config) === 'object') {\n transitionSupport = config.transitionSupport;\n }\n function isSupportTransition(props, contextMotion) {\n return !!(props.motionName && transitionSupport && contextMotion !== false);\n }\n var CSSMotion = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _props$visible = props.visible,\n visible = _props$visible === void 0 ? true : _props$visible,\n _props$removeOnLeave = props.removeOnLeave,\n removeOnLeave = _props$removeOnLeave === void 0 ? true : _props$removeOnLeave,\n forceRender = props.forceRender,\n children = props.children,\n motionName = props.motionName,\n leavedClassName = props.leavedClassName,\n eventProps = props.eventProps;\n var _React$useContext = React.useContext(Context),\n contextMotion = _React$useContext.motion;\n var supportMotion = isSupportTransition(props, contextMotion);\n\n // Ref to the react node, it may be a HTMLElement\n var nodeRef = useRef();\n // Ref to the dom wrapper in case ref can not pass to HTMLElement\n var wrapperNodeRef = useRef();\n function getDomElement() {\n try {\n // Here we're avoiding call for findDOMNode since it's deprecated\n // in strict mode. We're calling it only when node ref is not\n // an instance of DOM HTMLElement. Otherwise use\n // findDOMNode as a final resort\n return nodeRef.current instanceof HTMLElement ? nodeRef.current : findDOMNode(wrapperNodeRef.current);\n } catch (e) {\n // Only happen when `motionDeadline` trigger but element removed.\n return null;\n }\n }\n var _useStatus = useStatus(supportMotion, visible, getDomElement, props),\n _useStatus2 = _slicedToArray(_useStatus, 4),\n status = _useStatus2[0],\n statusStep = _useStatus2[1],\n statusStyle = _useStatus2[2],\n mergedVisible = _useStatus2[3];\n\n // Record whether content has rendered\n // Will return null for un-rendered even when `removeOnLeave={false}`\n var renderedRef = React.useRef(mergedVisible);\n if (mergedVisible) {\n renderedRef.current = true;\n }\n\n // ====================== Refs ======================\n var setNodeRef = React.useCallback(function (node) {\n nodeRef.current = node;\n fillRef(ref, node);\n }, [ref]);\n\n // ===================== Render =====================\n var motionChildren;\n var mergedProps = _objectSpread(_objectSpread({}, eventProps), {}, {\n visible: visible\n });\n if (!children) {\n // No children\n motionChildren = null;\n } else if (status === STATUS_NONE) {\n // Stable children\n if (mergedVisible) {\n motionChildren = children(_objectSpread({}, mergedProps), setNodeRef);\n } else if (!removeOnLeave && renderedRef.current && leavedClassName) {\n motionChildren = children(_objectSpread(_objectSpread({}, mergedProps), {}, {\n className: leavedClassName\n }), setNodeRef);\n } else if (forceRender || !removeOnLeave && !leavedClassName) {\n motionChildren = children(_objectSpread(_objectSpread({}, mergedProps), {}, {\n style: {\n display: 'none'\n }\n }), setNodeRef);\n } else {\n motionChildren = null;\n }\n } else {\n var _classNames;\n // In motion\n var statusSuffix;\n if (statusStep === STEP_PREPARE) {\n statusSuffix = 'prepare';\n } else if (isActive(statusStep)) {\n statusSuffix = 'active';\n } else if (statusStep === STEP_START) {\n statusSuffix = 'start';\n }\n var motionCls = getTransitionName(motionName, \"\".concat(status, \"-\").concat(statusSuffix));\n motionChildren = children(_objectSpread(_objectSpread({}, mergedProps), {}, {\n className: classNames(getTransitionName(motionName, status), (_classNames = {}, _defineProperty(_classNames, motionCls, motionCls && statusSuffix), _defineProperty(_classNames, motionName, typeof motionName === 'string'), _classNames)),\n style: statusStyle\n }), setNodeRef);\n }\n\n // Auto inject ref if child node not have `ref` props\n if ( /*#__PURE__*/React.isValidElement(motionChildren) && supportRef(motionChildren)) {\n var _ref = motionChildren,\n originNodeRef = _ref.ref;\n if (!originNodeRef) {\n motionChildren = /*#__PURE__*/React.cloneElement(motionChildren, {\n ref: setNodeRef\n });\n }\n }\n return /*#__PURE__*/React.createElement(DomWrapper, {\n ref: wrapperNodeRef\n }, motionChildren);\n });\n CSSMotion.displayName = 'CSSMotion';\n return CSSMotion;\n}\nexport default genCSSMotion(supportTransition);","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nexport var STATUS_ADD = 'add';\nexport var STATUS_KEEP = 'keep';\nexport var STATUS_REMOVE = 'remove';\nexport var STATUS_REMOVED = 'removed';\nexport function wrapKeyToObject(key) {\n var keyObj;\n if (key && _typeof(key) === 'object' && 'key' in key) {\n keyObj = key;\n } else {\n keyObj = {\n key: key\n };\n }\n return _objectSpread(_objectSpread({}, keyObj), {}, {\n key: String(keyObj.key)\n });\n}\nexport function parseKeys() {\n var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n return keys.map(wrapKeyToObject);\n}\nexport function diffKeys() {\n var prevKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var currentKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var list = [];\n var currentIndex = 0;\n var currentLen = currentKeys.length;\n var prevKeyObjects = parseKeys(prevKeys);\n var currentKeyObjects = parseKeys(currentKeys);\n\n // Check prev keys to insert or keep\n prevKeyObjects.forEach(function (keyObj) {\n var hit = false;\n for (var i = currentIndex; i < currentLen; i += 1) {\n var currentKeyObj = currentKeyObjects[i];\n if (currentKeyObj.key === keyObj.key) {\n // New added keys should add before current key\n if (currentIndex < i) {\n list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function (obj) {\n return _objectSpread(_objectSpread({}, obj), {}, {\n status: STATUS_ADD\n });\n }));\n currentIndex = i;\n }\n list.push(_objectSpread(_objectSpread({}, currentKeyObj), {}, {\n status: STATUS_KEEP\n }));\n currentIndex += 1;\n hit = true;\n break;\n }\n }\n\n // If not hit, it means key is removed\n if (!hit) {\n list.push(_objectSpread(_objectSpread({}, keyObj), {}, {\n status: STATUS_REMOVE\n }));\n }\n });\n\n // Add rest to the list\n if (currentIndex < currentLen) {\n list = list.concat(currentKeyObjects.slice(currentIndex).map(function (obj) {\n return _objectSpread(_objectSpread({}, obj), {}, {\n status: STATUS_ADD\n });\n }));\n }\n\n /**\n * Merge same key when it remove and add again:\n * [1 - add, 2 - keep, 1 - remove] -> [1 - keep, 2 - keep]\n */\n var keys = {};\n list.forEach(function (_ref) {\n var key = _ref.key;\n keys[key] = (keys[key] || 0) + 1;\n });\n var duplicatedKeys = Object.keys(keys).filter(function (key) {\n return keys[key] > 1;\n });\n duplicatedKeys.forEach(function (matchKey) {\n // Remove `STATUS_REMOVE` node.\n list = list.filter(function (_ref2) {\n var key = _ref2.key,\n status = _ref2.status;\n return key !== matchKey || status !== STATUS_REMOVE;\n });\n\n // Update `STATUS_ADD` to `STATUS_KEEP`\n list.forEach(function (node) {\n if (node.key === matchKey) {\n // eslint-disable-next-line no-param-reassign\n node.status = STATUS_KEEP;\n }\n });\n });\n return list;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar _excluded = [\"component\", \"children\", \"onVisibleChanged\", \"onAllRemoved\"],\n _excluded2 = [\"status\"];\n/* eslint react/prop-types: 0 */\nimport * as React from 'react';\nimport OriginCSSMotion from \"./CSSMotion\";\nimport { diffKeys, parseKeys, STATUS_ADD, STATUS_KEEP, STATUS_REMOVE, STATUS_REMOVED } from \"./util/diff\";\nimport { supportTransition } from \"./util/motion\";\nvar MOTION_PROP_NAMES = ['eventProps', 'visible', 'children', 'motionName', 'motionAppear', 'motionEnter', 'motionLeave', 'motionLeaveImmediately', 'motionDeadline', 'removeOnLeave', 'leavedClassName', 'onAppearPrepare', 'onAppearStart', 'onAppearActive', 'onAppearEnd', 'onEnterStart', 'onEnterActive', 'onEnterEnd', 'onLeaveStart', 'onLeaveActive', 'onLeaveEnd'];\n/**\n * Generate a CSSMotionList component with config\n * @param transitionSupport No need since CSSMotionList no longer depends on transition support\n * @param CSSMotion CSSMotion component\n */\nexport function genCSSMotionList(transitionSupport) {\n var CSSMotion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : OriginCSSMotion;\n var CSSMotionList = /*#__PURE__*/function (_React$Component) {\n _inherits(CSSMotionList, _React$Component);\n var _super = _createSuper(CSSMotionList);\n function CSSMotionList() {\n var _this;\n _classCallCheck(this, CSSMotionList);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n keyEntities: []\n });\n // ZombieJ: Return the count of rest keys. It's safe to refactor if need more info.\n _defineProperty(_assertThisInitialized(_this), \"removeKey\", function (removeKey) {\n var keyEntities = _this.state.keyEntities;\n var nextKeyEntities = keyEntities.map(function (entity) {\n if (entity.key !== removeKey) return entity;\n return _objectSpread(_objectSpread({}, entity), {}, {\n status: STATUS_REMOVED\n });\n });\n _this.setState({\n keyEntities: nextKeyEntities\n });\n return nextKeyEntities.filter(function (_ref) {\n var status = _ref.status;\n return status !== STATUS_REMOVED;\n }).length;\n });\n return _this;\n }\n _createClass(CSSMotionList, [{\n key: \"render\",\n value: function render() {\n var _this2 = this;\n var keyEntities = this.state.keyEntities;\n var _this$props = this.props,\n component = _this$props.component,\n children = _this$props.children,\n _onVisibleChanged = _this$props.onVisibleChanged,\n onAllRemoved = _this$props.onAllRemoved,\n restProps = _objectWithoutProperties(_this$props, _excluded);\n var Component = component || React.Fragment;\n var motionProps = {};\n MOTION_PROP_NAMES.forEach(function (prop) {\n motionProps[prop] = restProps[prop];\n delete restProps[prop];\n });\n delete restProps.keys;\n return /*#__PURE__*/React.createElement(Component, restProps, keyEntities.map(function (_ref2, index) {\n var status = _ref2.status,\n eventProps = _objectWithoutProperties(_ref2, _excluded2);\n var visible = status === STATUS_ADD || status === STATUS_KEEP;\n return /*#__PURE__*/React.createElement(CSSMotion, _extends({}, motionProps, {\n key: eventProps.key,\n visible: visible,\n eventProps: eventProps,\n onVisibleChanged: function onVisibleChanged(changedVisible) {\n _onVisibleChanged === null || _onVisibleChanged === void 0 ? void 0 : _onVisibleChanged(changedVisible, {\n key: eventProps.key\n });\n if (!changedVisible) {\n var restKeysCount = _this2.removeKey(eventProps.key);\n if (restKeysCount === 0 && onAllRemoved) {\n onAllRemoved();\n }\n }\n }\n }), function (props, ref) {\n return children(_objectSpread(_objectSpread({}, props), {}, {\n index: index\n }), ref);\n });\n }));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(_ref3, _ref4) {\n var keys = _ref3.keys;\n var keyEntities = _ref4.keyEntities;\n var parsedKeyObjects = parseKeys(keys);\n var mixedKeyEntities = diffKeys(keyEntities, parsedKeyObjects);\n return {\n keyEntities: mixedKeyEntities.filter(function (entity) {\n var prevEntity = keyEntities.find(function (_ref5) {\n var key = _ref5.key;\n return entity.key === key;\n });\n\n // Remove if already mark as removed\n if (prevEntity && prevEntity.status === STATUS_REMOVED && entity.status === STATUS_REMOVE) {\n return false;\n }\n return true;\n })\n };\n }\n }]);\n return CSSMotionList;\n }(React.Component);\n _defineProperty(CSSMotionList, \"defaultProps\", {\n component: 'div'\n });\n return CSSMotionList;\n}\nexport default genCSSMotionList(supportTransition);","\"use client\";\n\nimport { Provider as MotionProvider } from 'rc-motion';\nimport * as React from 'react';\nimport { useToken } from '../theme/internal';\nexport default function MotionWrapper(props) {\n const {\n children\n } = props;\n const [, token] = useToken();\n const {\n motion\n } = token;\n const needWrapMotionProviderRef = React.useRef(false);\n needWrapMotionProviderRef.current = needWrapMotionProviderRef.current || motion === false;\n if (needWrapMotionProviderRef.current) {\n return /*#__PURE__*/React.createElement(MotionProvider, {\n motion: motion\n }, children);\n }\n return children;\n}","\"use client\";\n\nimport * as React from 'react';\nimport { devUseWarning } from '../_util/warning';\n/**\n * Warning for ConfigProviderProps.\n * This will be empty function in production.\n */\nconst PropWarning = /*#__PURE__*/React.memo(_ref => {\n let {\n dropdownMatchSelectWidth\n } = _ref;\n const warning = devUseWarning('ConfigProvider');\n warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');\n return null;\n});\nif (process.env.NODE_ENV !== 'production') {\n PropWarning.displayName = 'PropWarning';\n}\nexport default process.env.NODE_ENV !== 'production' ? PropWarning : () => null;","\"use client\";\n'use client';\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport { createTheme } from '@ant-design/cssinjs';\nimport IconContext from \"@ant-design/icons/es/components/Context\";\nimport useMemo from \"rc-util/es/hooks/useMemo\";\nimport { merge } from \"rc-util/es/utils/set\";\nimport warning, { WarningContext } from '../_util/warning';\nimport ValidateMessagesContext from '../form/validateMessagesContext';\nimport LocaleProvider, { ANT_MARK } from '../locale';\nimport LocaleContext from '../locale/context';\nimport defaultLocale from '../locale/en_US';\nimport { defaultTheme, DesignTokenContext } from '../theme/context';\nimport defaultSeedToken from '../theme/themes/seed';\nimport { ConfigConsumer, ConfigContext, defaultIconPrefixCls } from './context';\nimport { registerTheme } from './cssVariables';\nimport { DisabledContextProvider } from './DisabledContext';\nimport useConfig from './hooks/useConfig';\nimport useTheme from './hooks/useTheme';\nimport MotionWrapper from './MotionWrapper';\nimport PropWarning from './PropWarning';\nimport SizeContext, { SizeContextProvider } from './SizeContext';\nimport useStyle from './style';\n/**\n * Since too many feedback using static method like `Modal.confirm` not getting theme, we record the\n * theme register info here to help developer get warning info.\n */\nlet existThemeConfig = false;\nexport const warnContext = process.env.NODE_ENV !== 'production' ? componentName => {\n process.env.NODE_ENV !== \"production\" ? warning(!existThemeConfig, componentName, `Static function can not consume context like dynamic theme. Please use 'App' component instead.`) : void 0;\n} : /* istanbul ignore next */\nnull;\nexport { ConfigConsumer, ConfigContext, defaultIconPrefixCls };\nexport const configConsumerProps = ['getTargetContainer', 'getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale', 'pageHeader'];\n// These props is used by `useContext` directly in sub component\nconst PASSED_PROPS = ['getTargetContainer', 'getPopupContainer', 'renderEmpty', 'pageHeader', 'input', 'pagination', 'form', 'select', 'button'];\nexport const defaultPrefixCls = 'ant';\nlet globalPrefixCls;\nlet globalIconPrefixCls;\nlet globalTheme;\nfunction getGlobalPrefixCls() {\n return globalPrefixCls || defaultPrefixCls;\n}\nfunction getGlobalIconPrefixCls() {\n return globalIconPrefixCls || defaultIconPrefixCls;\n}\nfunction isLegacyTheme(theme) {\n return Object.keys(theme).some(key => key.endsWith('Color'));\n}\nconst setGlobalConfig = _ref => {\n let {\n prefixCls,\n iconPrefixCls,\n theme\n } = _ref;\n if (prefixCls !== undefined) {\n globalPrefixCls = prefixCls;\n }\n if (iconPrefixCls !== undefined) {\n globalIconPrefixCls = iconPrefixCls;\n }\n if (theme) {\n if (isLegacyTheme(theme)) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'ConfigProvider', '`config` of css variable theme is not work in v5. Please use new `theme` config instead.') : void 0;\n registerTheme(getGlobalPrefixCls(), theme);\n } else {\n globalTheme = theme;\n }\n }\n};\nexport const globalConfig = () => ({\n getPrefixCls: (suffixCls, customizePrefixCls) => {\n if (customizePrefixCls) {\n return customizePrefixCls;\n }\n return suffixCls ? `${getGlobalPrefixCls()}-${suffixCls}` : getGlobalPrefixCls();\n },\n getIconPrefixCls: getGlobalIconPrefixCls,\n getRootPrefixCls: () => {\n // If Global prefixCls provided, use this\n if (globalPrefixCls) {\n return globalPrefixCls;\n }\n // Fallback to default prefixCls\n return getGlobalPrefixCls();\n },\n getTheme: () => globalTheme\n});\nconst ProviderChildren = props => {\n const {\n children,\n csp: customCsp,\n autoInsertSpaceInButton,\n alert,\n anchor,\n form,\n locale,\n componentSize,\n direction,\n space,\n virtual,\n dropdownMatchSelectWidth,\n popupMatchSelectWidth,\n popupOverflow,\n legacyLocale,\n parentContext,\n iconPrefixCls: customIconPrefixCls,\n theme,\n componentDisabled,\n segmented,\n statistic,\n spin,\n calendar,\n carousel,\n cascader,\n collapse,\n typography,\n checkbox,\n descriptions,\n divider,\n drawer,\n skeleton,\n steps,\n image,\n layout,\n list,\n mentions,\n modal,\n progress,\n result,\n slider,\n breadcrumb,\n menu,\n pagination,\n input,\n empty,\n badge,\n radio,\n rate,\n switch: SWITCH,\n transfer,\n avatar,\n message,\n tag,\n table,\n card,\n tabs,\n timeline,\n timePicker,\n upload,\n notification,\n tree,\n colorPicker,\n datePicker,\n flex,\n wave,\n warning: warningConfig\n } = props;\n // =================================== Context ===================================\n const getPrefixCls = React.useCallback((suffixCls, customizePrefixCls) => {\n const {\n prefixCls\n } = props;\n if (customizePrefixCls) {\n return customizePrefixCls;\n }\n const mergedPrefixCls = prefixCls || parentContext.getPrefixCls('');\n return suffixCls ? `${mergedPrefixCls}-${suffixCls}` : mergedPrefixCls;\n }, [parentContext.getPrefixCls, props.prefixCls]);\n const iconPrefixCls = customIconPrefixCls || parentContext.iconPrefixCls || defaultIconPrefixCls;\n const csp = customCsp || parentContext.csp;\n useStyle(iconPrefixCls, csp);\n const mergedTheme = useTheme(theme, parentContext.theme);\n if (process.env.NODE_ENV !== 'production') {\n existThemeConfig = existThemeConfig || !!mergedTheme;\n }\n const baseConfig = {\n csp,\n autoInsertSpaceInButton,\n alert,\n anchor,\n locale: locale || legacyLocale,\n direction,\n space,\n virtual,\n popupMatchSelectWidth: popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth,\n popupOverflow,\n getPrefixCls,\n iconPrefixCls,\n theme: mergedTheme,\n segmented,\n statistic,\n spin,\n calendar,\n carousel,\n cascader,\n collapse,\n typography,\n checkbox,\n descriptions,\n divider,\n drawer,\n skeleton,\n steps,\n image,\n input,\n layout,\n list,\n mentions,\n modal,\n progress,\n result,\n slider,\n breadcrumb,\n menu,\n pagination,\n empty,\n badge,\n radio,\n rate,\n switch: SWITCH,\n transfer,\n avatar,\n message,\n tag,\n table,\n card,\n tabs,\n timeline,\n timePicker,\n upload,\n notification,\n tree,\n colorPicker,\n datePicker,\n flex,\n wave,\n warning: warningConfig\n };\n const config = Object.assign({}, parentContext);\n Object.keys(baseConfig).forEach(key => {\n if (baseConfig[key] !== undefined) {\n config[key] = baseConfig[key];\n }\n });\n // Pass the props used by `useContext` directly with child component.\n // These props should merged into `config`.\n PASSED_PROPS.forEach(propName => {\n const propValue = props[propName];\n if (propValue) {\n config[propName] = propValue;\n }\n });\n // https://github.com/ant-design/ant-design/issues/27617\n const memoedConfig = useMemo(() => config, config, (prevConfig, currentConfig) => {\n const prevKeys = Object.keys(prevConfig);\n const currentKeys = Object.keys(currentConfig);\n return prevKeys.length !== currentKeys.length || prevKeys.some(key => prevConfig[key] !== currentConfig[key]);\n });\n const memoIconContextValue = React.useMemo(() => ({\n prefixCls: iconPrefixCls,\n csp\n }), [iconPrefixCls, csp]);\n let childNode = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PropWarning, {\n dropdownMatchSelectWidth: dropdownMatchSelectWidth\n }), children);\n const validateMessages = React.useMemo(() => {\n var _a, _b, _c, _d;\n return merge(((_a = defaultLocale.Form) === null || _a === void 0 ? void 0 : _a.defaultValidateMessages) || {}, ((_c = (_b = memoedConfig.locale) === null || _b === void 0 ? void 0 : _b.Form) === null || _c === void 0 ? void 0 : _c.defaultValidateMessages) || {}, ((_d = memoedConfig.form) === null || _d === void 0 ? void 0 : _d.validateMessages) || {}, (form === null || form === void 0 ? void 0 : form.validateMessages) || {});\n }, [memoedConfig, form === null || form === void 0 ? void 0 : form.validateMessages]);\n if (Object.keys(validateMessages).length > 0) {\n childNode = /*#__PURE__*/React.createElement(ValidateMessagesContext.Provider, {\n value: validateMessages\n }, childNode);\n }\n if (locale) {\n childNode = /*#__PURE__*/React.createElement(LocaleProvider, {\n locale: locale,\n _ANT_MARK__: ANT_MARK\n }, childNode);\n }\n if (iconPrefixCls || csp) {\n childNode = /*#__PURE__*/React.createElement(IconContext.Provider, {\n value: memoIconContextValue\n }, childNode);\n }\n if (componentSize) {\n childNode = /*#__PURE__*/React.createElement(SizeContextProvider, {\n size: componentSize\n }, childNode);\n }\n // =================================== Motion ===================================\n childNode = /*#__PURE__*/React.createElement(MotionWrapper, null, childNode);\n // ================================ Dynamic theme ================================\n const memoTheme = React.useMemo(() => {\n const _a = mergedTheme || {},\n {\n algorithm,\n token,\n components\n } = _a,\n rest = __rest(_a, [\"algorithm\", \"token\", \"components\"]);\n const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme;\n const parsedComponents = {};\n Object.entries(components || {}).forEach(_ref2 => {\n let [componentName, componentToken] = _ref2;\n const parsedToken = Object.assign({}, componentToken);\n if ('algorithm' in parsedToken) {\n if (parsedToken.algorithm === true) {\n parsedToken.theme = themeObj;\n } else if (Array.isArray(parsedToken.algorithm) || typeof parsedToken.algorithm === 'function') {\n parsedToken.theme = createTheme(parsedToken.algorithm);\n }\n delete parsedToken.algorithm;\n }\n parsedComponents[componentName] = parsedToken;\n });\n return Object.assign(Object.assign({}, rest), {\n theme: themeObj,\n token: Object.assign(Object.assign({}, defaultSeedToken), token),\n components: parsedComponents\n });\n }, [mergedTheme]);\n if (theme) {\n childNode = /*#__PURE__*/React.createElement(DesignTokenContext.Provider, {\n value: memoTheme\n }, childNode);\n }\n // ================================== Warning ===================================\n if (memoedConfig.warning) {\n childNode = /*#__PURE__*/React.createElement(WarningContext.Provider, {\n value: memoedConfig.warning\n }, childNode);\n }\n // =================================== Render ===================================\n if (componentDisabled !== undefined) {\n childNode = /*#__PURE__*/React.createElement(DisabledContextProvider, {\n disabled: componentDisabled\n }, childNode);\n }\n return /*#__PURE__*/React.createElement(ConfigContext.Provider, {\n value: memoedConfig\n }, childNode);\n};\nconst ConfigProvider = props => {\n const context = React.useContext(ConfigContext);\n const antLocale = React.useContext(LocaleContext);\n return /*#__PURE__*/React.createElement(ProviderChildren, Object.assign({\n parentContext: context,\n legacyLocale: antLocale\n }, props));\n};\nConfigProvider.ConfigContext = ConfigContext;\nConfigProvider.SizeContext = SizeContext;\nConfigProvider.config = setGlobalConfig;\nConfigProvider.useConfig = useConfig;\nObject.defineProperty(ConfigProvider, 'SizeContext', {\n get: () => {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') : void 0;\n return SizeContext;\n }\n});\nif (process.env.NODE_ENV !== 'production') {\n ConfigProvider.displayName = 'ConfigProvider';\n}\nexport default ConfigProvider;","// This icon file is generated automatically.\nvar CheckCircleFilled = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z\" } }] }, \"name\": \"check-circle\", \"theme\": \"filled\" };\nexport default CheckCircleFilled;\n","function getRoot(ele) {\n var _ele$getRootNode;\n return ele === null || ele === void 0 ? void 0 : (_ele$getRootNode = ele.getRootNode) === null || _ele$getRootNode === void 0 ? void 0 : _ele$getRootNode.call(ele);\n}\n\n/**\n * Check if is in shadowRoot\n */\nexport function inShadow(ele) {\n return getRoot(ele) instanceof ShadowRoot;\n}\n\n/**\n * Return shadowRoot if possible\n */\nexport function getShadowRoot(ele) {\n return inShadow(ele) ? getRoot(ele) : null;\n}","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { generate as generateColor } from '@ant-design/colors';\nimport { updateCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport { getShadowRoot } from \"rc-util/es/Dom/shadow\";\nimport warn from \"rc-util/es/warning\";\nimport React, { useContext, useEffect } from 'react';\nimport IconContext from \"./components/Context\";\nfunction camelCase(input) {\n return input.replace(/-(.)/g, function (match, g) {\n return g.toUpperCase();\n });\n}\nexport function warning(valid, message) {\n warn(valid, \"[@ant-design/icons] \".concat(message));\n}\nexport function isIconDefinition(target) {\n return _typeof(target) === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && (_typeof(target.icon) === 'object' || typeof target.icon === 'function');\n}\nexport function normalizeAttrs() {\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return Object.keys(attrs).reduce(function (acc, key) {\n var val = attrs[key];\n switch (key) {\n case 'class':\n acc.className = val;\n delete acc.class;\n break;\n default:\n delete acc[key];\n acc[camelCase(key)] = val;\n }\n return acc;\n }, {});\n}\nexport function generate(node, key, rootProps) {\n if (!rootProps) {\n return /*#__PURE__*/React.createElement(node.tag, _objectSpread({\n key: key\n }, normalizeAttrs(node.attrs)), (node.children || []).map(function (child, index) {\n return generate(child, \"\".concat(key, \"-\").concat(node.tag, \"-\").concat(index));\n }));\n }\n return /*#__PURE__*/React.createElement(node.tag, _objectSpread(_objectSpread({\n key: key\n }, normalizeAttrs(node.attrs)), rootProps), (node.children || []).map(function (child, index) {\n return generate(child, \"\".concat(key, \"-\").concat(node.tag, \"-\").concat(index));\n }));\n}\nexport function getSecondaryColor(primaryColor) {\n // choose the second color\n return generateColor(primaryColor)[0];\n}\nexport function normalizeTwoToneColors(twoToneColor) {\n if (!twoToneColor) {\n return [];\n }\n return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];\n}\n\n// These props make sure that the SVG behaviours like general text.\n// Reference: https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4\nexport var svgBaseProps = {\n width: '1em',\n height: '1em',\n fill: 'currentColor',\n 'aria-hidden': 'true',\n focusable: 'false'\n};\nexport var iconStyles = \"\\n.anticon {\\n display: inline-block;\\n color: inherit;\\n font-style: normal;\\n line-height: 0;\\n text-align: center;\\n text-transform: none;\\n vertical-align: -0.125em;\\n text-rendering: optimizeLegibility;\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n}\\n\\n.anticon > * {\\n line-height: 1;\\n}\\n\\n.anticon svg {\\n display: inline-block;\\n}\\n\\n.anticon::before {\\n display: none;\\n}\\n\\n.anticon .anticon-icon {\\n display: block;\\n}\\n\\n.anticon[tabindex] {\\n cursor: pointer;\\n}\\n\\n.anticon-spin::before,\\n.anticon-spin {\\n display: inline-block;\\n -webkit-animation: loadingCircle 1s infinite linear;\\n animation: loadingCircle 1s infinite linear;\\n}\\n\\n@-webkit-keyframes loadingCircle {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes loadingCircle {\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\";\nexport var useInsertStyles = function useInsertStyles(eleRef) {\n var _useContext = useContext(IconContext),\n csp = _useContext.csp,\n prefixCls = _useContext.prefixCls;\n var mergedStyleStr = iconStyles;\n if (prefixCls) {\n mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls);\n }\n useEffect(function () {\n var ele = eleRef.current;\n var shadowRoot = getShadowRoot(ele);\n updateCSS(mergedStyleStr, '@ant-design-icons', {\n prepend: true,\n csp: csp,\n attachTo: shadowRoot\n });\n }, []);\n};","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nvar _excluded = [\"icon\", \"className\", \"onClick\", \"style\", \"primaryColor\", \"secondaryColor\"];\nimport * as React from 'react';\nimport { generate, getSecondaryColor, isIconDefinition, warning, useInsertStyles } from \"../utils\";\nvar twoToneColorPalette = {\n primaryColor: '#333',\n secondaryColor: '#E6E6E6',\n calculated: false\n};\nfunction setTwoToneColors(_ref) {\n var primaryColor = _ref.primaryColor,\n secondaryColor = _ref.secondaryColor;\n twoToneColorPalette.primaryColor = primaryColor;\n twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);\n twoToneColorPalette.calculated = !!secondaryColor;\n}\nfunction getTwoToneColors() {\n return _objectSpread({}, twoToneColorPalette);\n}\nvar IconBase = function IconBase(props) {\n var icon = props.icon,\n className = props.className,\n onClick = props.onClick,\n style = props.style,\n primaryColor = props.primaryColor,\n secondaryColor = props.secondaryColor,\n restProps = _objectWithoutProperties(props, _excluded);\n var svgRef = React.useRef();\n var colors = twoToneColorPalette;\n if (primaryColor) {\n colors = {\n primaryColor: primaryColor,\n secondaryColor: secondaryColor || getSecondaryColor(primaryColor)\n };\n }\n useInsertStyles(svgRef);\n warning(isIconDefinition(icon), \"icon should be icon definiton, but got \".concat(icon));\n if (!isIconDefinition(icon)) {\n return null;\n }\n var target = icon;\n if (target && typeof target.icon === 'function') {\n target = _objectSpread(_objectSpread({}, target), {}, {\n icon: target.icon(colors.primaryColor, colors.secondaryColor)\n });\n }\n return generate(target.icon, \"svg-\".concat(target.name), _objectSpread(_objectSpread({\n className: className,\n onClick: onClick,\n style: style,\n 'data-icon': target.name,\n width: '1em',\n height: '1em',\n fill: 'currentColor',\n 'aria-hidden': 'true'\n }, restProps), {}, {\n ref: svgRef\n }));\n};\nIconBase.displayName = 'IconReact';\nIconBase.getTwoToneColors = getTwoToneColors;\nIconBase.setTwoToneColors = setTwoToneColors;\nexport default IconBase;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport ReactIcon from \"./IconBase\";\nimport { normalizeTwoToneColors } from \"../utils\";\nexport function setTwoToneColor(twoToneColor) {\n var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),\n _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),\n primaryColor = _normalizeTwoToneColo2[0],\n secondaryColor = _normalizeTwoToneColo2[1];\n return ReactIcon.setTwoToneColors({\n primaryColor: primaryColor,\n secondaryColor: secondaryColor\n });\n}\nexport function getTwoToneColor() {\n var colors = ReactIcon.getTwoToneColors();\n if (!colors.calculated) {\n return colors.primaryColor;\n }\n return [colors.primaryColor, colors.secondaryColor];\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"className\", \"icon\", \"spin\", \"rotate\", \"tabIndex\", \"onClick\", \"twoToneColor\"];\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { blue } from '@ant-design/colors';\nimport Context from \"./Context\";\nimport ReactIcon from \"./IconBase\";\nimport { getTwoToneColor, setTwoToneColor } from \"./twoTonePrimaryColor\";\nimport { normalizeTwoToneColors } from \"../utils\";\n// Initial setting\n// should move it to antd main repo?\nsetTwoToneColor(blue.primary);\n\n// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757#issuecomment-488848720\n\nvar Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _classNames;\n var className = props.className,\n icon = props.icon,\n spin = props.spin,\n rotate = props.rotate,\n tabIndex = props.tabIndex,\n onClick = props.onClick,\n twoToneColor = props.twoToneColor,\n restProps = _objectWithoutProperties(props, _excluded);\n var _React$useContext = React.useContext(Context),\n _React$useContext$pre = _React$useContext.prefixCls,\n prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre,\n rootClassName = _React$useContext.rootClassName;\n var classString = classNames(rootClassName, prefixCls, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(icon.name), !!icon.name), _defineProperty(_classNames, \"\".concat(prefixCls, \"-spin\"), !!spin || icon.name === 'loading'), _classNames), className);\n var iconTabIndex = tabIndex;\n if (iconTabIndex === undefined && onClick) {\n iconTabIndex = -1;\n }\n var svgStyle = rotate ? {\n msTransform: \"rotate(\".concat(rotate, \"deg)\"),\n transform: \"rotate(\".concat(rotate, \"deg)\")\n } : undefined;\n var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),\n _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),\n primaryColor = _normalizeTwoToneColo2[0],\n secondaryColor = _normalizeTwoToneColo2[1];\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n role: \"img\",\n \"aria-label\": icon.name\n }, restProps, {\n ref: ref,\n tabIndex: iconTabIndex,\n onClick: onClick,\n className: classString\n }), /*#__PURE__*/React.createElement(ReactIcon, {\n icon: icon,\n primaryColor: primaryColor,\n secondaryColor: secondaryColor,\n style: svgStyle\n }));\n});\nIcon.displayName = 'AntdIcon';\nIcon.getTwoToneColor = getTwoToneColor;\nIcon.setTwoToneColor = setTwoToneColor;\nexport default Icon;","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport CheckCircleFilledSvg from \"@ant-design/icons-svg/es/asn/CheckCircleFilled\";\nimport AntdIcon from \"../components/AntdIcon\";\nvar CheckCircleFilled = function CheckCircleFilled(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: CheckCircleFilledSvg\n }));\n};\nif (process.env.NODE_ENV !== 'production') {\n CheckCircleFilled.displayName = 'CheckCircleFilled';\n}\nexport default /*#__PURE__*/React.forwardRef(CheckCircleFilled);","// This icon file is generated automatically.\nvar CloseCircleFilled = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"fill-rule\": \"evenodd\", \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z\" } }] }, \"name\": \"close-circle\", \"theme\": \"filled\" };\nexport default CloseCircleFilled;\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport CloseCircleFilledSvg from \"@ant-design/icons-svg/es/asn/CloseCircleFilled\";\nimport AntdIcon from \"../components/AntdIcon\";\nvar CloseCircleFilled = function CloseCircleFilled(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: CloseCircleFilledSvg\n }));\n};\nif (process.env.NODE_ENV !== 'production') {\n CloseCircleFilled.displayName = 'CloseCircleFilled';\n}\nexport default /*#__PURE__*/React.forwardRef(CloseCircleFilled);","// This icon file is generated automatically.\nvar CloseOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"fill-rule\": \"evenodd\", \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z\" } }] }, \"name\": \"close\", \"theme\": \"outlined\" };\nexport default CloseOutlined;\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport CloseOutlinedSvg from \"@ant-design/icons-svg/es/asn/CloseOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nvar CloseOutlined = function CloseOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: CloseOutlinedSvg\n }));\n};\nif (process.env.NODE_ENV !== 'production') {\n CloseOutlined.displayName = 'CloseOutlined';\n}\nexport default /*#__PURE__*/React.forwardRef(CloseOutlined);","// This icon file is generated automatically.\nvar ExclamationCircleFilled = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z\" } }] }, \"name\": \"exclamation-circle\", \"theme\": \"filled\" };\nexport default ExclamationCircleFilled;\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport ExclamationCircleFilledSvg from \"@ant-design/icons-svg/es/asn/ExclamationCircleFilled\";\nimport AntdIcon from \"../components/AntdIcon\";\nvar ExclamationCircleFilled = function ExclamationCircleFilled(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: ExclamationCircleFilledSvg\n }));\n};\nif (process.env.NODE_ENV !== 'production') {\n ExclamationCircleFilled.displayName = 'ExclamationCircleFilled';\n}\nexport default /*#__PURE__*/React.forwardRef(ExclamationCircleFilled);","// This icon file is generated automatically.\nvar InfoCircleFilled = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z\" } }] }, \"name\": \"info-circle\", \"theme\": \"filled\" };\nexport default InfoCircleFilled;\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport InfoCircleFilledSvg from \"@ant-design/icons-svg/es/asn/InfoCircleFilled\";\nimport AntdIcon from \"../components/AntdIcon\";\nvar InfoCircleFilled = function InfoCircleFilled(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: InfoCircleFilledSvg\n }));\n};\nif (process.env.NODE_ENV !== 'production') {\n InfoCircleFilled.displayName = 'InfoCircleFilled';\n}\nexport default /*#__PURE__*/React.forwardRef(InfoCircleFilled);","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nvar attributes = \"accept acceptCharset accessKey action allowFullScreen allowTransparency\\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\\n charSet checked classID className colSpan cols content contentEditable contextMenu\\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\\n mediaGroup method min minLength multiple muted name noValidate nonce open\\n optimum pattern placeholder poster preload radioGroup readOnly rel required\\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\\n summary tabIndex target title type useMap value width wmode wrap\";\nvar eventsName = \"onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError\";\nvar propList = \"\".concat(attributes, \" \").concat(eventsName).split(/[\\s\\n]+/);\n\n/* eslint-enable max-len */\nvar ariaPrefix = 'aria-';\nvar dataPrefix = 'data-';\nfunction match(key, prefix) {\n return key.indexOf(prefix) === 0;\n}\n/**\n * Picker props from exist props with filter\n * @param props Passed props\n * @param ariaOnly boolean | { aria?: boolean; data?: boolean; attr?: boolean; } filter config\n */\nexport default function pickAttrs(props) {\n var ariaOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var mergedConfig;\n if (ariaOnly === false) {\n mergedConfig = {\n aria: true,\n data: true,\n attr: true\n };\n } else if (ariaOnly === true) {\n mergedConfig = {\n aria: true\n };\n } else {\n mergedConfig = _objectSpread({}, ariaOnly);\n }\n var attrs = {};\n Object.keys(props).forEach(function (key) {\n if (\n // Aria\n mergedConfig.aria && (key === 'role' || match(key, ariaPrefix)) ||\n // Data\n mergedConfig.data && match(key, dataPrefix) ||\n // Attr\n mergedConfig.attr && propList.includes(key)) {\n attrs[key] = props[key];\n }\n });\n return attrs;\n}","import * as React from 'react';\nexport const {\n isValidElement\n} = React;\nexport function isFragment(child) {\n return child && isValidElement(child) && child.type === React.Fragment;\n}\nexport function replaceElement(element, replacement, props) {\n if (!isValidElement(element)) {\n return replacement;\n }\n return /*#__PURE__*/React.cloneElement(element, typeof props === 'function' ? props(element.props || {}) : props);\n}\nexport function cloneElement(element, props) {\n return replaceElement(element, element, props);\n}","/**\n * @ignore\n * some key-codes definition and utils from closure-library\n * @author yiminghe@gmail.com\n */\n\nvar KeyCode = {\n /**\n * MAC_ENTER\n */\n MAC_ENTER: 3,\n /**\n * BACKSPACE\n */\n BACKSPACE: 8,\n /**\n * TAB\n */\n TAB: 9,\n /**\n * NUMLOCK on FF/Safari Mac\n */\n NUM_CENTER: 12,\n // NUMLOCK on FF/Safari Mac\n /**\n * ENTER\n */\n ENTER: 13,\n /**\n * SHIFT\n */\n SHIFT: 16,\n /**\n * CTRL\n */\n CTRL: 17,\n /**\n * ALT\n */\n ALT: 18,\n /**\n * PAUSE\n */\n PAUSE: 19,\n /**\n * CAPS_LOCK\n */\n CAPS_LOCK: 20,\n /**\n * ESC\n */\n ESC: 27,\n /**\n * SPACE\n */\n SPACE: 32,\n /**\n * PAGE_UP\n */\n PAGE_UP: 33,\n // also NUM_NORTH_EAST\n /**\n * PAGE_DOWN\n */\n PAGE_DOWN: 34,\n // also NUM_SOUTH_EAST\n /**\n * END\n */\n END: 35,\n // also NUM_SOUTH_WEST\n /**\n * HOME\n */\n HOME: 36,\n // also NUM_NORTH_WEST\n /**\n * LEFT\n */\n LEFT: 37,\n // also NUM_WEST\n /**\n * UP\n */\n UP: 38,\n // also NUM_NORTH\n /**\n * RIGHT\n */\n RIGHT: 39,\n // also NUM_EAST\n /**\n * DOWN\n */\n DOWN: 40,\n // also NUM_SOUTH\n /**\n * PRINT_SCREEN\n */\n PRINT_SCREEN: 44,\n /**\n * INSERT\n */\n INSERT: 45,\n // also NUM_INSERT\n /**\n * DELETE\n */\n DELETE: 46,\n // also NUM_DELETE\n /**\n * ZERO\n */\n ZERO: 48,\n /**\n * ONE\n */\n ONE: 49,\n /**\n * TWO\n */\n TWO: 50,\n /**\n * THREE\n */\n THREE: 51,\n /**\n * FOUR\n */\n FOUR: 52,\n /**\n * FIVE\n */\n FIVE: 53,\n /**\n * SIX\n */\n SIX: 54,\n /**\n * SEVEN\n */\n SEVEN: 55,\n /**\n * EIGHT\n */\n EIGHT: 56,\n /**\n * NINE\n */\n NINE: 57,\n /**\n * QUESTION_MARK\n */\n QUESTION_MARK: 63,\n // needs localization\n /**\n * A\n */\n A: 65,\n /**\n * B\n */\n B: 66,\n /**\n * C\n */\n C: 67,\n /**\n * D\n */\n D: 68,\n /**\n * E\n */\n E: 69,\n /**\n * F\n */\n F: 70,\n /**\n * G\n */\n G: 71,\n /**\n * H\n */\n H: 72,\n /**\n * I\n */\n I: 73,\n /**\n * J\n */\n J: 74,\n /**\n * K\n */\n K: 75,\n /**\n * L\n */\n L: 76,\n /**\n * M\n */\n M: 77,\n /**\n * N\n */\n N: 78,\n /**\n * O\n */\n O: 79,\n /**\n * P\n */\n P: 80,\n /**\n * Q\n */\n Q: 81,\n /**\n * R\n */\n R: 82,\n /**\n * S\n */\n S: 83,\n /**\n * T\n */\n T: 84,\n /**\n * U\n */\n U: 85,\n /**\n * V\n */\n V: 86,\n /**\n * W\n */\n W: 87,\n /**\n * X\n */\n X: 88,\n /**\n * Y\n */\n Y: 89,\n /**\n * Z\n */\n Z: 90,\n /**\n * META\n */\n META: 91,\n // WIN_KEY_LEFT\n /**\n * WIN_KEY_RIGHT\n */\n WIN_KEY_RIGHT: 92,\n /**\n * CONTEXT_MENU\n */\n CONTEXT_MENU: 93,\n /**\n * NUM_ZERO\n */\n NUM_ZERO: 96,\n /**\n * NUM_ONE\n */\n NUM_ONE: 97,\n /**\n * NUM_TWO\n */\n NUM_TWO: 98,\n /**\n * NUM_THREE\n */\n NUM_THREE: 99,\n /**\n * NUM_FOUR\n */\n NUM_FOUR: 100,\n /**\n * NUM_FIVE\n */\n NUM_FIVE: 101,\n /**\n * NUM_SIX\n */\n NUM_SIX: 102,\n /**\n * NUM_SEVEN\n */\n NUM_SEVEN: 103,\n /**\n * NUM_EIGHT\n */\n NUM_EIGHT: 104,\n /**\n * NUM_NINE\n */\n NUM_NINE: 105,\n /**\n * NUM_MULTIPLY\n */\n NUM_MULTIPLY: 106,\n /**\n * NUM_PLUS\n */\n NUM_PLUS: 107,\n /**\n * NUM_MINUS\n */\n NUM_MINUS: 109,\n /**\n * NUM_PERIOD\n */\n NUM_PERIOD: 110,\n /**\n * NUM_DIVISION\n */\n NUM_DIVISION: 111,\n /**\n * F1\n */\n F1: 112,\n /**\n * F2\n */\n F2: 113,\n /**\n * F3\n */\n F3: 114,\n /**\n * F4\n */\n F4: 115,\n /**\n * F5\n */\n F5: 116,\n /**\n * F6\n */\n F6: 117,\n /**\n * F7\n */\n F7: 118,\n /**\n * F8\n */\n F8: 119,\n /**\n * F9\n */\n F9: 120,\n /**\n * F10\n */\n F10: 121,\n /**\n * F11\n */\n F11: 122,\n /**\n * F12\n */\n F12: 123,\n /**\n * NUMLOCK\n */\n NUMLOCK: 144,\n /**\n * SEMICOLON\n */\n SEMICOLON: 186,\n // needs localization\n /**\n * DASH\n */\n DASH: 189,\n // needs localization\n /**\n * EQUALS\n */\n EQUALS: 187,\n // needs localization\n /**\n * COMMA\n */\n COMMA: 188,\n // needs localization\n /**\n * PERIOD\n */\n PERIOD: 190,\n // needs localization\n /**\n * SLASH\n */\n SLASH: 191,\n // needs localization\n /**\n * APOSTROPHE\n */\n APOSTROPHE: 192,\n // needs localization\n /**\n * SINGLE_QUOTE\n */\n SINGLE_QUOTE: 222,\n // needs localization\n /**\n * OPEN_SQUARE_BRACKET\n */\n OPEN_SQUARE_BRACKET: 219,\n // needs localization\n /**\n * BACKSLASH\n */\n BACKSLASH: 220,\n // needs localization\n /**\n * CLOSE_SQUARE_BRACKET\n */\n CLOSE_SQUARE_BRACKET: 221,\n // needs localization\n /**\n * WIN_KEY\n */\n WIN_KEY: 224,\n /**\n * MAC_FF_META\n */\n MAC_FF_META: 224,\n // Firefox (Gecko) fires this for the meta key instead of 91\n /**\n * WIN_IME\n */\n WIN_IME: 229,\n // ======================== Function ========================\n /**\n * whether text and modified key is entered at the same time.\n */\n isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) {\n var keyCode = e.keyCode;\n if (e.altKey && !e.ctrlKey || e.metaKey ||\n // Function keys don't generate text\n keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {\n return false;\n }\n\n // The following keys are quite harmless, even in combination with\n // CTRL, ALT or SHIFT.\n switch (keyCode) {\n case KeyCode.ALT:\n case KeyCode.CAPS_LOCK:\n case KeyCode.CONTEXT_MENU:\n case KeyCode.CTRL:\n case KeyCode.DOWN:\n case KeyCode.END:\n case KeyCode.ESC:\n case KeyCode.HOME:\n case KeyCode.INSERT:\n case KeyCode.LEFT:\n case KeyCode.MAC_FF_META:\n case KeyCode.META:\n case KeyCode.NUMLOCK:\n case KeyCode.NUM_CENTER:\n case KeyCode.PAGE_DOWN:\n case KeyCode.PAGE_UP:\n case KeyCode.PAUSE:\n case KeyCode.PRINT_SCREEN:\n case KeyCode.RIGHT:\n case KeyCode.SHIFT:\n case KeyCode.UP:\n case KeyCode.WIN_KEY:\n case KeyCode.WIN_KEY_RIGHT:\n return false;\n default:\n return true;\n }\n },\n /**\n * whether character is entered.\n */\n isCharacterKey: function isCharacterKey(keyCode) {\n if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {\n return true;\n }\n if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {\n return true;\n }\n if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {\n return true;\n }\n\n // Safari sends zero key code for non-latin characters.\n if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {\n return true;\n }\n switch (keyCode) {\n case KeyCode.SPACE:\n case KeyCode.QUESTION_MARK:\n case KeyCode.NUM_PLUS:\n case KeyCode.NUM_MINUS:\n case KeyCode.NUM_PERIOD:\n case KeyCode.NUM_DIVISION:\n case KeyCode.SEMICOLON:\n case KeyCode.DASH:\n case KeyCode.EQUALS:\n case KeyCode.COMMA:\n case KeyCode.PERIOD:\n case KeyCode.SLASH:\n case KeyCode.APOSTROPHE:\n case KeyCode.SINGLE_QUOTE:\n case KeyCode.OPEN_SQUARE_BRACKET:\n case KeyCode.BACKSLASH:\n case KeyCode.CLOSE_SQUARE_BRACKET:\n return true;\n default:\n return false;\n }\n }\n};\nexport default KeyCode;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport classNames from 'classnames';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport * as React from 'react';\nvar Notify = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var prefixCls = props.prefixCls,\n style = props.style,\n className = props.className,\n _props$duration = props.duration,\n duration = _props$duration === void 0 ? 4.5 : _props$duration,\n eventKey = props.eventKey,\n content = props.content,\n closable = props.closable,\n _props$closeIcon = props.closeIcon,\n closeIcon = _props$closeIcon === void 0 ? 'x' : _props$closeIcon,\n divProps = props.props,\n onClick = props.onClick,\n onNoticeClose = props.onNoticeClose,\n times = props.times,\n forcedHovering = props.hovering;\n var _React$useState = React.useState(false),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n hovering = _React$useState2[0],\n setHovering = _React$useState2[1];\n var mergedHovering = forcedHovering || hovering;\n\n // ======================== Close =========================\n var onInternalClose = function onInternalClose() {\n onNoticeClose(eventKey);\n };\n var onCloseKeyDown = function onCloseKeyDown(e) {\n if (e.key === 'Enter' || e.code === 'Enter' || e.keyCode === KeyCode.ENTER) {\n onInternalClose();\n }\n };\n\n // ======================== Effect ========================\n React.useEffect(function () {\n if (!mergedHovering && duration > 0) {\n var timeout = setTimeout(function () {\n onInternalClose();\n }, duration * 1000);\n return function () {\n clearTimeout(timeout);\n };\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [duration, mergedHovering, times]);\n\n // ======================== Render ========================\n var noticePrefixCls = \"\".concat(prefixCls, \"-notice\");\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, divProps, {\n ref: ref,\n className: classNames(noticePrefixCls, className, _defineProperty({}, \"\".concat(noticePrefixCls, \"-closable\"), closable)),\n style: style,\n onMouseEnter: function onMouseEnter(e) {\n var _divProps$onMouseEnte;\n setHovering(true);\n divProps === null || divProps === void 0 ? void 0 : (_divProps$onMouseEnte = divProps.onMouseEnter) === null || _divProps$onMouseEnte === void 0 ? void 0 : _divProps$onMouseEnte.call(divProps, e);\n },\n onMouseLeave: function onMouseLeave(e) {\n var _divProps$onMouseLeav;\n setHovering(false);\n divProps === null || divProps === void 0 ? void 0 : (_divProps$onMouseLeav = divProps.onMouseLeave) === null || _divProps$onMouseLeav === void 0 ? void 0 : _divProps$onMouseLeav.call(divProps, e);\n },\n onClick: onClick\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(noticePrefixCls, \"-content\")\n }, content), closable && /*#__PURE__*/React.createElement(\"a\", {\n tabIndex: 0,\n className: \"\".concat(noticePrefixCls, \"-close\"),\n onKeyDown: onCloseKeyDown,\n onClick: function onClick(e) {\n e.preventDefault();\n e.stopPropagation();\n onInternalClose();\n }\n }, closeIcon));\n});\nexport default Notify;","import React from 'react';\nexport var NotificationContext = /*#__PURE__*/React.createContext({});\nvar NotificationProvider = function NotificationProvider(_ref) {\n var children = _ref.children,\n classNames = _ref.classNames;\n return /*#__PURE__*/React.createElement(NotificationContext.Provider, {\n value: {\n classNames: classNames\n }\n }, children);\n};\nexport default NotificationProvider;","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nvar DEFAULT_OFFSET = 8;\nvar DEFAULT_THRESHOLD = 3;\nvar DEFAULT_GAP = 16;\nvar useStack = function useStack(config) {\n var result = {\n offset: DEFAULT_OFFSET,\n threshold: DEFAULT_THRESHOLD,\n gap: DEFAULT_GAP\n };\n if (config && _typeof(config) === 'object') {\n var _config$offset, _config$threshold, _config$gap;\n result.offset = (_config$offset = config.offset) !== null && _config$offset !== void 0 ? _config$offset : DEFAULT_OFFSET;\n result.threshold = (_config$threshold = config.threshold) !== null && _config$threshold !== void 0 ? _config$threshold : DEFAULT_THRESHOLD;\n result.gap = (_config$gap = config.gap) !== null && _config$gap !== void 0 ? _config$gap : DEFAULT_GAP;\n }\n return [!!config, result];\n};\nexport default useStack;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport React, { useContext, useEffect, useRef, useState } from 'react';\nimport clsx from 'classnames';\nimport { CSSMotionList } from 'rc-motion';\nimport Notice from \"./Notice\";\nimport { NotificationContext } from \"./NotificationProvider\";\nimport useStack from \"./hooks/useStack\";\nvar NoticeList = function NoticeList(props) {\n var _clsx;\n var configList = props.configList,\n placement = props.placement,\n prefixCls = props.prefixCls,\n className = props.className,\n style = props.style,\n motion = props.motion,\n onAllNoticeRemoved = props.onAllNoticeRemoved,\n onNoticeClose = props.onNoticeClose,\n stackConfig = props.stack;\n var _useContext = useContext(NotificationContext),\n ctxCls = _useContext.classNames;\n var dictRef = useRef({});\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n latestNotice = _useState2[0],\n setLatestNotice = _useState2[1];\n var _useState3 = useState([]),\n _useState4 = _slicedToArray(_useState3, 2),\n hoverKeys = _useState4[0],\n setHoverKeys = _useState4[1];\n var keys = configList.map(function (config) {\n return {\n config: config,\n key: config.key\n };\n });\n var _useStack = useStack(stackConfig),\n _useStack2 = _slicedToArray(_useStack, 2),\n stack = _useStack2[0],\n _useStack2$ = _useStack2[1],\n offset = _useStack2$.offset,\n threshold = _useStack2$.threshold,\n gap = _useStack2$.gap;\n var expanded = stack && (hoverKeys.length > 0 || keys.length <= threshold);\n var placementMotion = typeof motion === 'function' ? motion(placement) : motion;\n\n // Clean hover key\n useEffect(function () {\n if (stack && hoverKeys.length > 1) {\n setHoverKeys(function (prev) {\n return prev.filter(function (key) {\n return keys.some(function (_ref) {\n var dataKey = _ref.key;\n return key === dataKey;\n });\n });\n });\n }\n }, [hoverKeys, keys, stack]);\n\n // Force update latest notice\n useEffect(function () {\n var _keys;\n if (stack && dictRef.current[(_keys = keys[keys.length - 1]) === null || _keys === void 0 ? void 0 : _keys.key]) {\n var _keys2;\n setLatestNotice(dictRef.current[(_keys2 = keys[keys.length - 1]) === null || _keys2 === void 0 ? void 0 : _keys2.key]);\n }\n }, [keys, stack]);\n return /*#__PURE__*/React.createElement(CSSMotionList, _extends({\n key: placement,\n className: clsx(prefixCls, \"\".concat(prefixCls, \"-\").concat(placement), ctxCls === null || ctxCls === void 0 ? void 0 : ctxCls.list, className, (_clsx = {}, _defineProperty(_clsx, \"\".concat(prefixCls, \"-stack\"), !!stack), _defineProperty(_clsx, \"\".concat(prefixCls, \"-stack-expanded\"), expanded), _clsx)),\n style: style,\n keys: keys,\n motionAppear: true\n }, placementMotion, {\n onAllRemoved: function onAllRemoved() {\n onAllNoticeRemoved(placement);\n }\n }), function (_ref2, nodeRef) {\n var config = _ref2.config,\n motionClassName = _ref2.className,\n motionStyle = _ref2.style,\n motionIndex = _ref2.index;\n var _ref3 = config,\n key = _ref3.key,\n times = _ref3.times;\n var _ref4 = config,\n configClassName = _ref4.className,\n configStyle = _ref4.style;\n var dataIndex = keys.findIndex(function (item) {\n return item.key === key;\n });\n\n // If dataIndex is -1, that means this notice has been removed in data, but still in dom\n // Should minus (motionIndex - 1) to get the correct index because keys.length is not the same as dom length\n var stackStyle = {};\n if (stack) {\n var index = keys.length - 1 - (dataIndex > -1 ? dataIndex : motionIndex - 1);\n var transformX = placement === 'top' || placement === 'bottom' ? '-50%' : '0';\n if (index > 0) {\n var _dictRef$current$key, _dictRef$current$key2, _dictRef$current$key3;\n stackStyle.height = expanded ? (_dictRef$current$key = dictRef.current[key]) === null || _dictRef$current$key === void 0 ? void 0 : _dictRef$current$key.offsetHeight : latestNotice === null || latestNotice === void 0 ? void 0 : latestNotice.offsetHeight;\n\n // Transform\n var verticalOffset = 0;\n for (var i = 0; i < index; i++) {\n var _dictRef$current$keys;\n verticalOffset += ((_dictRef$current$keys = dictRef.current[keys[keys.length - 1 - i].key]) === null || _dictRef$current$keys === void 0 ? void 0 : _dictRef$current$keys.offsetHeight) + gap;\n }\n var transformY = (expanded ? verticalOffset : index * offset) * (placement.startsWith('top') ? 1 : -1);\n var scaleX = !expanded && latestNotice !== null && latestNotice !== void 0 && latestNotice.offsetWidth && (_dictRef$current$key2 = dictRef.current[key]) !== null && _dictRef$current$key2 !== void 0 && _dictRef$current$key2.offsetWidth ? ((latestNotice === null || latestNotice === void 0 ? void 0 : latestNotice.offsetWidth) - offset * 2 * (index < 3 ? index : 3)) / ((_dictRef$current$key3 = dictRef.current[key]) === null || _dictRef$current$key3 === void 0 ? void 0 : _dictRef$current$key3.offsetWidth) : 1;\n stackStyle.transform = \"translate3d(\".concat(transformX, \", \").concat(transformY, \"px, 0) scaleX(\").concat(scaleX, \")\");\n } else {\n stackStyle.transform = \"translate3d(\".concat(transformX, \", 0, 0)\");\n }\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: nodeRef,\n className: clsx(\"\".concat(prefixCls, \"-notice-wrapper\"), motionClassName),\n style: _objectSpread(_objectSpread(_objectSpread({}, motionStyle), stackStyle), configStyle),\n onMouseEnter: function onMouseEnter() {\n return setHoverKeys(function (prev) {\n return prev.includes(key) ? prev : [].concat(_toConsumableArray(prev), [key]);\n });\n },\n onMouseLeave: function onMouseLeave() {\n return setHoverKeys(function (prev) {\n return prev.filter(function (k) {\n return k !== key;\n });\n });\n }\n }, /*#__PURE__*/React.createElement(Notice, _extends({}, config, {\n ref: function ref(node) {\n if (dataIndex > -1) {\n dictRef.current[key] = node;\n } else {\n delete dictRef.current[key];\n }\n },\n prefixCls: prefixCls,\n className: clsx(configClassName, ctxCls === null || ctxCls === void 0 ? void 0 : ctxCls.notice),\n times: times,\n key: key,\n eventKey: key,\n onNoticeClose: onNoticeClose,\n hovering: stack && hoverKeys.length > 0\n })));\n });\n};\nif (process.env.NODE_ENV !== 'production') {\n NoticeList.displayName = 'NoticeList';\n}\nexport default NoticeList;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport NoticeList from \"./NoticeList\";\n// ant-notification ant-notification-topRight\nvar Notifications = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-notification' : _props$prefixCls,\n container = props.container,\n motion = props.motion,\n maxCount = props.maxCount,\n className = props.className,\n style = props.style,\n onAllRemoved = props.onAllRemoved,\n stack = props.stack,\n renderNotifications = props.renderNotifications;\n var _React$useState = React.useState([]),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n configList = _React$useState2[0],\n setConfigList = _React$useState2[1];\n\n // ======================== Close =========================\n var onNoticeClose = function onNoticeClose(key) {\n var _config$onClose;\n // Trigger close event\n var config = configList.find(function (item) {\n return item.key === key;\n });\n config === null || config === void 0 ? void 0 : (_config$onClose = config.onClose) === null || _config$onClose === void 0 ? void 0 : _config$onClose.call(config);\n setConfigList(function (list) {\n return list.filter(function (item) {\n return item.key !== key;\n });\n });\n };\n\n // ========================= Refs =========================\n React.useImperativeHandle(ref, function () {\n return {\n open: function open(config) {\n setConfigList(function (list) {\n var clone = _toConsumableArray(list);\n\n // Replace if exist\n var index = clone.findIndex(function (item) {\n return item.key === config.key;\n });\n var innerConfig = _objectSpread({}, config);\n if (index >= 0) {\n var _list$index;\n innerConfig.times = (((_list$index = list[index]) === null || _list$index === void 0 ? void 0 : _list$index.times) || 0) + 1;\n clone[index] = innerConfig;\n } else {\n innerConfig.times = 0;\n clone.push(innerConfig);\n }\n if (maxCount > 0 && clone.length > maxCount) {\n clone = clone.slice(-maxCount);\n }\n return clone;\n });\n },\n close: function close(key) {\n onNoticeClose(key);\n },\n destroy: function destroy() {\n setConfigList([]);\n }\n };\n });\n\n // ====================== Placements ======================\n var _React$useState3 = React.useState({}),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n placements = _React$useState4[0],\n setPlacements = _React$useState4[1];\n React.useEffect(function () {\n var nextPlacements = {};\n configList.forEach(function (config) {\n var _config$placement = config.placement,\n placement = _config$placement === void 0 ? 'topRight' : _config$placement;\n if (placement) {\n nextPlacements[placement] = nextPlacements[placement] || [];\n nextPlacements[placement].push(config);\n }\n });\n\n // Fill exist placements to avoid empty list causing remove without motion\n Object.keys(placements).forEach(function (placement) {\n nextPlacements[placement] = nextPlacements[placement] || [];\n });\n setPlacements(nextPlacements);\n }, [configList]);\n\n // Clean up container if all notices fade out\n var onAllNoticeRemoved = function onAllNoticeRemoved(placement) {\n setPlacements(function (originPlacements) {\n var clone = _objectSpread({}, originPlacements);\n var list = clone[placement] || [];\n if (!list.length) {\n delete clone[placement];\n }\n return clone;\n });\n };\n\n // Effect tell that placements is empty now\n var emptyRef = React.useRef(false);\n React.useEffect(function () {\n if (Object.keys(placements).length > 0) {\n emptyRef.current = true;\n } else if (emptyRef.current) {\n // Trigger only when from exist to empty\n onAllRemoved === null || onAllRemoved === void 0 ? void 0 : onAllRemoved();\n emptyRef.current = false;\n }\n }, [placements]);\n // ======================== Render ========================\n if (!container) {\n return null;\n }\n var placementList = Object.keys(placements);\n return /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(React.Fragment, null, placementList.map(function (placement) {\n var placementConfigList = placements[placement];\n var list = /*#__PURE__*/React.createElement(NoticeList, {\n key: placement,\n configList: placementConfigList,\n placement: placement,\n prefixCls: prefixCls,\n className: className === null || className === void 0 ? void 0 : className(placement),\n style: style === null || style === void 0 ? void 0 : style(placement),\n motion: motion,\n onNoticeClose: onNoticeClose,\n onAllNoticeRemoved: onAllNoticeRemoved,\n stack: stack\n });\n return renderNotifications ? renderNotifications(list, {\n prefixCls: prefixCls,\n key: placement\n }) : list;\n })), container);\n});\nif (process.env.NODE_ENV !== 'production') {\n Notifications.displayName = 'Notifications';\n}\nexport default Notifications;","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"getContainer\", \"motion\", \"prefixCls\", \"maxCount\", \"className\", \"style\", \"onAllRemoved\", \"stack\", \"renderNotifications\"];\nimport * as React from 'react';\nimport Notifications from \"../Notifications\";\nvar defaultGetContainer = function defaultGetContainer() {\n return document.body;\n};\nvar uniqueKey = 0;\nfunction mergeConfig() {\n var clone = {};\n for (var _len = arguments.length, objList = new Array(_len), _key = 0; _key < _len; _key++) {\n objList[_key] = arguments[_key];\n }\n objList.forEach(function (obj) {\n if (obj) {\n Object.keys(obj).forEach(function (key) {\n var val = obj[key];\n if (val !== undefined) {\n clone[key] = val;\n }\n });\n }\n });\n return clone;\n}\nexport default function useNotification() {\n var rootConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _rootConfig$getContai = rootConfig.getContainer,\n getContainer = _rootConfig$getContai === void 0 ? defaultGetContainer : _rootConfig$getContai,\n motion = rootConfig.motion,\n prefixCls = rootConfig.prefixCls,\n maxCount = rootConfig.maxCount,\n className = rootConfig.className,\n style = rootConfig.style,\n onAllRemoved = rootConfig.onAllRemoved,\n stack = rootConfig.stack,\n renderNotifications = rootConfig.renderNotifications,\n shareConfig = _objectWithoutProperties(rootConfig, _excluded);\n var _React$useState = React.useState(),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n container = _React$useState2[0],\n setContainer = _React$useState2[1];\n var notificationsRef = React.useRef();\n var contextHolder = /*#__PURE__*/React.createElement(Notifications, {\n container: container,\n ref: notificationsRef,\n prefixCls: prefixCls,\n motion: motion,\n maxCount: maxCount,\n className: className,\n style: style,\n onAllRemoved: onAllRemoved,\n stack: stack,\n renderNotifications: renderNotifications\n });\n var _React$useState3 = React.useState([]),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n taskQueue = _React$useState4[0],\n setTaskQueue = _React$useState4[1];\n\n // ========================= Refs =========================\n var api = React.useMemo(function () {\n return {\n open: function open(config) {\n var mergedConfig = mergeConfig(shareConfig, config);\n if (mergedConfig.key === null || mergedConfig.key === undefined) {\n mergedConfig.key = \"rc-notification-\".concat(uniqueKey);\n uniqueKey += 1;\n }\n setTaskQueue(function (queue) {\n return [].concat(_toConsumableArray(queue), [{\n type: 'open',\n config: mergedConfig\n }]);\n });\n },\n close: function close(key) {\n setTaskQueue(function (queue) {\n return [].concat(_toConsumableArray(queue), [{\n type: 'close',\n key: key\n }]);\n });\n },\n destroy: function destroy() {\n setTaskQueue(function (queue) {\n return [].concat(_toConsumableArray(queue), [{\n type: 'destroy'\n }]);\n });\n }\n };\n }, []);\n\n // ======================= Container ======================\n // React 18 should all in effect that we will check container in each render\n // Which means getContainer should be stable.\n React.useEffect(function () {\n setContainer(getContainer());\n });\n\n // ======================== Effect ========================\n React.useEffect(function () {\n // Flush task when node ready\n if (notificationsRef.current && taskQueue.length) {\n taskQueue.forEach(function (task) {\n switch (task.type) {\n case 'open':\n notificationsRef.current.open(task.config);\n break;\n case 'close':\n notificationsRef.current.close(task.key);\n break;\n case 'destroy':\n notificationsRef.current.destroy();\n break;\n }\n });\n\n // React 17 will mix order of effect & setState in async\n // - open: setState[0]\n // - effect[0]\n // - open: setState[1]\n // - effect setState([]) * here will clean up [0, 1] in React 17\n setTaskQueue(function (oriQueue) {\n return oriQueue.filter(function (task) {\n return !taskQueue.includes(task);\n });\n });\n }\n }, [taskQueue]);\n\n // ======================== Return ========================\n return [api, contextHolder];\n}","// This icon file is generated automatically.\nvar LoadingOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"0 0 1024 1024\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z\" } }] }, \"name\": \"loading\", \"theme\": \"outlined\" };\nexport default LoadingOutlined;\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport LoadingOutlinedSvg from \"@ant-design/icons-svg/es/asn/LoadingOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nvar LoadingOutlined = function LoadingOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: LoadingOutlinedSvg\n }));\n};\nif (process.env.NODE_ENV !== 'production') {\n LoadingOutlined.displayName = 'LoadingOutlined';\n}\nexport default /*#__PURE__*/React.forwardRef(LoadingOutlined);","\"use client\";\n\nimport { Keyframes } from '@ant-design/cssinjs';\nimport { resetComponent } from '../../style';\nimport { genComponentStyleHook, mergeToken } from '../../theme/internal';\nconst genMessageStyle = token => {\n const {\n componentCls,\n iconCls,\n boxShadow,\n colorText,\n colorSuccess,\n colorError,\n colorWarning,\n colorInfo,\n fontSizeLG,\n motionEaseInOutCirc,\n motionDurationSlow,\n marginXS,\n paddingXS,\n borderRadiusLG,\n zIndexPopup,\n // Custom token\n contentPadding,\n contentBg\n } = token;\n const noticeCls = `${componentCls}-notice`;\n const messageMoveIn = new Keyframes('MessageMoveIn', {\n '0%': {\n padding: 0,\n transform: 'translateY(-100%)',\n opacity: 0\n },\n '100%': {\n padding: paddingXS,\n transform: 'translateY(0)',\n opacity: 1\n }\n });\n const messageMoveOut = new Keyframes('MessageMoveOut', {\n '0%': {\n maxHeight: token.height,\n padding: paddingXS,\n opacity: 1\n },\n '100%': {\n maxHeight: 0,\n padding: 0,\n opacity: 0\n }\n });\n const noticeStyle = {\n padding: paddingXS,\n textAlign: 'center',\n [`${componentCls}-custom-content > ${iconCls}`]: {\n verticalAlign: 'text-bottom',\n marginInlineEnd: marginXS,\n fontSize: fontSizeLG\n },\n [`${noticeCls}-content`]: {\n display: 'inline-block',\n padding: contentPadding,\n background: contentBg,\n borderRadius: borderRadiusLG,\n boxShadow,\n pointerEvents: 'all'\n },\n [`${componentCls}-success > ${iconCls}`]: {\n color: colorSuccess\n },\n [`${componentCls}-error > ${iconCls}`]: {\n color: colorError\n },\n [`${componentCls}-warning > ${iconCls}`]: {\n color: colorWarning\n },\n [`${componentCls}-info > ${iconCls},\n ${componentCls}-loading > ${iconCls}`]: {\n color: colorInfo\n }\n };\n return [\n // ============================ Holder ============================\n {\n [componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n color: colorText,\n position: 'fixed',\n top: marginXS,\n width: '100%',\n pointerEvents: 'none',\n zIndex: zIndexPopup,\n [`${componentCls}-move-up`]: {\n animationFillMode: 'forwards'\n },\n [`\n ${componentCls}-move-up-appear,\n ${componentCls}-move-up-enter\n `]: {\n animationName: messageMoveIn,\n animationDuration: motionDurationSlow,\n animationPlayState: 'paused',\n animationTimingFunction: motionEaseInOutCirc\n },\n [`\n ${componentCls}-move-up-appear${componentCls}-move-up-appear-active,\n ${componentCls}-move-up-enter${componentCls}-move-up-enter-active\n `]: {\n animationPlayState: 'running'\n },\n [`${componentCls}-move-up-leave`]: {\n animationName: messageMoveOut,\n animationDuration: motionDurationSlow,\n animationPlayState: 'paused',\n animationTimingFunction: motionEaseInOutCirc\n },\n [`${componentCls}-move-up-leave${componentCls}-move-up-leave-active`]: {\n animationPlayState: 'running'\n },\n '&-rtl': {\n direction: 'rtl',\n span: {\n direction: 'rtl'\n }\n }\n })\n },\n // ============================ Notice ============================\n {\n [componentCls]: {\n [`${noticeCls}-wrapper`]: Object.assign({}, noticeStyle)\n }\n },\n // ============================= Pure =============================\n {\n [`${componentCls}-notice-pure-panel`]: Object.assign(Object.assign({}, noticeStyle), {\n padding: 0,\n textAlign: 'start'\n })\n }];\n};\n// ============================== Export ==============================\nexport default genComponentStyleHook('Message', token => {\n // Gen-style functions here\n const combinedToken = mergeToken(token, {\n height: 150\n });\n return [genMessageStyle(combinedToken)];\n}, token => ({\n zIndexPopup: token.zIndexPopupBase + 10,\n contentBg: token.colorBgElevated,\n contentPadding: `${(token.controlHeightLG - token.fontSize * token.lineHeight) / 2}px ${token.paddingSM}px`\n}));","\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport CheckCircleFilled from \"@ant-design/icons/es/icons/CheckCircleFilled\";\nimport CloseCircleFilled from \"@ant-design/icons/es/icons/CloseCircleFilled\";\nimport ExclamationCircleFilled from \"@ant-design/icons/es/icons/ExclamationCircleFilled\";\nimport InfoCircleFilled from \"@ant-design/icons/es/icons/InfoCircleFilled\";\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport { Notice } from 'rc-notification';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport useStyle from './style';\nexport const TypeIcon = {\n info: /*#__PURE__*/React.createElement(InfoCircleFilled, null),\n success: /*#__PURE__*/React.createElement(CheckCircleFilled, null),\n error: /*#__PURE__*/React.createElement(CloseCircleFilled, null),\n warning: /*#__PURE__*/React.createElement(ExclamationCircleFilled, null),\n loading: /*#__PURE__*/React.createElement(LoadingOutlined, null)\n};\nexport const PureContent = _ref => {\n let {\n prefixCls,\n type,\n icon,\n children\n } = _ref;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(`${prefixCls}-custom-content`, `${prefixCls}-${type}`)\n }, icon || TypeIcon[type], /*#__PURE__*/React.createElement(\"span\", null, children));\n};\n/** @private Internal Component. Do not use in your production. */\nconst PurePanel = props => {\n const {\n prefixCls: staticPrefixCls,\n className,\n type,\n icon,\n content\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"type\", \"icon\", \"content\"]);\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const prefixCls = staticPrefixCls || getPrefixCls('message');\n const [, hashId] = useStyle(prefixCls);\n return /*#__PURE__*/React.createElement(Notice, Object.assign({}, restProps, {\n prefixCls: prefixCls,\n className: classNames(className, hashId, `${prefixCls}-notice-pure-panel`),\n eventKey: \"pure\",\n duration: null,\n content: /*#__PURE__*/React.createElement(PureContent, {\n prefixCls: prefixCls,\n type: type,\n icon: icon\n }, content)\n }));\n};\nexport default PurePanel;","export function getMotion(prefixCls, transitionName) {\n return {\n motionName: transitionName !== null && transitionName !== void 0 ? transitionName : `${prefixCls}-move-up`\n };\n}\n/** Wrap message open with promise like function */\nexport function wrapPromiseFn(openFn) {\n let closeFn;\n const closePromise = new Promise(resolve => {\n closeFn = openFn(() => {\n resolve(true);\n });\n });\n const result = () => {\n closeFn === null || closeFn === void 0 ? void 0 : closeFn();\n };\n result.then = (filled, rejected) => closePromise.then(filled, rejected);\n result.promise = closePromise;\n return result;\n}","\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport classNames from 'classnames';\nimport { NotificationProvider, useNotification as useRcNotification } from 'rc-notification';\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider';\nimport { PureContent } from './PurePanel';\nimport useStyle from './style';\nimport { getMotion, wrapPromiseFn } from './util';\nconst DEFAULT_OFFSET = 8;\nconst DEFAULT_DURATION = 3;\nconst Wrapper = _ref => {\n let {\n children,\n prefixCls\n } = _ref;\n const [, hashId] = useStyle(prefixCls);\n return /*#__PURE__*/React.createElement(NotificationProvider, {\n classNames: {\n list: hashId,\n notice: hashId\n }\n }, children);\n};\nconst renderNotifications = (node, _ref2) => {\n let {\n prefixCls,\n key\n } = _ref2;\n return /*#__PURE__*/React.createElement(Wrapper, {\n prefixCls: prefixCls,\n key: key\n }, node);\n};\nconst Holder = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n top,\n prefixCls: staticPrefixCls,\n getContainer: staticGetContainer,\n maxCount,\n duration = DEFAULT_DURATION,\n rtl,\n transitionName,\n onAllRemoved\n } = props;\n const {\n getPrefixCls,\n getPopupContainer,\n message\n } = React.useContext(ConfigContext);\n const prefixCls = staticPrefixCls || getPrefixCls('message');\n // =============================== Style ===============================\n const getStyle = () => ({\n left: '50%',\n transform: 'translateX(-50%)',\n top: top !== null && top !== void 0 ? top : DEFAULT_OFFSET\n });\n const getClassName = () => classNames({\n [`${prefixCls}-rtl`]: rtl\n });\n // ============================== Motion ===============================\n const getNotificationMotion = () => getMotion(prefixCls, transitionName);\n // ============================ Close Icon =============================\n const mergedCloseIcon = /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-close-x`\n }, /*#__PURE__*/React.createElement(CloseOutlined, {\n className: `${prefixCls}-close-icon`\n }));\n // ============================== Origin ===============================\n const [api, holder] = useRcNotification({\n prefixCls,\n style: getStyle,\n className: getClassName,\n motion: getNotificationMotion,\n closable: false,\n closeIcon: mergedCloseIcon,\n duration,\n getContainer: () => (staticGetContainer === null || staticGetContainer === void 0 ? void 0 : staticGetContainer()) || (getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer()) || document.body,\n maxCount,\n onAllRemoved,\n renderNotifications\n });\n // ================================ Ref ================================\n React.useImperativeHandle(ref, () => Object.assign(Object.assign({}, api), {\n prefixCls,\n message\n }));\n return holder;\n});\n// ==============================================================================\n// == Hook ==\n// ==============================================================================\nlet keyIndex = 0;\nexport function useInternalMessage(messageConfig) {\n const holderRef = React.useRef(null);\n const warning = devUseWarning('Message');\n // ================================ API ================================\n const wrapAPI = React.useMemo(() => {\n // Wrap with notification content\n // >>> close\n const close = key => {\n var _a;\n (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.close(key);\n };\n // >>> Open\n const open = config => {\n if (!holderRef.current) {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'usage', 'You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.') : void 0;\n const fakeResult = () => {};\n fakeResult.then = () => {};\n return fakeResult;\n }\n const {\n open: originOpen,\n prefixCls,\n message\n } = holderRef.current;\n const noticePrefixCls = `${prefixCls}-notice`;\n const {\n content,\n icon,\n type,\n key,\n className,\n style,\n onClose\n } = config,\n restConfig = __rest(config, [\"content\", \"icon\", \"type\", \"key\", \"className\", \"style\", \"onClose\"]);\n let mergedKey = key;\n if (mergedKey === undefined || mergedKey === null) {\n keyIndex += 1;\n mergedKey = `antd-message-${keyIndex}`;\n }\n return wrapPromiseFn(resolve => {\n originOpen(Object.assign(Object.assign({}, restConfig), {\n key: mergedKey,\n content: /*#__PURE__*/React.createElement(PureContent, {\n prefixCls: prefixCls,\n type: type,\n icon: icon\n }, content),\n placement: 'top',\n className: classNames(type && `${noticePrefixCls}-${type}`, className, message === null || message === void 0 ? void 0 : message.className),\n style: Object.assign(Object.assign({}, message === null || message === void 0 ? void 0 : message.style), style),\n onClose: () => {\n onClose === null || onClose === void 0 ? void 0 : onClose();\n resolve();\n }\n }));\n // Return close function\n return () => {\n close(mergedKey);\n };\n });\n };\n // >>> destroy\n const destroy = key => {\n var _a;\n if (key !== undefined) {\n close(key);\n } else {\n (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.destroy();\n }\n };\n const clone = {\n open,\n destroy\n };\n const keys = ['info', 'success', 'warning', 'error', 'loading'];\n keys.forEach(type => {\n const typeOpen = (jointContent, duration, onClose) => {\n let config;\n if (jointContent && typeof jointContent === 'object' && 'content' in jointContent) {\n config = jointContent;\n } else {\n config = {\n content: jointContent\n };\n }\n // Params\n let mergedDuration;\n let mergedOnClose;\n if (typeof duration === 'function') {\n mergedOnClose = duration;\n } else {\n mergedDuration = duration;\n mergedOnClose = onClose;\n }\n const mergedConfig = Object.assign(Object.assign({\n onClose: mergedOnClose,\n duration: mergedDuration\n }, config), {\n type\n });\n return open(mergedConfig);\n };\n clone[type] = typeOpen;\n });\n return clone;\n }, []);\n // ============================== Return ===============================\n return [wrapAPI, /*#__PURE__*/React.createElement(Holder, Object.assign({\n key: \"message-holder\"\n }, messageConfig, {\n ref: holderRef\n }))];\n}\nexport default function useMessage(messageConfig) {\n return useInternalMessage(messageConfig);\n}","\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nexport default function usePatchElement() {\n const [elements, setElements] = React.useState([]);\n const patchElement = React.useCallback(element => {\n // append a new element to elements (and create a new ref)\n setElements(originElements => [].concat(_toConsumableArray(originElements), [element]));\n // return a function that removes the new element out of elements (and create a new ref)\n // it works a little like useEffect\n return () => {\n setElements(originElements => originElements.filter(ele => ele !== element));\n };\n }, []);\n return [elements, patchElement];\n}","import _typeof from \"./typeof.js\";\nexport default function _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n };\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import _regeneratorRuntime from \"@babel/runtime/helpers/esm/regeneratorRuntime\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as ReactDOM from 'react-dom';\n// Let compiler not to search module usage\nvar fullClone = _objectSpread({}, ReactDOM);\nvar version = fullClone.version,\n reactRender = fullClone.render,\n unmountComponentAtNode = fullClone.unmountComponentAtNode;\nvar createRoot;\ntry {\n var mainVersion = Number((version || '').split('.')[0]);\n if (mainVersion >= 18) {\n createRoot = fullClone.createRoot;\n }\n} catch (e) {\n // Do nothing;\n}\nfunction toggleWarning(skip) {\n var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && _typeof(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === 'object') {\n __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;\n }\n}\nvar MARK = '__rc_react_root__';\n\n// ========================== Render ==========================\n\nfunction modernRender(node, container) {\n toggleWarning(true);\n var root = container[MARK] || createRoot(container);\n toggleWarning(false);\n root.render(node);\n container[MARK] = root;\n}\nfunction legacyRender(node, container) {\n reactRender(node, container);\n}\n\n/** @private Test usage. Not work in prod */\nexport function _r(node, container) {\n if (process.env.NODE_ENV !== 'production') {\n return legacyRender(node, container);\n }\n}\nexport function render(node, container) {\n if (createRoot) {\n modernRender(node, container);\n return;\n }\n legacyRender(node, container);\n}\n\n// ========================= Unmount ==========================\nfunction modernUnmount(_x) {\n return _modernUnmount.apply(this, arguments);\n}\nfunction _modernUnmount() {\n _modernUnmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(container) {\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n return _context.abrupt(\"return\", Promise.resolve().then(function () {\n var _container$MARK;\n (_container$MARK = container[MARK]) === null || _container$MARK === void 0 ? void 0 : _container$MARK.unmount();\n delete container[MARK];\n }));\n case 1:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return _modernUnmount.apply(this, arguments);\n}\nfunction legacyUnmount(container) {\n unmountComponentAtNode(container);\n}\n\n/** @private Test usage. Not work in prod */\nexport function _u(container) {\n if (process.env.NODE_ENV !== 'production') {\n return legacyUnmount(container);\n }\n}\nexport function unmount(_x2) {\n return _unmount.apply(this, arguments);\n}\nfunction _unmount() {\n _unmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(container) {\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n if (!(createRoot !== undefined)) {\n _context2.next = 2;\n break;\n }\n return _context2.abrupt(\"return\", modernUnmount(container));\n case 2:\n legacyUnmount(container);\n case 3:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2);\n }));\n return _unmount.apply(this, arguments);\n}","// ================== Collapse Motion ==================\nconst getCollapsedHeight = () => ({\n height: 0,\n opacity: 0\n});\nconst getRealHeight = node => {\n const {\n scrollHeight\n } = node;\n return {\n height: scrollHeight,\n opacity: 1\n };\n};\nconst getCurrentHeight = node => ({\n height: node ? node.offsetHeight : 0\n});\nconst skipOpacityTransition = (_, event) => (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';\nconst initCollapseMotion = function () {\n let rootCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'ant';\n return {\n motionName: `${rootCls}-motion-collapse`,\n onAppearStart: getCollapsedHeight,\n onEnterStart: getCollapsedHeight,\n onAppearActive: getRealHeight,\n onEnterActive: getRealHeight,\n onLeaveStart: getCurrentHeight,\n onLeaveActive: getCollapsedHeight,\n onAppearEnd: skipOpacityTransition,\n onEnterEnd: skipOpacityTransition,\n onLeaveEnd: skipOpacityTransition,\n motionDeadline: 500\n };\n};\nconst SelectPlacements = ['bottomLeft', 'bottomRight', 'topLeft', 'topRight'];\nconst getTransitionName = (rootPrefixCls, motion, transitionName) => {\n if (transitionName !== undefined) {\n return transitionName;\n }\n return `${rootPrefixCls}-${motion}`;\n};\nexport { getTransitionName };\nexport default initCollapseMotion;","export default (function (element) {\n if (!element) {\n return false;\n }\n if (element instanceof Element) {\n if (element.offsetParent) {\n return true;\n }\n if (element.getBBox) {\n var _getBBox = element.getBBox(),\n width = _getBBox.width,\n height = _getBBox.height;\n if (width || height) {\n return true;\n }\n }\n if (element.getBoundingClientRect) {\n var _element$getBoundingC = element.getBoundingClientRect(),\n _width = _element$getBoundingC.width,\n _height = _element$getBoundingC.height;\n if (_width || _height) {\n return true;\n }\n }\n }\n return false;\n});","import { genComponentStyleHook } from '../../theme/internal';\nconst genWaveStyle = token => {\n const {\n componentCls,\n colorPrimary\n } = token;\n return {\n [componentCls]: {\n position: 'absolute',\n background: 'transparent',\n pointerEvents: 'none',\n boxSizing: 'border-box',\n color: `var(--wave-color, ${colorPrimary})`,\n boxShadow: `0 0 0 0 currentcolor`,\n opacity: 0.2,\n // =================== Motion ===================\n '&.wave-motion-appear': {\n transition: [`box-shadow 0.4s ${token.motionEaseOutCirc}`, `opacity 2s ${token.motionEaseOutCirc}`].join(','),\n '&-active': {\n boxShadow: `0 0 0 6px currentcolor`,\n opacity: 0\n },\n '&.wave-quick': {\n transition: [`box-shadow 0.3s ${token.motionEaseInOut}`, `opacity 0.35s ${token.motionEaseInOut}`].join(',')\n }\n }\n }\n };\n};\nexport default genComponentStyleHook('Wave', token => [genWaveStyle(token)]);","export function isNotGrey(color) {\n // eslint-disable-next-line no-useless-escape\n const match = (color || '').match(/rgba?\\((\\d*), (\\d*), (\\d*)(, [\\d.]*)?\\)/);\n if (match && match[1] && match[2] && match[3]) {\n return !(match[1] === match[2] && match[2] === match[3]);\n }\n return true;\n}\nexport function isValidWaveColor(color) {\n return color && color !== '#fff' && color !== '#ffffff' && color !== 'rgb(255, 255, 255)' && color !== 'rgba(255, 255, 255, 1)' && isNotGrey(color) && !/rgba\\((?:\\d*, ){3}0\\)/.test(color) &&\n // any transparent rgba color\n color !== 'transparent';\n}\nexport function getTargetWaveColor(node) {\n const {\n borderTopColor,\n borderColor,\n backgroundColor\n } = getComputedStyle(node);\n if (isValidWaveColor(borderTopColor)) {\n return borderTopColor;\n }\n if (isValidWaveColor(borderColor)) {\n return borderColor;\n }\n if (isValidWaveColor(backgroundColor)) {\n return backgroundColor;\n }\n return null;\n}","export const TARGET_CLS = 'ant-wave-target';","\"use client\";\n\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport { render, unmount } from \"rc-util/es/React/render\";\nimport raf from \"rc-util/es/raf\";\nimport * as React from 'react';\nimport { getTargetWaveColor } from './util';\nimport { TARGET_CLS } from './interface';\nfunction validateNum(value) {\n return Number.isNaN(value) ? 0 : value;\n}\nconst WaveEffect = props => {\n const {\n className,\n target,\n component\n } = props;\n const divRef = React.useRef(null);\n const [color, setWaveColor] = React.useState(null);\n const [borderRadius, setBorderRadius] = React.useState([]);\n const [left, setLeft] = React.useState(0);\n const [top, setTop] = React.useState(0);\n const [width, setWidth] = React.useState(0);\n const [height, setHeight] = React.useState(0);\n const [enabled, setEnabled] = React.useState(false);\n const waveStyle = {\n left,\n top,\n width,\n height,\n borderRadius: borderRadius.map(radius => `${radius}px`).join(' ')\n };\n if (color) {\n waveStyle['--wave-color'] = color;\n }\n function syncPos() {\n const nodeStyle = getComputedStyle(target);\n // Get wave color from target\n setWaveColor(getTargetWaveColor(target));\n const isStatic = nodeStyle.position === 'static';\n // Rect\n const {\n borderLeftWidth,\n borderTopWidth\n } = nodeStyle;\n setLeft(isStatic ? target.offsetLeft : validateNum(-parseFloat(borderLeftWidth)));\n setTop(isStatic ? target.offsetTop : validateNum(-parseFloat(borderTopWidth)));\n setWidth(target.offsetWidth);\n setHeight(target.offsetHeight);\n // Get border radius\n const {\n borderTopLeftRadius,\n borderTopRightRadius,\n borderBottomLeftRadius,\n borderBottomRightRadius\n } = nodeStyle;\n setBorderRadius([borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius].map(radius => validateNum(parseFloat(radius))));\n }\n React.useEffect(() => {\n if (target) {\n // We need delay to check position here\n // since UI may change after click\n const id = raf(() => {\n syncPos();\n setEnabled(true);\n });\n // Add resize observer to follow size\n let resizeObserver;\n if (typeof ResizeObserver !== 'undefined') {\n resizeObserver = new ResizeObserver(syncPos);\n resizeObserver.observe(target);\n }\n return () => {\n raf.cancel(id);\n resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();\n };\n }\n }, []);\n if (!enabled) {\n return null;\n }\n const isSmallComponent = (component === 'Checkbox' || component === 'Radio') && (target === null || target === void 0 ? void 0 : target.classList.contains(TARGET_CLS));\n return /*#__PURE__*/React.createElement(CSSMotion, {\n visible: true,\n motionAppear: true,\n motionName: \"wave-motion\",\n motionDeadline: 5000,\n onAppearEnd: (_, event) => {\n var _a;\n if (event.deadline || event.propertyName === 'opacity') {\n const holder = (_a = divRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;\n unmount(holder).then(() => {\n holder === null || holder === void 0 ? void 0 : holder.remove();\n });\n }\n return false;\n }\n }, _ref => {\n let {\n className: motionClassName\n } = _ref;\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: divRef,\n className: classNames(className, {\n 'wave-quick': isSmallComponent\n }, motionClassName),\n style: waveStyle\n });\n });\n};\nconst showWaveEffect = (target, info) => {\n var _a;\n const {\n component\n } = info;\n // Skip for unchecked checkbox\n if (component === 'Checkbox' && !((_a = target.querySelector('input')) === null || _a === void 0 ? void 0 : _a.checked)) {\n return;\n }\n // Create holder\n const holder = document.createElement('div');\n holder.style.position = 'absolute';\n holder.style.left = '0px';\n holder.style.top = '0px';\n target === null || target === void 0 ? void 0 : target.insertBefore(holder, target === null || target === void 0 ? void 0 : target.firstChild);\n render( /*#__PURE__*/React.createElement(WaveEffect, Object.assign({}, info, {\n target: target\n })), holder);\n};\nexport default showWaveEffect;","import * as React from 'react';\nimport { useEvent } from 'rc-util';\nimport raf from \"rc-util/es/raf\";\nimport showWaveEffect from './WaveEffect';\nimport { ConfigContext } from '../../config-provider';\nimport useToken from '../../theme/useToken';\nimport { TARGET_CLS } from './interface';\nexport default function useWave(nodeRef, className, component) {\n const {\n wave\n } = React.useContext(ConfigContext);\n const [, token, hashId] = useToken();\n const showWave = useEvent(event => {\n const node = nodeRef.current;\n if ((wave === null || wave === void 0 ? void 0 : wave.disabled) || !node) {\n return;\n }\n const targetNode = node.querySelector(`.${TARGET_CLS}`) || node;\n const {\n showEffect\n } = wave || {};\n // Customize wave effect\n (showEffect || showWaveEffect)(targetNode, {\n className,\n token,\n component,\n event,\n hashId\n });\n });\n const rafId = React.useRef();\n // Merge trigger event into one for each frame\n const showDebounceWave = event => {\n raf.cancel(rafId.current);\n rafId.current = raf(() => {\n showWave(event);\n });\n };\n return showDebounceWave;\n}","import classNames from 'classnames';\nimport { composeRef, supportRef } from \"rc-util/es/ref\";\nimport isVisible from \"rc-util/es/Dom/isVisible\";\nimport React, { useContext, useRef } from 'react';\nimport { ConfigContext } from '../../config-provider';\nimport { cloneElement } from '../reactNode';\nimport useStyle from './style';\nimport useWave from './useWave';\nconst Wave = props => {\n const {\n children,\n disabled,\n component\n } = props;\n const {\n getPrefixCls\n } = useContext(ConfigContext);\n const containerRef = useRef(null);\n // ============================== Style ===============================\n const prefixCls = getPrefixCls('wave');\n const [, hashId] = useStyle(prefixCls);\n // =============================== Wave ===============================\n const showWave = useWave(containerRef, classNames(prefixCls, hashId), component);\n // ============================== Effect ==============================\n React.useEffect(() => {\n const node = containerRef.current;\n if (!node || node.nodeType !== 1 || disabled) {\n return;\n }\n // Click handler\n const onClick = e => {\n // Fix radio button click twice\n if (!isVisible(e.target) ||\n // No need wave\n !node.getAttribute || node.getAttribute('disabled') || node.disabled || node.className.includes('disabled') || node.className.includes('-leave')) {\n return;\n }\n showWave(e);\n };\n // Bind events\n node.addEventListener('click', onClick, true);\n return () => {\n node.removeEventListener('click', onClick, true);\n };\n }, [disabled]);\n // ============================== Render ==============================\n if (! /*#__PURE__*/React.isValidElement(children)) {\n return children !== null && children !== void 0 ? children : null;\n }\n const ref = supportRef(children) ? composeRef(children.ref, containerRef) : containerRef;\n return cloneElement(children, {\n ref\n });\n};\nif (process.env.NODE_ENV !== 'production') {\n Wave.displayName = 'Wave';\n}\nexport default Wave;","import React from 'react';\nimport SizeContext from '../SizeContext';\nconst useSize = customSize => {\n const size = React.useContext(SizeContext);\n const mergedSize = React.useMemo(() => {\n if (!customSize) {\n return size;\n }\n if (typeof customSize === 'string') {\n return customSize !== null && customSize !== void 0 ? customSize : size;\n }\n if (customSize instanceof Function) {\n return customSize(size);\n }\n return size;\n }, [customSize, size]);\n return mergedSize;\n};\nexport default useSize;","\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport classNames from 'classnames';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport useSize from '../config-provider/hooks/useSize';\nimport useStyle from './style';\nexport const SpaceCompactItemContext = /*#__PURE__*/React.createContext(null);\nexport const useCompactItemContext = (prefixCls, direction) => {\n const compactItemContext = React.useContext(SpaceCompactItemContext);\n const compactItemClassnames = React.useMemo(() => {\n if (!compactItemContext) {\n return '';\n }\n const {\n compactDirection,\n isFirstItem,\n isLastItem\n } = compactItemContext;\n const separator = compactDirection === 'vertical' ? '-vertical-' : '-';\n return classNames(`${prefixCls}-compact${separator}item`, {\n [`${prefixCls}-compact${separator}first-item`]: isFirstItem,\n [`${prefixCls}-compact${separator}last-item`]: isLastItem,\n [`${prefixCls}-compact${separator}item-rtl`]: direction === 'rtl'\n });\n }, [prefixCls, direction, compactItemContext]);\n return {\n compactSize: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactSize,\n compactDirection: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactDirection,\n compactItemClassnames\n };\n};\nexport const NoCompactStyle = _ref => {\n let {\n children\n } = _ref;\n return /*#__PURE__*/React.createElement(SpaceCompactItemContext.Provider, {\n value: null\n }, children);\n};\nconst CompactItem = _a => {\n var {\n children\n } = _a,\n otherProps = __rest(_a, [\"children\"]);\n return /*#__PURE__*/React.createElement(SpaceCompactItemContext.Provider, {\n value: otherProps\n }, children);\n};\nconst Compact = props => {\n const {\n getPrefixCls,\n direction: directionConfig\n } = React.useContext(ConfigContext);\n const {\n size,\n direction,\n block,\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n children\n } = props,\n restProps = __rest(props, [\"size\", \"direction\", \"block\", \"prefixCls\", \"className\", \"rootClassName\", \"children\"]);\n const mergedSize = useSize(ctx => size !== null && size !== void 0 ? size : ctx);\n const prefixCls = getPrefixCls('space-compact', customizePrefixCls);\n const [wrapSSR, hashId] = useStyle(prefixCls);\n const clx = classNames(prefixCls, hashId, {\n [`${prefixCls}-rtl`]: directionConfig === 'rtl',\n [`${prefixCls}-block`]: block,\n [`${prefixCls}-vertical`]: direction === 'vertical'\n }, className, rootClassName);\n const compactItemContext = React.useContext(SpaceCompactItemContext);\n const childNodes = toArray(children);\n const nodes = React.useMemo(() => childNodes.map((child, i) => {\n const key = child && child.key || `${prefixCls}-item-${i}`;\n return /*#__PURE__*/React.createElement(CompactItem, {\n key: key,\n compactSize: mergedSize,\n compactDirection: direction,\n isFirstItem: i === 0 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isFirstItem)),\n isLastItem: i === childNodes.length - 1 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isLastItem))\n }, child);\n }), [size, childNodes, compactItemContext]);\n // =========================== Render ===========================\n if (childNodes.length === 0) {\n return null;\n }\n return wrapSSR( /*#__PURE__*/React.createElement(\"div\", Object.assign({\n className: clx\n }, restProps), nodes));\n};\nexport default Compact;","\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider';\nimport { useToken } from '../theme/internal';\nexport const GroupSizeContext = /*#__PURE__*/React.createContext(undefined);\nconst ButtonGroup = props => {\n const {\n getPrefixCls,\n direction\n } = React.useContext(ConfigContext);\n const {\n prefixCls: customizePrefixCls,\n size,\n className\n } = props,\n others = __rest(props, [\"prefixCls\", \"size\", \"className\"]);\n const prefixCls = getPrefixCls('btn-group', customizePrefixCls);\n const [,, hashId] = useToken();\n let sizeCls = '';\n switch (size) {\n case 'large':\n sizeCls = 'lg';\n break;\n case 'small':\n sizeCls = 'sm';\n break;\n case 'middle':\n default:\n // Do nothing\n }\n\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Button.Group');\n process.env.NODE_ENV !== \"production\" ? warning(!size || ['large', 'small', 'middle'].includes(size), 'usage', 'Invalid prop `size`.') : void 0;\n }\n const classes = classNames(prefixCls, {\n [`${prefixCls}-${sizeCls}`]: sizeCls,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, className, hashId);\n return /*#__PURE__*/React.createElement(GroupSizeContext.Provider, {\n value: size\n }, /*#__PURE__*/React.createElement(\"div\", Object.assign({}, others, {\n className: classes\n })));\n};\nexport default ButtonGroup;","\"use client\";\n\nimport React from 'react';\nimport { cloneElement, isFragment } from '../_util/reactNode';\nconst rxTwoCNChar = /^[\\u4e00-\\u9fa5]{2}$/;\nexport const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);\nexport function convertLegacyProps(type) {\n if (type === 'danger') {\n return {\n danger: true\n };\n }\n return {\n type\n };\n}\nexport function isString(str) {\n return typeof str === 'string';\n}\nexport function isUnBorderedButtonType(type) {\n return type === 'text' || type === 'link';\n}\nfunction splitCNCharsBySpace(child, needInserted) {\n if (child === null || child === undefined) {\n return;\n }\n const SPACE = needInserted ? ' ' : '';\n if (typeof child !== 'string' && typeof child !== 'number' && isString(child.type) && isTwoCNChar(child.props.children)) {\n return cloneElement(child, {\n children: child.props.children.split('').join(SPACE)\n });\n }\n if (isString(child)) {\n return isTwoCNChar(child) ? /*#__PURE__*/React.createElement(\"span\", null, child.split('').join(SPACE)) : /*#__PURE__*/React.createElement(\"span\", null, child);\n }\n if (isFragment(child)) {\n return /*#__PURE__*/React.createElement(\"span\", null, child);\n }\n return child;\n}\nexport function spaceChildren(children, needInserted) {\n let isPrevChildPure = false;\n const childList = [];\n React.Children.forEach(children, child => {\n const type = typeof child;\n const isCurrentChildPure = type === 'string' || type === 'number';\n if (isPrevChildPure && isCurrentChildPure) {\n const lastIndex = childList.length - 1;\n const lastChild = childList[lastIndex];\n childList[lastIndex] = `${lastChild}${child}`;\n } else {\n childList.push(child);\n }\n isPrevChildPure = isCurrentChildPure;\n });\n return React.Children.map(childList, child => splitCNCharsBySpace(child, needInserted));\n}\nconst ButtonTypes = ['default', 'primary', 'dashed', 'link', 'text'];\nconst ButtonShapes = ['default', 'circle', 'round'];\nconst ButtonHTMLTypes = ['submit', 'button', 'reset'];","\"use client\";\n\nimport React, { forwardRef } from 'react';\nimport classNames from 'classnames';\nconst IconWrapper = /*#__PURE__*/forwardRef((props, ref) => {\n const {\n className,\n style,\n children,\n prefixCls\n } = props;\n const iconWrapperCls = classNames(`${prefixCls}-icon`, className);\n return /*#__PURE__*/React.createElement(\"span\", {\n ref: ref,\n className: iconWrapperCls,\n style: style\n }, children);\n});\nexport default IconWrapper;","\"use client\";\n\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport React, { forwardRef } from 'react';\nimport IconWrapper from './IconWrapper';\nconst InnerLoadingIcon = /*#__PURE__*/forwardRef((_ref, ref) => {\n let {\n prefixCls,\n className,\n style,\n iconClassName\n } = _ref;\n const mergedIconCls = classNames(`${prefixCls}-loading-icon`, className);\n return /*#__PURE__*/React.createElement(IconWrapper, {\n prefixCls: prefixCls,\n className: mergedIconCls,\n style: style,\n ref: ref\n }, /*#__PURE__*/React.createElement(LoadingOutlined, {\n className: iconClassName\n }));\n});\nconst getCollapsedWidth = () => ({\n width: 0,\n opacity: 0,\n transform: 'scale(0)'\n});\nconst getRealWidth = node => ({\n width: node.scrollWidth,\n opacity: 1,\n transform: 'scale(1)'\n});\nconst LoadingIcon = props => {\n const {\n prefixCls,\n loading,\n existIcon,\n className,\n style\n } = props;\n const visible = !!loading;\n if (existIcon) {\n return /*#__PURE__*/React.createElement(InnerLoadingIcon, {\n prefixCls: prefixCls,\n className: className,\n style: style\n });\n }\n return /*#__PURE__*/React.createElement(CSSMotion, {\n visible: visible,\n // We do not really use this motionName\n motionName: `${prefixCls}-loading-icon-motion`,\n motionLeave: visible,\n removeOnLeave: true,\n onAppearStart: getCollapsedWidth,\n onAppearActive: getRealWidth,\n onEnterStart: getCollapsedWidth,\n onEnterActive: getRealWidth,\n onLeaveStart: getRealWidth,\n onLeaveActive: getCollapsedWidth\n }, (_ref2, ref) => {\n let {\n className: motionCls,\n style: motionStyle\n } = _ref2;\n return /*#__PURE__*/React.createElement(InnerLoadingIcon, {\n prefixCls: prefixCls,\n className: className,\n style: Object.assign(Object.assign({}, style), motionStyle),\n ref: ref,\n iconClassName: motionCls\n });\n });\n};\nexport default LoadingIcon;","const genButtonBorderStyle = (buttonTypeCls, borderColor) => ({\n // Border\n [`> span, > ${buttonTypeCls}`]: {\n '&:not(:last-child)': {\n [`&, & > ${buttonTypeCls}`]: {\n '&:not(:disabled)': {\n borderInlineEndColor: borderColor\n }\n }\n },\n '&:not(:first-child)': {\n [`&, & > ${buttonTypeCls}`]: {\n '&:not(:disabled)': {\n borderInlineStartColor: borderColor\n }\n }\n }\n }\n});\nconst genGroupStyle = token => {\n const {\n componentCls,\n fontSize,\n lineWidth,\n groupBorderColor,\n colorErrorHover\n } = token;\n return {\n [`${componentCls}-group`]: [{\n position: 'relative',\n display: 'inline-flex',\n // Border\n [`> span, > ${componentCls}`]: {\n '&:not(:last-child)': {\n [`&, & > ${componentCls}`]: {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n }\n },\n '&:not(:first-child)': {\n marginInlineStart: -lineWidth,\n [`&, & > ${componentCls}`]: {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0\n }\n }\n },\n [componentCls]: {\n position: 'relative',\n zIndex: 1,\n [`&:hover,\n &:focus,\n &:active`]: {\n zIndex: 2\n },\n '&[disabled]': {\n zIndex: 0\n }\n },\n [`${componentCls}-icon-only`]: {\n fontSize\n }\n },\n // Border Color\n genButtonBorderStyle(`${componentCls}-primary`, groupBorderColor), genButtonBorderStyle(`${componentCls}-danger`, colorErrorHover)]\n };\n};\nexport default genGroupStyle;","import { genFocusStyle } from '../../style';\nimport { genComponentStyleHook, mergeToken } from '../../theme/internal';\nimport genGroupStyle from './group';\n// ============================== Shared ==============================\nconst genSharedButtonStyle = token => {\n const {\n componentCls,\n iconCls,\n fontWeight\n } = token;\n return {\n [componentCls]: {\n outline: 'none',\n position: 'relative',\n display: 'inline-block',\n fontWeight,\n whiteSpace: 'nowrap',\n textAlign: 'center',\n backgroundImage: 'none',\n backgroundColor: 'transparent',\n border: `${token.lineWidth}px ${token.lineType} transparent`,\n cursor: 'pointer',\n transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`,\n userSelect: 'none',\n touchAction: 'manipulation',\n lineHeight: token.lineHeight,\n color: token.colorText,\n '&:disabled > *': {\n pointerEvents: 'none'\n },\n '> span': {\n display: 'inline-block'\n },\n [`${componentCls}-icon`]: {\n lineHeight: 0\n },\n // Leave a space between icon and text.\n [`> ${iconCls} + span, > span + ${iconCls}`]: {\n marginInlineStart: token.marginXS\n },\n [`&:not(${componentCls}-icon-only) > ${componentCls}-icon`]: {\n [`&${componentCls}-loading-icon, &:not(:last-child)`]: {\n marginInlineEnd: token.marginXS\n }\n },\n '> a': {\n color: 'currentColor'\n },\n '&:not(:disabled)': Object.assign({}, genFocusStyle(token)),\n [`&${componentCls}-two-chinese-chars::first-letter`]: {\n letterSpacing: '0.34em'\n },\n [`&${componentCls}-two-chinese-chars > *:not(${iconCls})`]: {\n marginInlineEnd: '-0.34em',\n letterSpacing: '0.34em'\n },\n // make `btn-icon-only` not too narrow\n [`&-icon-only${componentCls}-compact-item`]: {\n flex: 'none'\n },\n // Special styles for Primary Button\n [`&-compact-item${componentCls}-primary`]: {\n [`&:not([disabled]) + ${componentCls}-compact-item${componentCls}-primary:not([disabled])`]: {\n position: 'relative',\n '&:before': {\n position: 'absolute',\n top: -token.lineWidth,\n insetInlineStart: -token.lineWidth,\n display: 'inline-block',\n width: token.lineWidth,\n height: `calc(100% + ${token.lineWidth * 2}px)`,\n backgroundColor: token.colorPrimaryHover,\n content: '\"\"'\n }\n }\n },\n // Special styles for Primary Button\n '&-compact-vertical-item': {\n [`&${componentCls}-primary`]: {\n [`&:not([disabled]) + ${componentCls}-compact-vertical-item${componentCls}-primary:not([disabled])`]: {\n position: 'relative',\n '&:before': {\n position: 'absolute',\n top: -token.lineWidth,\n insetInlineStart: -token.lineWidth,\n display: 'inline-block',\n width: `calc(100% + ${token.lineWidth * 2}px)`,\n height: token.lineWidth,\n backgroundColor: token.colorPrimaryHover,\n content: '\"\"'\n }\n }\n }\n }\n }\n };\n};\nconst genHoverActiveButtonStyle = (btnCls, hoverStyle, activeStyle) => ({\n [`&:not(:disabled):not(${btnCls}-disabled)`]: {\n '&:hover': hoverStyle,\n '&:active': activeStyle\n }\n});\n// ============================== Shape ===============================\nconst genCircleButtonStyle = token => ({\n minWidth: token.controlHeight,\n paddingInlineStart: 0,\n paddingInlineEnd: 0,\n borderRadius: '50%'\n});\nconst genRoundButtonStyle = token => ({\n borderRadius: token.controlHeight,\n paddingInlineStart: token.controlHeight / 2,\n paddingInlineEnd: token.controlHeight / 2\n});\n// =============================== Type ===============================\nconst genDisabledStyle = token => ({\n cursor: 'not-allowed',\n borderColor: token.borderColorDisabled,\n color: token.colorTextDisabled,\n backgroundColor: token.colorBgContainerDisabled,\n boxShadow: 'none'\n});\nconst genGhostButtonStyle = (btnCls, background, textColor, borderColor, textColorDisabled, borderColorDisabled, hoverStyle, activeStyle) => ({\n [`&${btnCls}-background-ghost`]: Object.assign(Object.assign({\n color: textColor || undefined,\n backgroundColor: background,\n borderColor: borderColor || undefined,\n boxShadow: 'none'\n }, genHoverActiveButtonStyle(btnCls, Object.assign({\n backgroundColor: background\n }, hoverStyle), Object.assign({\n backgroundColor: background\n }, activeStyle))), {\n '&:disabled': {\n cursor: 'not-allowed',\n color: textColorDisabled || undefined,\n borderColor: borderColorDisabled || undefined\n }\n })\n});\nconst genSolidDisabledButtonStyle = token => ({\n [`&:disabled, &${token.componentCls}-disabled`]: Object.assign({}, genDisabledStyle(token))\n});\nconst genSolidButtonStyle = token => Object.assign({}, genSolidDisabledButtonStyle(token));\nconst genPureDisabledButtonStyle = token => ({\n [`&:disabled, &${token.componentCls}-disabled`]: {\n cursor: 'not-allowed',\n color: token.colorTextDisabled\n }\n});\n// Type: Default\nconst genDefaultButtonStyle = token => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, genSolidButtonStyle(token)), {\n backgroundColor: token.defaultBg,\n borderColor: token.defaultBorderColor,\n color: token.defaultColor,\n boxShadow: token.defaultShadow\n}), genHoverActiveButtonStyle(token.componentCls, {\n color: token.colorPrimaryHover,\n borderColor: token.colorPrimaryHover\n}, {\n color: token.colorPrimaryActive,\n borderColor: token.colorPrimaryActive\n})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.defaultGhostColor, token.defaultGhostBorderColor, token.colorTextDisabled, token.colorBorder)), {\n [`&${token.componentCls}-dangerous`]: Object.assign(Object.assign(Object.assign({\n color: token.colorError,\n borderColor: token.colorError\n }, genHoverActiveButtonStyle(token.componentCls, {\n color: token.colorErrorHover,\n borderColor: token.colorErrorBorderHover\n }, {\n color: token.colorErrorActive,\n borderColor: token.colorErrorActive\n })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorError, token.colorError, token.colorTextDisabled, token.colorBorder)), genSolidDisabledButtonStyle(token))\n});\n// Type: Primary\nconst genPrimaryButtonStyle = token => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, genSolidButtonStyle(token)), {\n color: token.primaryColor,\n backgroundColor: token.colorPrimary,\n boxShadow: token.primaryShadow\n}), genHoverActiveButtonStyle(token.componentCls, {\n color: token.colorTextLightSolid,\n backgroundColor: token.colorPrimaryHover\n}, {\n color: token.colorTextLightSolid,\n backgroundColor: token.colorPrimaryActive\n})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorPrimary, token.colorPrimary, token.colorTextDisabled, token.colorBorder, {\n color: token.colorPrimaryHover,\n borderColor: token.colorPrimaryHover\n}, {\n color: token.colorPrimaryActive,\n borderColor: token.colorPrimaryActive\n})), {\n [`&${token.componentCls}-dangerous`]: Object.assign(Object.assign(Object.assign({\n backgroundColor: token.colorError,\n boxShadow: token.dangerShadow,\n color: token.dangerColor\n }, genHoverActiveButtonStyle(token.componentCls, {\n backgroundColor: token.colorErrorHover\n }, {\n backgroundColor: token.colorErrorActive\n })), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorError, token.colorError, token.colorTextDisabled, token.colorBorder, {\n color: token.colorErrorHover,\n borderColor: token.colorErrorHover\n }, {\n color: token.colorErrorActive,\n borderColor: token.colorErrorActive\n })), genSolidDisabledButtonStyle(token))\n});\n// Type: Dashed\nconst genDashedButtonStyle = token => Object.assign(Object.assign({}, genDefaultButtonStyle(token)), {\n borderStyle: 'dashed'\n});\n// Type: Link\nconst genLinkButtonStyle = token => Object.assign(Object.assign(Object.assign({\n color: token.colorLink\n}, genHoverActiveButtonStyle(token.componentCls, {\n color: token.colorLinkHover,\n backgroundColor: token.linkHoverBg\n}, {\n color: token.colorLinkActive\n})), genPureDisabledButtonStyle(token)), {\n [`&${token.componentCls}-dangerous`]: Object.assign(Object.assign({\n color: token.colorError\n }, genHoverActiveButtonStyle(token.componentCls, {\n color: token.colorErrorHover\n }, {\n color: token.colorErrorActive\n })), genPureDisabledButtonStyle(token))\n});\n// Type: Text\nconst genTextButtonStyle = token => Object.assign(Object.assign(Object.assign({}, genHoverActiveButtonStyle(token.componentCls, {\n color: token.colorText,\n backgroundColor: token.textHoverBg\n}, {\n color: token.colorText,\n backgroundColor: token.colorBgTextActive\n})), genPureDisabledButtonStyle(token)), {\n [`&${token.componentCls}-dangerous`]: Object.assign(Object.assign({\n color: token.colorError\n }, genPureDisabledButtonStyle(token)), genHoverActiveButtonStyle(token.componentCls, {\n color: token.colorErrorHover,\n backgroundColor: token.colorErrorBg\n }, {\n color: token.colorErrorHover,\n backgroundColor: token.colorErrorBg\n }))\n});\nconst genTypeButtonStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-default`]: genDefaultButtonStyle(token),\n [`${componentCls}-primary`]: genPrimaryButtonStyle(token),\n [`${componentCls}-dashed`]: genDashedButtonStyle(token),\n [`${componentCls}-link`]: genLinkButtonStyle(token),\n [`${componentCls}-text`]: genTextButtonStyle(token),\n [`${componentCls}-ghost`]: genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorBgContainer, token.colorBgContainer, token.colorTextDisabled, token.colorBorder)\n };\n};\n// =============================== Size ===============================\nconst genSizeButtonStyle = function (token) {\n let sizePrefixCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n const {\n componentCls,\n controlHeight,\n fontSize,\n lineHeight,\n lineWidth,\n borderRadius,\n buttonPaddingHorizontal,\n iconCls\n } = token;\n const paddingVertical = Math.max(0, (controlHeight - fontSize * lineHeight) / 2 - lineWidth);\n const iconOnlyCls = `${componentCls}-icon-only`;\n return [\n // Size\n {\n [`${componentCls}${sizePrefixCls}`]: {\n fontSize,\n height: controlHeight,\n padding: `${paddingVertical}px ${buttonPaddingHorizontal}px`,\n borderRadius,\n [`&${iconOnlyCls}`]: {\n width: controlHeight,\n paddingInlineStart: 0,\n paddingInlineEnd: 0,\n [`&${componentCls}-round`]: {\n width: 'auto'\n },\n [iconCls]: {\n fontSize: token.buttonIconOnlyFontSize\n }\n },\n // Loading\n [`&${componentCls}-loading`]: {\n opacity: token.opacityLoading,\n cursor: 'default'\n },\n [`${componentCls}-loading-icon`]: {\n transition: `width ${token.motionDurationSlow} ${token.motionEaseInOut}, opacity ${token.motionDurationSlow} ${token.motionEaseInOut}`\n }\n }\n },\n // Shape - patch prefixCls again to override solid border radius style\n {\n [`${componentCls}${componentCls}-circle${sizePrefixCls}`]: genCircleButtonStyle(token)\n }, {\n [`${componentCls}${componentCls}-round${sizePrefixCls}`]: genRoundButtonStyle(token)\n }];\n};\nconst genSizeBaseButtonStyle = token => genSizeButtonStyle(mergeToken(token, {\n fontSize: token.contentFontSize\n}));\nconst genSizeSmallButtonStyle = token => {\n const smallToken = mergeToken(token, {\n controlHeight: token.controlHeightSM,\n fontSize: token.contentFontSizeSM,\n padding: token.paddingXS,\n buttonPaddingHorizontal: token.paddingInlineSM,\n borderRadius: token.borderRadiusSM,\n buttonIconOnlyFontSize: token.onlyIconSizeSM\n });\n return genSizeButtonStyle(smallToken, `${token.componentCls}-sm`);\n};\nconst genSizeLargeButtonStyle = token => {\n const largeToken = mergeToken(token, {\n controlHeight: token.controlHeightLG,\n fontSize: token.contentFontSizeLG,\n buttonPaddingHorizontal: token.paddingInlineLG,\n borderRadius: token.borderRadiusLG,\n buttonIconOnlyFontSize: token.onlyIconSizeLG\n });\n return genSizeButtonStyle(largeToken, `${token.componentCls}-lg`);\n};\nconst genBlockButtonStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [componentCls]: {\n [`&${componentCls}-block`]: {\n width: '100%'\n }\n }\n };\n};\n// ============================== Export ==============================\nexport const prepareToken = token => {\n const {\n paddingInline,\n onlyIconSize\n } = token;\n const buttonToken = mergeToken(token, {\n buttonPaddingHorizontal: paddingInline,\n buttonIconOnlyFontSize: onlyIconSize\n });\n return buttonToken;\n};\nexport const prepareComponentToken = token => ({\n fontWeight: 400,\n defaultShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlTmpOutline}`,\n primaryShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlOutline}`,\n dangerShadow: `0 ${token.controlOutlineWidth}px 0 ${token.colorErrorOutline}`,\n primaryColor: token.colorTextLightSolid,\n dangerColor: token.colorTextLightSolid,\n borderColorDisabled: token.colorBorder,\n defaultGhostColor: token.colorBgContainer,\n ghostBg: 'transparent',\n defaultGhostBorderColor: token.colorBgContainer,\n paddingInline: token.paddingContentHorizontal - token.lineWidth,\n paddingInlineLG: token.paddingContentHorizontal - token.lineWidth,\n paddingInlineSM: 8 - token.lineWidth,\n onlyIconSize: token.fontSizeLG,\n onlyIconSizeSM: token.fontSizeLG - 2,\n onlyIconSizeLG: token.fontSizeLG + 2,\n groupBorderColor: token.colorPrimaryHover,\n linkHoverBg: 'transparent',\n textHoverBg: token.colorBgTextHover,\n defaultColor: token.colorText,\n defaultBg: token.colorBgContainer,\n defaultBorderColor: token.colorBorder,\n defaultBorderColorDisabled: token.colorBorder,\n contentFontSize: token.fontSize,\n contentFontSizeSM: token.fontSize,\n contentFontSizeLG: token.fontSizeLG\n});\nexport default genComponentStyleHook('Button', token => {\n const buttonToken = prepareToken(token);\n return [\n // Shared\n genSharedButtonStyle(buttonToken),\n // Size\n genSizeSmallButtonStyle(buttonToken), genSizeBaseButtonStyle(buttonToken), genSizeLargeButtonStyle(buttonToken),\n // Block\n genBlockButtonStyle(buttonToken),\n // Group (type, ghost, danger, loading)\n genTypeButtonStyle(buttonToken),\n // Button Group\n genGroupStyle(buttonToken)];\n}, prepareComponentToken);","// handle border collapse\nfunction compactItemBorder(token, parentCls, options) {\n const {\n focusElCls,\n focus,\n borderElCls\n } = options;\n const childCombinator = borderElCls ? '> *' : '';\n const hoverEffects = ['hover', focus ? 'focus' : null, 'active'].filter(Boolean).map(n => `&:${n} ${childCombinator}`).join(',');\n return {\n [`&-item:not(${parentCls}-last-item)`]: {\n marginInlineEnd: -token.lineWidth\n },\n '&-item': Object.assign(Object.assign({\n [hoverEffects]: {\n zIndex: 2\n }\n }, focusElCls ? {\n [`&${focusElCls}`]: {\n zIndex: 2\n }\n } : {}), {\n [`&[disabled] ${childCombinator}`]: {\n zIndex: 0\n }\n })\n };\n}\n// handle border-radius\nfunction compactItemBorderRadius(prefixCls, parentCls, options) {\n const {\n borderElCls\n } = options;\n const childCombinator = borderElCls ? `> ${borderElCls}` : '';\n return {\n [`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item) ${childCombinator}`]: {\n borderRadius: 0\n },\n [`&-item:not(${parentCls}-last-item)${parentCls}-first-item`]: {\n [`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {\n borderStartEndRadius: 0,\n borderEndEndRadius: 0\n }\n },\n [`&-item:not(${parentCls}-first-item)${parentCls}-last-item`]: {\n [`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {\n borderStartStartRadius: 0,\n borderEndStartRadius: 0\n }\n }\n };\n}\nexport function genCompactItemStyle(token) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n focus: true\n };\n const {\n componentCls\n } = token;\n const compactCls = `${componentCls}-compact`;\n return {\n [compactCls]: Object.assign(Object.assign({}, compactItemBorder(token, compactCls, options)), compactItemBorderRadius(componentCls, compactCls, options))\n };\n}","function compactItemVerticalBorder(token, parentCls) {\n return {\n // border collapse\n [`&-item:not(${parentCls}-last-item)`]: {\n marginBottom: -token.lineWidth\n },\n '&-item': {\n '&:hover,&:focus,&:active': {\n zIndex: 2\n },\n '&[disabled]': {\n zIndex: 0\n }\n }\n };\n}\nfunction compactItemBorderVerticalRadius(prefixCls, parentCls) {\n return {\n [`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item)`]: {\n borderRadius: 0\n },\n [`&-item${parentCls}-first-item:not(${parentCls}-last-item)`]: {\n [`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {\n borderEndEndRadius: 0,\n borderEndStartRadius: 0\n }\n },\n [`&-item${parentCls}-last-item:not(${parentCls}-first-item)`]: {\n [`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {\n borderStartStartRadius: 0,\n borderStartEndRadius: 0\n }\n }\n };\n}\nexport function genCompactItemVerticalStyle(token) {\n const compactCls = `${token.componentCls}-compact-vertical`;\n return {\n [compactCls]: Object.assign(Object.assign({}, compactItemVerticalBorder(token, compactCls)), compactItemBorderVerticalRadius(token.componentCls, compactCls))\n };\n}","// Style as inline component\nimport { prepareComponentToken, prepareToken } from '.';\nimport { genCompactItemStyle } from '../../style/compact-item';\nimport { genCompactItemVerticalStyle } from '../../style/compact-item-vertical';\nimport { genSubStyleComponent } from '../../theme/internal';\n// ============================== Export ==============================\nexport default genSubStyleComponent(['Button', 'compact'], token => {\n const buttonToken = prepareToken(token);\n return [\n // Space Compact\n genCompactItemStyle(buttonToken), genCompactItemVerticalStyle(buttonToken)];\n}, prepareComponentToken);","\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n/* eslint-disable react/button-has-type */\nimport React, { Children, createRef, forwardRef, useContext, useEffect, useMemo, useState } from 'react';\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport { composeRef } from \"rc-util/es/ref\";\nimport { devUseWarning } from '../_util/warning';\nimport Wave from '../_util/wave';\nimport { ConfigContext } from '../config-provider';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport useSize from '../config-provider/hooks/useSize';\nimport { useCompactItemContext } from '../space/Compact';\nimport Group, { GroupSizeContext } from './button-group';\nimport { isTwoCNChar, isUnBorderedButtonType, spaceChildren } from './buttonHelpers';\nimport IconWrapper from './IconWrapper';\nimport LoadingIcon from './LoadingIcon';\nimport useStyle from './style';\nimport CompactCmp from './style/compactCmp';\nfunction getLoadingConfig(loading) {\n if (typeof loading === 'object' && loading) {\n const delay = loading === null || loading === void 0 ? void 0 : loading.delay;\n const isDelay = !Number.isNaN(delay) && typeof delay === 'number';\n return {\n loading: false,\n delay: isDelay ? delay : 0\n };\n }\n return {\n loading: !!loading,\n delay: 0\n };\n}\nconst InternalButton = (props, ref) => {\n var _a, _b;\n const {\n loading = false,\n prefixCls: customizePrefixCls,\n type = 'default',\n danger,\n shape = 'default',\n size: customizeSize,\n styles,\n disabled: customDisabled,\n className,\n rootClassName,\n children,\n icon,\n ghost = false,\n block = false,\n // React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`.\n htmlType = 'button',\n classNames: customClassNames,\n style: customStyle = {}\n } = props,\n rest = __rest(props, [\"loading\", \"prefixCls\", \"type\", \"danger\", \"shape\", \"size\", \"styles\", \"disabled\", \"className\", \"rootClassName\", \"children\", \"icon\", \"ghost\", \"block\", \"htmlType\", \"classNames\", \"style\"]);\n const {\n getPrefixCls,\n autoInsertSpaceInButton,\n direction,\n button\n } = useContext(ConfigContext);\n const prefixCls = getPrefixCls('btn', customizePrefixCls);\n const [wrapSSR, hashId] = useStyle(prefixCls);\n const disabled = useContext(DisabledContext);\n const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;\n const groupSize = useContext(GroupSizeContext);\n const loadingOrDelay = useMemo(() => getLoadingConfig(loading), [loading]);\n const [innerLoading, setLoading] = useState(loadingOrDelay.loading);\n const [hasTwoCNChar, setHasTwoCNChar] = useState(false);\n const internalRef = /*#__PURE__*/createRef();\n const buttonRef = composeRef(ref, internalRef);\n const needInserted = Children.count(children) === 1 && !icon && !isUnBorderedButtonType(type);\n useEffect(() => {\n let delayTimer = null;\n if (loadingOrDelay.delay > 0) {\n delayTimer = setTimeout(() => {\n delayTimer = null;\n setLoading(true);\n }, loadingOrDelay.delay);\n } else {\n setLoading(loadingOrDelay.loading);\n }\n function cleanupTimer() {\n if (delayTimer) {\n clearTimeout(delayTimer);\n delayTimer = null;\n }\n }\n return cleanupTimer;\n }, [loadingOrDelay]);\n useEffect(() => {\n // FIXME: for HOC usage like \n if (!buttonRef || !buttonRef.current || autoInsertSpaceInButton === false) {\n return;\n }\n const buttonText = buttonRef.current.textContent;\n if (needInserted && isTwoCNChar(buttonText)) {\n if (!hasTwoCNChar) {\n setHasTwoCNChar(true);\n }\n } else if (hasTwoCNChar) {\n setHasTwoCNChar(false);\n }\n }, [buttonRef]);\n const handleClick = e => {\n const {\n onClick\n } = props;\n // FIXME: https://github.com/ant-design/ant-design/issues/30207\n if (innerLoading || mergedDisabled) {\n e.preventDefault();\n return;\n }\n onClick === null || onClick === void 0 ? void 0 : onClick(e);\n };\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Button');\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\\`icon\\` is using ReactNode instead of string naming in v4. Please check \\`${icon}\\` at https://ant.design/components/icon`) : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(ghost && isUnBorderedButtonType(type)), 'usage', \"`link` or `text` button can't be a `ghost` button.\") : void 0;\n }\n const autoInsertSpace = autoInsertSpaceInButton !== false;\n const {\n compactSize,\n compactItemClassnames\n } = useCompactItemContext(prefixCls, direction);\n const sizeClassNameMap = {\n large: 'lg',\n small: 'sm',\n middle: undefined\n };\n const sizeFullName = useSize(ctxSize => {\n var _a, _b;\n return (_b = (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : groupSize) !== null && _b !== void 0 ? _b : ctxSize;\n });\n const sizeCls = sizeFullName ? sizeClassNameMap[sizeFullName] || '' : '';\n const iconType = innerLoading ? 'loading' : icon;\n const linkButtonRestProps = omit(rest, ['navigate']);\n const classes = classNames(prefixCls, hashId, {\n [`${prefixCls}-${shape}`]: shape !== 'default' && shape,\n [`${prefixCls}-${type}`]: type,\n [`${prefixCls}-${sizeCls}`]: sizeCls,\n [`${prefixCls}-icon-only`]: !children && children !== 0 && !!iconType,\n [`${prefixCls}-background-ghost`]: ghost && !isUnBorderedButtonType(type),\n [`${prefixCls}-loading`]: innerLoading,\n [`${prefixCls}-two-chinese-chars`]: hasTwoCNChar && autoInsertSpace && !innerLoading,\n [`${prefixCls}-block`]: block,\n [`${prefixCls}-dangerous`]: !!danger,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, compactItemClassnames, className, rootClassName, button === null || button === void 0 ? void 0 : button.className);\n const fullStyle = Object.assign(Object.assign({}, button === null || button === void 0 ? void 0 : button.style), customStyle);\n const iconClasses = classNames(customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.icon, (_a = button === null || button === void 0 ? void 0 : button.classNames) === null || _a === void 0 ? void 0 : _a.icon);\n const iconStyle = Object.assign(Object.assign({}, (styles === null || styles === void 0 ? void 0 : styles.icon) || {}), ((_b = button === null || button === void 0 ? void 0 : button.styles) === null || _b === void 0 ? void 0 : _b.icon) || {});\n const iconNode = icon && !innerLoading ? /*#__PURE__*/React.createElement(IconWrapper, {\n prefixCls: prefixCls,\n className: iconClasses,\n style: iconStyle\n }, icon) : /*#__PURE__*/React.createElement(LoadingIcon, {\n existIcon: !!icon,\n prefixCls: prefixCls,\n loading: !!innerLoading\n });\n const kids = children || children === 0 ? spaceChildren(children, needInserted && autoInsertSpace) : null;\n if (linkButtonRestProps.href !== undefined) {\n return wrapSSR( /*#__PURE__*/React.createElement(\"a\", Object.assign({}, linkButtonRestProps, {\n className: classNames(classes, {\n [`${prefixCls}-disabled`]: mergedDisabled\n }),\n style: fullStyle,\n onClick: handleClick,\n ref: buttonRef\n }), iconNode, kids));\n }\n let buttonNode = /*#__PURE__*/React.createElement(\"button\", Object.assign({}, rest, {\n type: htmlType,\n className: classes,\n style: fullStyle,\n onClick: handleClick,\n disabled: mergedDisabled,\n ref: buttonRef\n }), iconNode, kids, compactItemClassnames && /*#__PURE__*/React.createElement(CompactCmp, {\n key: \"compact\",\n prefixCls: prefixCls\n }));\n if (!isUnBorderedButtonType(type)) {\n buttonNode = /*#__PURE__*/React.createElement(Wave, {\n component: \"Button\",\n disabled: !!innerLoading\n }, buttonNode);\n }\n return wrapSSR(buttonNode);\n};\nconst Button = /*#__PURE__*/forwardRef(InternalButton);\nif (process.env.NODE_ENV !== 'production') {\n Button.displayName = 'Button';\n}\nButton.Group = Group;\nButton.__ANT_BUTTON = true;\nexport default Button;","\"use client\";\n\nimport useState from \"rc-util/es/hooks/useState\";\nimport * as React from 'react';\nimport Button from '../button';\nimport { convertLegacyProps } from '../button/buttonHelpers';\nfunction isThenable(thing) {\n return !!(thing && thing.then);\n}\nconst ActionButton = props => {\n const {\n type,\n children,\n prefixCls,\n buttonProps,\n close,\n autoFocus,\n emitEvent,\n isSilent,\n quitOnNullishReturnValue,\n actionFn\n } = props;\n const clickedRef = React.useRef(false);\n const buttonRef = React.useRef(null);\n const [loading, setLoading] = useState(false);\n const onInternalClose = function () {\n close === null || close === void 0 ? void 0 : close.apply(void 0, arguments);\n };\n React.useEffect(() => {\n let timeoutId = null;\n if (autoFocus) {\n timeoutId = setTimeout(() => {\n var _a;\n (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.focus();\n });\n }\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, []);\n const handlePromiseOnOk = returnValueOfOnOk => {\n if (!isThenable(returnValueOfOnOk)) {\n return;\n }\n setLoading(true);\n returnValueOfOnOk.then(function () {\n setLoading(false, true);\n onInternalClose.apply(void 0, arguments);\n clickedRef.current = false;\n }, e => {\n // See: https://github.com/ant-design/ant-design/issues/6183\n setLoading(false, true);\n clickedRef.current = false;\n // Do not throw if is `await` mode\n if (isSilent === null || isSilent === void 0 ? void 0 : isSilent()) {\n return;\n }\n return Promise.reject(e);\n });\n };\n const onClick = e => {\n if (clickedRef.current) {\n return;\n }\n clickedRef.current = true;\n if (!actionFn) {\n onInternalClose();\n return;\n }\n let returnValueOfOnOk;\n if (emitEvent) {\n returnValueOfOnOk = actionFn(e);\n if (quitOnNullishReturnValue && !isThenable(returnValueOfOnOk)) {\n clickedRef.current = false;\n onInternalClose(e);\n return;\n }\n } else if (actionFn.length) {\n returnValueOfOnOk = actionFn(close);\n // https://github.com/ant-design/ant-design/issues/23358\n clickedRef.current = false;\n } else {\n returnValueOfOnOk = actionFn();\n if (!returnValueOfOnOk) {\n onInternalClose();\n return;\n }\n }\n handlePromiseOnOk(returnValueOfOnOk);\n };\n return /*#__PURE__*/React.createElement(Button, Object.assign({}, convertLegacyProps(type), {\n onClick: onClick,\n loading: loading,\n prefixCls: prefixCls\n }, buttonProps, {\n ref: buttonRef\n }), children);\n};\nexport default ActionButton;","import React from 'react';\nexport const ModalContext = /*#__PURE__*/React.createContext({});\nexport const {\n Provider: ModalContextProvider\n} = ModalContext;","\"use client\";\n\nimport React, { useContext } from 'react';\nimport ActionButton from '../../_util/ActionButton';\nimport { ModalContext } from '../context';\nconst ConfirmCancelBtn = () => {\n const {\n autoFocusButton,\n cancelButtonProps,\n cancelTextLocale,\n isSilent,\n mergedOkCancel,\n rootPrefixCls,\n close,\n onCancel,\n onConfirm\n } = useContext(ModalContext);\n return mergedOkCancel ? /*#__PURE__*/React.createElement(ActionButton, {\n isSilent: isSilent,\n actionFn: onCancel,\n close: function () {\n close === null || close === void 0 ? void 0 : close.apply(void 0, arguments);\n onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(false);\n },\n autoFocus: autoFocusButton === 'cancel',\n buttonProps: cancelButtonProps,\n prefixCls: `${rootPrefixCls}-btn`\n }, cancelTextLocale) : null;\n};\nexport default ConfirmCancelBtn;","\"use client\";\n\nimport React, { useContext } from 'react';\nimport ActionButton from '../../_util/ActionButton';\nimport { ModalContext } from '../context';\nconst ConfirmOkBtn = () => {\n const {\n autoFocusButton,\n close,\n isSilent,\n okButtonProps,\n rootPrefixCls,\n okTextLocale,\n okType,\n onConfirm,\n onOk\n } = useContext(ModalContext);\n return /*#__PURE__*/React.createElement(ActionButton, {\n isSilent: isSilent,\n type: okType || 'primary',\n actionFn: onOk,\n close: function () {\n close === null || close === void 0 ? void 0 : close.apply(void 0, arguments);\n onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(true);\n },\n autoFocus: autoFocusButton === 'ok',\n buttonProps: okButtonProps,\n prefixCls: `${rootPrefixCls}-btn`\n }, okTextLocale);\n};\nexport default ConfirmOkBtn;","import * as React from 'react';\nvar OrderContext = /*#__PURE__*/React.createContext(null);\nexport default OrderContext;","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport OrderContext from \"./Context\";\nvar EMPTY_LIST = [];\n\n/**\n * Will add `div` to document. Nest call will keep order\n * @param render Render DOM in document\n */\nexport default function useDom(render, debug) {\n var _React$useState = React.useState(function () {\n if (!canUseDom()) {\n return null;\n }\n var defaultEle = document.createElement('div');\n if (process.env.NODE_ENV !== 'production' && debug) {\n defaultEle.setAttribute('data-debug', debug);\n }\n return defaultEle;\n }),\n _React$useState2 = _slicedToArray(_React$useState, 1),\n ele = _React$useState2[0];\n\n // ========================== Order ==========================\n var appendedRef = React.useRef(false);\n var queueCreate = React.useContext(OrderContext);\n var _React$useState3 = React.useState(EMPTY_LIST),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n queue = _React$useState4[0],\n setQueue = _React$useState4[1];\n var mergedQueueCreate = queueCreate || (appendedRef.current ? undefined : function (appendFn) {\n setQueue(function (origin) {\n var newQueue = [appendFn].concat(_toConsumableArray(origin));\n return newQueue;\n });\n });\n\n // =========================== DOM ===========================\n function append() {\n if (!ele.parentElement) {\n document.body.appendChild(ele);\n }\n appendedRef.current = true;\n }\n function cleanup() {\n var _ele$parentElement;\n (_ele$parentElement = ele.parentElement) === null || _ele$parentElement === void 0 ? void 0 : _ele$parentElement.removeChild(ele);\n appendedRef.current = false;\n }\n useLayoutEffect(function () {\n if (render) {\n if (queueCreate) {\n queueCreate(append);\n } else {\n append();\n }\n } else {\n cleanup();\n }\n return cleanup;\n }, [render]);\n useLayoutEffect(function () {\n if (queue.length) {\n queue.forEach(function (appendFn) {\n return appendFn();\n });\n setQueue(EMPTY_LIST);\n }\n }, [queue]);\n return [ele, mergedQueueCreate];\n}","/* eslint-disable no-param-reassign */\n\nvar cached;\nexport default function getScrollBarSize(fresh) {\n if (typeof document === 'undefined') {\n return 0;\n }\n if (fresh || cached === undefined) {\n var inner = document.createElement('div');\n inner.style.width = '100%';\n inner.style.height = '200px';\n var outer = document.createElement('div');\n var outerStyle = outer.style;\n outerStyle.position = 'absolute';\n outerStyle.top = '0';\n outerStyle.left = '0';\n outerStyle.pointerEvents = 'none';\n outerStyle.visibility = 'hidden';\n outerStyle.width = '200px';\n outerStyle.height = '150px';\n outerStyle.overflow = 'hidden';\n outer.appendChild(inner);\n document.body.appendChild(outer);\n var widthContained = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n var widthScroll = inner.offsetWidth;\n if (widthContained === widthScroll) {\n widthScroll = outer.clientWidth;\n }\n document.body.removeChild(outer);\n cached = widthContained - widthScroll;\n }\n return cached;\n}\nfunction ensureSize(str) {\n var match = str.match(/^(.*)px$/);\n var value = Number(match === null || match === void 0 ? void 0 : match[1]);\n return Number.isNaN(value) ? getScrollBarSize() : value;\n}\nexport function getTargetScrollBarSize(target) {\n if (typeof document === 'undefined' || !target || !(target instanceof Element)) {\n return {\n width: 0,\n height: 0\n };\n }\n var _getComputedStyle = getComputedStyle(target, '::-webkit-scrollbar'),\n width = _getComputedStyle.width,\n height = _getComputedStyle.height;\n return {\n width: ensureSize(width),\n height: ensureSize(height)\n };\n}","/**\n * Test usage export. Do not use in your production\n */\nexport function isBodyOverflowing() {\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;\n}","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport { updateCSS, removeCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport { getTargetScrollBarSize } from \"rc-util/es/getScrollBarSize\";\nimport { isBodyOverflowing } from \"./util\";\nvar UNIQUE_ID = \"rc-util-locker-\".concat(Date.now());\nvar uuid = 0;\nexport default function useScrollLocker(lock) {\n var mergedLock = !!lock;\n var _React$useState = React.useState(function () {\n uuid += 1;\n return \"\".concat(UNIQUE_ID, \"_\").concat(uuid);\n }),\n _React$useState2 = _slicedToArray(_React$useState, 1),\n id = _React$useState2[0];\n useLayoutEffect(function () {\n if (mergedLock) {\n var scrollbarSize = getTargetScrollBarSize(document.body).width;\n var isOverflow = isBodyOverflowing();\n updateCSS(\"\\nhtml body {\\n overflow-y: hidden;\\n \".concat(isOverflow ? \"width: calc(100% - \".concat(scrollbarSize, \"px);\") : '', \"\\n}\"), id);\n } else {\n removeCSS(id);\n }\n return function () {\n removeCSS(id);\n };\n }, [mergedLock, id]);\n}","export var inline = false;\nexport function inlineMock(nextInline) {\n if (typeof nextInline === 'boolean') {\n inline = nextInline;\n }\n return inline;\n}","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport warning from \"rc-util/es/warning\";\nimport { supportRef, useComposeRef } from \"rc-util/es/ref\";\nimport OrderContext from \"./Context\";\nimport useDom from \"./useDom\";\nimport useScrollLocker from \"./useScrollLocker\";\nimport { inlineMock } from \"./mock\";\nvar getPortalContainer = function getPortalContainer(getContainer) {\n if (getContainer === false) {\n return false;\n }\n if (!canUseDom() || !getContainer) {\n return null;\n }\n if (typeof getContainer === 'string') {\n return document.querySelector(getContainer);\n }\n if (typeof getContainer === 'function') {\n return getContainer();\n }\n return getContainer;\n};\nvar Portal = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var open = props.open,\n autoLock = props.autoLock,\n getContainer = props.getContainer,\n debug = props.debug,\n _props$autoDestroy = props.autoDestroy,\n autoDestroy = _props$autoDestroy === void 0 ? true : _props$autoDestroy,\n children = props.children;\n var _React$useState = React.useState(open),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n shouldRender = _React$useState2[0],\n setShouldRender = _React$useState2[1];\n var mergedRender = shouldRender || open;\n\n // ========================= Warning =========================\n if (process.env.NODE_ENV !== 'production') {\n warning(canUseDom() || !open, \"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR.\");\n }\n\n // ====================== Should Render ======================\n React.useEffect(function () {\n if (autoDestroy || open) {\n setShouldRender(open);\n }\n }, [open, autoDestroy]);\n\n // ======================== Container ========================\n var _React$useState3 = React.useState(function () {\n return getPortalContainer(getContainer);\n }),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n innerContainer = _React$useState4[0],\n setInnerContainer = _React$useState4[1];\n React.useEffect(function () {\n var customizeContainer = getPortalContainer(getContainer);\n\n // Tell component that we check this in effect which is safe to be `null`\n setInnerContainer(customizeContainer !== null && customizeContainer !== void 0 ? customizeContainer : null);\n });\n var _useDom = useDom(mergedRender && !innerContainer, debug),\n _useDom2 = _slicedToArray(_useDom, 2),\n defaultContainer = _useDom2[0],\n queueCreate = _useDom2[1];\n var mergedContainer = innerContainer !== null && innerContainer !== void 0 ? innerContainer : defaultContainer;\n\n // ========================= Locker ==========================\n useScrollLocker(autoLock && open && canUseDom() && (mergedContainer === defaultContainer || mergedContainer === document.body));\n\n // =========================== Ref ===========================\n var childRef = null;\n if (children && supportRef(children) && ref) {\n var _ref = children;\n childRef = _ref.ref;\n }\n var mergedRef = useComposeRef(childRef, ref);\n\n // ========================= Render ==========================\n // Do not render when nothing need render\n // When innerContainer is `undefined`, it may not ready since user use ref in the same render\n if (!mergedRender || !canUseDom() || innerContainer === undefined) {\n return null;\n }\n\n // Render inline\n var renderInline = mergedContainer === false || inlineMock();\n var reffedChildren = children;\n if (ref) {\n reffedChildren = /*#__PURE__*/React.cloneElement(children, {\n ref: mergedRef\n });\n }\n return /*#__PURE__*/React.createElement(OrderContext.Provider, {\n value: queueCreate\n }, renderInline ? reffedChildren : /*#__PURE__*/createPortal(reffedChildren, mergedContainer));\n});\nif (process.env.NODE_ENV !== 'production') {\n Portal.displayName = 'Portal';\n}\nexport default Portal;","import * as React from 'react';\nexport var RefContext = /*#__PURE__*/React.createContext({});","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nfunction getUseId() {\n // We need fully clone React function here to avoid webpack warning React 17 do not export `useId`\n var fullClone = _objectSpread({}, React);\n return fullClone.useId;\n}\nvar uuid = 0;\n\n/** @private Note only worked in develop env. Not work in production. */\nexport function resetUuid() {\n if (process.env.NODE_ENV !== 'production') {\n uuid = 0;\n }\n}\nvar useOriginId = getUseId();\nexport default useOriginId ?\n// Use React `useId`\nfunction useId(id) {\n var reactId = useOriginId();\n\n // Developer passed id is single source of truth\n if (id) {\n return id;\n }\n\n // Test env always return mock id\n if (process.env.NODE_ENV === 'test') {\n return 'test-id';\n }\n return reactId;\n} :\n// Use compatible of `useId`\nfunction useCompatId(id) {\n // Inner id for accessibility usage. Only work in client side\n var _React$useState = React.useState('ssr-id'),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n innerId = _React$useState2[0],\n setInnerId = _React$useState2[1];\n React.useEffect(function () {\n var nextId = uuid;\n uuid += 1;\n setInnerId(\"rc_unique_\".concat(nextId));\n }, []);\n\n // Developer passed id is single source of truth\n if (id) {\n return id;\n }\n\n // Test env always return mock id\n if (process.env.NODE_ENV === 'test') {\n return 'test-id';\n }\n\n // Return react native id or inner id\n return innerId;\n};","// =============================== Motion ===============================\nexport function getMotionName(prefixCls, transitionName, animationName) {\n var motionName = transitionName;\n if (!motionName && animationName) {\n motionName = \"\".concat(prefixCls, \"-\").concat(animationName);\n }\n return motionName;\n}\n\n// =============================== Offset ===============================\nfunction getScroll(w, top) {\n var ret = w[\"page\".concat(top ? 'Y' : 'X', \"Offset\")];\n var method = \"scroll\".concat(top ? 'Top' : 'Left');\n if (typeof ret !== 'number') {\n var d = w.document;\n ret = d.documentElement[method];\n if (typeof ret !== 'number') {\n ret = d.body[method];\n }\n }\n return ret;\n}\nexport function offset(el) {\n var rect = el.getBoundingClientRect();\n var pos = {\n left: rect.left,\n top: rect.top\n };\n var doc = el.ownerDocument;\n var w = doc.defaultView || doc.parentWindow;\n pos.left += getScroll(w);\n pos.top += getScroll(w, true);\n return pos;\n}","import * as React from 'react';\nexport default /*#__PURE__*/React.memo(function (_ref) {\n var children = _ref.children;\n return children;\n}, function (_, _ref2) {\n var shouldUpdate = _ref2.shouldUpdate;\n return !shouldUpdate;\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport classNames from 'classnames';\nimport { useComposeRef } from \"rc-util/es/ref\";\nimport React, { useRef } from 'react';\nimport { RefContext } from \"../../context\";\nimport MemoChildren from \"./MemoChildren\";\nvar sentinelStyle = {\n width: 0,\n height: 0,\n overflow: 'hidden',\n outline: 'none'\n};\nvar Panel = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var prefixCls = props.prefixCls,\n className = props.className,\n style = props.style,\n title = props.title,\n ariaId = props.ariaId,\n footer = props.footer,\n closable = props.closable,\n closeIcon = props.closeIcon,\n onClose = props.onClose,\n children = props.children,\n bodyStyle = props.bodyStyle,\n bodyProps = props.bodyProps,\n modalRender = props.modalRender,\n onMouseDown = props.onMouseDown,\n onMouseUp = props.onMouseUp,\n holderRef = props.holderRef,\n visible = props.visible,\n forceRender = props.forceRender,\n width = props.width,\n height = props.height,\n modalClassNames = props.classNames,\n modalStyles = props.styles;\n\n // ================================= Refs =================================\n var _React$useContext = React.useContext(RefContext),\n panelRef = _React$useContext.panel;\n var mergedRef = useComposeRef(holderRef, panelRef);\n var sentinelStartRef = useRef();\n var sentinelEndRef = useRef();\n React.useImperativeHandle(ref, function () {\n return {\n focus: function focus() {\n var _sentinelStartRef$cur;\n (_sentinelStartRef$cur = sentinelStartRef.current) === null || _sentinelStartRef$cur === void 0 ? void 0 : _sentinelStartRef$cur.focus();\n },\n changeActive: function changeActive(next) {\n var _document = document,\n activeElement = _document.activeElement;\n if (next && activeElement === sentinelEndRef.current) {\n sentinelStartRef.current.focus();\n } else if (!next && activeElement === sentinelStartRef.current) {\n sentinelEndRef.current.focus();\n }\n }\n };\n });\n\n // ================================ Style =================================\n var contentStyle = {};\n if (width !== undefined) {\n contentStyle.width = width;\n }\n if (height !== undefined) {\n contentStyle.height = height;\n }\n // ================================ Render ================================\n var footerNode;\n if (footer) {\n footerNode = /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(\"\".concat(prefixCls, \"-footer\"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.footer),\n style: _objectSpread({}, modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.footer)\n }, footer);\n }\n var headerNode;\n if (title) {\n headerNode = /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(\"\".concat(prefixCls, \"-header\"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.header),\n style: _objectSpread({}, modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.header)\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-title\"),\n id: ariaId\n }, title));\n }\n var closer;\n if (closable) {\n closer = /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n onClick: onClose,\n \"aria-label\": \"Close\",\n className: \"\".concat(prefixCls, \"-close\")\n }, closeIcon || /*#__PURE__*/React.createElement(\"span\", {\n className: \"\".concat(prefixCls, \"-close-x\")\n }));\n }\n var content = /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(\"\".concat(prefixCls, \"-content\"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.content),\n style: modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.content\n }, closer, headerNode, /*#__PURE__*/React.createElement(\"div\", _extends({\n className: classNames(\"\".concat(prefixCls, \"-body\"), modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.body),\n style: _objectSpread(_objectSpread({}, bodyStyle), modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.body)\n }, bodyProps), children), footerNode);\n return /*#__PURE__*/React.createElement(\"div\", {\n key: \"dialog-element\",\n role: \"dialog\",\n \"aria-labelledby\": title ? ariaId : null,\n \"aria-modal\": \"true\",\n ref: mergedRef,\n style: _objectSpread(_objectSpread({}, style), contentStyle),\n className: classNames(prefixCls, className),\n onMouseDown: onMouseDown,\n onMouseUp: onMouseUp\n }, /*#__PURE__*/React.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelStartRef,\n style: sentinelStyle,\n \"aria-hidden\": \"true\"\n }), /*#__PURE__*/React.createElement(MemoChildren, {\n shouldUpdate: visible || forceRender\n }, modalRender ? modalRender(content) : content), /*#__PURE__*/React.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEndRef,\n style: sentinelStyle,\n \"aria-hidden\": \"true\"\n }));\n});\nif (process.env.NODE_ENV !== 'production') {\n Panel.displayName = 'Panel';\n}\nexport default Panel;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport * as React from 'react';\nimport { useRef } from 'react';\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport { offset } from \"../../util\";\nimport Panel from \"./Panel\";\nvar Content = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var prefixCls = props.prefixCls,\n title = props.title,\n style = props.style,\n className = props.className,\n visible = props.visible,\n forceRender = props.forceRender,\n destroyOnClose = props.destroyOnClose,\n motionName = props.motionName,\n ariaId = props.ariaId,\n onVisibleChanged = props.onVisibleChanged,\n mousePosition = props.mousePosition;\n var dialogRef = useRef();\n\n // ============================= Style ==============================\n var _React$useState = React.useState(),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n transformOrigin = _React$useState2[0],\n setTransformOrigin = _React$useState2[1];\n var contentStyle = {};\n if (transformOrigin) {\n contentStyle.transformOrigin = transformOrigin;\n }\n function onPrepare() {\n var elementOffset = offset(dialogRef.current);\n setTransformOrigin(mousePosition ? \"\".concat(mousePosition.x - elementOffset.left, \"px \").concat(mousePosition.y - elementOffset.top, \"px\") : '');\n }\n\n // ============================= Render =============================\n return /*#__PURE__*/React.createElement(CSSMotion, {\n visible: visible,\n onVisibleChanged: onVisibleChanged,\n onAppearPrepare: onPrepare,\n onEnterPrepare: onPrepare,\n forceRender: forceRender,\n motionName: motionName,\n removeOnLeave: destroyOnClose,\n ref: dialogRef\n }, function (_ref, motionRef) {\n var motionClassName = _ref.className,\n motionStyle = _ref.style;\n return /*#__PURE__*/React.createElement(Panel, _extends({}, props, {\n ref: ref,\n title: title,\n ariaId: ariaId,\n prefixCls: prefixCls,\n holderRef: motionRef,\n style: _objectSpread(_objectSpread(_objectSpread({}, motionStyle), style), contentStyle),\n className: classNames(className, motionClassName)\n }));\n });\n});\nContent.displayName = 'Content';\nexport default Content;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nexport default function Mask(props) {\n var prefixCls = props.prefixCls,\n style = props.style,\n visible = props.visible,\n maskProps = props.maskProps,\n motionName = props.motionName,\n className = props.className;\n return /*#__PURE__*/React.createElement(CSSMotion, {\n key: \"mask\",\n visible: visible,\n motionName: motionName,\n leavedClassName: \"\".concat(prefixCls, \"-mask-hidden\")\n }, function (_ref, ref) {\n var motionClassName = _ref.className,\n motionStyle = _ref.style;\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref,\n style: _objectSpread(_objectSpread({}, motionStyle), style),\n className: classNames(\"\".concat(prefixCls, \"-mask\"), motionClassName, className)\n }, maskProps));\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport classNames from 'classnames';\nimport contains from \"rc-util/es/Dom/contains\";\nimport useId from \"rc-util/es/hooks/useId\";\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport pickAttrs from \"rc-util/es/pickAttrs\";\nimport * as React from 'react';\nimport { useEffect, useRef } from 'react';\nimport { getMotionName } from \"../util\";\nimport Content from \"./Content\";\nimport Mask from \"./Mask\";\nimport { warning } from 'rc-util';\nexport default function Dialog(props) {\n var _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-dialog' : _props$prefixCls,\n zIndex = props.zIndex,\n _props$visible = props.visible,\n visible = _props$visible === void 0 ? false : _props$visible,\n _props$keyboard = props.keyboard,\n keyboard = _props$keyboard === void 0 ? true : _props$keyboard,\n _props$focusTriggerAf = props.focusTriggerAfterClose,\n focusTriggerAfterClose = _props$focusTriggerAf === void 0 ? true : _props$focusTriggerAf,\n wrapStyle = props.wrapStyle,\n wrapClassName = props.wrapClassName,\n wrapProps = props.wrapProps,\n onClose = props.onClose,\n afterOpenChange = props.afterOpenChange,\n afterClose = props.afterClose,\n transitionName = props.transitionName,\n animation = props.animation,\n _props$closable = props.closable,\n closable = _props$closable === void 0 ? true : _props$closable,\n _props$mask = props.mask,\n mask = _props$mask === void 0 ? true : _props$mask,\n maskTransitionName = props.maskTransitionName,\n maskAnimation = props.maskAnimation,\n _props$maskClosable = props.maskClosable,\n maskClosable = _props$maskClosable === void 0 ? true : _props$maskClosable,\n maskStyle = props.maskStyle,\n maskProps = props.maskProps,\n rootClassName = props.rootClassName,\n modalClassNames = props.classNames,\n modalStyles = props.styles;\n if (process.env.NODE_ENV !== 'production') {\n [\"wrapStyle\", \"bodyStyle\", \"maskStyle\"].forEach(function (prop) {\n // (prop in props) && console.error(`Warning: ${prop} is deprecated, please use styles instead.`)\n warning(!(prop in props), \"\".concat(prop, \" is deprecated, please use styles instead.\"));\n });\n if (\"wrapClassName\" in props) {\n warning(false, \"wrapClassName is deprecated, please use classNames instead.\");\n }\n }\n var lastOutSideActiveElementRef = useRef();\n var wrapperRef = useRef();\n var contentRef = useRef();\n var _React$useState = React.useState(visible),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n animatedVisible = _React$useState2[0],\n setAnimatedVisible = _React$useState2[1];\n\n // ========================== Init ==========================\n var ariaId = useId();\n function saveLastOutSideActiveElementRef() {\n if (!contains(wrapperRef.current, document.activeElement)) {\n lastOutSideActiveElementRef.current = document.activeElement;\n }\n }\n function focusDialogContent() {\n if (!contains(wrapperRef.current, document.activeElement)) {\n var _contentRef$current;\n (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 ? void 0 : _contentRef$current.focus();\n }\n }\n\n // ========================= Events =========================\n function onDialogVisibleChanged(newVisible) {\n // Try to focus\n if (newVisible) {\n focusDialogContent();\n } else {\n // Clean up scroll bar & focus back\n setAnimatedVisible(false);\n if (mask && lastOutSideActiveElementRef.current && focusTriggerAfterClose) {\n try {\n lastOutSideActiveElementRef.current.focus({\n preventScroll: true\n });\n } catch (e) {\n // Do nothing\n }\n lastOutSideActiveElementRef.current = null;\n }\n\n // Trigger afterClose only when change visible from true to false\n if (animatedVisible) {\n afterClose === null || afterClose === void 0 ? void 0 : afterClose();\n }\n }\n afterOpenChange === null || afterOpenChange === void 0 ? void 0 : afterOpenChange(newVisible);\n }\n function onInternalClose(e) {\n onClose === null || onClose === void 0 ? void 0 : onClose(e);\n }\n\n // >>> Content\n var contentClickRef = useRef(false);\n var contentTimeoutRef = useRef();\n\n // We need record content click incase content popup out of dialog\n var onContentMouseDown = function onContentMouseDown() {\n clearTimeout(contentTimeoutRef.current);\n contentClickRef.current = true;\n };\n var onContentMouseUp = function onContentMouseUp() {\n contentTimeoutRef.current = setTimeout(function () {\n contentClickRef.current = false;\n });\n };\n\n // >>> Wrapper\n // Close only when element not on dialog\n var onWrapperClick = null;\n if (maskClosable) {\n onWrapperClick = function onWrapperClick(e) {\n if (contentClickRef.current) {\n contentClickRef.current = false;\n } else if (wrapperRef.current === e.target) {\n onInternalClose(e);\n }\n };\n }\n function onWrapperKeyDown(e) {\n if (keyboard && e.keyCode === KeyCode.ESC) {\n e.stopPropagation();\n onInternalClose(e);\n return;\n }\n\n // keep focus inside dialog\n if (visible) {\n if (e.keyCode === KeyCode.TAB) {\n contentRef.current.changeActive(!e.shiftKey);\n }\n }\n }\n\n // ========================= Effect =========================\n useEffect(function () {\n if (visible) {\n setAnimatedVisible(true);\n saveLastOutSideActiveElementRef();\n }\n }, [visible]);\n\n // Remove direct should also check the scroll bar update\n useEffect(function () {\n return function () {\n clearTimeout(contentTimeoutRef.current);\n };\n }, []);\n\n // ========================= Render =========================\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: classNames(\"\".concat(prefixCls, \"-root\"), rootClassName)\n }, pickAttrs(props, {\n data: true\n })), /*#__PURE__*/React.createElement(Mask, {\n prefixCls: prefixCls,\n visible: mask && visible,\n motionName: getMotionName(prefixCls, maskTransitionName, maskAnimation),\n style: _objectSpread(_objectSpread({\n zIndex: zIndex\n }, maskStyle), modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.mask),\n maskProps: maskProps,\n className: modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.mask\n }), /*#__PURE__*/React.createElement(\"div\", _extends({\n tabIndex: -1,\n onKeyDown: onWrapperKeyDown,\n className: classNames(\"\".concat(prefixCls, \"-wrap\"), wrapClassName, modalClassNames === null || modalClassNames === void 0 ? void 0 : modalClassNames.wrapper),\n ref: wrapperRef,\n onClick: onWrapperClick,\n style: _objectSpread(_objectSpread(_objectSpread({\n zIndex: zIndex\n }, wrapStyle), modalStyles === null || modalStyles === void 0 ? void 0 : modalStyles.wrapper), {}, {\n display: !animatedVisible ? 'none' : null\n })\n }, wrapProps), /*#__PURE__*/React.createElement(Content, _extends({}, props, {\n onMouseDown: onContentMouseDown,\n onMouseUp: onContentMouseUp,\n ref: contentRef,\n closable: closable,\n ariaId: ariaId,\n prefixCls: prefixCls,\n visible: visible && animatedVisible,\n onClose: onInternalClose,\n onVisibleChanged: onDialogVisibleChanged,\n motionName: getMotionName(prefixCls, transitionName, animation)\n }))));\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport Portal from '@rc-component/portal';\nimport * as React from 'react';\nimport { RefContext } from \"./context\";\nimport Dialog from \"./Dialog\";\n// fix issue #10656\n/*\n * getContainer remarks\n * Custom container should not be return, because in the Portal component, it will remove the\n * return container element here, if the custom container is the only child of it's component,\n * like issue #10656, It will has a conflict with removeChild method in react-dom.\n * So here should add a child (div element) to custom container.\n * */\nvar DialogWrap = function DialogWrap(props) {\n var visible = props.visible,\n getContainer = props.getContainer,\n forceRender = props.forceRender,\n _props$destroyOnClose = props.destroyOnClose,\n destroyOnClose = _props$destroyOnClose === void 0 ? false : _props$destroyOnClose,\n _afterClose = props.afterClose,\n panelRef = props.panelRef;\n var _React$useState = React.useState(visible),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n animatedVisible = _React$useState2[0],\n setAnimatedVisible = _React$useState2[1];\n var refContext = React.useMemo(function () {\n return {\n panel: panelRef\n };\n }, [panelRef]);\n React.useEffect(function () {\n if (visible) {\n setAnimatedVisible(true);\n }\n }, [visible]);\n\n // Destroy on close will remove wrapped div\n if (!forceRender && destroyOnClose && !animatedVisible) {\n return null;\n }\n return /*#__PURE__*/React.createElement(RefContext.Provider, {\n value: refContext\n }, /*#__PURE__*/React.createElement(Portal, {\n open: visible || forceRender || animatedVisible,\n autoDestroy: false,\n getContainer: getContainer,\n autoLock: visible || animatedVisible\n }, /*#__PURE__*/React.createElement(Dialog, _extends({}, props, {\n destroyOnClose: destroyOnClose,\n afterClose: function afterClose() {\n _afterClose === null || _afterClose === void 0 ? void 0 : _afterClose();\n setAnimatedVisible(false);\n }\n }))));\n};\nDialogWrap.displayName = 'Dialog';\nexport default DialogWrap;","\"use client\";\n\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport React from 'react';\nfunction useInnerClosable(closable, closeIcon, defaultClosable) {\n if (typeof closable === 'boolean') {\n return closable;\n }\n if (closeIcon === undefined) {\n return !!defaultClosable;\n }\n return closeIcon !== false && closeIcon !== null;\n}\nexport default function useClosable(closable, closeIcon, customCloseIconRender) {\n let defaultCloseIcon = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : /*#__PURE__*/React.createElement(CloseOutlined, null);\n let defaultClosable = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n const mergedClosable = useInnerClosable(closable, closeIcon, defaultClosable);\n if (!mergedClosable) {\n return [false, null];\n }\n const mergedCloseIcon = typeof closeIcon === 'boolean' || closeIcon === undefined || closeIcon === null ? defaultCloseIcon : closeIcon;\n return [true, customCloseIconRender ? customCloseIconRender(mergedCloseIcon) : mergedCloseIcon];\n}","import canUseDom from \"rc-util/es/Dom/canUseDom\";\nimport { isStyleSupport } from \"rc-util/es/Dom/styleChecker\";\nexport const canUseDocElement = () => canUseDom() && window.document.documentElement;\nexport { isStyleSupport };","import warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nexport var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nvar warningFunc = function warningFunc() {\n warning(false, 'Can not find FormContext. Please make sure you wrap Field under Form.');\n};\nvar Context = /*#__PURE__*/React.createContext({\n getFieldValue: warningFunc,\n getFieldsValue: warningFunc,\n getFieldError: warningFunc,\n getFieldWarning: warningFunc,\n getFieldsError: warningFunc,\n isFieldsTouched: warningFunc,\n isFieldTouched: warningFunc,\n isFieldValidating: warningFunc,\n isFieldsValidating: warningFunc,\n resetFields: warningFunc,\n setFields: warningFunc,\n setFieldValue: warningFunc,\n setFieldsValue: warningFunc,\n validateFields: warningFunc,\n submit: warningFunc,\n getInternalHooks: function getInternalHooks() {\n warningFunc();\n return {\n dispatch: warningFunc,\n initEntityValue: warningFunc,\n registerField: warningFunc,\n useSubscribe: warningFunc,\n setInitialValues: warningFunc,\n destroyForm: warningFunc,\n setCallbacks: warningFunc,\n registerWatch: warningFunc,\n getFields: warningFunc,\n setValidateMessages: warningFunc,\n setPreserve: warningFunc,\n getInitialValue: warningFunc\n };\n }\n});\nexport default Context;","import * as React from 'react';\nvar ListContext = /*#__PURE__*/React.createContext(null);\nexport default ListContext;","export function toArray(value) {\n if (value === undefined || value === null) {\n return [];\n }\n return Array.isArray(value) ? value : [value];\n}\nexport function isFormInstance(form) {\n return form && !!form._init;\n}","function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct.bind();\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !_isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return _construct(Class, arguments, _getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return _setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}\n\n/* eslint no-console:0 */\nvar formatRegExp = /%[sdj%]/g;\nvar warning = function warning() {}; // don't print warning message when in production env or node runtime\n\nif (typeof process !== 'undefined' && process.env && process.env.NODE_ENV !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {\n warning = function warning(type, errors) {\n if (typeof console !== 'undefined' && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING === 'undefined') {\n if (errors.every(function (e) {\n return typeof e === 'string';\n })) {\n console.warn(type, errors);\n }\n }\n };\n}\n\nfunction convertFieldsError(errors) {\n if (!errors || !errors.length) return null;\n var fields = {};\n errors.forEach(function (error) {\n var field = error.field;\n fields[field] = fields[field] || [];\n fields[field].push(error);\n });\n return fields;\n}\nfunction format(template) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var i = 0;\n var len = args.length;\n\n if (typeof template === 'function') {\n return template.apply(null, args);\n }\n\n if (typeof template === 'string') {\n var str = template.replace(formatRegExp, function (x) {\n if (x === '%%') {\n return '%';\n }\n\n if (i >= len) {\n return x;\n }\n\n switch (x) {\n case '%s':\n return String(args[i++]);\n\n case '%d':\n return Number(args[i++]);\n\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n\n break;\n\n default:\n return x;\n }\n });\n return str;\n }\n\n return template;\n}\n\nfunction isNativeStringType(type) {\n return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern';\n}\n\nfunction isEmptyValue(value, type) {\n if (value === undefined || value === null) {\n return true;\n }\n\n if (type === 'array' && Array.isArray(value) && !value.length) {\n return true;\n }\n\n if (isNativeStringType(type) && typeof value === 'string' && !value) {\n return true;\n }\n\n return false;\n}\n\nfunction asyncParallelArray(arr, func, callback) {\n var results = [];\n var total = 0;\n var arrLength = arr.length;\n\n function count(errors) {\n results.push.apply(results, errors || []);\n total++;\n\n if (total === arrLength) {\n callback(results);\n }\n }\n\n arr.forEach(function (a) {\n func(a, count);\n });\n}\n\nfunction asyncSerialArray(arr, func, callback) {\n var index = 0;\n var arrLength = arr.length;\n\n function next(errors) {\n if (errors && errors.length) {\n callback(errors);\n return;\n }\n\n var original = index;\n index = index + 1;\n\n if (original < arrLength) {\n func(arr[original], next);\n } else {\n callback([]);\n }\n }\n\n next([]);\n}\n\nfunction flattenObjArr(objArr) {\n var ret = [];\n Object.keys(objArr).forEach(function (k) {\n ret.push.apply(ret, objArr[k] || []);\n });\n return ret;\n}\n\nvar AsyncValidationError = /*#__PURE__*/function (_Error) {\n _inheritsLoose(AsyncValidationError, _Error);\n\n function AsyncValidationError(errors, fields) {\n var _this;\n\n _this = _Error.call(this, 'Async Validation Error') || this;\n _this.errors = errors;\n _this.fields = fields;\n return _this;\n }\n\n return AsyncValidationError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\nfunction asyncMap(objArr, option, func, callback, source) {\n if (option.first) {\n var _pending = new Promise(function (resolve, reject) {\n var next = function next(errors) {\n callback(errors);\n return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source);\n };\n\n var flattenArr = flattenObjArr(objArr);\n asyncSerialArray(flattenArr, func, next);\n });\n\n _pending[\"catch\"](function (e) {\n return e;\n });\n\n return _pending;\n }\n\n var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || [];\n var objArrKeys = Object.keys(objArr);\n var objArrLength = objArrKeys.length;\n var total = 0;\n var results = [];\n var pending = new Promise(function (resolve, reject) {\n var next = function next(errors) {\n results.push.apply(results, errors);\n total++;\n\n if (total === objArrLength) {\n callback(results);\n return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source);\n }\n };\n\n if (!objArrKeys.length) {\n callback(results);\n resolve(source);\n }\n\n objArrKeys.forEach(function (key) {\n var arr = objArr[key];\n\n if (firstFields.indexOf(key) !== -1) {\n asyncSerialArray(arr, func, next);\n } else {\n asyncParallelArray(arr, func, next);\n }\n });\n });\n pending[\"catch\"](function (e) {\n return e;\n });\n return pending;\n}\n\nfunction isErrorObj(obj) {\n return !!(obj && obj.message !== undefined);\n}\n\nfunction getValue(value, path) {\n var v = value;\n\n for (var i = 0; i < path.length; i++) {\n if (v == undefined) {\n return v;\n }\n\n v = v[path[i]];\n }\n\n return v;\n}\n\nfunction complementError(rule, source) {\n return function (oe) {\n var fieldValue;\n\n if (rule.fullFields) {\n fieldValue = getValue(source, rule.fullFields);\n } else {\n fieldValue = source[oe.field || rule.fullField];\n }\n\n if (isErrorObj(oe)) {\n oe.field = oe.field || rule.fullField;\n oe.fieldValue = fieldValue;\n return oe;\n }\n\n return {\n message: typeof oe === 'function' ? oe() : oe,\n fieldValue: fieldValue,\n field: oe.field || rule.fullField\n };\n };\n}\nfunction deepMerge(target, source) {\n if (source) {\n for (var s in source) {\n if (source.hasOwnProperty(s)) {\n var value = source[s];\n\n if (typeof value === 'object' && typeof target[s] === 'object') {\n target[s] = _extends({}, target[s], value);\n } else {\n target[s] = value;\n }\n }\n }\n }\n\n return target;\n}\n\nvar required$1 = function required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {\n errors.push(format(options.messages.required, rule.fullField));\n }\n};\n\n/**\n * Rule for validating whitespace.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\n\nvar whitespace = function whitespace(rule, value, source, errors, options) {\n if (/^\\s+$/.test(value) || value === '') {\n errors.push(format(options.messages.whitespace, rule.fullField));\n }\n};\n\n// https://github.com/kevva/url-regex/blob/master/index.js\nvar urlReg;\nvar getUrlRegex = (function () {\n if (urlReg) {\n return urlReg;\n }\n\n var word = '[a-fA-F\\\\d:]';\n\n var b = function b(options) {\n return options && options.includeBoundaries ? \"(?:(?<=\\\\s|^)(?=\" + word + \")|(?<=\" + word + \")(?=\\\\s|$))\" : '';\n };\n\n var v4 = '(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}';\n var v6seg = '[a-fA-F\\\\d]{1,4}';\n var v6 = (\"\\n(?:\\n(?:\" + v6seg + \":){7}(?:\" + v6seg + \"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\\n(?:\" + v6seg + \":){6}(?:\" + v4 + \"|:\" + v6seg + \"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\\n(?:\" + v6seg + \":){5}(?::\" + v4 + \"|(?::\" + v6seg + \"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\\n(?:\" + v6seg + \":){4}(?:(?::\" + v6seg + \"){0,1}:\" + v4 + \"|(?::\" + v6seg + \"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\\n(?:\" + v6seg + \":){3}(?:(?::\" + v6seg + \"){0,2}:\" + v4 + \"|(?::\" + v6seg + \"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\\n(?:\" + v6seg + \":){2}(?:(?::\" + v6seg + \"){0,3}:\" + v4 + \"|(?::\" + v6seg + \"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\\n(?:\" + v6seg + \":){1}(?:(?::\" + v6seg + \"){0,4}:\" + v4 + \"|(?::\" + v6seg + \"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\\n(?::(?:(?::\" + v6seg + \"){0,5}:\" + v4 + \"|(?::\" + v6seg + \"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\\n\").replace(/\\s*\\/\\/.*$/gm, '').replace(/\\n/g, '').trim(); // Pre-compile only the exact regexes because adding a global flag make regexes stateful\n\n var v46Exact = new RegExp(\"(?:^\" + v4 + \"$)|(?:^\" + v6 + \"$)\");\n var v4exact = new RegExp(\"^\" + v4 + \"$\");\n var v6exact = new RegExp(\"^\" + v6 + \"$\");\n\n var ip = function ip(options) {\n return options && options.exact ? v46Exact : new RegExp(\"(?:\" + b(options) + v4 + b(options) + \")|(?:\" + b(options) + v6 + b(options) + \")\", 'g');\n };\n\n ip.v4 = function (options) {\n return options && options.exact ? v4exact : new RegExp(\"\" + b(options) + v4 + b(options), 'g');\n };\n\n ip.v6 = function (options) {\n return options && options.exact ? v6exact : new RegExp(\"\" + b(options) + v6 + b(options), 'g');\n };\n\n var protocol = \"(?:(?:[a-z]+:)?//)\";\n var auth = '(?:\\\\S+(?::\\\\S*)?@)?';\n var ipv4 = ip.v4().source;\n var ipv6 = ip.v6().source;\n var host = \"(?:(?:[a-z\\\\u00a1-\\\\uffff0-9][-_]*)*[a-z\\\\u00a1-\\\\uffff0-9]+)\";\n var domain = \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*\";\n var tld = \"(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,}))\";\n var port = '(?::\\\\d{2,5})?';\n var path = '(?:[/?#][^\\\\s\"]*)?';\n var regex = \"(?:\" + protocol + \"|www\\\\.)\" + auth + \"(?:localhost|\" + ipv4 + \"|\" + ipv6 + \"|\" + host + domain + tld + \")\" + port + path;\n urlReg = new RegExp(\"(?:^\" + regex + \"$)\", 'i');\n return urlReg;\n});\n\n/* eslint max-len:0 */\n\nvar pattern$2 = {\n // http://emailregex.com/\n email: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+\\.)+[a-zA-Z\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]{2,}))$/,\n // url: new RegExp(\n // '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\\\S+(?::\\\\S*)?@)?(?:(?:(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}(?:\\\\.(?:[0-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))|(?:(?:[a-z\\\\u00a1-\\\\uffff0-9]+-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]+-*)*[a-z\\\\u00a1-\\\\uffff0-9]+)*(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,})))|localhost)(?::\\\\d{2,5})?(?:(/|\\\\?|#)[^\\\\s]*)?$',\n // 'i',\n // ),\n hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i\n};\nvar types = {\n integer: function integer(value) {\n return types.number(value) && parseInt(value, 10) === value;\n },\n \"float\": function float(value) {\n return types.number(value) && !types.integer(value);\n },\n array: function array(value) {\n return Array.isArray(value);\n },\n regexp: function regexp(value) {\n if (value instanceof RegExp) {\n return true;\n }\n\n try {\n return !!new RegExp(value);\n } catch (e) {\n return false;\n }\n },\n date: function date(value) {\n return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function' && !isNaN(value.getTime());\n },\n number: function number(value) {\n if (isNaN(value)) {\n return false;\n }\n\n return typeof value === 'number';\n },\n object: function object(value) {\n return typeof value === 'object' && !types.array(value);\n },\n method: function method(value) {\n return typeof value === 'function';\n },\n email: function email(value) {\n return typeof value === 'string' && value.length <= 320 && !!value.match(pattern$2.email);\n },\n url: function url(value) {\n return typeof value === 'string' && value.length <= 2048 && !!value.match(getUrlRegex());\n },\n hex: function hex(value) {\n return typeof value === 'string' && !!value.match(pattern$2.hex);\n }\n};\n\nvar type$1 = function type(rule, value, source, errors, options) {\n if (rule.required && value === undefined) {\n required$1(rule, value, source, errors, options);\n return;\n }\n\n var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];\n var ruleType = rule.type;\n\n if (custom.indexOf(ruleType) > -1) {\n if (!types[ruleType](value)) {\n errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));\n } // straight typeof check\n\n } else if (ruleType && typeof value !== rule.type) {\n errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));\n }\n};\n\nvar range = function range(rule, value, source, errors, options) {\n var len = typeof rule.len === 'number';\n var min = typeof rule.min === 'number';\n var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)\n\n var spRegexp = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n var val = value;\n var key = null;\n var num = typeof value === 'number';\n var str = typeof value === 'string';\n var arr = Array.isArray(value);\n\n if (num) {\n key = 'number';\n } else if (str) {\n key = 'string';\n } else if (arr) {\n key = 'array';\n } // if the value is not of a supported type for range validation\n // the validation rule rule should use the\n // type property to also test for a particular type\n\n\n if (!key) {\n return false;\n }\n\n if (arr) {\n val = value.length;\n }\n\n if (str) {\n // 处理码点大于U+010000的文字length属性不准确的bug,如\"𠮷𠮷𠮷\".lenght !== 3\n val = value.replace(spRegexp, '_').length;\n }\n\n if (len) {\n if (val !== rule.len) {\n errors.push(format(options.messages[key].len, rule.fullField, rule.len));\n }\n } else if (min && !max && val < rule.min) {\n errors.push(format(options.messages[key].min, rule.fullField, rule.min));\n } else if (max && !min && val > rule.max) {\n errors.push(format(options.messages[key].max, rule.fullField, rule.max));\n } else if (min && max && (val < rule.min || val > rule.max)) {\n errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));\n }\n};\n\nvar ENUM$1 = 'enum';\n\nvar enumerable$1 = function enumerable(rule, value, source, errors, options) {\n rule[ENUM$1] = Array.isArray(rule[ENUM$1]) ? rule[ENUM$1] : [];\n\n if (rule[ENUM$1].indexOf(value) === -1) {\n errors.push(format(options.messages[ENUM$1], rule.fullField, rule[ENUM$1].join(', ')));\n }\n};\n\nvar pattern$1 = function pattern(rule, value, source, errors, options) {\n if (rule.pattern) {\n if (rule.pattern instanceof RegExp) {\n // if a RegExp instance is passed, reset `lastIndex` in case its `global`\n // flag is accidentally set to `true`, which in a validation scenario\n // is not necessary and the result might be misleading\n rule.pattern.lastIndex = 0;\n\n if (!rule.pattern.test(value)) {\n errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));\n }\n } else if (typeof rule.pattern === 'string') {\n var _pattern = new RegExp(rule.pattern);\n\n if (!_pattern.test(value)) {\n errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));\n }\n }\n }\n};\n\nvar rules = {\n required: required$1,\n whitespace: whitespace,\n type: type$1,\n range: range,\n \"enum\": enumerable$1,\n pattern: pattern$1\n};\n\nvar string = function string(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value, 'string') && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options, 'string');\n\n if (!isEmptyValue(value, 'string')) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n rules.pattern(rule, value, source, errors, options);\n\n if (rule.whitespace === true) {\n rules.whitespace(rule, value, source, errors, options);\n }\n }\n }\n\n callback(errors);\n};\n\nvar method = function method(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n};\n\nvar number = function number(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (value === '') {\n value = undefined;\n }\n\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n};\n\nvar _boolean = function _boolean(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n};\n\nvar regexp = function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n};\n\nvar integer = function integer(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n};\n\nvar floatFn = function floatFn(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n};\n\nvar array = function array(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if ((value === undefined || value === null) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options, 'array');\n\n if (value !== undefined && value !== null) {\n rules.type(rule, value, source, errors, options);\n rules.range(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n};\n\nvar object = function object(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (value !== undefined) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n};\n\nvar ENUM = 'enum';\n\nvar enumerable = function enumerable(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (value !== undefined) {\n rules[ENUM](rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n};\n\nvar pattern = function pattern(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value, 'string') && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value, 'string')) {\n rules.pattern(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n};\n\nvar date = function date(rule, value, callback, source, options) {\n // console.log('integer rule called %j', rule);\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); // console.log('validate on %s value', value);\n\n if (validate) {\n if (isEmptyValue(value, 'date') && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value, 'date')) {\n var dateObject;\n\n if (value instanceof Date) {\n dateObject = value;\n } else {\n dateObject = new Date(value);\n }\n\n rules.type(rule, dateObject, source, errors, options);\n\n if (dateObject) {\n rules.range(rule, dateObject.getTime(), source, errors, options);\n }\n }\n }\n\n callback(errors);\n};\n\nvar required = function required(rule, value, callback, source, options) {\n var errors = [];\n var type = Array.isArray(value) ? 'array' : typeof value;\n rules.required(rule, value, source, errors, options, type);\n callback(errors);\n};\n\nvar type = function type(rule, value, callback, source, options) {\n var ruleType = rule.type;\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value, ruleType) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options, ruleType);\n\n if (!isEmptyValue(value, ruleType)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n};\n\nvar any = function any(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n }\n\n callback(errors);\n};\n\nvar validators = {\n string: string,\n method: method,\n number: number,\n \"boolean\": _boolean,\n regexp: regexp,\n integer: integer,\n \"float\": floatFn,\n array: array,\n object: object,\n \"enum\": enumerable,\n pattern: pattern,\n date: date,\n url: type,\n hex: type,\n email: type,\n required: required,\n any: any\n};\n\nfunction newMessages() {\n return {\n \"default\": 'Validation error on field %s',\n required: '%s is required',\n \"enum\": '%s must be one of %s',\n whitespace: '%s cannot be empty',\n date: {\n format: '%s date %s is invalid for format %s',\n parse: '%s date could not be parsed, %s is invalid ',\n invalid: '%s date %s is invalid'\n },\n types: {\n string: '%s is not a %s',\n method: '%s is not a %s (function)',\n array: '%s is not an %s',\n object: '%s is not an %s',\n number: '%s is not a %s',\n date: '%s is not a %s',\n \"boolean\": '%s is not a %s',\n integer: '%s is not an %s',\n \"float\": '%s is not a %s',\n regexp: '%s is not a valid %s',\n email: '%s is not a valid %s',\n url: '%s is not a valid %s',\n hex: '%s is not a valid %s'\n },\n string: {\n len: '%s must be exactly %s characters',\n min: '%s must be at least %s characters',\n max: '%s cannot be longer than %s characters',\n range: '%s must be between %s and %s characters'\n },\n number: {\n len: '%s must equal %s',\n min: '%s cannot be less than %s',\n max: '%s cannot be greater than %s',\n range: '%s must be between %s and %s'\n },\n array: {\n len: '%s must be exactly %s in length',\n min: '%s cannot be less than %s in length',\n max: '%s cannot be greater than %s in length',\n range: '%s must be between %s and %s in length'\n },\n pattern: {\n mismatch: '%s value %s does not match pattern %s'\n },\n clone: function clone() {\n var cloned = JSON.parse(JSON.stringify(this));\n cloned.clone = this.clone;\n return cloned;\n }\n };\n}\nvar messages = newMessages();\n\n/**\n * Encapsulates a validation schema.\n *\n * @param descriptor An object declaring validation rules\n * for this schema.\n */\n\nvar Schema = /*#__PURE__*/function () {\n // ========================= Static =========================\n // ======================== Instance ========================\n function Schema(descriptor) {\n this.rules = null;\n this._messages = messages;\n this.define(descriptor);\n }\n\n var _proto = Schema.prototype;\n\n _proto.define = function define(rules) {\n var _this = this;\n\n if (!rules) {\n throw new Error('Cannot configure a schema with no rules');\n }\n\n if (typeof rules !== 'object' || Array.isArray(rules)) {\n throw new Error('Rules must be an object');\n }\n\n this.rules = {};\n Object.keys(rules).forEach(function (name) {\n var item = rules[name];\n _this.rules[name] = Array.isArray(item) ? item : [item];\n });\n };\n\n _proto.messages = function messages(_messages) {\n if (_messages) {\n this._messages = deepMerge(newMessages(), _messages);\n }\n\n return this._messages;\n };\n\n _proto.validate = function validate(source_, o, oc) {\n var _this2 = this;\n\n if (o === void 0) {\n o = {};\n }\n\n if (oc === void 0) {\n oc = function oc() {};\n }\n\n var source = source_;\n var options = o;\n var callback = oc;\n\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n\n if (!this.rules || Object.keys(this.rules).length === 0) {\n if (callback) {\n callback(null, source);\n }\n\n return Promise.resolve(source);\n }\n\n function complete(results) {\n var errors = [];\n var fields = {};\n\n function add(e) {\n if (Array.isArray(e)) {\n var _errors;\n\n errors = (_errors = errors).concat.apply(_errors, e);\n } else {\n errors.push(e);\n }\n }\n\n for (var i = 0; i < results.length; i++) {\n add(results[i]);\n }\n\n if (!errors.length) {\n callback(null, source);\n } else {\n fields = convertFieldsError(errors);\n callback(errors, fields);\n }\n }\n\n if (options.messages) {\n var messages$1 = this.messages();\n\n if (messages$1 === messages) {\n messages$1 = newMessages();\n }\n\n deepMerge(messages$1, options.messages);\n options.messages = messages$1;\n } else {\n options.messages = this.messages();\n }\n\n var series = {};\n var keys = options.keys || Object.keys(this.rules);\n keys.forEach(function (z) {\n var arr = _this2.rules[z];\n var value = source[z];\n arr.forEach(function (r) {\n var rule = r;\n\n if (typeof rule.transform === 'function') {\n if (source === source_) {\n source = _extends({}, source);\n }\n\n value = source[z] = rule.transform(value);\n }\n\n if (typeof rule === 'function') {\n rule = {\n validator: rule\n };\n } else {\n rule = _extends({}, rule);\n } // Fill validator. Skip if nothing need to validate\n\n\n rule.validator = _this2.getValidationMethod(rule);\n\n if (!rule.validator) {\n return;\n }\n\n rule.field = z;\n rule.fullField = rule.fullField || z;\n rule.type = _this2.getType(rule);\n series[z] = series[z] || [];\n series[z].push({\n rule: rule,\n value: value,\n source: source,\n field: z\n });\n });\n });\n var errorFields = {};\n return asyncMap(series, options, function (data, doIt) {\n var rule = data.rule;\n var deep = (rule.type === 'object' || rule.type === 'array') && (typeof rule.fields === 'object' || typeof rule.defaultField === 'object');\n deep = deep && (rule.required || !rule.required && data.value);\n rule.field = data.field;\n\n function addFullField(key, schema) {\n return _extends({}, schema, {\n fullField: rule.fullField + \".\" + key,\n fullFields: rule.fullFields ? [].concat(rule.fullFields, [key]) : [key]\n });\n }\n\n function cb(e) {\n if (e === void 0) {\n e = [];\n }\n\n var errorList = Array.isArray(e) ? e : [e];\n\n if (!options.suppressWarning && errorList.length) {\n Schema.warning('async-validator:', errorList);\n }\n\n if (errorList.length && rule.message !== undefined) {\n errorList = [].concat(rule.message);\n } // Fill error info\n\n\n var filledErrors = errorList.map(complementError(rule, source));\n\n if (options.first && filledErrors.length) {\n errorFields[rule.field] = 1;\n return doIt(filledErrors);\n }\n\n if (!deep) {\n doIt(filledErrors);\n } else {\n // if rule is required but the target object\n // does not exist fail at the rule level and don't\n // go deeper\n if (rule.required && !data.value) {\n if (rule.message !== undefined) {\n filledErrors = [].concat(rule.message).map(complementError(rule, source));\n } else if (options.error) {\n filledErrors = [options.error(rule, format(options.messages.required, rule.field))];\n }\n\n return doIt(filledErrors);\n }\n\n var fieldsSchema = {};\n\n if (rule.defaultField) {\n Object.keys(data.value).map(function (key) {\n fieldsSchema[key] = rule.defaultField;\n });\n }\n\n fieldsSchema = _extends({}, fieldsSchema, data.rule.fields);\n var paredFieldsSchema = {};\n Object.keys(fieldsSchema).forEach(function (field) {\n var fieldSchema = fieldsSchema[field];\n var fieldSchemaList = Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema];\n paredFieldsSchema[field] = fieldSchemaList.map(addFullField.bind(null, field));\n });\n var schema = new Schema(paredFieldsSchema);\n schema.messages(options.messages);\n\n if (data.rule.options) {\n data.rule.options.messages = options.messages;\n data.rule.options.error = options.error;\n }\n\n schema.validate(data.value, data.rule.options || options, function (errs) {\n var finalErrors = [];\n\n if (filledErrors && filledErrors.length) {\n finalErrors.push.apply(finalErrors, filledErrors);\n }\n\n if (errs && errs.length) {\n finalErrors.push.apply(finalErrors, errs);\n }\n\n doIt(finalErrors.length ? finalErrors : null);\n });\n }\n }\n\n var res;\n\n if (rule.asyncValidator) {\n res = rule.asyncValidator(rule, data.value, cb, data.source, options);\n } else if (rule.validator) {\n try {\n res = rule.validator(rule, data.value, cb, data.source, options);\n } catch (error) {\n console.error == null ? void 0 : console.error(error); // rethrow to report error\n\n if (!options.suppressValidatorError) {\n setTimeout(function () {\n throw error;\n }, 0);\n }\n\n cb(error.message);\n }\n\n if (res === true) {\n cb();\n } else if (res === false) {\n cb(typeof rule.message === 'function' ? rule.message(rule.fullField || rule.field) : rule.message || (rule.fullField || rule.field) + \" fails\");\n } else if (res instanceof Array) {\n cb(res);\n } else if (res instanceof Error) {\n cb(res.message);\n }\n }\n\n if (res && res.then) {\n res.then(function () {\n return cb();\n }, function (e) {\n return cb(e);\n });\n }\n }, function (results) {\n complete(results);\n }, source);\n };\n\n _proto.getType = function getType(rule) {\n if (rule.type === undefined && rule.pattern instanceof RegExp) {\n rule.type = 'pattern';\n }\n\n if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {\n throw new Error(format('Unknown rule type %s', rule.type));\n }\n\n return rule.type || 'string';\n };\n\n _proto.getValidationMethod = function getValidationMethod(rule) {\n if (typeof rule.validator === 'function') {\n return rule.validator;\n }\n\n var keys = Object.keys(rule);\n var messageIndex = keys.indexOf('message');\n\n if (messageIndex !== -1) {\n keys.splice(messageIndex, 1);\n }\n\n if (keys.length === 1 && keys[0] === 'required') {\n return validators.required;\n }\n\n return validators[this.getType(rule)] || undefined;\n };\n\n return Schema;\n}();\n\nSchema.register = function register(type, validator) {\n if (typeof validator !== 'function') {\n throw new Error('Cannot register a validator by type, validator is not a function');\n }\n\n validators[type] = validator;\n};\n\nSchema.warning = warning;\nSchema.messages = messages;\nSchema.validators = validators;\n\nexport { Schema as default };\n//# sourceMappingURL=index.js.map\n","var typeTemplate = \"'${name}' is not a valid ${type}\";\nexport var defaultValidateMessages = {\n default: \"Validation error on field '${name}'\",\n required: \"'${name}' is required\",\n enum: \"'${name}' must be one of [${enum}]\",\n whitespace: \"'${name}' cannot be empty\",\n date: {\n format: \"'${name}' is invalid for format date\",\n parse: \"'${name}' could not be parsed as date\",\n invalid: \"'${name}' is invalid date\"\n },\n types: {\n string: typeTemplate,\n method: typeTemplate,\n array: typeTemplate,\n object: typeTemplate,\n number: typeTemplate,\n date: typeTemplate,\n boolean: typeTemplate,\n integer: typeTemplate,\n float: typeTemplate,\n regexp: typeTemplate,\n email: typeTemplate,\n url: typeTemplate,\n hex: typeTemplate\n },\n string: {\n len: \"'${name}' must be exactly ${len} characters\",\n min: \"'${name}' must be at least ${min} characters\",\n max: \"'${name}' cannot be longer than ${max} characters\",\n range: \"'${name}' must be between ${min} and ${max} characters\"\n },\n number: {\n len: \"'${name}' must equal ${len}\",\n min: \"'${name}' cannot be less than ${min}\",\n max: \"'${name}' cannot be greater than ${max}\",\n range: \"'${name}' must be between ${min} and ${max}\"\n },\n array: {\n len: \"'${name}' must be exactly ${len} in length\",\n min: \"'${name}' cannot be less than ${min} in length\",\n max: \"'${name}' cannot be greater than ${max} in length\",\n range: \"'${name}' must be between ${min} and ${max} in length\"\n },\n pattern: {\n mismatch: \"'${name}' does not match pattern ${pattern}\"\n }\n};","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _regeneratorRuntime from \"@babel/runtime/helpers/esm/regeneratorRuntime\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport RawAsyncValidator from 'async-validator';\nimport * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nimport { defaultValidateMessages } from \"./messages\";\nimport { merge } from \"rc-util/es/utils/set\";\n\n// Remove incorrect original ts define\nvar AsyncValidator = RawAsyncValidator;\n\n/**\n * Replace with template.\n * `I'm ${name}` + { name: 'bamboo' } = I'm bamboo\n */\nfunction replaceMessage(template, kv) {\n return template.replace(/\\$\\{\\w+\\}/g, function (str) {\n var key = str.slice(2, -1);\n return kv[key];\n });\n}\nvar CODE_LOGIC_ERROR = 'CODE_LOGIC_ERROR';\nfunction validateRule(_x, _x2, _x3, _x4, _x5) {\n return _validateRule.apply(this, arguments);\n}\n/**\n * We use `async-validator` to validate the value.\n * But only check one value in a time to avoid namePath validate issue.\n */\nfunction _validateRule() {\n _validateRule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(name, value, rule, options, messageVariables) {\n var cloneRule, originValidator, subRuleField, validator, messages, result, subResults, kv, fillVariableResult;\n return _regeneratorRuntime().wrap(function _callee2$(_context2) {\n while (1) switch (_context2.prev = _context2.next) {\n case 0:\n cloneRule = _objectSpread({}, rule); // Bug of `async-validator`\n // https://github.com/react-component/field-form/issues/316\n // https://github.com/react-component/field-form/issues/313\n delete cloneRule.ruleIndex;\n\n // https://github.com/ant-design/ant-design/issues/40497#issuecomment-1422282378\n AsyncValidator.warning = function () {\n return void 0;\n };\n if (cloneRule.validator) {\n originValidator = cloneRule.validator;\n cloneRule.validator = function () {\n try {\n return originValidator.apply(void 0, arguments);\n } catch (error) {\n console.error(error);\n return Promise.reject(CODE_LOGIC_ERROR);\n }\n };\n }\n\n // We should special handle array validate\n subRuleField = null;\n if (cloneRule && cloneRule.type === 'array' && cloneRule.defaultField) {\n subRuleField = cloneRule.defaultField;\n delete cloneRule.defaultField;\n }\n validator = new AsyncValidator(_defineProperty({}, name, [cloneRule]));\n messages = merge(defaultValidateMessages, options.validateMessages);\n validator.messages(messages);\n result = [];\n _context2.prev = 10;\n _context2.next = 13;\n return Promise.resolve(validator.validate(_defineProperty({}, name, value), _objectSpread({}, options)));\n case 13:\n _context2.next = 18;\n break;\n case 15:\n _context2.prev = 15;\n _context2.t0 = _context2[\"catch\"](10);\n if (_context2.t0.errors) {\n result = _context2.t0.errors.map(function (_ref4, index) {\n var message = _ref4.message;\n var mergedMessage = message === CODE_LOGIC_ERROR ? messages.default : message;\n return /*#__PURE__*/React.isValidElement(mergedMessage) ?\n /*#__PURE__*/\n // Wrap ReactNode with `key`\n React.cloneElement(mergedMessage, {\n key: \"error_\".concat(index)\n }) : mergedMessage;\n });\n }\n case 18:\n if (!(!result.length && subRuleField)) {\n _context2.next = 23;\n break;\n }\n _context2.next = 21;\n return Promise.all(value.map(function (subValue, i) {\n return validateRule(\"\".concat(name, \".\").concat(i), subValue, subRuleField, options, messageVariables);\n }));\n case 21:\n subResults = _context2.sent;\n return _context2.abrupt(\"return\", subResults.reduce(function (prev, errors) {\n return [].concat(_toConsumableArray(prev), _toConsumableArray(errors));\n }, []));\n case 23:\n // Replace message with variables\n kv = _objectSpread(_objectSpread({}, rule), {}, {\n name: name,\n enum: (rule.enum || []).join(', ')\n }, messageVariables);\n fillVariableResult = result.map(function (error) {\n if (typeof error === 'string') {\n return replaceMessage(error, kv);\n }\n return error;\n });\n return _context2.abrupt(\"return\", fillVariableResult);\n case 26:\n case \"end\":\n return _context2.stop();\n }\n }, _callee2, null, [[10, 15]]);\n }));\n return _validateRule.apply(this, arguments);\n}\nexport function validateRules(namePath, value, rules, options, validateFirst, messageVariables) {\n var name = namePath.join('.');\n\n // Fill rule with context\n var filledRules = rules.map(function (currentRule, ruleIndex) {\n var originValidatorFunc = currentRule.validator;\n var cloneRule = _objectSpread(_objectSpread({}, currentRule), {}, {\n ruleIndex: ruleIndex\n });\n\n // Replace validator if needed\n if (originValidatorFunc) {\n cloneRule.validator = function (rule, val, callback) {\n var hasPromise = false;\n\n // Wrap callback only accept when promise not provided\n var wrappedCallback = function wrappedCallback() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n // Wait a tick to make sure return type is a promise\n Promise.resolve().then(function () {\n warning(!hasPromise, 'Your validator function has already return a promise. `callback` will be ignored.');\n if (!hasPromise) {\n callback.apply(void 0, args);\n }\n });\n };\n\n // Get promise\n var promise = originValidatorFunc(rule, val, wrappedCallback);\n hasPromise = promise && typeof promise.then === 'function' && typeof promise.catch === 'function';\n\n /**\n * 1. Use promise as the first priority.\n * 2. If promise not exist, use callback with warning instead\n */\n warning(hasPromise, '`callback` is deprecated. Please return a promise instead.');\n if (hasPromise) {\n promise.then(function () {\n callback();\n }).catch(function (err) {\n callback(err || ' ');\n });\n }\n };\n }\n return cloneRule;\n }).sort(function (_ref, _ref2) {\n var w1 = _ref.warningOnly,\n i1 = _ref.ruleIndex;\n var w2 = _ref2.warningOnly,\n i2 = _ref2.ruleIndex;\n if (!!w1 === !!w2) {\n // Let keep origin order\n return i1 - i2;\n }\n if (w1) {\n return 1;\n }\n return -1;\n });\n\n // Do validate rules\n var summaryPromise;\n if (validateFirst === true) {\n // >>>>> Validate by serialization\n summaryPromise = new Promise( /*#__PURE__*/function () {\n var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {\n var i, rule, errors;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n i = 0;\n case 1:\n if (!(i < filledRules.length)) {\n _context.next = 12;\n break;\n }\n rule = filledRules[i];\n _context.next = 5;\n return validateRule(name, value, rule, options, messageVariables);\n case 5:\n errors = _context.sent;\n if (!errors.length) {\n _context.next = 9;\n break;\n }\n reject([{\n errors: errors,\n rule: rule\n }]);\n return _context.abrupt(\"return\");\n case 9:\n i += 1;\n _context.next = 1;\n break;\n case 12:\n /* eslint-enable */\n\n resolve([]);\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n }));\n return function (_x6, _x7) {\n return _ref3.apply(this, arguments);\n };\n }());\n } else {\n // >>>>> Validate by parallel\n var rulePromises = filledRules.map(function (rule) {\n return validateRule(name, value, rule, options, messageVariables).then(function (errors) {\n return {\n errors: errors,\n rule: rule\n };\n });\n });\n summaryPromise = (validateFirst ? finishOnFirstFailed(rulePromises) : finishOnAllFailed(rulePromises)).then(function (errors) {\n // Always change to rejection for Field to catch\n return Promise.reject(errors);\n });\n }\n\n // Internal catch error to avoid console error log.\n summaryPromise.catch(function (e) {\n return e;\n });\n return summaryPromise;\n}\nfunction finishOnAllFailed(_x8) {\n return _finishOnAllFailed.apply(this, arguments);\n}\nfunction _finishOnAllFailed() {\n _finishOnAllFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(rulePromises) {\n return _regeneratorRuntime().wrap(function _callee3$(_context3) {\n while (1) switch (_context3.prev = _context3.next) {\n case 0:\n return _context3.abrupt(\"return\", Promise.all(rulePromises).then(function (errorsList) {\n var _ref5;\n var errors = (_ref5 = []).concat.apply(_ref5, _toConsumableArray(errorsList));\n return errors;\n }));\n case 1:\n case \"end\":\n return _context3.stop();\n }\n }, _callee3);\n }));\n return _finishOnAllFailed.apply(this, arguments);\n}\nfunction finishOnFirstFailed(_x9) {\n return _finishOnFirstFailed.apply(this, arguments);\n}\nfunction _finishOnFirstFailed() {\n _finishOnFirstFailed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(rulePromises) {\n var count;\n return _regeneratorRuntime().wrap(function _callee4$(_context4) {\n while (1) switch (_context4.prev = _context4.next) {\n case 0:\n count = 0;\n return _context4.abrupt(\"return\", new Promise(function (resolve) {\n rulePromises.forEach(function (promise) {\n promise.then(function (ruleError) {\n if (ruleError.errors.length) {\n resolve([ruleError]);\n }\n count += 1;\n if (count === rulePromises.length) {\n resolve([]);\n }\n });\n });\n }));\n case 2:\n case \"end\":\n return _context4.stop();\n }\n }, _callee4);\n }));\n return _finishOnFirstFailed.apply(this, arguments);\n}","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport getValue from \"rc-util/es/utils/get\";\nimport setValue from \"rc-util/es/utils/set\";\nimport { toArray } from \"./typeUtil\";\nexport { getValue, setValue };\n\n/**\n * Convert name to internal supported format.\n * This function should keep since we still thinking if need support like `a.b.c` format.\n * 'a' => ['a']\n * 123 => [123]\n * ['a', 123] => ['a', 123]\n */\nexport function getNamePath(path) {\n return toArray(path);\n}\nexport function cloneByNamePathList(store, namePathList) {\n var newStore = {};\n namePathList.forEach(function (namePath) {\n var value = getValue(store, namePath);\n newStore = setValue(newStore, namePath, value);\n });\n return newStore;\n}\n\n/**\n * Check if `namePathList` includes `namePath`.\n * @param namePathList A list of `InternalNamePath[]`\n * @param namePath Compare `InternalNamePath`\n * @param partialMatch True will make `[a, b]` match `[a, b, c]`\n */\nexport function containsNamePath(namePathList, namePath) {\n var partialMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n return namePathList && namePathList.some(function (path) {\n return matchNamePath(namePath, path, partialMatch);\n });\n}\n\n/**\n * Check if `namePath` is super set or equal of `subNamePath`.\n * @param namePath A list of `InternalNamePath[]`\n * @param subNamePath Compare `InternalNamePath`\n * @param partialMatch True will make `[a, b]` match `[a, b, c]`\n */\nexport function matchNamePath(namePath, subNamePath) {\n var partialMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n if (!namePath || !subNamePath) {\n return false;\n }\n if (!partialMatch && namePath.length !== subNamePath.length) {\n return false;\n }\n return subNamePath.every(function (nameUnit, i) {\n return namePath[i] === nameUnit;\n });\n}\n\n// Like `shallowEqual`, but we not check the data which may cause re-render\n\nexport function isSimilar(source, target) {\n if (source === target) {\n return true;\n }\n if (!source && target || source && !target) {\n return false;\n }\n if (!source || !target || _typeof(source) !== 'object' || _typeof(target) !== 'object') {\n return false;\n }\n var sourceKeys = Object.keys(source);\n var targetKeys = Object.keys(target);\n var keys = new Set([].concat(sourceKeys, targetKeys));\n return _toConsumableArray(keys).every(function (key) {\n var sourceValue = source[key];\n var targetValue = target[key];\n if (typeof sourceValue === 'function' && typeof targetValue === 'function') {\n return true;\n }\n return sourceValue === targetValue;\n });\n}\nexport function defaultGetValueFromEvent(valuePropName) {\n var event = arguments.length <= 1 ? undefined : arguments[1];\n if (event && event.target && _typeof(event.target) === 'object' && valuePropName in event.target) {\n return event.target[valuePropName];\n }\n return event;\n}\n\n/**\n * Moves an array item from one position in an array to another.\n *\n * Note: This is a pure function so a new array will be returned, instead\n * of altering the array argument.\n *\n * @param array Array in which to move an item. (required)\n * @param moveIndex The index of the item to move. (required)\n * @param toIndex The index to move item at moveIndex to. (required)\n */\nexport function move(array, moveIndex, toIndex) {\n var length = array.length;\n if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) {\n return array;\n }\n var item = array[moveIndex];\n var diff = moveIndex - toIndex;\n if (diff > 0) {\n // move left\n return [].concat(_toConsumableArray(array.slice(0, toIndex)), [item], _toConsumableArray(array.slice(toIndex, moveIndex)), _toConsumableArray(array.slice(moveIndex + 1, length)));\n }\n if (diff < 0) {\n // move right\n return [].concat(_toConsumableArray(array.slice(0, moveIndex)), _toConsumableArray(array.slice(moveIndex + 1, toIndex + 1)), [item], _toConsumableArray(array.slice(toIndex + 1, length)));\n }\n return array;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _regeneratorRuntime from \"@babel/runtime/helpers/esm/regeneratorRuntime\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar _excluded = [\"name\"];\nimport toChildrenArray from \"rc-util/es/Children/toArray\";\nimport isEqual from \"rc-util/es/isEqual\";\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport FieldContext, { HOOK_MARK } from \"./FieldContext\";\nimport ListContext from \"./ListContext\";\nimport { toArray } from \"./utils/typeUtil\";\nimport { validateRules } from \"./utils/validateUtil\";\nimport { containsNamePath, defaultGetValueFromEvent, getNamePath, getValue } from \"./utils/valueUtil\";\nvar EMPTY_ERRORS = [];\nfunction requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) {\n if (typeof shouldUpdate === 'function') {\n return shouldUpdate(prev, next, 'source' in info ? {\n source: info.source\n } : {});\n }\n return prevValue !== nextValue;\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style\n// We use Class instead of Hooks here since it will cost much code by using Hooks.\nvar Field = /*#__PURE__*/function (_React$Component) {\n _inherits(Field, _React$Component);\n var _super = _createSuper(Field);\n // ============================== Subscriptions ==============================\n function Field(props) {\n var _this;\n _classCallCheck(this, Field);\n _this = _super.call(this, props);\n\n // Register on init\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n resetCount: 0\n });\n _defineProperty(_assertThisInitialized(_this), \"cancelRegisterFunc\", null);\n _defineProperty(_assertThisInitialized(_this), \"mounted\", false);\n /**\n * Follow state should not management in State since it will async update by React.\n * This makes first render of form can not get correct state value.\n */\n _defineProperty(_assertThisInitialized(_this), \"touched\", false);\n /**\n * Mark when touched & validated. Currently only used for `dependencies`.\n * Note that we do not think field with `initialValue` is dirty\n * but this will be by `isFieldDirty` func.\n */\n _defineProperty(_assertThisInitialized(_this), \"dirty\", false);\n _defineProperty(_assertThisInitialized(_this), \"validatePromise\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"prevValidating\", void 0);\n _defineProperty(_assertThisInitialized(_this), \"errors\", EMPTY_ERRORS);\n _defineProperty(_assertThisInitialized(_this), \"warnings\", EMPTY_ERRORS);\n _defineProperty(_assertThisInitialized(_this), \"cancelRegister\", function () {\n var _this$props = _this.props,\n preserve = _this$props.preserve,\n isListField = _this$props.isListField,\n name = _this$props.name;\n if (_this.cancelRegisterFunc) {\n _this.cancelRegisterFunc(isListField, preserve, getNamePath(name));\n }\n _this.cancelRegisterFunc = null;\n });\n // ================================== Utils ==================================\n _defineProperty(_assertThisInitialized(_this), \"getNamePath\", function () {\n var _this$props2 = _this.props,\n name = _this$props2.name,\n fieldContext = _this$props2.fieldContext;\n var _fieldContext$prefixN = fieldContext.prefixName,\n prefixName = _fieldContext$prefixN === void 0 ? [] : _fieldContext$prefixN;\n return name !== undefined ? [].concat(_toConsumableArray(prefixName), _toConsumableArray(name)) : [];\n });\n _defineProperty(_assertThisInitialized(_this), \"getRules\", function () {\n var _this$props3 = _this.props,\n _this$props3$rules = _this$props3.rules,\n rules = _this$props3$rules === void 0 ? [] : _this$props3$rules,\n fieldContext = _this$props3.fieldContext;\n return rules.map(function (rule) {\n if (typeof rule === 'function') {\n return rule(fieldContext);\n }\n return rule;\n });\n });\n _defineProperty(_assertThisInitialized(_this), \"refresh\", function () {\n if (!_this.mounted) return;\n\n /**\n * Clean up current node.\n */\n _this.setState(function (_ref) {\n var resetCount = _ref.resetCount;\n return {\n resetCount: resetCount + 1\n };\n });\n });\n // Event should only trigger when meta changed\n _defineProperty(_assertThisInitialized(_this), \"metaCache\", null);\n _defineProperty(_assertThisInitialized(_this), \"triggerMetaEvent\", function (destroy) {\n var onMetaChange = _this.props.onMetaChange;\n if (onMetaChange) {\n var _meta = _objectSpread(_objectSpread({}, _this.getMeta()), {}, {\n destroy: destroy\n });\n if (!isEqual(_this.metaCache, _meta)) {\n onMetaChange(_meta);\n }\n _this.metaCache = _meta;\n } else {\n _this.metaCache = null;\n }\n });\n // ========================= Field Entity Interfaces =========================\n // Trigger by store update. Check if need update the component\n _defineProperty(_assertThisInitialized(_this), \"onStoreChange\", function (prevStore, namePathList, info) {\n var _this$props4 = _this.props,\n shouldUpdate = _this$props4.shouldUpdate,\n _this$props4$dependen = _this$props4.dependencies,\n dependencies = _this$props4$dependen === void 0 ? [] : _this$props4$dependen,\n onReset = _this$props4.onReset;\n var store = info.store;\n var namePath = _this.getNamePath();\n var prevValue = _this.getValue(prevStore);\n var curValue = _this.getValue(store);\n var namePathMatch = namePathList && containsNamePath(namePathList, namePath);\n\n // `setFieldsValue` is a quick access to update related status\n if (info.type === 'valueUpdate' && info.source === 'external' && prevValue !== curValue) {\n _this.touched = true;\n _this.dirty = true;\n _this.validatePromise = null;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n }\n switch (info.type) {\n case 'reset':\n if (!namePathList || namePathMatch) {\n // Clean up state\n _this.touched = false;\n _this.dirty = false;\n _this.validatePromise = undefined;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n onReset === null || onReset === void 0 ? void 0 : onReset();\n _this.refresh();\n return;\n }\n break;\n\n /**\n * In case field with `preserve = false` nest deps like:\n * - A = 1 => show B\n * - B = 1 => show C\n * - Reset A, need clean B, C\n */\n case 'remove':\n {\n if (shouldUpdate) {\n _this.reRender();\n return;\n }\n break;\n }\n case 'setField':\n {\n var data = info.data;\n if (namePathMatch) {\n if ('touched' in data) {\n _this.touched = data.touched;\n }\n if ('validating' in data && !('originRCField' in data)) {\n _this.validatePromise = data.validating ? Promise.resolve([]) : null;\n }\n if ('errors' in data) {\n _this.errors = data.errors || EMPTY_ERRORS;\n }\n if ('warnings' in data) {\n _this.warnings = data.warnings || EMPTY_ERRORS;\n }\n _this.dirty = true;\n _this.triggerMetaEvent();\n _this.reRender();\n return;\n } else if ('value' in data && containsNamePath(namePathList, namePath, true)) {\n // Contains path with value should also check\n _this.reRender();\n return;\n }\n\n // Handle update by `setField` with `shouldUpdate`\n if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n case 'dependenciesUpdate':\n {\n /**\n * Trigger when marked `dependencies` updated. Related fields will all update\n */\n var dependencyList = dependencies.map(getNamePath);\n // No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be\n // emitted earlier and they will work there\n // If set it may cause unnecessary twice rerendering\n if (dependencyList.some(function (dependency) {\n return containsNamePath(info.relatedFields, dependency);\n })) {\n _this.reRender();\n return;\n }\n break;\n }\n default:\n // 1. If `namePath` exists in `namePathList`, means it's related value and should update\n // For example \n // If `namePathList` is [['list']] (List value update), Field should be updated\n // If `namePathList` is [['list', 0]] (Field value update), List shouldn't be updated\n // 2.\n // 2.1 If `dependencies` is set, `name` is not set and `shouldUpdate` is not set,\n // don't use `shouldUpdate`. `dependencies` is view as a shortcut if `shouldUpdate`\n // is not provided\n // 2.2 If `shouldUpdate` provided, use customize logic to update the field\n // else to check if value changed\n if (namePathMatch || (!dependencies.length || namePath.length || shouldUpdate) && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {\n _this.reRender();\n return;\n }\n break;\n }\n if (shouldUpdate === true) {\n _this.reRender();\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"validateRules\", function (options) {\n // We should fixed namePath & value to avoid developer change then by form function\n var namePath = _this.getNamePath();\n var currentValue = _this.getValue();\n var _ref2 = options || {},\n triggerName = _ref2.triggerName,\n _ref2$validateOnly = _ref2.validateOnly,\n validateOnly = _ref2$validateOnly === void 0 ? false : _ref2$validateOnly;\n\n // Force change to async to avoid rule OOD under renderProps field\n var rootPromise = Promise.resolve().then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {\n var _this$props5, _this$props5$validate, validateFirst, messageVariables, validateDebounce, filteredRules, promise;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) switch (_context.prev = _context.next) {\n case 0:\n if (_this.mounted) {\n _context.next = 2;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 2:\n _this$props5 = _this.props, _this$props5$validate = _this$props5.validateFirst, validateFirst = _this$props5$validate === void 0 ? false : _this$props5$validate, messageVariables = _this$props5.messageVariables, validateDebounce = _this$props5.validateDebounce; // Start validate\n filteredRules = _this.getRules();\n if (triggerName) {\n filteredRules = filteredRules.filter(function (rule) {\n return rule;\n }).filter(function (rule) {\n var validateTrigger = rule.validateTrigger;\n if (!validateTrigger) {\n return true;\n }\n var triggerList = toArray(validateTrigger);\n return triggerList.includes(triggerName);\n });\n }\n\n // Wait for debounce. Skip if no `triggerName` since its from `validateFields / submit`\n if (!(validateDebounce && triggerName)) {\n _context.next = 10;\n break;\n }\n _context.next = 8;\n return new Promise(function (resolve) {\n setTimeout(resolve, validateDebounce);\n });\n case 8:\n if (!(_this.validatePromise !== rootPromise)) {\n _context.next = 10;\n break;\n }\n return _context.abrupt(\"return\", []);\n case 10:\n promise = validateRules(namePath, currentValue, filteredRules, options, validateFirst, messageVariables);\n promise.catch(function (e) {\n return e;\n }).then(function () {\n var ruleErrors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : EMPTY_ERRORS;\n if (_this.validatePromise === rootPromise) {\n var _ruleErrors$forEach;\n _this.validatePromise = null;\n\n // Get errors & warnings\n var nextErrors = [];\n var nextWarnings = [];\n (_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 ? void 0 : _ruleErrors$forEach.call(ruleErrors, function (_ref4) {\n var warningOnly = _ref4.rule.warningOnly,\n _ref4$errors = _ref4.errors,\n errors = _ref4$errors === void 0 ? EMPTY_ERRORS : _ref4$errors;\n if (warningOnly) {\n nextWarnings.push.apply(nextWarnings, _toConsumableArray(errors));\n } else {\n nextErrors.push.apply(nextErrors, _toConsumableArray(errors));\n }\n });\n _this.errors = nextErrors;\n _this.warnings = nextWarnings;\n _this.triggerMetaEvent();\n _this.reRender();\n }\n });\n return _context.abrupt(\"return\", promise);\n case 13:\n case \"end\":\n return _context.stop();\n }\n }, _callee);\n })));\n if (validateOnly) {\n return rootPromise;\n }\n _this.validatePromise = rootPromise;\n _this.dirty = true;\n _this.errors = EMPTY_ERRORS;\n _this.warnings = EMPTY_ERRORS;\n _this.triggerMetaEvent();\n\n // Force trigger re-render since we need sync renderProps with new meta\n _this.reRender();\n return rootPromise;\n });\n _defineProperty(_assertThisInitialized(_this), \"isFieldValidating\", function () {\n return !!_this.validatePromise;\n });\n _defineProperty(_assertThisInitialized(_this), \"isFieldTouched\", function () {\n return _this.touched;\n });\n _defineProperty(_assertThisInitialized(_this), \"isFieldDirty\", function () {\n // Touched or validate or has initialValue\n if (_this.dirty || _this.props.initialValue !== undefined) {\n return true;\n }\n\n // Form set initialValue\n var fieldContext = _this.props.fieldContext;\n var _fieldContext$getInte = fieldContext.getInternalHooks(HOOK_MARK),\n getInitialValue = _fieldContext$getInte.getInitialValue;\n if (getInitialValue(_this.getNamePath()) !== undefined) {\n return true;\n }\n return false;\n });\n _defineProperty(_assertThisInitialized(_this), \"getErrors\", function () {\n return _this.errors;\n });\n _defineProperty(_assertThisInitialized(_this), \"getWarnings\", function () {\n return _this.warnings;\n });\n _defineProperty(_assertThisInitialized(_this), \"isListField\", function () {\n return _this.props.isListField;\n });\n _defineProperty(_assertThisInitialized(_this), \"isList\", function () {\n return _this.props.isList;\n });\n _defineProperty(_assertThisInitialized(_this), \"isPreserve\", function () {\n return _this.props.preserve;\n });\n // ============================= Child Component =============================\n _defineProperty(_assertThisInitialized(_this), \"getMeta\", function () {\n // Make error & validating in cache to save perf\n _this.prevValidating = _this.isFieldValidating();\n var meta = {\n touched: _this.isFieldTouched(),\n validating: _this.prevValidating,\n errors: _this.errors,\n warnings: _this.warnings,\n name: _this.getNamePath(),\n validated: _this.validatePromise === null\n };\n return meta;\n });\n // Only return validate child node. If invalidate, will do nothing about field.\n _defineProperty(_assertThisInitialized(_this), \"getOnlyChild\", function (children) {\n // Support render props\n if (typeof children === 'function') {\n var _meta2 = _this.getMeta();\n return _objectSpread(_objectSpread({}, _this.getOnlyChild(children(_this.getControlled(), _meta2, _this.props.fieldContext))), {}, {\n isFunction: true\n });\n }\n\n // Filed element only\n var childList = toChildrenArray(children);\n if (childList.length !== 1 || ! /*#__PURE__*/React.isValidElement(childList[0])) {\n return {\n child: childList,\n isFunction: false\n };\n }\n return {\n child: childList[0],\n isFunction: false\n };\n });\n // ============================== Field Control ==============================\n _defineProperty(_assertThisInitialized(_this), \"getValue\", function (store) {\n var getFieldsValue = _this.props.fieldContext.getFieldsValue;\n var namePath = _this.getNamePath();\n return getValue(store || getFieldsValue(true), namePath);\n });\n _defineProperty(_assertThisInitialized(_this), \"getControlled\", function () {\n var childProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _this$props6 = _this.props,\n trigger = _this$props6.trigger,\n validateTrigger = _this$props6.validateTrigger,\n getValueFromEvent = _this$props6.getValueFromEvent,\n normalize = _this$props6.normalize,\n valuePropName = _this$props6.valuePropName,\n getValueProps = _this$props6.getValueProps,\n fieldContext = _this$props6.fieldContext;\n var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : fieldContext.validateTrigger;\n var namePath = _this.getNamePath();\n var getInternalHooks = fieldContext.getInternalHooks,\n getFieldsValue = fieldContext.getFieldsValue;\n var _getInternalHooks = getInternalHooks(HOOK_MARK),\n dispatch = _getInternalHooks.dispatch;\n var value = _this.getValue();\n var mergedGetValueProps = getValueProps || function (val) {\n return _defineProperty({}, valuePropName, val);\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var originTriggerFunc = childProps[trigger];\n var control = _objectSpread(_objectSpread({}, childProps), mergedGetValueProps(value));\n\n // Add trigger\n control[trigger] = function () {\n // Mark as touched\n _this.touched = true;\n _this.dirty = true;\n _this.triggerMetaEvent();\n var newValue;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (getValueFromEvent) {\n newValue = getValueFromEvent.apply(void 0, args);\n } else {\n newValue = defaultGetValueFromEvent.apply(void 0, [valuePropName].concat(args));\n }\n if (normalize) {\n newValue = normalize(newValue, value, getFieldsValue(true));\n }\n dispatch({\n type: 'updateValue',\n namePath: namePath,\n value: newValue\n });\n if (originTriggerFunc) {\n originTriggerFunc.apply(void 0, args);\n }\n };\n\n // Add validateTrigger\n var validateTriggerList = toArray(mergedValidateTrigger || []);\n validateTriggerList.forEach(function (triggerName) {\n // Wrap additional function of component, so that we can get latest value from store\n var originTrigger = control[triggerName];\n control[triggerName] = function () {\n if (originTrigger) {\n originTrigger.apply(void 0, arguments);\n }\n\n // Always use latest rules\n var rules = _this.props.rules;\n if (rules && rules.length) {\n // We dispatch validate to root,\n // since it will update related data with other field with same name\n dispatch({\n type: 'validateField',\n namePath: namePath,\n triggerName: triggerName\n });\n }\n };\n });\n return control;\n });\n if (props.fieldContext) {\n var getInternalHooks = props.fieldContext.getInternalHooks;\n var _getInternalHooks2 = getInternalHooks(HOOK_MARK),\n initEntityValue = _getInternalHooks2.initEntityValue;\n initEntityValue(_assertThisInitialized(_this));\n }\n return _this;\n }\n _createClass(Field, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props7 = this.props,\n shouldUpdate = _this$props7.shouldUpdate,\n fieldContext = _this$props7.fieldContext;\n this.mounted = true;\n\n // Register on init\n if (fieldContext) {\n var getInternalHooks = fieldContext.getInternalHooks;\n var _getInternalHooks3 = getInternalHooks(HOOK_MARK),\n registerField = _getInternalHooks3.registerField;\n this.cancelRegisterFunc = registerField(this);\n }\n\n // One more render for component in case fields not ready\n if (shouldUpdate === true) {\n this.reRender();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelRegister();\n this.triggerMetaEvent(true);\n this.mounted = false;\n }\n }, {\n key: \"reRender\",\n value: function reRender() {\n if (!this.mounted) return;\n this.forceUpdate();\n }\n }, {\n key: \"render\",\n value: function render() {\n var resetCount = this.state.resetCount;\n var children = this.props.children;\n var _this$getOnlyChild = this.getOnlyChild(children),\n child = _this$getOnlyChild.child,\n isFunction = _this$getOnlyChild.isFunction;\n\n // Not need to `cloneElement` since user can handle this in render function self\n var returnChildNode;\n if (isFunction) {\n returnChildNode = child;\n } else if ( /*#__PURE__*/React.isValidElement(child)) {\n returnChildNode = /*#__PURE__*/React.cloneElement(child, this.getControlled(child.props));\n } else {\n warning(!child, '`children` of Field is not validate ReactElement.');\n returnChildNode = child;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: resetCount\n }, returnChildNode);\n }\n }]);\n return Field;\n}(React.Component);\n_defineProperty(Field, \"contextType\", FieldContext);\n_defineProperty(Field, \"defaultProps\", {\n trigger: 'onChange',\n valuePropName: 'value'\n});\nfunction WrapperField(_ref6) {\n var name = _ref6.name,\n restProps = _objectWithoutProperties(_ref6, _excluded);\n var fieldContext = React.useContext(FieldContext);\n var listContext = React.useContext(ListContext);\n var namePath = name !== undefined ? getNamePath(name) : undefined;\n var key = 'keep';\n if (!restProps.isListField) {\n key = \"_\".concat((namePath || []).join('_'));\n }\n\n // Warning if it's a directly list field.\n // We can still support multiple level field preserve.\n if (process.env.NODE_ENV !== 'production' && restProps.preserve === false && restProps.isListField && namePath.length <= 1) {\n warning(false, '`preserve` should not apply on Form.List fields.');\n }\n return /*#__PURE__*/React.createElement(Field, _extends({\n key: key,\n name: namePath,\n isListField: !!listContext\n }, restProps, {\n fieldContext: fieldContext\n }));\n}\nexport default WrapperField;","import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport warning from \"rc-util/es/warning\";\nimport FieldContext from \"./FieldContext\";\nimport Field from \"./Field\";\nimport { move as _move, getNamePath } from \"./utils/valueUtil\";\nimport ListContext from \"./ListContext\";\nfunction List(_ref) {\n var name = _ref.name,\n initialValue = _ref.initialValue,\n children = _ref.children,\n rules = _ref.rules,\n validateTrigger = _ref.validateTrigger,\n isListField = _ref.isListField;\n var context = React.useContext(FieldContext);\n var wrapperListContext = React.useContext(ListContext);\n var keyRef = React.useRef({\n keys: [],\n id: 0\n });\n var keyManager = keyRef.current;\n var prefixName = React.useMemo(function () {\n var parentPrefixName = getNamePath(context.prefixName) || [];\n return [].concat(_toConsumableArray(parentPrefixName), _toConsumableArray(getNamePath(name)));\n }, [context.prefixName, name]);\n var fieldContext = React.useMemo(function () {\n return _objectSpread(_objectSpread({}, context), {}, {\n prefixName: prefixName\n });\n }, [context, prefixName]);\n\n // List context\n var listContext = React.useMemo(function () {\n return {\n getKey: function getKey(namePath) {\n var len = prefixName.length;\n var pathName = namePath[len];\n return [keyManager.keys[pathName], namePath.slice(len + 1)];\n }\n };\n }, [prefixName]);\n\n // User should not pass `children` as other type.\n if (typeof children !== 'function') {\n warning(false, 'Form.List only accepts function as children.');\n return null;\n }\n var shouldUpdate = function shouldUpdate(prevValue, nextValue, _ref2) {\n var source = _ref2.source;\n if (source === 'internal') {\n return false;\n }\n return prevValue !== nextValue;\n };\n return /*#__PURE__*/React.createElement(ListContext.Provider, {\n value: listContext\n }, /*#__PURE__*/React.createElement(FieldContext.Provider, {\n value: fieldContext\n }, /*#__PURE__*/React.createElement(Field, {\n name: [],\n shouldUpdate: shouldUpdate,\n rules: rules,\n validateTrigger: validateTrigger,\n initialValue: initialValue,\n isList: true,\n isListField: isListField !== null && isListField !== void 0 ? isListField : !!wrapperListContext\n }, function (_ref3, meta) {\n var _ref3$value = _ref3.value,\n value = _ref3$value === void 0 ? [] : _ref3$value,\n onChange = _ref3.onChange;\n var getFieldValue = context.getFieldValue;\n var getNewValue = function getNewValue() {\n var values = getFieldValue(prefixName || []);\n return values || [];\n };\n /**\n * Always get latest value in case user update fields by `form` api.\n */\n var operations = {\n add: function add(defaultValue, index) {\n // Mapping keys\n var newValue = getNewValue();\n if (index >= 0 && index <= newValue.length) {\n keyManager.keys = [].concat(_toConsumableArray(keyManager.keys.slice(0, index)), [keyManager.id], _toConsumableArray(keyManager.keys.slice(index)));\n onChange([].concat(_toConsumableArray(newValue.slice(0, index)), [defaultValue], _toConsumableArray(newValue.slice(index))));\n } else {\n if (process.env.NODE_ENV !== 'production' && (index < 0 || index > newValue.length)) {\n warning(false, 'The second parameter of the add function should be a valid positive number.');\n }\n keyManager.keys = [].concat(_toConsumableArray(keyManager.keys), [keyManager.id]);\n onChange([].concat(_toConsumableArray(newValue), [defaultValue]));\n }\n keyManager.id += 1;\n },\n remove: function remove(index) {\n var newValue = getNewValue();\n var indexSet = new Set(Array.isArray(index) ? index : [index]);\n if (indexSet.size <= 0) {\n return;\n }\n keyManager.keys = keyManager.keys.filter(function (_, keysIndex) {\n return !indexSet.has(keysIndex);\n });\n\n // Trigger store change\n onChange(newValue.filter(function (_, valueIndex) {\n return !indexSet.has(valueIndex);\n }));\n },\n move: function move(from, to) {\n if (from === to) {\n return;\n }\n var newValue = getNewValue();\n\n // Do not handle out of range\n if (from < 0 || from >= newValue.length || to < 0 || to >= newValue.length) {\n return;\n }\n keyManager.keys = _move(keyManager.keys, from, to);\n\n // Trigger store change\n onChange(_move(newValue, from, to));\n }\n };\n var listValue = value || [];\n if (!Array.isArray(listValue)) {\n listValue = [];\n if (process.env.NODE_ENV !== 'production') {\n warning(false, \"Current value of '\".concat(prefixName.join(' > '), \"' is not an array type.\"));\n }\n }\n return children(listValue.map(function (__, index) {\n var key = keyManager.keys[index];\n if (key === undefined) {\n keyManager.keys[index] = keyManager.id;\n key = keyManager.keys[index];\n keyManager.id += 1;\n }\n return {\n name: index,\n key: key,\n isListField: true\n };\n }), operations, meta);\n })));\n}\nexport default List;","export function allPromiseFinish(promiseList) {\n var hasError = false;\n var count = promiseList.length;\n var results = [];\n if (!promiseList.length) {\n return Promise.resolve([]);\n }\n return new Promise(function (resolve, reject) {\n promiseList.forEach(function (promise, index) {\n promise.catch(function (e) {\n hasError = true;\n return e;\n }).then(function (result) {\n count -= 1;\n results[index] = result;\n if (count > 0) {\n return;\n }\n if (hasError) {\n reject(results);\n }\n resolve(results);\n });\n });\n });\n}","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nvar SPLIT = '__@field_split__';\n\n/**\n * Convert name path into string to fast the fetch speed of Map.\n */\nfunction normalize(namePath) {\n return namePath.map(function (cell) {\n return \"\".concat(_typeof(cell), \":\").concat(cell);\n })\n // Magic split\n .join(SPLIT);\n}\n\n/**\n * NameMap like a `Map` but accepts `string[]` as key.\n */\nvar NameMap = /*#__PURE__*/function () {\n function NameMap() {\n _classCallCheck(this, NameMap);\n _defineProperty(this, \"kvs\", new Map());\n }\n _createClass(NameMap, [{\n key: \"set\",\n value: function set(key, value) {\n this.kvs.set(normalize(key), value);\n }\n }, {\n key: \"get\",\n value: function get(key) {\n return this.kvs.get(normalize(key));\n }\n }, {\n key: \"update\",\n value: function update(key, updater) {\n var origin = this.get(key);\n var next = updater(origin);\n if (!next) {\n this.delete(key);\n } else {\n this.set(key, next);\n }\n }\n }, {\n key: \"delete\",\n value: function _delete(key) {\n this.kvs.delete(normalize(key));\n }\n\n // Since we only use this in test, let simply realize this\n }, {\n key: \"map\",\n value: function map(callback) {\n return _toConsumableArray(this.kvs.entries()).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n var cells = key.split(SPLIT);\n return callback({\n key: cells.map(function (cell) {\n var _cell$match = cell.match(/^([^:]*):(.*)$/),\n _cell$match2 = _slicedToArray(_cell$match, 3),\n type = _cell$match2[1],\n unit = _cell$match2[2];\n return type === 'number' ? Number(unit) : unit;\n }),\n value: value\n });\n });\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var json = {};\n this.map(function (_ref3) {\n var key = _ref3.key,\n value = _ref3.value;\n json[key.join('.')] = value;\n return null;\n });\n return json;\n }\n }]);\n return NameMap;\n}();\nexport default NameMap;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nvar _excluded = [\"name\"];\nimport warning from \"rc-util/es/warning\";\nimport * as React from 'react';\nimport { HOOK_MARK } from \"./FieldContext\";\nimport { allPromiseFinish } from \"./utils/asyncUtil\";\nimport { merge } from \"rc-util/es/utils/set\";\nimport { defaultValidateMessages } from \"./utils/messages\";\nimport NameMap from \"./utils/NameMap\";\nimport { cloneByNamePathList, containsNamePath, getNamePath, getValue, matchNamePath, setValue } from \"./utils/valueUtil\";\nexport var FormStore = /*#__PURE__*/_createClass(function FormStore(forceRootUpdate) {\n var _this = this;\n _classCallCheck(this, FormStore);\n _defineProperty(this, \"formHooked\", false);\n _defineProperty(this, \"forceRootUpdate\", void 0);\n _defineProperty(this, \"subscribable\", true);\n _defineProperty(this, \"store\", {});\n _defineProperty(this, \"fieldEntities\", []);\n _defineProperty(this, \"initialValues\", {});\n _defineProperty(this, \"callbacks\", {});\n _defineProperty(this, \"validateMessages\", null);\n _defineProperty(this, \"preserve\", null);\n _defineProperty(this, \"lastValidatePromise\", null);\n _defineProperty(this, \"getForm\", function () {\n return {\n getFieldValue: _this.getFieldValue,\n getFieldsValue: _this.getFieldsValue,\n getFieldError: _this.getFieldError,\n getFieldWarning: _this.getFieldWarning,\n getFieldsError: _this.getFieldsError,\n isFieldsTouched: _this.isFieldsTouched,\n isFieldTouched: _this.isFieldTouched,\n isFieldValidating: _this.isFieldValidating,\n isFieldsValidating: _this.isFieldsValidating,\n resetFields: _this.resetFields,\n setFields: _this.setFields,\n setFieldValue: _this.setFieldValue,\n setFieldsValue: _this.setFieldsValue,\n validateFields: _this.validateFields,\n submit: _this.submit,\n _init: true,\n getInternalHooks: _this.getInternalHooks\n };\n });\n // ======================== Internal Hooks ========================\n _defineProperty(this, \"getInternalHooks\", function (key) {\n if (key === HOOK_MARK) {\n _this.formHooked = true;\n return {\n dispatch: _this.dispatch,\n initEntityValue: _this.initEntityValue,\n registerField: _this.registerField,\n useSubscribe: _this.useSubscribe,\n setInitialValues: _this.setInitialValues,\n destroyForm: _this.destroyForm,\n setCallbacks: _this.setCallbacks,\n setValidateMessages: _this.setValidateMessages,\n getFields: _this.getFields,\n setPreserve: _this.setPreserve,\n getInitialValue: _this.getInitialValue,\n registerWatch: _this.registerWatch\n };\n }\n warning(false, '`getInternalHooks` is internal usage. Should not call directly.');\n return null;\n });\n _defineProperty(this, \"useSubscribe\", function (subscribable) {\n _this.subscribable = subscribable;\n });\n /**\n * Record prev Form unmount fieldEntities which config preserve false.\n * This need to be refill with initialValues instead of store value.\n */\n _defineProperty(this, \"prevWithoutPreserves\", null);\n /**\n * First time `setInitialValues` should update store with initial value\n */\n _defineProperty(this, \"setInitialValues\", function (initialValues, init) {\n _this.initialValues = initialValues || {};\n if (init) {\n var _this$prevWithoutPres;\n var nextStore = merge(initialValues, _this.store);\n\n // We will take consider prev form unmount fields.\n // When the field is not `preserve`, we need fill this with initialValues instead of store.\n // eslint-disable-next-line array-callback-return\n (_this$prevWithoutPres = _this.prevWithoutPreserves) === null || _this$prevWithoutPres === void 0 ? void 0 : _this$prevWithoutPres.map(function (_ref) {\n var namePath = _ref.key;\n nextStore = setValue(nextStore, namePath, getValue(initialValues, namePath));\n });\n _this.prevWithoutPreserves = null;\n _this.updateStore(nextStore);\n }\n });\n _defineProperty(this, \"destroyForm\", function () {\n var prevWithoutPreserves = new NameMap();\n _this.getFieldEntities(true).forEach(function (entity) {\n if (!_this.isMergedPreserve(entity.isPreserve())) {\n prevWithoutPreserves.set(entity.getNamePath(), true);\n }\n });\n _this.prevWithoutPreserves = prevWithoutPreserves;\n });\n _defineProperty(this, \"getInitialValue\", function (namePath) {\n var initValue = getValue(_this.initialValues, namePath);\n\n // Not cloneDeep when without `namePath`\n return namePath.length ? merge(initValue) : initValue;\n });\n _defineProperty(this, \"setCallbacks\", function (callbacks) {\n _this.callbacks = callbacks;\n });\n _defineProperty(this, \"setValidateMessages\", function (validateMessages) {\n _this.validateMessages = validateMessages;\n });\n _defineProperty(this, \"setPreserve\", function (preserve) {\n _this.preserve = preserve;\n });\n // ============================= Watch ============================\n _defineProperty(this, \"watchList\", []);\n _defineProperty(this, \"registerWatch\", function (callback) {\n _this.watchList.push(callback);\n return function () {\n _this.watchList = _this.watchList.filter(function (fn) {\n return fn !== callback;\n });\n };\n });\n _defineProperty(this, \"notifyWatch\", function () {\n var namePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n // No need to cost perf when nothing need to watch\n if (_this.watchList.length) {\n var values = _this.getFieldsValue();\n var allValues = _this.getFieldsValue(true);\n _this.watchList.forEach(function (callback) {\n callback(values, allValues, namePath);\n });\n }\n });\n // ========================== Dev Warning =========================\n _defineProperty(this, \"timeoutId\", null);\n _defineProperty(this, \"warningUnhooked\", function () {\n if (process.env.NODE_ENV !== 'production' && !_this.timeoutId && typeof window !== 'undefined') {\n _this.timeoutId = setTimeout(function () {\n _this.timeoutId = null;\n if (!_this.formHooked) {\n warning(false, 'Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?');\n }\n });\n }\n });\n // ============================ Store =============================\n _defineProperty(this, \"updateStore\", function (nextStore) {\n _this.store = nextStore;\n });\n // ============================ Fields ============================\n /**\n * Get registered field entities.\n * @param pure Only return field which has a `name`. Default: false\n */\n _defineProperty(this, \"getFieldEntities\", function () {\n var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n if (!pure) {\n return _this.fieldEntities;\n }\n return _this.fieldEntities.filter(function (field) {\n return field.getNamePath().length;\n });\n });\n _defineProperty(this, \"getFieldsMap\", function () {\n var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var cache = new NameMap();\n _this.getFieldEntities(pure).forEach(function (field) {\n var namePath = field.getNamePath();\n cache.set(namePath, field);\n });\n return cache;\n });\n _defineProperty(this, \"getFieldEntitiesForNamePathList\", function (nameList) {\n if (!nameList) {\n return _this.getFieldEntities(true);\n }\n var cache = _this.getFieldsMap(true);\n return nameList.map(function (name) {\n var namePath = getNamePath(name);\n return cache.get(namePath) || {\n INVALIDATE_NAME_PATH: getNamePath(name)\n };\n });\n });\n _defineProperty(this, \"getFieldsValue\", function (nameList, filterFunc) {\n _this.warningUnhooked();\n\n // Fill args\n var mergedNameList;\n var mergedFilterFunc;\n var mergedStrict;\n if (nameList === true || Array.isArray(nameList)) {\n mergedNameList = nameList;\n mergedFilterFunc = filterFunc;\n } else if (nameList && _typeof(nameList) === 'object') {\n mergedStrict = nameList.strict;\n mergedFilterFunc = nameList.filter;\n }\n if (mergedNameList === true && !mergedFilterFunc) {\n return _this.store;\n }\n var fieldEntities = _this.getFieldEntitiesForNamePathList(Array.isArray(mergedNameList) ? mergedNameList : null);\n var filteredNameList = [];\n fieldEntities.forEach(function (entity) {\n var _isListField, _ref3;\n var namePath = 'INVALIDATE_NAME_PATH' in entity ? entity.INVALIDATE_NAME_PATH : entity.getNamePath();\n\n // Ignore when it's a list item and not specific the namePath,\n // since parent field is already take in count\n if (mergedStrict) {\n var _isList, _ref2;\n if ((_isList = (_ref2 = entity).isList) !== null && _isList !== void 0 && _isList.call(_ref2)) {\n return;\n }\n } else if (!mergedNameList && (_isListField = (_ref3 = entity).isListField) !== null && _isListField !== void 0 && _isListField.call(_ref3)) {\n return;\n }\n if (!mergedFilterFunc) {\n filteredNameList.push(namePath);\n } else {\n var meta = 'getMeta' in entity ? entity.getMeta() : null;\n if (mergedFilterFunc(meta)) {\n filteredNameList.push(namePath);\n }\n }\n });\n return cloneByNamePathList(_this.store, filteredNameList.map(getNamePath));\n });\n _defineProperty(this, \"getFieldValue\", function (name) {\n _this.warningUnhooked();\n var namePath = getNamePath(name);\n return getValue(_this.store, namePath);\n });\n _defineProperty(this, \"getFieldsError\", function (nameList) {\n _this.warningUnhooked();\n var fieldEntities = _this.getFieldEntitiesForNamePathList(nameList);\n return fieldEntities.map(function (entity, index) {\n if (entity && !('INVALIDATE_NAME_PATH' in entity)) {\n return {\n name: entity.getNamePath(),\n errors: entity.getErrors(),\n warnings: entity.getWarnings()\n };\n }\n return {\n name: getNamePath(nameList[index]),\n errors: [],\n warnings: []\n };\n });\n });\n _defineProperty(this, \"getFieldError\", function (name) {\n _this.warningUnhooked();\n var namePath = getNamePath(name);\n var fieldError = _this.getFieldsError([namePath])[0];\n return fieldError.errors;\n });\n _defineProperty(this, \"getFieldWarning\", function (name) {\n _this.warningUnhooked();\n var namePath = getNamePath(name);\n var fieldError = _this.getFieldsError([namePath])[0];\n return fieldError.warnings;\n });\n _defineProperty(this, \"isFieldsTouched\", function () {\n _this.warningUnhooked();\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var arg0 = args[0],\n arg1 = args[1];\n var namePathList;\n var isAllFieldsTouched = false;\n if (args.length === 0) {\n namePathList = null;\n } else if (args.length === 1) {\n if (Array.isArray(arg0)) {\n namePathList = arg0.map(getNamePath);\n isAllFieldsTouched = false;\n } else {\n namePathList = null;\n isAllFieldsTouched = arg0;\n }\n } else {\n namePathList = arg0.map(getNamePath);\n isAllFieldsTouched = arg1;\n }\n var fieldEntities = _this.getFieldEntities(true);\n var isFieldTouched = function isFieldTouched(field) {\n return field.isFieldTouched();\n };\n\n // ===== Will get fully compare when not config namePathList =====\n if (!namePathList) {\n return isAllFieldsTouched ? fieldEntities.every(isFieldTouched) : fieldEntities.some(isFieldTouched);\n }\n\n // Generate a nest tree for validate\n var map = new NameMap();\n namePathList.forEach(function (shortNamePath) {\n map.set(shortNamePath, []);\n });\n fieldEntities.forEach(function (field) {\n var fieldNamePath = field.getNamePath();\n\n // Find matched entity and put into list\n namePathList.forEach(function (shortNamePath) {\n if (shortNamePath.every(function (nameUnit, i) {\n return fieldNamePath[i] === nameUnit;\n })) {\n map.update(shortNamePath, function (list) {\n return [].concat(_toConsumableArray(list), [field]);\n });\n }\n });\n });\n\n // Check if NameMap value is touched\n var isNamePathListTouched = function isNamePathListTouched(entities) {\n return entities.some(isFieldTouched);\n };\n var namePathListEntities = map.map(function (_ref4) {\n var value = _ref4.value;\n return value;\n });\n return isAllFieldsTouched ? namePathListEntities.every(isNamePathListTouched) : namePathListEntities.some(isNamePathListTouched);\n });\n _defineProperty(this, \"isFieldTouched\", function (name) {\n _this.warningUnhooked();\n return _this.isFieldsTouched([name]);\n });\n _defineProperty(this, \"isFieldsValidating\", function (nameList) {\n _this.warningUnhooked();\n var fieldEntities = _this.getFieldEntities();\n if (!nameList) {\n return fieldEntities.some(function (testField) {\n return testField.isFieldValidating();\n });\n }\n var namePathList = nameList.map(getNamePath);\n return fieldEntities.some(function (testField) {\n var fieldNamePath = testField.getNamePath();\n return containsNamePath(namePathList, fieldNamePath) && testField.isFieldValidating();\n });\n });\n _defineProperty(this, \"isFieldValidating\", function (name) {\n _this.warningUnhooked();\n return _this.isFieldsValidating([name]);\n });\n /**\n * Reset Field with field `initialValue` prop.\n * Can pass `entities` or `namePathList` or just nothing.\n */\n _defineProperty(this, \"resetWithFieldInitialValue\", function () {\n var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Create cache\n var cache = new NameMap();\n var fieldEntities = _this.getFieldEntities(true);\n fieldEntities.forEach(function (field) {\n var initialValue = field.props.initialValue;\n var namePath = field.getNamePath();\n\n // Record only if has `initialValue`\n if (initialValue !== undefined) {\n var records = cache.get(namePath) || new Set();\n records.add({\n entity: field,\n value: initialValue\n });\n cache.set(namePath, records);\n }\n });\n\n // Reset\n var resetWithFields = function resetWithFields(entities) {\n entities.forEach(function (field) {\n var initialValue = field.props.initialValue;\n if (initialValue !== undefined) {\n var namePath = field.getNamePath();\n var formInitialValue = _this.getInitialValue(namePath);\n if (formInitialValue !== undefined) {\n // Warning if conflict with form initialValues and do not modify value\n warning(false, \"Form already set 'initialValues' with path '\".concat(namePath.join('.'), \"'. Field can not overwrite it.\"));\n } else {\n var records = cache.get(namePath);\n if (records && records.size > 1) {\n // Warning if multiple field set `initialValue`and do not modify value\n warning(false, \"Multiple Field with path '\".concat(namePath.join('.'), \"' set 'initialValue'. Can not decide which one to pick.\"));\n } else if (records) {\n var originValue = _this.getFieldValue(namePath);\n // Set `initialValue`\n if (!info.skipExist || originValue === undefined) {\n _this.updateStore(setValue(_this.store, namePath, _toConsumableArray(records)[0].value));\n }\n }\n }\n }\n });\n };\n var requiredFieldEntities;\n if (info.entities) {\n requiredFieldEntities = info.entities;\n } else if (info.namePathList) {\n requiredFieldEntities = [];\n info.namePathList.forEach(function (namePath) {\n var records = cache.get(namePath);\n if (records) {\n var _requiredFieldEntitie;\n (_requiredFieldEntitie = requiredFieldEntities).push.apply(_requiredFieldEntitie, _toConsumableArray(_toConsumableArray(records).map(function (r) {\n return r.entity;\n })));\n }\n });\n } else {\n requiredFieldEntities = fieldEntities;\n }\n resetWithFields(requiredFieldEntities);\n });\n _defineProperty(this, \"resetFields\", function (nameList) {\n _this.warningUnhooked();\n var prevStore = _this.store;\n if (!nameList) {\n _this.updateStore(merge(_this.initialValues));\n _this.resetWithFieldInitialValue();\n _this.notifyObservers(prevStore, null, {\n type: 'reset'\n });\n _this.notifyWatch();\n return;\n }\n\n // Reset by `nameList`\n var namePathList = nameList.map(getNamePath);\n namePathList.forEach(function (namePath) {\n var initialValue = _this.getInitialValue(namePath);\n _this.updateStore(setValue(_this.store, namePath, initialValue));\n });\n _this.resetWithFieldInitialValue({\n namePathList: namePathList\n });\n _this.notifyObservers(prevStore, namePathList, {\n type: 'reset'\n });\n _this.notifyWatch(namePathList);\n });\n _defineProperty(this, \"setFields\", function (fields) {\n _this.warningUnhooked();\n var prevStore = _this.store;\n var namePathList = [];\n fields.forEach(function (fieldData) {\n var name = fieldData.name,\n data = _objectWithoutProperties(fieldData, _excluded);\n var namePath = getNamePath(name);\n namePathList.push(namePath);\n\n // Value\n if ('value' in data) {\n _this.updateStore(setValue(_this.store, namePath, data.value));\n }\n _this.notifyObservers(prevStore, [namePath], {\n type: 'setField',\n data: fieldData\n });\n });\n _this.notifyWatch(namePathList);\n });\n _defineProperty(this, \"getFields\", function () {\n var entities = _this.getFieldEntities(true);\n var fields = entities.map(function (field) {\n var namePath = field.getNamePath();\n var meta = field.getMeta();\n var fieldData = _objectSpread(_objectSpread({}, meta), {}, {\n name: namePath,\n value: _this.getFieldValue(namePath)\n });\n Object.defineProperty(fieldData, 'originRCField', {\n value: true\n });\n return fieldData;\n });\n return fields;\n });\n // =========================== Observer ===========================\n /**\n * This only trigger when a field is on constructor to avoid we get initialValue too late\n */\n _defineProperty(this, \"initEntityValue\", function (entity) {\n var initialValue = entity.props.initialValue;\n if (initialValue !== undefined) {\n var namePath = entity.getNamePath();\n var prevValue = getValue(_this.store, namePath);\n if (prevValue === undefined) {\n _this.updateStore(setValue(_this.store, namePath, initialValue));\n }\n }\n });\n _defineProperty(this, \"isMergedPreserve\", function (fieldPreserve) {\n var mergedPreserve = fieldPreserve !== undefined ? fieldPreserve : _this.preserve;\n return mergedPreserve !== null && mergedPreserve !== void 0 ? mergedPreserve : true;\n });\n _defineProperty(this, \"registerField\", function (entity) {\n _this.fieldEntities.push(entity);\n var namePath = entity.getNamePath();\n _this.notifyWatch([namePath]);\n\n // Set initial values\n if (entity.props.initialValue !== undefined) {\n var prevStore = _this.store;\n _this.resetWithFieldInitialValue({\n entities: [entity],\n skipExist: true\n });\n _this.notifyObservers(prevStore, [entity.getNamePath()], {\n type: 'valueUpdate',\n source: 'internal'\n });\n }\n\n // un-register field callback\n return function (isListField, preserve) {\n var subNamePath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n _this.fieldEntities = _this.fieldEntities.filter(function (item) {\n return item !== entity;\n });\n\n // Clean up store value if not preserve\n if (!_this.isMergedPreserve(preserve) && (!isListField || subNamePath.length > 1)) {\n var defaultValue = isListField ? undefined : _this.getInitialValue(namePath);\n if (namePath.length && _this.getFieldValue(namePath) !== defaultValue && _this.fieldEntities.every(function (field) {\n return (\n // Only reset when no namePath exist\n !matchNamePath(field.getNamePath(), namePath)\n );\n })) {\n var _prevStore = _this.store;\n _this.updateStore(setValue(_prevStore, namePath, defaultValue, true));\n\n // Notify that field is unmount\n _this.notifyObservers(_prevStore, [namePath], {\n type: 'remove'\n });\n\n // Dependencies update\n _this.triggerDependenciesUpdate(_prevStore, namePath);\n }\n }\n _this.notifyWatch([namePath]);\n };\n });\n _defineProperty(this, \"dispatch\", function (action) {\n switch (action.type) {\n case 'updateValue':\n {\n var namePath = action.namePath,\n value = action.value;\n _this.updateValue(namePath, value);\n break;\n }\n case 'validateField':\n {\n var _namePath = action.namePath,\n triggerName = action.triggerName;\n _this.validateFields([_namePath], {\n triggerName: triggerName\n });\n break;\n }\n default:\n // Currently we don't have other action. Do nothing.\n }\n });\n _defineProperty(this, \"notifyObservers\", function (prevStore, namePathList, info) {\n if (_this.subscribable) {\n var mergedInfo = _objectSpread(_objectSpread({}, info), {}, {\n store: _this.getFieldsValue(true)\n });\n _this.getFieldEntities().forEach(function (_ref5) {\n var onStoreChange = _ref5.onStoreChange;\n onStoreChange(prevStore, namePathList, mergedInfo);\n });\n } else {\n _this.forceRootUpdate();\n }\n });\n /**\n * Notify dependencies children with parent update\n * We need delay to trigger validate in case Field is under render props\n */\n _defineProperty(this, \"triggerDependenciesUpdate\", function (prevStore, namePath) {\n var childrenFields = _this.getDependencyChildrenFields(namePath);\n if (childrenFields.length) {\n _this.validateFields(childrenFields);\n }\n _this.notifyObservers(prevStore, childrenFields, {\n type: 'dependenciesUpdate',\n relatedFields: [namePath].concat(_toConsumableArray(childrenFields))\n });\n return childrenFields;\n });\n _defineProperty(this, \"updateValue\", function (name, value) {\n var namePath = getNamePath(name);\n var prevStore = _this.store;\n _this.updateStore(setValue(_this.store, namePath, value));\n _this.notifyObservers(prevStore, [namePath], {\n type: 'valueUpdate',\n source: 'internal'\n });\n _this.notifyWatch([namePath]);\n\n // Dependencies update\n var childrenFields = _this.triggerDependenciesUpdate(prevStore, namePath);\n\n // trigger callback function\n var onValuesChange = _this.callbacks.onValuesChange;\n if (onValuesChange) {\n var changedValues = cloneByNamePathList(_this.store, [namePath]);\n onValuesChange(changedValues, _this.getFieldsValue());\n }\n _this.triggerOnFieldsChange([namePath].concat(_toConsumableArray(childrenFields)));\n });\n // Let all child Field get update.\n _defineProperty(this, \"setFieldsValue\", function (store) {\n _this.warningUnhooked();\n var prevStore = _this.store;\n if (store) {\n var nextStore = merge(_this.store, store);\n _this.updateStore(nextStore);\n }\n _this.notifyObservers(prevStore, null, {\n type: 'valueUpdate',\n source: 'external'\n });\n _this.notifyWatch();\n });\n _defineProperty(this, \"setFieldValue\", function (name, value) {\n _this.setFields([{\n name: name,\n value: value\n }]);\n });\n _defineProperty(this, \"getDependencyChildrenFields\", function (rootNamePath) {\n var children = new Set();\n var childrenFields = [];\n var dependencies2fields = new NameMap();\n\n /**\n * Generate maps\n * Can use cache to save perf if user report performance issue with this\n */\n _this.getFieldEntities().forEach(function (field) {\n var dependencies = field.props.dependencies;\n (dependencies || []).forEach(function (dependency) {\n var dependencyNamePath = getNamePath(dependency);\n dependencies2fields.update(dependencyNamePath, function () {\n var fields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Set();\n fields.add(field);\n return fields;\n });\n });\n });\n var fillChildren = function fillChildren(namePath) {\n var fields = dependencies2fields.get(namePath) || new Set();\n fields.forEach(function (field) {\n if (!children.has(field)) {\n children.add(field);\n var fieldNamePath = field.getNamePath();\n if (field.isFieldDirty() && fieldNamePath.length) {\n childrenFields.push(fieldNamePath);\n fillChildren(fieldNamePath);\n }\n }\n });\n };\n fillChildren(rootNamePath);\n return childrenFields;\n });\n _defineProperty(this, \"triggerOnFieldsChange\", function (namePathList, filedErrors) {\n var onFieldsChange = _this.callbacks.onFieldsChange;\n if (onFieldsChange) {\n var fields = _this.getFields();\n\n /**\n * Fill errors since `fields` may be replaced by controlled fields\n */\n if (filedErrors) {\n var cache = new NameMap();\n filedErrors.forEach(function (_ref6) {\n var name = _ref6.name,\n errors = _ref6.errors;\n cache.set(name, errors);\n });\n fields.forEach(function (field) {\n // eslint-disable-next-line no-param-reassign\n field.errors = cache.get(field.name) || field.errors;\n });\n }\n var changedFields = fields.filter(function (_ref7) {\n var fieldName = _ref7.name;\n return containsNamePath(namePathList, fieldName);\n });\n if (changedFields.length) {\n onFieldsChange(changedFields, fields);\n }\n }\n });\n // =========================== Validate ===========================\n _defineProperty(this, \"validateFields\", function (arg1, arg2) {\n var _options;\n _this.warningUnhooked();\n var nameList;\n var options;\n if (Array.isArray(arg1) || typeof arg1 === 'string' || typeof arg2 === 'string') {\n nameList = arg1;\n options = arg2;\n } else {\n options = arg1;\n }\n var provideNameList = !!nameList;\n var namePathList = provideNameList ? nameList.map(getNamePath) : [];\n\n // Collect result in promise list\n var promiseList = [];\n\n // We temp save the path which need trigger for `onFieldsChange`\n var TMP_SPLIT = String(Date.now());\n var validateNamePathList = new Set();\n var recursive = (_options = options) === null || _options === void 0 ? void 0 : _options.recursive;\n _this.getFieldEntities(true).forEach(function (field) {\n // Add field if not provide `nameList`\n if (!provideNameList) {\n namePathList.push(field.getNamePath());\n }\n\n // Skip if without rule\n if (!field.props.rules || !field.props.rules.length) {\n return;\n }\n var fieldNamePath = field.getNamePath();\n validateNamePathList.add(fieldNamePath.join(TMP_SPLIT));\n\n // Add field validate rule in to promise list\n if (!provideNameList || containsNamePath(namePathList, fieldNamePath, recursive)) {\n var promise = field.validateRules(_objectSpread({\n validateMessages: _objectSpread(_objectSpread({}, defaultValidateMessages), _this.validateMessages)\n }, options));\n\n // Wrap promise with field\n promiseList.push(promise.then(function () {\n return {\n name: fieldNamePath,\n errors: [],\n warnings: []\n };\n }).catch(function (ruleErrors) {\n var _ruleErrors$forEach;\n var mergedErrors = [];\n var mergedWarnings = [];\n (_ruleErrors$forEach = ruleErrors.forEach) === null || _ruleErrors$forEach === void 0 ? void 0 : _ruleErrors$forEach.call(ruleErrors, function (_ref8) {\n var warningOnly = _ref8.rule.warningOnly,\n errors = _ref8.errors;\n if (warningOnly) {\n mergedWarnings.push.apply(mergedWarnings, _toConsumableArray(errors));\n } else {\n mergedErrors.push.apply(mergedErrors, _toConsumableArray(errors));\n }\n });\n if (mergedErrors.length) {\n return Promise.reject({\n name: fieldNamePath,\n errors: mergedErrors,\n warnings: mergedWarnings\n });\n }\n return {\n name: fieldNamePath,\n errors: mergedErrors,\n warnings: mergedWarnings\n };\n }));\n }\n });\n var summaryPromise = allPromiseFinish(promiseList);\n _this.lastValidatePromise = summaryPromise;\n\n // Notify fields with rule that validate has finished and need update\n summaryPromise.catch(function (results) {\n return results;\n }).then(function (results) {\n var resultNamePathList = results.map(function (_ref9) {\n var name = _ref9.name;\n return name;\n });\n _this.notifyObservers(_this.store, resultNamePathList, {\n type: 'validateFinish'\n });\n _this.triggerOnFieldsChange(resultNamePathList, results);\n });\n var returnPromise = summaryPromise.then(function () {\n if (_this.lastValidatePromise === summaryPromise) {\n return Promise.resolve(_this.getFieldsValue(namePathList));\n }\n return Promise.reject([]);\n }).catch(function (results) {\n var errorList = results.filter(function (result) {\n return result && result.errors.length;\n });\n return Promise.reject({\n values: _this.getFieldsValue(namePathList),\n errorFields: errorList,\n outOfDate: _this.lastValidatePromise !== summaryPromise\n });\n });\n\n // Do not throw in console\n returnPromise.catch(function (e) {\n return e;\n });\n\n // `validating` changed. Trigger `onFieldsChange`\n var triggerNamePathList = namePathList.filter(function (namePath) {\n return validateNamePathList.has(namePath.join(TMP_SPLIT));\n });\n _this.triggerOnFieldsChange(triggerNamePathList);\n return returnPromise;\n });\n // ============================ Submit ============================\n _defineProperty(this, \"submit\", function () {\n _this.warningUnhooked();\n _this.validateFields().then(function (values) {\n var onFinish = _this.callbacks.onFinish;\n if (onFinish) {\n try {\n onFinish(values);\n } catch (err) {\n // Should print error if user `onFinish` callback failed\n console.error(err);\n }\n }\n }).catch(function (e) {\n var onFinishFailed = _this.callbacks.onFinishFailed;\n if (onFinishFailed) {\n onFinishFailed(e);\n }\n });\n });\n this.forceRootUpdate = forceRootUpdate;\n});\nfunction useForm(form) {\n var formRef = React.useRef();\n var _React$useState = React.useState({}),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n forceUpdate = _React$useState2[1];\n if (!formRef.current) {\n if (form) {\n formRef.current = form;\n } else {\n // Create a new FormStore if not provided\n var forceReRender = function forceReRender() {\n forceUpdate({});\n };\n var formStore = new FormStore(forceReRender);\n formRef.current = formStore.getForm();\n }\n }\n return [formRef.current];\n}\nexport default useForm;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport * as React from 'react';\nvar FormContext = /*#__PURE__*/React.createContext({\n triggerFormChange: function triggerFormChange() {},\n triggerFormFinish: function triggerFormFinish() {},\n registerForm: function registerForm() {},\n unregisterForm: function unregisterForm() {}\n});\nvar FormProvider = function FormProvider(_ref) {\n var validateMessages = _ref.validateMessages,\n onFormChange = _ref.onFormChange,\n onFormFinish = _ref.onFormFinish,\n children = _ref.children;\n var formContext = React.useContext(FormContext);\n var formsRef = React.useRef({});\n return /*#__PURE__*/React.createElement(FormContext.Provider, {\n value: _objectSpread(_objectSpread({}, formContext), {}, {\n validateMessages: _objectSpread(_objectSpread({}, formContext.validateMessages), validateMessages),\n // =========================================================\n // = Global Form Control =\n // =========================================================\n triggerFormChange: function triggerFormChange(name, changedFields) {\n if (onFormChange) {\n onFormChange(name, {\n changedFields: changedFields,\n forms: formsRef.current\n });\n }\n formContext.triggerFormChange(name, changedFields);\n },\n triggerFormFinish: function triggerFormFinish(name, values) {\n if (onFormFinish) {\n onFormFinish(name, {\n values: values,\n forms: formsRef.current\n });\n }\n formContext.triggerFormFinish(name, values);\n },\n registerForm: function registerForm(name, form) {\n if (name) {\n formsRef.current = _objectSpread(_objectSpread({}, formsRef.current), {}, _defineProperty({}, name, form));\n }\n formContext.registerForm(name, form);\n },\n unregisterForm: function unregisterForm(name) {\n var newForms = _objectSpread({}, formsRef.current);\n delete newForms[name];\n formsRef.current = newForms;\n formContext.unregisterForm(name);\n }\n })\n }, children);\n};\nexport { FormProvider };\nexport default FormContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"name\", \"initialValues\", \"fields\", \"form\", \"preserve\", \"children\", \"component\", \"validateMessages\", \"validateTrigger\", \"onValuesChange\", \"onFieldsChange\", \"onFinish\", \"onFinishFailed\"];\nimport * as React from 'react';\nimport useForm from \"./useForm\";\nimport FieldContext, { HOOK_MARK } from \"./FieldContext\";\nimport FormContext from \"./FormContext\";\nimport { isSimilar } from \"./utils/valueUtil\";\nimport ListContext from \"./ListContext\";\nvar Form = function Form(_ref, ref) {\n var name = _ref.name,\n initialValues = _ref.initialValues,\n fields = _ref.fields,\n form = _ref.form,\n preserve = _ref.preserve,\n children = _ref.children,\n _ref$component = _ref.component,\n Component = _ref$component === void 0 ? 'form' : _ref$component,\n validateMessages = _ref.validateMessages,\n _ref$validateTrigger = _ref.validateTrigger,\n validateTrigger = _ref$validateTrigger === void 0 ? 'onChange' : _ref$validateTrigger,\n onValuesChange = _ref.onValuesChange,\n _onFieldsChange = _ref.onFieldsChange,\n _onFinish = _ref.onFinish,\n onFinishFailed = _ref.onFinishFailed,\n restProps = _objectWithoutProperties(_ref, _excluded);\n var formContext = React.useContext(FormContext);\n\n // We customize handle event since Context will makes all the consumer re-render:\n // https://reactjs.org/docs/context.html#contextprovider\n var _useForm = useForm(form),\n _useForm2 = _slicedToArray(_useForm, 1),\n formInstance = _useForm2[0];\n var _getInternalHooks = formInstance.getInternalHooks(HOOK_MARK),\n useSubscribe = _getInternalHooks.useSubscribe,\n setInitialValues = _getInternalHooks.setInitialValues,\n setCallbacks = _getInternalHooks.setCallbacks,\n setValidateMessages = _getInternalHooks.setValidateMessages,\n setPreserve = _getInternalHooks.setPreserve,\n destroyForm = _getInternalHooks.destroyForm;\n\n // Pass ref with form instance\n React.useImperativeHandle(ref, function () {\n return formInstance;\n });\n\n // Register form into Context\n React.useEffect(function () {\n formContext.registerForm(name, formInstance);\n return function () {\n formContext.unregisterForm(name);\n };\n }, [formContext, formInstance, name]);\n\n // Pass props to store\n setValidateMessages(_objectSpread(_objectSpread({}, formContext.validateMessages), validateMessages));\n setCallbacks({\n onValuesChange: onValuesChange,\n onFieldsChange: function onFieldsChange(changedFields) {\n formContext.triggerFormChange(name, changedFields);\n if (_onFieldsChange) {\n for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n _onFieldsChange.apply(void 0, [changedFields].concat(rest));\n }\n },\n onFinish: function onFinish(values) {\n formContext.triggerFormFinish(name, values);\n if (_onFinish) {\n _onFinish(values);\n }\n },\n onFinishFailed: onFinishFailed\n });\n setPreserve(preserve);\n\n // Set initial value, init store value when first mount\n var mountRef = React.useRef(null);\n setInitialValues(initialValues, !mountRef.current);\n if (!mountRef.current) {\n mountRef.current = true;\n }\n React.useEffect(function () {\n return destroyForm;\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n\n // Prepare children by `children` type\n var childrenNode;\n var childrenRenderProps = typeof children === 'function';\n if (childrenRenderProps) {\n var _values = formInstance.getFieldsValue(true);\n childrenNode = children(_values, formInstance);\n } else {\n childrenNode = children;\n }\n\n // Not use subscribe when using render props\n useSubscribe(!childrenRenderProps);\n\n // Listen if fields provided. We use ref to save prev data here to avoid additional render\n var prevFieldsRef = React.useRef();\n React.useEffect(function () {\n if (!isSimilar(prevFieldsRef.current || [], fields || [])) {\n formInstance.setFields(fields || []);\n }\n prevFieldsRef.current = fields;\n }, [fields, formInstance]);\n var formContextValue = React.useMemo(function () {\n return _objectSpread(_objectSpread({}, formInstance), {}, {\n validateTrigger: validateTrigger\n });\n }, [formInstance, validateTrigger]);\n var wrapperNode = /*#__PURE__*/React.createElement(ListContext.Provider, {\n value: null\n }, /*#__PURE__*/React.createElement(FieldContext.Provider, {\n value: formContextValue\n }, childrenNode));\n if (Component === false) {\n return wrapperNode;\n }\n return /*#__PURE__*/React.createElement(Component, _extends({}, restProps, {\n onSubmit: function onSubmit(event) {\n event.preventDefault();\n event.stopPropagation();\n formInstance.submit();\n },\n onReset: function onReset(event) {\n var _restProps$onReset;\n event.preventDefault();\n formInstance.resetFields();\n (_restProps$onReset = restProps.onReset) === null || _restProps$onReset === void 0 ? void 0 : _restProps$onReset.call(restProps, event);\n }\n }), wrapperNode);\n};\nexport default Form;","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport warning from \"rc-util/es/warning\";\nimport { useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport FieldContext, { HOOK_MARK } from \"./FieldContext\";\nimport { isFormInstance } from \"./utils/typeUtil\";\nimport { getNamePath, getValue } from \"./utils/valueUtil\";\nexport function stringify(value) {\n try {\n return JSON.stringify(value);\n } catch (err) {\n return Math.random();\n }\n}\nvar useWatchWarning = process.env.NODE_ENV !== 'production' ? function (namePath) {\n var fullyStr = namePath.join('__RC_FIELD_FORM_SPLIT__');\n var nameStrRef = useRef(fullyStr);\n warning(nameStrRef.current === fullyStr, '`useWatch` is not support dynamic `namePath`. Please provide static instead.');\n} : function () {};\nfunction useWatch() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var _args$ = args[0],\n dependencies = _args$ === void 0 ? [] : _args$,\n _args$2 = args[1],\n _form = _args$2 === void 0 ? {} : _args$2;\n var options = isFormInstance(_form) ? {\n form: _form\n } : _form;\n var form = options.form;\n var _useState = useState(),\n _useState2 = _slicedToArray(_useState, 2),\n value = _useState2[0],\n setValue = _useState2[1];\n var valueStr = useMemo(function () {\n return stringify(value);\n }, [value]);\n var valueStrRef = useRef(valueStr);\n valueStrRef.current = valueStr;\n var fieldContext = useContext(FieldContext);\n var formInstance = form || fieldContext;\n var isValidForm = formInstance && formInstance._init;\n\n // Warning if not exist form instance\n if (process.env.NODE_ENV !== 'production') {\n warning(args.length === 2 ? form ? isValidForm : true : isValidForm, 'useWatch requires a form instance since it can not auto detect from context.');\n }\n var namePath = getNamePath(dependencies);\n var namePathRef = useRef(namePath);\n namePathRef.current = namePath;\n useWatchWarning(namePath);\n useEffect(function () {\n // Skip if not exist form instance\n if (!isValidForm) {\n return;\n }\n var getFieldsValue = formInstance.getFieldsValue,\n getInternalHooks = formInstance.getInternalHooks;\n var _getInternalHooks = getInternalHooks(HOOK_MARK),\n registerWatch = _getInternalHooks.registerWatch;\n var cancelRegister = registerWatch(function (values, allValues) {\n var newValue = getValue(options.preserve ? allValues : values, namePathRef.current);\n var nextValueStr = stringify(newValue);\n\n // Compare stringify in case it's nest object\n if (valueStrRef.current !== nextValueStr) {\n valueStrRef.current = nextValueStr;\n setValue(newValue);\n }\n });\n\n // TODO: We can improve this perf in future\n var initialValue = getValue(options.preserve ? getFieldsValue(true) : getFieldsValue(), namePathRef.current);\n\n // React 18 has the bug that will queue update twice even the value is not changed\n // ref: https://github.com/facebook/react/issues/27213\n if (value !== initialValue) {\n setValue(initialValue);\n }\n return cancelRegister;\n },\n // We do not need re-register since namePath content is the same\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isValidForm]);\n return value;\n}\nexport default useWatch;","import * as React from 'react';\nimport Field from \"./Field\";\nimport List from \"./List\";\nimport useForm from \"./useForm\";\nimport FieldForm from \"./Form\";\nimport { FormProvider } from \"./FormContext\";\nimport FieldContext from \"./FieldContext\";\nimport ListContext from \"./ListContext\";\nimport useWatch from \"./useWatch\";\nvar InternalForm = /*#__PURE__*/React.forwardRef(FieldForm);\nvar RefForm = InternalForm;\nRefForm.FormProvider = FormProvider;\nRefForm.Field = Field;\nRefForm.List = List;\nRefForm.useForm = useForm;\nRefForm.useWatch = useWatch;\nexport { Field, List, useForm, FormProvider, FieldContext, ListContext, useWatch };\nexport default RefForm;","\"use client\";\n\nimport * as React from 'react';\nimport { useContext, useMemo } from 'react';\nimport { FormProvider as RcFormProvider } from 'rc-field-form';\nimport omit from \"rc-util/es/omit\";\nexport const FormContext = /*#__PURE__*/React.createContext({\n labelAlign: 'right',\n vertical: false,\n itemRef: () => {}\n});\nexport const NoStyleItemContext = /*#__PURE__*/React.createContext(null);\nexport const FormProvider = props => {\n const providerProps = omit(props, ['prefixCls']);\n return /*#__PURE__*/React.createElement(RcFormProvider, Object.assign({}, providerProps));\n};\nexport const FormItemPrefixContext = /*#__PURE__*/React.createContext({\n prefixCls: ''\n});\nexport const FormItemInputContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n FormItemInputContext.displayName = 'FormItemInputContext';\n}\nexport const NoFormStyle = _ref => {\n let {\n children,\n status,\n override\n } = _ref;\n const formItemInputContext = useContext(FormItemInputContext);\n const newFormItemInputContext = useMemo(() => {\n const newContext = Object.assign({}, formItemInputContext);\n if (override) {\n delete newContext.isFormItemInput;\n }\n if (status) {\n delete newContext.status;\n delete newContext.hasFeedback;\n delete newContext.feedbackIcon;\n }\n return newContext;\n }, [status, override, formItemInputContext]);\n return /*#__PURE__*/React.createElement(FormItemInputContext.Provider, {\n value: newFormItemInputContext\n }, children);\n};","import { useEvent } from 'rc-util';\nimport * as React from 'react';\nfunction voidFunc() {}\nconst WatermarkContext = /*#__PURE__*/React.createContext({\n add: voidFunc,\n remove: voidFunc\n});\nexport function usePanelRef(panelSelector) {\n const watermark = React.useContext(WatermarkContext);\n const panelEleRef = React.useRef();\n const panelRef = useEvent(ele => {\n if (ele) {\n const innerContentEle = panelSelector ? ele.querySelector(panelSelector) : ele;\n watermark.add(innerContentEle);\n panelEleRef.current = innerContentEle;\n } else {\n watermark.remove(panelEleRef.current);\n }\n });\n return panelRef;\n}\nexport default WatermarkContext;","\"use client\";\n\nimport React, { useContext } from 'react';\nimport Button from '../../button';\nimport { ModalContext } from '../context';\nconst NormalCancelBtn = () => {\n const {\n cancelButtonProps,\n cancelTextLocale,\n onCancel\n } = useContext(ModalContext);\n return /*#__PURE__*/React.createElement(Button, Object.assign({\n onClick: onCancel\n }, cancelButtonProps), cancelTextLocale);\n};\nexport default NormalCancelBtn;","\"use client\";\n\nimport React, { useContext } from 'react';\nimport Button from '../../button';\nimport { convertLegacyProps } from '../../button/buttonHelpers';\nimport { ModalContext } from '../context';\nconst NormalOkBtn = () => {\n const {\n confirmLoading,\n okButtonProps,\n okType,\n okTextLocale,\n onOk\n } = useContext(ModalContext);\n return /*#__PURE__*/React.createElement(Button, Object.assign({}, convertLegacyProps(okType), {\n loading: confirmLoading,\n onClick: onOk\n }, okButtonProps), okTextLocale);\n};\nexport default NormalOkBtn;","\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport React from 'react';\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport { DisabledContextProvider } from '../config-provider/DisabledContext';\nimport { useLocale } from '../locale';\nimport NormalCancelBtn from './components/NormalCancelBtn';\nimport NormalOkBtn from './components/NormalOkBtn';\nimport { ModalContextProvider } from './context';\nimport { getConfirmLocale } from './locale';\nexport function renderCloseIcon(prefixCls, closeIcon) {\n return /*#__PURE__*/React.createElement(\"span\", {\n className: `${prefixCls}-close-x`\n }, closeIcon || /*#__PURE__*/React.createElement(CloseOutlined, {\n className: `${prefixCls}-close-icon`\n }));\n}\nexport const Footer = props => {\n const {\n okText,\n okType = 'primary',\n cancelText,\n confirmLoading,\n onOk,\n onCancel,\n okButtonProps,\n cancelButtonProps,\n footer\n } = props;\n const [locale] = useLocale('Modal', getConfirmLocale());\n // ================== Locale Text ==================\n const okTextLocale = okText || (locale === null || locale === void 0 ? void 0 : locale.okText);\n const cancelTextLocale = cancelText || (locale === null || locale === void 0 ? void 0 : locale.cancelText);\n // ================= Context Value =================\n const btnCtxValue = {\n confirmLoading,\n okButtonProps,\n cancelButtonProps,\n okTextLocale,\n cancelTextLocale,\n okType,\n onOk,\n onCancel\n };\n const btnCtxValueMemo = React.useMemo(() => btnCtxValue, _toConsumableArray(Object.values(btnCtxValue)));\n let footerNode;\n if (typeof footer === 'function' || typeof footer === 'undefined') {\n footerNode = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NormalCancelBtn, null), /*#__PURE__*/React.createElement(NormalOkBtn, null));\n if (typeof footer === 'function') {\n footerNode = footer(footerNode, {\n OkBtn: NormalOkBtn,\n CancelBtn: NormalCancelBtn\n });\n }\n footerNode = /*#__PURE__*/React.createElement(ModalContextProvider, {\n value: btnCtxValueMemo\n }, footerNode);\n } else {\n footerNode = footer;\n }\n return /*#__PURE__*/React.createElement(DisabledContextProvider, {\n disabled: false\n }, footerNode);\n};","const initMotionCommon = duration => ({\n animationDuration: duration,\n animationFillMode: 'both'\n});\n// FIXME: origin less code seems same as initMotionCommon. Maybe we can safe remove\nconst initMotionCommonLeave = duration => ({\n animationDuration: duration,\n animationFillMode: 'both'\n});\nexport const initMotion = function (motionCls, inKeyframes, outKeyframes, duration) {\n let sameLevel = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n const sameLevelPrefix = sameLevel ? '&' : '';\n return {\n [`\n ${sameLevelPrefix}${motionCls}-enter,\n ${sameLevelPrefix}${motionCls}-appear\n `]: Object.assign(Object.assign({}, initMotionCommon(duration)), {\n animationPlayState: 'paused'\n }),\n [`${sameLevelPrefix}${motionCls}-leave`]: Object.assign(Object.assign({}, initMotionCommonLeave(duration)), {\n animationPlayState: 'paused'\n }),\n [`\n ${sameLevelPrefix}${motionCls}-enter${motionCls}-enter-active,\n ${sameLevelPrefix}${motionCls}-appear${motionCls}-appear-active\n `]: {\n animationName: inKeyframes,\n animationPlayState: 'running'\n },\n [`${sameLevelPrefix}${motionCls}-leave${motionCls}-leave-active`]: {\n animationName: outKeyframes,\n animationPlayState: 'running',\n pointerEvents: 'none'\n }\n };\n};","import { Keyframes } from '@ant-design/cssinjs';\nimport { initMotion } from './motion';\nexport const fadeIn = new Keyframes('antFadeIn', {\n '0%': {\n opacity: 0\n },\n '100%': {\n opacity: 1\n }\n});\nexport const fadeOut = new Keyframes('antFadeOut', {\n '0%': {\n opacity: 1\n },\n '100%': {\n opacity: 0\n }\n});\nexport const initFadeMotion = function (token) {\n let sameLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n const {\n antCls\n } = token;\n const motionCls = `${antCls}-fade`;\n const sameLevelPrefix = sameLevel ? '&' : '';\n return [initMotion(motionCls, fadeIn, fadeOut, token.motionDurationMid, sameLevel), {\n [`\n ${sameLevelPrefix}${motionCls}-enter,\n ${sameLevelPrefix}${motionCls}-appear\n `]: {\n opacity: 0,\n animationTimingFunction: 'linear'\n },\n [`${sameLevelPrefix}${motionCls}-leave`]: {\n animationTimingFunction: 'linear'\n }\n }];\n};","import { Keyframes } from '@ant-design/cssinjs';\nimport { initMotion } from './motion';\nexport const zoomIn = new Keyframes('antZoomIn', {\n '0%': {\n transform: 'scale(0.2)',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 1\n }\n});\nexport const zoomOut = new Keyframes('antZoomOut', {\n '0%': {\n transform: 'scale(1)'\n },\n '100%': {\n transform: 'scale(0.2)',\n opacity: 0\n }\n});\nexport const zoomBigIn = new Keyframes('antZoomBigIn', {\n '0%': {\n transform: 'scale(0.8)',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 1\n }\n});\nexport const zoomBigOut = new Keyframes('antZoomBigOut', {\n '0%': {\n transform: 'scale(1)'\n },\n '100%': {\n transform: 'scale(0.8)',\n opacity: 0\n }\n});\nexport const zoomUpIn = new Keyframes('antZoomUpIn', {\n '0%': {\n transform: 'scale(0.8)',\n transformOrigin: '50% 0%',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1)',\n transformOrigin: '50% 0%'\n }\n});\nexport const zoomUpOut = new Keyframes('antZoomUpOut', {\n '0%': {\n transform: 'scale(1)',\n transformOrigin: '50% 0%'\n },\n '100%': {\n transform: 'scale(0.8)',\n transformOrigin: '50% 0%',\n opacity: 0\n }\n});\nexport const zoomLeftIn = new Keyframes('antZoomLeftIn', {\n '0%': {\n transform: 'scale(0.8)',\n transformOrigin: '0% 50%',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1)',\n transformOrigin: '0% 50%'\n }\n});\nexport const zoomLeftOut = new Keyframes('antZoomLeftOut', {\n '0%': {\n transform: 'scale(1)',\n transformOrigin: '0% 50%'\n },\n '100%': {\n transform: 'scale(0.8)',\n transformOrigin: '0% 50%',\n opacity: 0\n }\n});\nexport const zoomRightIn = new Keyframes('antZoomRightIn', {\n '0%': {\n transform: 'scale(0.8)',\n transformOrigin: '100% 50%',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1)',\n transformOrigin: '100% 50%'\n }\n});\nexport const zoomRightOut = new Keyframes('antZoomRightOut', {\n '0%': {\n transform: 'scale(1)',\n transformOrigin: '100% 50%'\n },\n '100%': {\n transform: 'scale(0.8)',\n transformOrigin: '100% 50%',\n opacity: 0\n }\n});\nexport const zoomDownIn = new Keyframes('antZoomDownIn', {\n '0%': {\n transform: 'scale(0.8)',\n transformOrigin: '50% 100%',\n opacity: 0\n },\n '100%': {\n transform: 'scale(1)',\n transformOrigin: '50% 100%'\n }\n});\nexport const zoomDownOut = new Keyframes('antZoomDownOut', {\n '0%': {\n transform: 'scale(1)',\n transformOrigin: '50% 100%'\n },\n '100%': {\n transform: 'scale(0.8)',\n transformOrigin: '50% 100%',\n opacity: 0\n }\n});\nconst zoomMotion = {\n zoom: {\n inKeyframes: zoomIn,\n outKeyframes: zoomOut\n },\n 'zoom-big': {\n inKeyframes: zoomBigIn,\n outKeyframes: zoomBigOut\n },\n 'zoom-big-fast': {\n inKeyframes: zoomBigIn,\n outKeyframes: zoomBigOut\n },\n 'zoom-left': {\n inKeyframes: zoomLeftIn,\n outKeyframes: zoomLeftOut\n },\n 'zoom-right': {\n inKeyframes: zoomRightIn,\n outKeyframes: zoomRightOut\n },\n 'zoom-up': {\n inKeyframes: zoomUpIn,\n outKeyframes: zoomUpOut\n },\n 'zoom-down': {\n inKeyframes: zoomDownIn,\n outKeyframes: zoomDownOut\n }\n};\nexport const initZoomMotion = (token, motionName) => {\n const {\n antCls\n } = token;\n const motionCls = `${antCls}-${motionName}`;\n const {\n inKeyframes,\n outKeyframes\n } = zoomMotion[motionName];\n return [initMotion(motionCls, inKeyframes, outKeyframes, motionName === 'zoom-big-fast' ? token.motionDurationFast : token.motionDurationMid), {\n [`\n ${motionCls}-enter,\n ${motionCls}-appear\n `]: {\n transform: 'scale(0)',\n opacity: 0,\n animationTimingFunction: token.motionEaseOutCirc,\n '&-prepare': {\n transform: 'none'\n }\n },\n [`${motionCls}-leave`]: {\n animationTimingFunction: token.motionEaseInOutCirc\n }\n }];\n};","\"use client\";\n\nimport { genFocusStyle, resetComponent } from '../../style';\nimport { initFadeMotion, initZoomMotion } from '../../style/motion';\nimport { genComponentStyleHook, mergeToken } from '../../theme/internal';\nfunction box(position) {\n return {\n position,\n inset: 0\n };\n}\nexport const genModalMaskStyle = token => {\n const {\n componentCls,\n antCls\n } = token;\n return [{\n [`${componentCls}-root`]: {\n [`${componentCls}${antCls}-zoom-enter, ${componentCls}${antCls}-zoom-appear`]: {\n // reset scale avoid mousePosition bug\n transform: 'none',\n opacity: 0,\n animationDuration: token.motionDurationSlow,\n // https://github.com/ant-design/ant-design/issues/11777\n userSelect: 'none'\n },\n // https://github.com/ant-design/ant-design/issues/37329\n // https://github.com/ant-design/ant-design/issues/40272\n [`${componentCls}${antCls}-zoom-leave ${componentCls}-content`]: {\n pointerEvents: 'none'\n },\n [`${componentCls}-mask`]: Object.assign(Object.assign({}, box('fixed')), {\n zIndex: token.zIndexPopupBase,\n height: '100%',\n backgroundColor: token.colorBgMask,\n pointerEvents: 'none',\n [`${componentCls}-hidden`]: {\n display: 'none'\n }\n }),\n [`${componentCls}-wrap`]: Object.assign(Object.assign({}, box('fixed')), {\n zIndex: token.zIndexPopupBase,\n overflow: 'auto',\n outline: 0,\n WebkitOverflowScrolling: 'touch',\n // Note: Firefox not support `:has` yet\n [`&:has(${componentCls}${antCls}-zoom-enter), &:has(${componentCls}${antCls}-zoom-appear)`]: {\n pointerEvents: 'none'\n }\n })\n }\n }, {\n [`${componentCls}-root`]: initFadeMotion(token)\n }];\n};\nconst genModalStyle = token => {\n const {\n componentCls\n } = token;\n return [\n // ======================== Root =========================\n {\n [`${componentCls}-root`]: {\n [`${componentCls}-wrap-rtl`]: {\n direction: 'rtl'\n },\n [`${componentCls}-centered`]: {\n textAlign: 'center',\n '&::before': {\n display: 'inline-block',\n width: 0,\n height: '100%',\n verticalAlign: 'middle',\n content: '\"\"'\n },\n [componentCls]: {\n top: 0,\n display: 'inline-block',\n paddingBottom: 0,\n textAlign: 'start',\n verticalAlign: 'middle'\n }\n },\n [`@media (max-width: ${token.screenSMMax})`]: {\n [componentCls]: {\n maxWidth: 'calc(100vw - 16px)',\n margin: `${token.marginXS} auto`\n },\n [`${componentCls}-centered`]: {\n [componentCls]: {\n flex: 1\n }\n }\n }\n }\n },\n // ======================== Modal ========================\n {\n [componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n pointerEvents: 'none',\n position: 'relative',\n top: 100,\n width: 'auto',\n maxWidth: `calc(100vw - ${token.margin * 2}px)`,\n margin: '0 auto',\n paddingBottom: token.paddingLG,\n [`${componentCls}-title`]: {\n margin: 0,\n color: token.titleColor,\n fontWeight: token.fontWeightStrong,\n fontSize: token.titleFontSize,\n lineHeight: token.titleLineHeight,\n wordWrap: 'break-word'\n },\n [`${componentCls}-content`]: {\n position: 'relative',\n backgroundColor: token.contentBg,\n backgroundClip: 'padding-box',\n border: 0,\n borderRadius: token.borderRadiusLG,\n boxShadow: token.boxShadow,\n pointerEvents: 'auto',\n padding: `${token.paddingMD}px ${token.paddingContentHorizontalLG}px`\n },\n [`${componentCls}-close`]: Object.assign({\n position: 'absolute',\n top: (token.modalHeaderHeight - token.modalCloseBtnSize) / 2,\n insetInlineEnd: (token.modalHeaderHeight - token.modalCloseBtnSize) / 2,\n zIndex: token.zIndexPopupBase + 10,\n padding: 0,\n color: token.modalCloseIconColor,\n fontWeight: token.fontWeightStrong,\n lineHeight: 1,\n textDecoration: 'none',\n background: 'transparent',\n borderRadius: token.borderRadiusSM,\n width: token.modalCloseBtnSize,\n height: token.modalCloseBtnSize,\n border: 0,\n outline: 0,\n cursor: 'pointer',\n transition: `color ${token.motionDurationMid}, background-color ${token.motionDurationMid}`,\n '&-x': {\n display: 'flex',\n fontSize: token.fontSizeLG,\n fontStyle: 'normal',\n lineHeight: `${token.modalCloseBtnSize}px`,\n justifyContent: 'center',\n textTransform: 'none',\n textRendering: 'auto'\n },\n '&:hover': {\n color: token.modalIconHoverColor,\n backgroundColor: token.wireframe ? 'transparent' : token.colorFillContent,\n textDecoration: 'none'\n },\n '&:active': {\n backgroundColor: token.wireframe ? 'transparent' : token.colorFillContentHover\n }\n }, genFocusStyle(token)),\n [`${componentCls}-header`]: {\n color: token.colorText,\n background: token.headerBg,\n borderRadius: `${token.borderRadiusLG}px ${token.borderRadiusLG}px 0 0`,\n marginBottom: token.marginXS\n },\n [`${componentCls}-body`]: {\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n wordWrap: 'break-word'\n },\n [`${componentCls}-footer`]: {\n textAlign: 'end',\n background: token.footerBg,\n marginTop: token.marginSM,\n [`${token.antCls}-btn + ${token.antCls}-btn:not(${token.antCls}-dropdown-trigger)`]: {\n marginBottom: 0,\n marginInlineStart: token.marginXS\n }\n },\n [`${componentCls}-open`]: {\n overflow: 'hidden'\n }\n })\n },\n // ======================== Pure =========================\n {\n [`${componentCls}-pure-panel`]: {\n top: 'auto',\n padding: 0,\n display: 'flex',\n flexDirection: 'column',\n [`${componentCls}-content,\n ${componentCls}-body,\n ${componentCls}-confirm-body-wrapper`]: {\n display: 'flex',\n flexDirection: 'column',\n flex: 'auto'\n },\n [`${componentCls}-confirm-body`]: {\n marginBottom: 'auto'\n }\n }\n }];\n};\nconst genWireframeStyle = token => {\n const {\n componentCls,\n antCls\n } = token;\n const confirmComponentCls = `${componentCls}-confirm`;\n return {\n [componentCls]: {\n [`${componentCls}-content`]: {\n padding: 0\n },\n [`${componentCls}-header`]: {\n padding: token.modalHeaderPadding,\n borderBottom: `${token.modalHeaderBorderWidth}px ${token.modalHeaderBorderStyle} ${token.modalHeaderBorderColorSplit}`,\n marginBottom: 0\n },\n [`${componentCls}-body`]: {\n padding: token.modalBodyPadding\n },\n [`${componentCls}-footer`]: {\n padding: `${token.modalFooterPaddingVertical}px ${token.modalFooterPaddingHorizontal}px`,\n borderTop: `${token.modalFooterBorderWidth}px ${token.modalFooterBorderStyle} ${token.modalFooterBorderColorSplit}`,\n borderRadius: `0 0 ${token.borderRadiusLG}px ${token.borderRadiusLG}px`,\n marginTop: 0\n }\n },\n [confirmComponentCls]: {\n [`${antCls}-modal-body`]: {\n padding: `${token.padding * 2}px ${token.padding * 2}px ${token.paddingLG}px`\n },\n [`${confirmComponentCls}-body > ${token.iconCls}`]: {\n marginInlineEnd: token.margin\n },\n [`${confirmComponentCls}-btns`]: {\n marginTop: token.marginLG\n }\n }\n };\n};\nconst genRTLStyle = token => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-root`]: {\n [`${componentCls}-wrap-rtl`]: {\n direction: 'rtl',\n [`${componentCls}-confirm-body`]: {\n direction: 'rtl'\n }\n }\n }\n };\n};\n// ============================== Export ==============================\nexport const prepareToken = token => {\n const headerPaddingVertical = token.padding;\n const headerFontSize = token.fontSizeHeading5;\n const headerLineHeight = token.lineHeightHeading5;\n const modalToken = mergeToken(token, {\n modalBodyPadding: token.paddingLG,\n modalHeaderPadding: `${headerPaddingVertical}px ${token.paddingLG}px`,\n modalHeaderBorderWidth: token.lineWidth,\n modalHeaderBorderStyle: token.lineType,\n modalHeaderBorderColorSplit: token.colorSplit,\n modalHeaderHeight: headerLineHeight * headerFontSize + headerPaddingVertical * 2,\n modalFooterBorderColorSplit: token.colorSplit,\n modalFooterBorderStyle: token.lineType,\n modalFooterPaddingVertical: token.paddingXS,\n modalFooterPaddingHorizontal: token.padding,\n modalFooterBorderWidth: token.lineWidth,\n modalIconHoverColor: token.colorIconHover,\n modalCloseIconColor: token.colorIcon,\n modalCloseBtnSize: token.fontSize * token.lineHeight,\n modalConfirmIconSize: token.fontSize * token.lineHeight\n });\n return modalToken;\n};\nexport const prepareComponentToken = token => ({\n footerBg: 'transparent',\n headerBg: token.colorBgElevated,\n titleLineHeight: token.lineHeightHeading5,\n titleFontSize: token.fontSizeHeading5,\n contentBg: token.colorBgElevated,\n titleColor: token.colorTextHeading\n});\nexport default genComponentStyleHook('Modal', token => {\n const modalToken = prepareToken(token);\n return [genModalStyle(modalToken), genRTLStyle(modalToken), genModalMaskStyle(modalToken), token.wireframe && genWireframeStyle(modalToken), initZoomMotion(modalToken, 'zoom')];\n}, prepareComponentToken);","\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport classNames from 'classnames';\nimport Dialog from 'rc-dialog';\nimport useClosable from '../_util/hooks/useClosable';\nimport { getTransitionName } from '../_util/motion';\nimport { canUseDocElement } from '../_util/styleChecker';\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider';\nimport { NoFormStyle } from '../form/context';\nimport { NoCompactStyle } from '../space/Compact';\nimport { usePanelRef } from '../watermark/context';\nimport { Footer, renderCloseIcon } from './shared';\nimport useStyle from './style';\nlet mousePosition;\n// ref: https://github.com/ant-design/ant-design/issues/15795\nconst getClickPosition = e => {\n mousePosition = {\n x: e.pageX,\n y: e.pageY\n };\n // 100ms 内发生过点击事件,则从点击位置动画展示\n // 否则直接 zoom 展示\n // 这样可以兼容非点击方式展开\n setTimeout(() => {\n mousePosition = null;\n }, 100);\n};\n// 只有点击事件支持从鼠标位置动画展开\nif (canUseDocElement()) {\n document.documentElement.addEventListener('click', getClickPosition, true);\n}\nconst Modal = props => {\n var _a;\n const {\n getPopupContainer: getContextPopupContainer,\n getPrefixCls,\n direction,\n modal\n } = React.useContext(ConfigContext);\n const handleCancel = e => {\n const {\n onCancel\n } = props;\n onCancel === null || onCancel === void 0 ? void 0 : onCancel(e);\n };\n const handleOk = e => {\n const {\n onOk\n } = props;\n onOk === null || onOk === void 0 ? void 0 : onOk(e);\n };\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Modal');\n [['visible', 'open'], ['bodyStyle', 'styles.body'], ['maskStyle', 'styles.mask']].forEach(_ref => {\n let [deprecatedName, newName] = _ref;\n warning.deprecated(!(deprecatedName in props), deprecatedName, newName);\n });\n }\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n open,\n wrapClassName,\n centered,\n getContainer,\n closeIcon,\n closable,\n focusTriggerAfterClose = true,\n style,\n // Deprecated\n visible,\n width = 520,\n footer,\n classNames: modalClassNames,\n styles: modalStyles\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"open\", \"wrapClassName\", \"centered\", \"getContainer\", \"closeIcon\", \"closable\", \"focusTriggerAfterClose\", \"style\", \"visible\", \"width\", \"footer\", \"classNames\", \"styles\"]);\n const prefixCls = getPrefixCls('modal', customizePrefixCls);\n const rootPrefixCls = getPrefixCls();\n // Style\n const [wrapSSR, hashId] = useStyle(prefixCls);\n const wrapClassNameExtended = classNames(wrapClassName, {\n [`${prefixCls}-centered`]: !!centered,\n [`${prefixCls}-wrap-rtl`]: direction === 'rtl'\n });\n const dialogFooter = footer !== null && /*#__PURE__*/React.createElement(Footer, Object.assign({}, props, {\n onOk: handleOk,\n onCancel: handleCancel\n }));\n const [mergedClosable, mergedCloseIcon] = useClosable(closable, closeIcon, icon => renderCloseIcon(prefixCls, icon), /*#__PURE__*/React.createElement(CloseOutlined, {\n className: `${prefixCls}-close-icon`\n }), true);\n // ============================ Refs ============================\n // Select `ant-modal-content` by `panelRef`\n const panelRef = usePanelRef(`.${prefixCls}-content`);\n // =========================== Render ===========================\n return wrapSSR( /*#__PURE__*/React.createElement(NoCompactStyle, null, /*#__PURE__*/React.createElement(NoFormStyle, {\n status: true,\n override: true\n }, /*#__PURE__*/React.createElement(Dialog, Object.assign({\n width: width\n }, restProps, {\n getContainer: getContainer === undefined ? getContextPopupContainer : getContainer,\n prefixCls: prefixCls,\n rootClassName: classNames(hashId, rootClassName),\n footer: dialogFooter,\n visible: open !== null && open !== void 0 ? open : visible,\n mousePosition: (_a = restProps.mousePosition) !== null && _a !== void 0 ? _a : mousePosition,\n onClose: handleCancel,\n closable: mergedClosable,\n closeIcon: mergedCloseIcon,\n focusTriggerAfterClose: focusTriggerAfterClose,\n transitionName: getTransitionName(rootPrefixCls, 'zoom', props.transitionName),\n maskTransitionName: getTransitionName(rootPrefixCls, 'fade', props.maskTransitionName),\n className: classNames(hashId, className, modal === null || modal === void 0 ? void 0 : modal.className),\n style: Object.assign(Object.assign({}, modal === null || modal === void 0 ? void 0 : modal.style), style),\n classNames: Object.assign(Object.assign({\n wrapper: wrapClassNameExtended\n }, modal === null || modal === void 0 ? void 0 : modal.classNames), modalClassNames),\n styles: Object.assign(Object.assign({}, modal === null || modal === void 0 ? void 0 : modal.styles), modalStyles),\n panelRef: panelRef\n })))));\n};\nexport default Modal;","\"use client\";\n\n// Style as confirm component\nimport { prepareComponentToken, prepareToken } from '.';\nimport { clearFix } from '../../style';\nimport { genSubStyleComponent } from '../../theme/internal';\n// ============================= Confirm ==============================\nconst genModalConfirmStyle = token => {\n const {\n componentCls,\n titleFontSize,\n titleLineHeight,\n modalConfirmIconSize,\n fontSize,\n lineHeight\n } = token;\n const confirmComponentCls = `${componentCls}-confirm`;\n const titleHeight = Math.round(titleFontSize * titleLineHeight);\n const contentHeight = Math.round(fontSize * lineHeight);\n return {\n [confirmComponentCls]: {\n '&-rtl': {\n direction: 'rtl'\n },\n [`${token.antCls}-modal-header`]: {\n display: 'none'\n },\n [`${confirmComponentCls}-body-wrapper`]: Object.assign({}, clearFix()),\n // ====================== Body ======================\n [`${confirmComponentCls}-body`]: {\n display: 'flex',\n flexWrap: 'nowrap',\n alignItems: 'start',\n [`> ${token.iconCls}`]: {\n flex: 'none',\n fontSize: modalConfirmIconSize,\n marginInlineEnd: token.marginSM,\n marginTop: (contentHeight - modalConfirmIconSize) / 2\n },\n [`&-has-title > ${token.iconCls}`]: {\n marginTop: (titleHeight - modalConfirmIconSize) / 2\n }\n },\n [`${confirmComponentCls}-paragraph`]: {\n display: 'flex',\n flexDirection: 'column',\n flex: 'auto',\n rowGap: token.marginXS,\n maxWidth: `calc(100% - ${token.modalConfirmIconSize + token.marginSM}px)`\n },\n [`${confirmComponentCls}-title`]: {\n color: token.colorTextHeading,\n fontWeight: token.fontWeightStrong,\n fontSize: titleFontSize,\n lineHeight: titleLineHeight\n },\n [`${confirmComponentCls}-content`]: {\n color: token.colorText,\n fontSize,\n lineHeight\n },\n // ===================== Footer =====================\n [`${confirmComponentCls}-btns`]: {\n textAlign: 'end',\n marginTop: token.marginSM,\n [`${token.antCls}-btn + ${token.antCls}-btn`]: {\n marginBottom: 0,\n marginInlineStart: token.marginXS\n }\n }\n },\n [`${confirmComponentCls}-error ${confirmComponentCls}-body > ${token.iconCls}`]: {\n color: token.colorError\n },\n [`${confirmComponentCls}-warning ${confirmComponentCls}-body > ${token.iconCls},\n ${confirmComponentCls}-confirm ${confirmComponentCls}-body > ${token.iconCls}`]: {\n color: token.colorWarning\n },\n [`${confirmComponentCls}-info ${confirmComponentCls}-body > ${token.iconCls}`]: {\n color: token.colorInfo\n },\n [`${confirmComponentCls}-success ${confirmComponentCls}-body > ${token.iconCls}`]: {\n color: token.colorSuccess\n }\n };\n};\n// ============================== Export ==============================\nexport default genSubStyleComponent(['Modal', 'confirm'], token => {\n const modalToken = prepareToken(token);\n return [genModalConfirmStyle(modalToken)];\n}, prepareComponentToken, {\n // confirm is weak than modal since no conflict here\n order: -1000\n});","\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport CheckCircleFilled from \"@ant-design/icons/es/icons/CheckCircleFilled\";\nimport CloseCircleFilled from \"@ant-design/icons/es/icons/CloseCircleFilled\";\nimport ExclamationCircleFilled from \"@ant-design/icons/es/icons/ExclamationCircleFilled\";\nimport InfoCircleFilled from \"@ant-design/icons/es/icons/InfoCircleFilled\";\nimport classNames from 'classnames';\nimport { getTransitionName } from '../_util/motion';\nimport { devUseWarning } from '../_util/warning';\nimport ConfigProvider from '../config-provider';\nimport { useLocale } from '../locale';\nimport CancelBtn from './components/ConfirmCancelBtn';\nimport OkBtn from './components/ConfirmOkBtn';\nimport { ModalContextProvider } from './context';\nimport Dialog from './Modal';\nimport ConfirmCmp from './style/confirmCmp';\nexport function ConfirmContent(props) {\n const {\n prefixCls,\n icon,\n okText,\n cancelText,\n confirmPrefixCls,\n type,\n okCancel,\n footer,\n // Legacy for static function usage\n locale: staticLocale\n } = props,\n resetProps = __rest(props, [\"prefixCls\", \"icon\", \"okText\", \"cancelText\", \"confirmPrefixCls\", \"type\", \"okCancel\", \"footer\", \"locale\"]);\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Modal');\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof icon === 'string' && icon.length > 2), 'breaking', `\\`icon\\` is using ReactNode instead of string naming in v4. Please check \\`${icon}\\` at https://ant.design/components/icon`) : void 0;\n }\n // Icon\n let mergedIcon = icon;\n // 支持传入{ icon: null }来隐藏`Modal.confirm`默认的Icon\n if (!icon && icon !== null) {\n switch (type) {\n case 'info':\n mergedIcon = /*#__PURE__*/React.createElement(InfoCircleFilled, null);\n break;\n case 'success':\n mergedIcon = /*#__PURE__*/React.createElement(CheckCircleFilled, null);\n break;\n case 'error':\n mergedIcon = /*#__PURE__*/React.createElement(CloseCircleFilled, null);\n break;\n default:\n mergedIcon = /*#__PURE__*/React.createElement(ExclamationCircleFilled, null);\n }\n }\n // 默认为 true,保持向下兼容\n const mergedOkCancel = okCancel !== null && okCancel !== void 0 ? okCancel : type === 'confirm';\n const autoFocusButton = props.autoFocusButton === null ? false : props.autoFocusButton || 'ok';\n const [locale] = useLocale('Modal');\n const mergedLocale = staticLocale || locale;\n // ================== Locale Text ==================\n const okTextLocale = okText || (mergedOkCancel ? mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.okText : mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.justOkText);\n const cancelTextLocale = cancelText || (mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.cancelText);\n // ================= Context Value =================\n const btnCtxValue = Object.assign({\n autoFocusButton,\n cancelTextLocale,\n okTextLocale,\n mergedOkCancel\n }, resetProps);\n const btnCtxValueMemo = React.useMemo(() => btnCtxValue, _toConsumableArray(Object.values(btnCtxValue)));\n // ====================== Footer Origin Node ======================\n const footerOriginNode = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CancelBtn, null), /*#__PURE__*/React.createElement(OkBtn, null));\n const hasTitle = props.title !== undefined && props.title !== null;\n const bodyCls = `${confirmPrefixCls}-body`;\n return /*#__PURE__*/React.createElement(\"div\", {\n className: `${confirmPrefixCls}-body-wrapper`\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(bodyCls, {\n [`${bodyCls}-has-title`]: hasTitle\n })\n }, mergedIcon, /*#__PURE__*/React.createElement(\"div\", {\n className: `${confirmPrefixCls}-paragraph`\n }, hasTitle && /*#__PURE__*/React.createElement(\"span\", {\n className: `${confirmPrefixCls}-title`\n }, props.title), /*#__PURE__*/React.createElement(\"div\", {\n className: `${confirmPrefixCls}-content`\n }, props.content))), footer === undefined || typeof footer === 'function' ? /*#__PURE__*/React.createElement(ModalContextProvider, {\n value: btnCtxValueMemo\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: `${confirmPrefixCls}-btns`\n }, typeof footer === 'function' ? footer(footerOriginNode, {\n OkBtn,\n CancelBtn\n }) : footerOriginNode)) : footer, /*#__PURE__*/React.createElement(ConfirmCmp, {\n prefixCls: prefixCls\n }));\n}\nconst ConfirmDialog = props => {\n const {\n close,\n zIndex,\n afterClose,\n open,\n keyboard,\n centered,\n getContainer,\n maskStyle,\n direction,\n prefixCls,\n wrapClassName,\n rootPrefixCls,\n iconPrefixCls,\n theme,\n bodyStyle,\n closable = false,\n closeIcon,\n modalRender,\n focusTriggerAfterClose,\n onConfirm\n } = props;\n if (process.env.NODE_ENV !== 'production') {\n const warning = devUseWarning('Modal');\n [['visible', 'open'], ['bodyStyle', 'styles.body'], ['maskStyle', 'styles.mask']].forEach(_ref => {\n let [deprecatedName, newName] = _ref;\n warning.deprecated(!(deprecatedName in props), deprecatedName, newName);\n });\n }\n const confirmPrefixCls = `${prefixCls}-confirm`;\n const width = props.width || 416;\n const style = props.style || {};\n const mask = props.mask === undefined ? true : props.mask;\n // 默认为 false,保持旧版默认行为\n const maskClosable = props.maskClosable === undefined ? false : props.maskClosable;\n const classString = classNames(confirmPrefixCls, `${confirmPrefixCls}-${props.type}`, {\n [`${confirmPrefixCls}-rtl`]: direction === 'rtl'\n }, props.className);\n return /*#__PURE__*/React.createElement(ConfigProvider, {\n prefixCls: rootPrefixCls,\n iconPrefixCls: iconPrefixCls,\n direction: direction,\n theme: theme\n }, /*#__PURE__*/React.createElement(Dialog, {\n prefixCls: prefixCls,\n className: classString,\n wrapClassName: classNames({\n [`${confirmPrefixCls}-centered`]: !!props.centered\n }, wrapClassName),\n onCancel: () => {\n close === null || close === void 0 ? void 0 : close({\n triggerCancel: true\n });\n onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(false);\n },\n open: open,\n title: \"\",\n footer: null,\n transitionName: getTransitionName(rootPrefixCls || '', 'zoom', props.transitionName),\n maskTransitionName: getTransitionName(rootPrefixCls || '', 'fade', props.maskTransitionName),\n mask: mask,\n maskClosable: maskClosable,\n style: style,\n styles: {\n body: bodyStyle,\n mask: maskStyle\n },\n width: width,\n zIndex: zIndex,\n afterClose: afterClose,\n keyboard: keyboard,\n centered: centered,\n getContainer: getContainer,\n closable: closable,\n closeIcon: closeIcon,\n modalRender: modalRender,\n focusTriggerAfterClose: focusTriggerAfterClose\n }, /*#__PURE__*/React.createElement(ConfirmContent, Object.assign({}, props, {\n confirmPrefixCls: confirmPrefixCls\n }))));\n};\nif (process.env.NODE_ENV !== 'production') {\n ConfirmDialog.displayName = 'ConfirmDialog';\n}\nexport default ConfirmDialog;","const destroyFns = [];\nexport default destroyFns;","\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { render as reactRender, unmount as reactUnmount } from \"rc-util/es/React/render\";\nimport * as React from 'react';\nimport warning from '../_util/warning';\nimport { globalConfig, warnContext } from '../config-provider';\nimport ConfirmDialog from './ConfirmDialog';\nimport destroyFns from './destroyFns';\nimport { getConfirmLocale } from './locale';\nlet defaultRootPrefixCls = '';\nfunction getRootPrefixCls() {\n return defaultRootPrefixCls;\n}\nexport default function confirm(config) {\n // Warning if exist theme\n if (process.env.NODE_ENV !== 'production') {\n warnContext('Modal');\n }\n const container = document.createDocumentFragment();\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n let currentConfig = Object.assign(Object.assign({}, config), {\n close,\n open: true\n });\n let timeoutId;\n function destroy() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n const triggerCancel = args.some(param => param && param.triggerCancel);\n if (config.onCancel && triggerCancel) {\n config.onCancel.apply(config, [() => {}].concat(_toConsumableArray(args.slice(1))));\n }\n for (let i = 0; i < destroyFns.length; i++) {\n const fn = destroyFns[i];\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n if (fn === close) {\n destroyFns.splice(i, 1);\n break;\n }\n }\n reactUnmount(container);\n }\n function render(_a) {\n var {\n okText,\n cancelText,\n prefixCls: customizePrefixCls,\n getContainer\n } = _a,\n props = __rest(_a, [\"okText\", \"cancelText\", \"prefixCls\", \"getContainer\"]);\n clearTimeout(timeoutId);\n /**\n * https://github.com/ant-design/ant-design/issues/23623\n *\n * Sync render blocks React event. Let's make this async.\n */\n timeoutId = setTimeout(() => {\n const runtimeLocale = getConfirmLocale();\n const {\n getPrefixCls,\n getIconPrefixCls,\n getTheme\n } = globalConfig();\n // because Modal.config \b set rootPrefixCls, which is different from other components\n const rootPrefixCls = getPrefixCls(undefined, getRootPrefixCls());\n const prefixCls = customizePrefixCls || `${rootPrefixCls}-modal`;\n const iconPrefixCls = getIconPrefixCls();\n const theme = getTheme();\n let mergedGetContainer = getContainer;\n if (mergedGetContainer === false) {\n mergedGetContainer = undefined;\n if (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Modal', 'Static method not support `getContainer` to be `false` since it do not have context env.') : void 0;\n }\n }\n reactRender( /*#__PURE__*/React.createElement(ConfirmDialog, Object.assign({}, props, {\n getContainer: mergedGetContainer,\n prefixCls: prefixCls,\n rootPrefixCls: rootPrefixCls,\n iconPrefixCls: iconPrefixCls,\n okText: okText,\n locale: runtimeLocale,\n theme: theme,\n cancelText: cancelText || runtimeLocale.cancelText\n })), container);\n });\n }\n function close() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n currentConfig = Object.assign(Object.assign({}, currentConfig), {\n open: false,\n afterClose: () => {\n if (typeof config.afterClose === 'function') {\n config.afterClose();\n }\n destroy.apply(this, args);\n }\n });\n // Legacy support\n if (currentConfig.visible) {\n delete currentConfig.visible;\n }\n render(currentConfig);\n }\n function update(configUpdate) {\n if (typeof configUpdate === 'function') {\n currentConfig = configUpdate(currentConfig);\n } else {\n currentConfig = Object.assign(Object.assign({}, currentConfig), configUpdate);\n }\n render(currentConfig);\n }\n render(currentConfig);\n destroyFns.push(close);\n return {\n destroy: close,\n update\n };\n}\nexport function withWarn(props) {\n return Object.assign(Object.assign({}, props), {\n type: 'warning'\n });\n}\nexport function withInfo(props) {\n return Object.assign(Object.assign({}, props), {\n type: 'info'\n });\n}\nexport function withSuccess(props) {\n return Object.assign(Object.assign({}, props), {\n type: 'success'\n });\n}\nexport function withError(props) {\n return Object.assign(Object.assign({}, props), {\n type: 'error'\n });\n}\nexport function withConfirm(props) {\n return Object.assign(Object.assign({}, props), {\n type: 'confirm'\n });\n}\nexport function modalGlobalConfig(_ref) {\n let {\n rootPrefixCls\n } = _ref;\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Modal', 'Modal.config is deprecated. Please use ConfigProvider.config instead.') : void 0;\n defaultRootPrefixCls = rootPrefixCls;\n}","\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport { ConfigContext } from '../../config-provider';\nimport defaultLocale from '../../locale/en_US';\nimport useLocale from '../../locale/useLocale';\nimport ConfirmDialog from '../ConfirmDialog';\nconst HookModal = (_a, ref) => {\n var _b;\n var {\n afterClose: hookAfterClose,\n config\n } = _a,\n restProps = __rest(_a, [\"afterClose\", \"config\"]);\n const [open, setOpen] = React.useState(true);\n const [innerConfig, setInnerConfig] = React.useState(config);\n const {\n direction,\n getPrefixCls\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('modal');\n const rootPrefixCls = getPrefixCls();\n const afterClose = () => {\n var _a;\n hookAfterClose();\n (_a = innerConfig.afterClose) === null || _a === void 0 ? void 0 : _a.call(innerConfig);\n };\n const close = function () {\n setOpen(false);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n const triggerCancel = args.some(param => param && param.triggerCancel);\n if (innerConfig.onCancel && triggerCancel) {\n innerConfig.onCancel.apply(innerConfig, [() => {}].concat(_toConsumableArray(args.slice(1))));\n }\n };\n React.useImperativeHandle(ref, () => ({\n destroy: close,\n update: newConfig => {\n setInnerConfig(originConfig => Object.assign(Object.assign({}, originConfig), newConfig));\n }\n }));\n const mergedOkCancel = (_b = innerConfig.okCancel) !== null && _b !== void 0 ? _b : innerConfig.type === 'confirm';\n const [contextLocale] = useLocale('Modal', defaultLocale.Modal);\n return /*#__PURE__*/React.createElement(ConfirmDialog, Object.assign({\n prefixCls: prefixCls,\n rootPrefixCls: rootPrefixCls\n }, innerConfig, {\n close: close,\n open: open,\n afterClose: afterClose,\n okText: innerConfig.okText || (mergedOkCancel ? contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.okText : contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.justOkText),\n direction: innerConfig.direction || direction,\n cancelText: innerConfig.cancelText || (contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.cancelText)\n }, restProps));\n};\nexport default /*#__PURE__*/React.forwardRef(HookModal);","\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport usePatchElement from '../../_util/hooks/usePatchElement';\nimport { withConfirm, withError, withInfo, withSuccess, withWarn } from '../confirm';\nimport destroyFns from '../destroyFns';\nimport HookModal from './HookModal';\nlet uuid = 0;\nconst ElementsHolder = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef((_props, ref) => {\n const [elements, patchElement] = usePatchElement();\n React.useImperativeHandle(ref, () => ({\n patchElement\n }), []);\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return /*#__PURE__*/React.createElement(React.Fragment, null, elements);\n}));\nfunction useModal() {\n const holderRef = React.useRef(null);\n // ========================== Effect ==========================\n const [actionQueue, setActionQueue] = React.useState([]);\n React.useEffect(() => {\n if (actionQueue.length) {\n const cloneQueue = _toConsumableArray(actionQueue);\n cloneQueue.forEach(action => {\n action();\n });\n setActionQueue([]);\n }\n }, [actionQueue]);\n // =========================== Hook ===========================\n const getConfirmFunc = React.useCallback(withFunc => function hookConfirm(config) {\n var _a;\n uuid += 1;\n const modalRef = /*#__PURE__*/React.createRef();\n // Proxy to promise with `onClose`\n let resolvePromise;\n const promise = new Promise(resolve => {\n resolvePromise = resolve;\n });\n let silent = false;\n let closeFunc;\n const modal = /*#__PURE__*/React.createElement(HookModal, {\n key: `modal-${uuid}`,\n config: withFunc(config),\n ref: modalRef,\n afterClose: () => {\n closeFunc === null || closeFunc === void 0 ? void 0 : closeFunc();\n },\n isSilent: () => silent,\n onConfirm: confirmed => {\n resolvePromise(confirmed);\n }\n });\n closeFunc = (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.patchElement(modal);\n if (closeFunc) {\n destroyFns.push(closeFunc);\n }\n const instance = {\n destroy: () => {\n function destroyAction() {\n var _a;\n (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.destroy();\n }\n if (modalRef.current) {\n destroyAction();\n } else {\n setActionQueue(prev => [].concat(_toConsumableArray(prev), [destroyAction]));\n }\n },\n update: newConfig => {\n function updateAction() {\n var _a;\n (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.update(newConfig);\n }\n if (modalRef.current) {\n updateAction();\n } else {\n setActionQueue(prev => [].concat(_toConsumableArray(prev), [updateAction]));\n }\n },\n then: resolve => {\n silent = true;\n return promise.then(resolve);\n }\n };\n return instance;\n }, []);\n const fns = React.useMemo(() => ({\n info: getConfirmFunc(withInfo),\n success: getConfirmFunc(withSuccess),\n error: getConfirmFunc(withError),\n warning: getConfirmFunc(withWarn),\n confirm: getConfirmFunc(withConfirm)\n }), []);\n return [fns, /*#__PURE__*/React.createElement(ElementsHolder, {\n key: \"modal-holder\",\n ref: holderRef\n })];\n}\nexport default useModal;","\"use client\";\n\nimport useMergedState from \"rc-util/es/hooks/useMergedState\";\nimport * as React from 'react';\nimport ConfigProvider, { ConfigContext } from '../config-provider';\nexport function withPureRenderTheme(Component) {\n return function PureRenderThemeComponent(props) {\n return /*#__PURE__*/React.createElement(ConfigProvider, {\n theme: {\n token: {\n motion: false,\n zIndexPopupBase: 0\n }\n }\n }, /*#__PURE__*/React.createElement(Component, Object.assign({}, props)));\n };\n}\n/* istanbul ignore next */\nexport default function genPurePanel(Component, defaultPrefixCls, getDropdownCls, postProps) {\n function PurePanel(props) {\n const {\n prefixCls: customizePrefixCls,\n style\n } = props;\n const holderRef = React.useRef(null);\n const [popupHeight, setPopupHeight] = React.useState(0);\n const [popupWidth, setPopupWidth] = React.useState(0);\n const [open, setOpen] = useMergedState(false, {\n value: props.open\n });\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls(defaultPrefixCls || 'select', customizePrefixCls);\n React.useEffect(() => {\n // We do not care about ssr\n setOpen(true);\n if (typeof ResizeObserver !== 'undefined') {\n const resizeObserver = new ResizeObserver(entries => {\n const element = entries[0].target;\n setPopupHeight(element.offsetHeight + 8);\n setPopupWidth(element.offsetWidth);\n });\n const interval = setInterval(() => {\n var _a;\n const dropdownCls = getDropdownCls ? `.${getDropdownCls(prefixCls)}` : `.${prefixCls}-dropdown`;\n const popup = (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(dropdownCls);\n if (popup) {\n clearInterval(interval);\n resizeObserver.observe(popup);\n }\n }, 10);\n return () => {\n clearInterval(interval);\n resizeObserver.disconnect();\n };\n }\n }, []);\n let mergedProps = Object.assign(Object.assign({}, props), {\n style: Object.assign(Object.assign({}, style), {\n margin: 0\n }),\n open,\n visible: open,\n getPopupContainer: () => holderRef.current\n });\n if (postProps) {\n mergedProps = postProps(mergedProps);\n }\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: holderRef,\n style: {\n paddingBottom: popupHeight,\n position: 'relative',\n minWidth: popupWidth\n }\n }, /*#__PURE__*/React.createElement(Component, Object.assign({}, mergedProps)));\n }\n return withPureRenderTheme(PurePanel);\n}","\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport * as React from 'react';\nimport { render } from \"rc-util/es/React/render\";\nimport ConfigProvider, { globalConfig, warnContext } from '../config-provider';\nimport PurePanel from './PurePanel';\nimport useMessage, { useInternalMessage } from './useMessage';\nimport { wrapPromiseFn } from './util';\nlet message = null;\nlet act = callback => callback();\nlet taskQueue = [];\nlet defaultGlobalConfig = {};\nfunction getGlobalContext() {\n const {\n prefixCls: globalPrefixCls,\n getContainer: globalGetContainer,\n duration,\n rtl,\n maxCount,\n top\n } = defaultGlobalConfig;\n const mergedPrefixCls = globalPrefixCls !== null && globalPrefixCls !== void 0 ? globalPrefixCls : globalConfig().getPrefixCls('message');\n const mergedContainer = (globalGetContainer === null || globalGetContainer === void 0 ? void 0 : globalGetContainer()) || document.body;\n return {\n prefixCls: mergedPrefixCls,\n getContainer: () => mergedContainer,\n duration,\n rtl,\n maxCount,\n top\n };\n}\nconst GlobalHolder = /*#__PURE__*/React.forwardRef((_, ref) => {\n const [messageConfig, setMessageConfig] = React.useState(getGlobalContext);\n const [api, holder] = useInternalMessage(messageConfig);\n const global = globalConfig();\n const rootPrefixCls = global.getRootPrefixCls();\n const rootIconPrefixCls = global.getIconPrefixCls();\n const theme = global.getTheme();\n const sync = () => {\n setMessageConfig(getGlobalContext);\n };\n React.useEffect(sync, []);\n React.useImperativeHandle(ref, () => {\n const instance = Object.assign({}, api);\n Object.keys(instance).forEach(method => {\n instance[method] = function () {\n sync();\n return api[method].apply(api, arguments);\n };\n });\n return {\n instance,\n sync\n };\n });\n return /*#__PURE__*/React.createElement(ConfigProvider, {\n prefixCls: rootPrefixCls,\n iconPrefixCls: rootIconPrefixCls,\n theme: theme\n }, holder);\n});\nfunction flushNotice() {\n if (!message) {\n const holderFragment = document.createDocumentFragment();\n const newMessage = {\n fragment: holderFragment\n };\n message = newMessage;\n // Delay render to avoid sync issue\n act(() => {\n render( /*#__PURE__*/React.createElement(GlobalHolder, {\n ref: node => {\n const {\n instance,\n sync\n } = node || {};\n // React 18 test env will throw if call immediately in ref\n Promise.resolve().then(() => {\n if (!newMessage.instance && instance) {\n newMessage.instance = instance;\n newMessage.sync = sync;\n flushNotice();\n }\n });\n }\n }), holderFragment);\n });\n return;\n }\n // Notification not ready\n if (!message.instance) {\n return;\n }\n // >>> Execute task\n taskQueue.forEach(task => {\n const {\n type,\n skipped\n } = task;\n // Only `skipped` when user call notice but cancel it immediately\n // and instance not ready\n if (!skipped) {\n switch (type) {\n case 'open':\n {\n act(() => {\n const closeFn = message.instance.open(Object.assign(Object.assign({}, defaultGlobalConfig), task.config));\n closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);\n task.setCloseFn(closeFn);\n });\n break;\n }\n case 'destroy':\n act(() => {\n message === null || message === void 0 ? void 0 : message.instance.destroy(task.key);\n });\n break;\n // Other type open\n default:\n {\n act(() => {\n var _message$instance;\n const closeFn = (_message$instance = message.instance)[type].apply(_message$instance, _toConsumableArray(task.args));\n closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);\n task.setCloseFn(closeFn);\n });\n }\n }\n }\n });\n // Clean up\n taskQueue = [];\n}\n// ==============================================================================\n// == Export ==\n// ==============================================================================\nfunction setMessageGlobalConfig(config) {\n defaultGlobalConfig = Object.assign(Object.assign({}, defaultGlobalConfig), config);\n // Trigger sync for it\n act(() => {\n var _a;\n (_a = message === null || message === void 0 ? void 0 : message.sync) === null || _a === void 0 ? void 0 : _a.call(message);\n });\n}\nfunction open(config) {\n const result = wrapPromiseFn(resolve => {\n let closeFn;\n const task = {\n type: 'open',\n config,\n resolve,\n setCloseFn: fn => {\n closeFn = fn;\n }\n };\n taskQueue.push(task);\n return () => {\n if (closeFn) {\n act(() => {\n closeFn();\n });\n } else {\n task.skipped = true;\n }\n };\n });\n flushNotice();\n return result;\n}\nfunction typeOpen(type, args) {\n // Warning if exist theme\n if (process.env.NODE_ENV !== 'production') {\n warnContext('message');\n }\n const result = wrapPromiseFn(resolve => {\n let closeFn;\n const task = {\n type,\n args,\n resolve,\n setCloseFn: fn => {\n closeFn = fn;\n }\n };\n taskQueue.push(task);\n return () => {\n if (closeFn) {\n act(() => {\n closeFn();\n });\n } else {\n task.skipped = true;\n }\n };\n });\n flushNotice();\n return result;\n}\nfunction destroy(key) {\n taskQueue.push({\n type: 'destroy',\n key\n });\n flushNotice();\n}\nconst methods = ['success', 'info', 'warning', 'error', 'loading'];\nconst baseStaticMethods = {\n open,\n destroy,\n config: setMessageGlobalConfig,\n useMessage,\n _InternalPanelDoNotUseOrYouWillBeFired: PurePanel\n};\nconst staticMethods = baseStaticMethods;\nmethods.forEach(type => {\n staticMethods[type] = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return typeOpen(type, args);\n };\n});\n// ==============================================================================\n// == Test ==\n// ==============================================================================\nconst noop = () => {};\n/** @internal Only Work in test env */\n// eslint-disable-next-line import/no-mutable-exports\nexport let actWrapper = noop;\nif (process.env.NODE_ENV === 'test') {\n actWrapper = wrapper => {\n act = wrapper;\n };\n}\n/** @internal Only Work in test env */\n// eslint-disable-next-line import/no-mutable-exports\nexport let actDestroy = noop;\nif (process.env.NODE_ENV === 'test') {\n actDestroy = () => {\n message = null;\n };\n}\nexport default staticMethods;","\"use client\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n/* eslint-disable react/jsx-no-useless-fragment */\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Panel } from 'rc-dialog';\nimport { withPureRenderTheme } from '../_util/PurePanel';\nimport { ConfigContext } from '../config-provider';\nimport { ConfirmContent } from './ConfirmDialog';\nimport { Footer, renderCloseIcon } from './shared';\nimport useStyle from './style';\nconst PurePanel = props => {\n const {\n prefixCls: customizePrefixCls,\n className,\n closeIcon,\n closable,\n type,\n title,\n children\n } = props,\n restProps = __rest(props, [\"prefixCls\", \"className\", \"closeIcon\", \"closable\", \"type\", \"title\", \"children\"]);\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const rootPrefixCls = getPrefixCls();\n const prefixCls = customizePrefixCls || getPrefixCls('modal');\n const [, hashId] = useStyle(prefixCls);\n const confirmPrefixCls = `${prefixCls}-confirm`;\n // Choose target props by confirm mark\n let additionalProps = {};\n if (type) {\n additionalProps = {\n closable: closable !== null && closable !== void 0 ? closable : false,\n title: '',\n footer: '',\n children: /*#__PURE__*/React.createElement(ConfirmContent, Object.assign({}, props, {\n prefixCls: prefixCls,\n confirmPrefixCls: confirmPrefixCls,\n rootPrefixCls: rootPrefixCls,\n content: children\n }))\n };\n } else {\n additionalProps = {\n closable: closable !== null && closable !== void 0 ? closable : true,\n title,\n footer: props.footer === undefined ? /*#__PURE__*/React.createElement(Footer, Object.assign({}, props)) : props.footer,\n children\n };\n }\n return /*#__PURE__*/React.createElement(Panel, Object.assign({\n prefixCls: prefixCls,\n className: classNames(hashId, `${prefixCls}-pure-panel`, type && confirmPrefixCls, type && `${confirmPrefixCls}-${type}`, className)\n }, restProps, {\n closeIcon: renderCloseIcon(prefixCls, closeIcon),\n closable: closable\n }, additionalProps));\n};\nexport default withPureRenderTheme(PurePanel);","\"use client\";\n\nimport confirm, { modalGlobalConfig, withConfirm, withError, withInfo, withSuccess, withWarn } from './confirm';\nimport destroyFns from './destroyFns';\nimport OriginModal from './Modal';\nimport PurePanel from './PurePanel';\nimport useModal from './useModal';\nfunction modalWarn(props) {\n return confirm(withWarn(props));\n}\nconst Modal = OriginModal;\nModal.useModal = useModal;\nModal.info = function infoFn(props) {\n return confirm(withInfo(props));\n};\nModal.success = function successFn(props) {\n return confirm(withSuccess(props));\n};\nModal.error = function errorFn(props) {\n return confirm(withError(props));\n};\nModal.warning = modalWarn;\nModal.warn = modalWarn;\nModal.confirm = function confirmFn(props) {\n return confirm(withConfirm(props));\n};\nModal.destroyAll = function destroyAllFn() {\n while (destroyFns.length) {\n const close = destroyFns.pop();\n if (close) {\n close();\n }\n }\n};\nModal.config = modalGlobalConfig;\nModal._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;\nif (process.env.NODE_ENV !== 'production') {\n Modal.displayName = 'Modal';\n}\nexport default Modal;","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n","\"use strict\";\n\nvar deselectCurrent = require(\"toggle-selection\");\n\nvar clipboardToIE11Formatting = {\n \"text/plain\": \"Text\",\n \"text/html\": \"Url\",\n \"default\": \"Text\"\n}\n\nvar defaultMessage = \"Copy to clipboard: #{key}, Enter\";\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? \"⌘\" : \"Ctrl\") + \"+C\";\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug,\n message,\n reselectPrevious,\n range,\n selection,\n mark,\n success = false;\n if (!options) {\n options = {};\n }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement(\"span\");\n mark.textContent = text;\n // avoid screen readers from reading out loud the text\n mark.ariaHidden = \"true\"\n // reset user styles for span element\n mark.style.all = \"unset\";\n // prevents scrolling to the end of the page\n mark.style.position = \"fixed\";\n mark.style.top = 0;\n mark.style.clip = \"rect(0, 0, 0, 0)\";\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = \"pre\";\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = \"text\";\n mark.style.MozUserSelect = \"text\";\n mark.style.msUserSelect = \"text\";\n mark.style.userSelect = \"text\";\n mark.addEventListener(\"copy\", function(e) {\n e.stopPropagation();\n if (options.format) {\n e.preventDefault();\n if (typeof e.clipboardData === \"undefined\") { // IE 11\n debug && console.warn(\"unable to use e.clipboardData\");\n debug && console.warn(\"trying IE specific stuff\");\n window.clipboardData.clearData();\n var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting[\"default\"]\n window.clipboardData.setData(format, text);\n } else { // all other browsers\n e.clipboardData.clearData();\n e.clipboardData.setData(options.format, text);\n }\n }\n if (options.onCopy) {\n e.preventDefault();\n options.onCopy(e.clipboardData);\n }\n });\n\n document.body.appendChild(mark);\n\n range.selectNodeContents(mark);\n selection.addRange(range);\n\n var successful = document.execCommand(\"copy\");\n if (!successful) {\n throw new Error(\"copy command was unsuccessful\");\n }\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using execCommand: \", err);\n debug && console.warn(\"trying IE specific stuff\");\n try {\n window.clipboardData.setData(options.format || \"text\", text);\n options.onCopy && options.onCopy(window.clipboardData);\n success = true;\n } catch (err) {\n debug && console.error(\"unable to copy using clipboardData: \", err);\n debug && console.error(\"falling back to prompt\");\n message = format(\"message\" in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == \"function\") {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n","import { getComponentValue } from \"@latticexyz/recs\";\nimport { ClientComponents } from \"./createClientComponents\";\nimport { SetupNetworkResult } from \"./setupNetwork\";\nimport { singletonEntity, encodeEntity } from \"@latticexyz/store-sync/recs\";\nimport { message } from 'antd';\n\nlet wait = false;\n\nexport type SystemCalls = ReturnType;\n\nexport function createSystemCalls(\n { worldContract, waitForTransaction }: SetupNetworkResult,\n ClientComponents\n) {\n const { Counter, Player, LootList1, LootList2, BoxList, BattleList } = ClientComponents;\n const increment = async () => {\n const tx = await worldContract.write.increment();\n await waitForTransaction(tx);\n return getComponentValue(Counter, singletonEntity);\n };\n\n const move = async (steps: any) => {\n if (wait) return\n wait = true\n console.log('move', new Date().getTime());\n try {\n const tx = await worldContract.write.move([steps]);\n await waitForTransaction(tx);\n console.log('move success', new Date().getTime(), tx);\n wait = false\n } catch (error) {\n console.log('move', error);\n message.error(error.cause.reason || error.cause.details);\n wait = false\n }\n \n // return getComponentValue(Player, singletonEntity);\n };\n\n const getPosition = async (address) => {\n const tx = await worldContract.read.getPosition([address]);\n const result = await waitForTransaction(tx);\n await waitForTransaction(tx);\n };\n\n const joinBattlefield = async () => {\n console.log('joinBattlefield', new Date().getTime());\n try {\n const tx = await worldContract.write.joinBattlefield();\n await waitForTransaction(tx);\n console.log('joinBattlefield success', new Date().getTime(), tx);\n return tx\n } catch (error) {\n console.log('joinBattlefield', error);\n message.error(error.cause.reason || error.cause.details);\n }\n }\n\n const transfer = async (addr: any, transferData: any) => {\n console.log('transfer', new Date().getTime());\n try {\n const tx = await worldContract.write.transfer([addr, ...transferData]);\n await waitForTransaction(tx);\n console.log('transfer success', new Date().getTime(), tx);\n } catch (error) {\n console.log('transfer', error);\n message.error(error.cause.reason || error.cause.details);\n }\n }\n\n const battleInvitation = async (addr: any, steps: any) => {\n if (wait) return\n wait = true\n console.log('battleInvitation', new Date().getTime());\n try {\n const tx = await worldContract.write.battleInvitation([addr, steps]);\n await waitForTransaction(tx);\n console.log('battleInvitation success', new Date().getTime(), tx);\n wait = false\n return tx\n } catch (error) {\n console.log('battleInvitation', error);\n message.error(error.cause.reason || error.cause.details);\n wait = false\n }\n }\n\n const confirmBattle = async (buffHash: any, battleId: any) => {\n if (wait) return\n wait = true\n console.log('confirmBattle', new Date().getTime());\n try {\n const tx = await worldContract.write.confirmBattle([buffHash, battleId]);\n await waitForTransaction(tx);\n console.log('confirmBattle success', new Date().getTime(), tx);\n wait = false\n return {\n type: 'success',\n data: getComponentValue(BattleList, encodeEntity({ battleId: \"uint256\" }, { battleId: battleId}))\n }\n } catch (error) {\n console.log('confirmBattle', error);\n message.error(error.cause.reason || error.cause.details);\n wait = false\n return {\n type: 'error',\n msg: error.cause.reason || error.cause.details || error.cause\n }\n }\n \n }\n\n const revealBattle = async (battleId: any, action: any, arg: any, nonce: any) => {\n if (wait) return\n wait = true\n console.log('revealBattle', new Date().getTime());\n try {\n const tx = await worldContract.write.revealBattle([battleId, action, arg, nonce]);\n await waitForTransaction(tx);\n console.log('revealBattle success', new Date().getTime(), tx);\n wait = false\n return {\n type: 'success',\n data: getComponentValue(BattleList, encodeEntity({ battleId: \"uint256\" }, { battleId: battleId}))\n }\n } catch (error) {\n console.log('revealBattle', error);\n message.error(error.cause.reason || error.cause.details);\n wait = false\n return {\n type: 'error',\n msg: error.cause.reason || error.cause.details || error.cause\n }\n }\n }\n\n const selectBothNFT = async (userTokenId: any, lootTokenId: any, address: any) => {\n console.log('selectBothNFT', new Date().getTime());\n try {\n const tx = await worldContract.write.selectBothNFT([userTokenId, lootTokenId]);\n await waitForTransaction(tx);\n console.log('selectBothNFT success', new Date().getTime(), tx);\n return {\n playerData: getComponentValue(Player, encodeEntity({ addr: \"address\" }, { addr: address})),\n lootData: getComponentValue(LootList1, encodeEntity({ addr: \"address\" }, { addr: address})),\n }\n } catch (error) {\n console.log('selectUserNft', error);\n message.error(error.cause.reason || error.cause.details);\n }\n }\n\n const selectUserNft = async (tokenId: any, address: any) => {\n console.log('selectUserNft', new Date().getTime());\n try {\n const tx = await worldContract.write.selectUserNft([tokenId]);\n await waitForTransaction(tx);\n console.log('selectUserNft success', new Date().getTime(), tx);\n return getComponentValue(Player, encodeEntity({ addr: \"address\" }, { addr: address}));\n } catch (error) {\n console.log('selectUserNft', error);\n message.error(error.cause.reason || error.cause.details);\n }\n }\n\n const selectLootNFT = async (tokenId: any, address: any) => {\n console.log('selectLootNFT', new Date().getTime());\n try {\n const tx = await worldContract.write.selectLootNFT([tokenId]);\n await waitForTransaction(tx);\n console.log('selectLootNFT success', new Date().getTime(), tx);\n let LootList1Data = getComponentValue(LootList1, encodeEntity({ addr: \"address\" }, { addr: address}));\n // let LootList2Data = getComponentValue(LootList2, encodeEntity({ addr: \"address\" }, { addr: address}));\n return LootList1Data\n } catch (error) {\n console.log('selectLootNFT', error);\n message.error(error.cause.reason || error.cause.details);\n }\n }\n\n const openBox = async (boxId: any) => {\n if (wait) return\n wait = true\n console.log('openBox', new Date().getTime());\n try {\n const tx = await worldContract.write.openBox([boxId]);\n await waitForTransaction(tx);\n console.log('openBox success', new Date().getTime(), tx);\n wait = false\n } catch (error) {\n console.log('openBox', error);\n message.error(error.cause.reason || error.cause.details);\n wait = false\n }\n }\n\n const revealBox = async (boxId: any) => {\n if (wait) return\n wait = true\n console.log('revealBox', new Date().getTime());\n try {\n const tx = await worldContract.write.revealBox([boxId]);\n await waitForTransaction(tx);\n console.log('revealBox success', new Date().getTime(), tx);\n wait = false\n return getComponentValue(BoxList, encodeEntity({ boxId: \"uint256\" }, { boxId: boxId}));\n } catch (error) {\n console.log('revealBox', error);\n message.error(error.cause.reason || error.cause.details);\n wait = false\n }\n }\n\n const getCollections = async (boxId: any, oreAmount: any, treasureAmount: any) => {\n if (wait) return\n wait = true\n try {\n const tx = await worldContract.write.getCollections([boxId, oreAmount, treasureAmount]);\n await waitForTransaction(tx);\n wait = false\n } catch (error) {\n console.log('getCollections', error);\n message.error(error.cause.reason || error.cause.details);\n wait = false\n }\n }\n\n const CreateBox = async (x: any, y: any) => {\n try {\n const tx = await worldContract.write.CreateBox([x, y]);\n await waitForTransaction(tx);\n } catch (error) {\n console.log('CreateBox', error);\n message.error(error.cause.reason || error.cause.details);\n }\n }\n\n const setInfo = async (name: any, url: any) => {\n console.log('setInfo', new Date().getTime());\n try {\n const tx = await worldContract.write.setInfo([name, url]);\n await waitForTransaction(tx);\n console.log('setInfo success', new Date().getTime(), tx);\n return tx\n } catch (error) {\n console.log('setInfo', error);\n message.error(error.cause.reason || error.cause.details);\n }\n }\n\n const initUserInfo = async () => {\n if (wait) return\n wait = true\n console.log('initUserInfo', new Date().getTime());\n try {\n const tx = await worldContract.write.initUserInfo();\n await waitForTransaction(tx);\n console.log('initUserInfo success', new Date().getTime(), tx);\n wait = false\n return tx\n } catch (error) {\n console.log('initUserInfo', error);\n message.error(error.cause.reason || error.cause.details);\n wait = false\n }\n }\n\n const forceEnd = async (battleId: any) => {\n if (wait) return\n wait = true\n console.log('forceEnd', new Date().getTime());\n try {\n const tx = await worldContract.write.forceEnd([battleId]);\n await waitForTransaction(tx);\n console.log('forceEnd success', new Date().getTime(), tx);\n wait = false\n return getComponentValue(BattleList, encodeEntity({ battleId: \"uint256\" }, { battleId: battleId}))\n } catch (error) {\n console.log('forceEnd', error);\n // message.error(error.cause.reason || error.cause.details);\n wait = false\n }\n }\n\n const unlockUserLocation = async () => {\n console.log('unlockUserLocation', new Date().getTime());\n try {\n const tx = await worldContract.write.unlockUserLocation();\n await waitForTransaction(tx);\n console.log('unlockUserLocation success', new Date().getTime(), tx);\n return tx\n } catch (error) {\n console.log('unlockUserLocation', error);\n message.error(error.cause.reason || error.cause.details);\n }\n }\n\n const submitGem = async () => {\n try {\n const tx = await worldContract.write.submitGem();\n await waitForTransaction(tx);\n return tx\n } catch (error) {\n console.log('submitGem', error);\n message.error(error.cause.reason || error.cause.details);\n }\n }\n\n const getBattlePlayerHp = async (battleId: any, addr: any) => {\n const data = await worldContract.read.getBattlePlayerHp([battleId, addr]);\n return data\n }\n return {\n increment,\n move,\n getPosition,\n joinBattlefield,\n transfer,\n battleInvitation,\n confirmBattle,\n selectUserNft,\n selectLootNFT,\n revealBattle,\n openBox,\n getCollections,\n revealBox,\n CreateBox,\n getBattlePlayerHp,\n setInfo,\n initUserInfo,\n selectBothNFT,\n forceEnd,\n unlockUserLocation,\n submitGem\n };\n}\n","/**\n * @license\n * Copyright 2009 The Closure Library Authors\n * Copyright 2020 Daniel Wirtz / The long.js Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// WebAssembly optimizations to do native i64 multiplication and divide\nvar wasm = null;\ntry {\n wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([\n 0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11\n ])), {}).exports;\n} catch (e) {\n // no wasm support :(\n}\n\n/**\n * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.\n * See the from* functions below for more convenient ways of constructing Longs.\n * @exports Long\n * @class A Long class for representing a 64 bit two's-complement integer value.\n * @param {number} low The low (signed) 32 bits of the long\n * @param {number} high The high (signed) 32 bits of the long\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @constructor\n */\nfunction Long(low, high, unsigned) {\n\n /**\n * The low 32 bits as a signed value.\n * @type {number}\n */\n this.low = low | 0;\n\n /**\n * The high 32 bits as a signed value.\n * @type {number}\n */\n this.high = high | 0;\n\n /**\n * Whether unsigned or not.\n * @type {boolean}\n */\n this.unsigned = !!unsigned;\n}\n\n// The internal representation of a long is the two given signed, 32-bit values.\n// We use 32-bit pieces because these are the size of integers on which\n// Javascript performs bit-operations. For operations like addition and\n// multiplication, we split each number into 16 bit pieces, which can easily be\n// multiplied within Javascript's floating-point representation without overflow\n// or change in sign.\n//\n// In the algorithms below, we frequently reduce the negative case to the\n// positive case by negating the input(s) and then post-processing the result.\n// Note that we must ALWAYS check specially whether those values are MIN_VALUE\n// (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\n// a positive number, it overflows back into a negative). Not handling this\n// case would often result in infinite recursion.\n//\n// Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*\n// methods on which they depend.\n\n/**\n * An indicator used to reliably determine if an object is a Long or not.\n * @type {boolean}\n * @const\n * @private\n */\nLong.prototype.__isLong__;\n\nObject.defineProperty(Long.prototype, \"__isLong__\", { value: true });\n\n/**\n * @function\n * @param {*} obj Object\n * @returns {boolean}\n * @inner\n */\nfunction isLong(obj) {\n return (obj && obj[\"__isLong__\"]) === true;\n}\n\n/**\n * @function\n * @param {*} value number\n * @returns {number}\n * @inner\n */\nfunction ctz32(value) {\n var c = Math.clz32(value & -value);\n return value ? 31 - c : c;\n}\n\n/**\n * Tests if the specified object is a Long.\n * @function\n * @param {*} obj Object\n * @returns {boolean}\n */\nLong.isLong = isLong;\n\n/**\n * A cache of the Long representations of small integer values.\n * @type {!Object}\n * @inner\n */\nvar INT_CACHE = {};\n\n/**\n * A cache of the Long representations of small unsigned integer values.\n * @type {!Object}\n * @inner\n */\nvar UINT_CACHE = {};\n\n/**\n * @param {number} value\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nfunction fromInt(value, unsigned) {\n var obj, cachedObj, cache;\n if (unsigned) {\n value >>>= 0;\n if (cache = (0 <= value && value < 256)) {\n cachedObj = UINT_CACHE[value];\n if (cachedObj)\n return cachedObj;\n }\n obj = fromBits(value, 0, true);\n if (cache)\n UINT_CACHE[value] = obj;\n return obj;\n } else {\n value |= 0;\n if (cache = (-128 <= value && value < 128)) {\n cachedObj = INT_CACHE[value];\n if (cachedObj)\n return cachedObj;\n }\n obj = fromBits(value, value < 0 ? -1 : 0, false);\n if (cache)\n INT_CACHE[value] = obj;\n return obj;\n }\n}\n\n/**\n * Returns a Long representing the given 32 bit integer value.\n * @function\n * @param {number} value The 32 bit integer in question\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\nLong.fromInt = fromInt;\n\n/**\n * @param {number} value\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nfunction fromNumber(value, unsigned) {\n if (isNaN(value))\n return unsigned ? UZERO : ZERO;\n if (unsigned) {\n if (value < 0)\n return UZERO;\n if (value >= TWO_PWR_64_DBL)\n return MAX_UNSIGNED_VALUE;\n } else {\n if (value <= -TWO_PWR_63_DBL)\n return MIN_VALUE;\n if (value + 1 >= TWO_PWR_63_DBL)\n return MAX_VALUE;\n }\n if (value < 0)\n return fromNumber(-value, unsigned).neg();\n return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);\n}\n\n/**\n * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.\n * @function\n * @param {number} value The number in question\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\nLong.fromNumber = fromNumber;\n\n/**\n * @param {number} lowBits\n * @param {number} highBits\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nfunction fromBits(lowBits, highBits, unsigned) {\n return new Long(lowBits, highBits, unsigned);\n}\n\n/**\n * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is\n * assumed to use 32 bits.\n * @function\n * @param {number} lowBits The low 32 bits\n * @param {number} highBits The high 32 bits\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long} The corresponding Long value\n */\nLong.fromBits = fromBits;\n\n/**\n * @function\n * @param {number} base\n * @param {number} exponent\n * @returns {number}\n * @inner\n */\nvar pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)\n\n/**\n * @param {string} str\n * @param {(boolean|number)=} unsigned\n * @param {number=} radix\n * @returns {!Long}\n * @inner\n */\nfunction fromString(str, unsigned, radix) {\n if (str.length === 0)\n throw Error('empty string');\n if (typeof unsigned === 'number') {\n // For goog.math.long compatibility\n radix = unsigned;\n unsigned = false;\n } else {\n unsigned = !!unsigned;\n }\n if (str === \"NaN\" || str === \"Infinity\" || str === \"+Infinity\" || str === \"-Infinity\")\n return unsigned ? UZERO : ZERO;\n radix = radix || 10;\n if (radix < 2 || 36 < radix)\n throw RangeError('radix');\n\n var p;\n if ((p = str.indexOf('-')) > 0)\n throw Error('interior hyphen');\n else if (p === 0) {\n return fromString(str.substring(1), unsigned, radix).neg();\n }\n\n // Do several (8) digits each time through the loop, so as to\n // minimize the calls to the very expensive emulated div.\n var radixToPower = fromNumber(pow_dbl(radix, 8));\n\n var result = ZERO;\n for (var i = 0; i < str.length; i += 8) {\n var size = Math.min(8, str.length - i),\n value = parseInt(str.substring(i, i + size), radix);\n if (size < 8) {\n var power = fromNumber(pow_dbl(radix, size));\n result = result.mul(power).add(fromNumber(value));\n } else {\n result = result.mul(radixToPower);\n result = result.add(fromNumber(value));\n }\n }\n result.unsigned = unsigned;\n return result;\n}\n\n/**\n * Returns a Long representation of the given string, written using the specified radix.\n * @function\n * @param {string} str The textual representation of the Long\n * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed\n * @param {number=} radix The radix in which the text is written (2-36), defaults to 10\n * @returns {!Long} The corresponding Long value\n */\nLong.fromString = fromString;\n\n/**\n * @function\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val\n * @param {boolean=} unsigned\n * @returns {!Long}\n * @inner\n */\nfunction fromValue(val, unsigned) {\n if (typeof val === 'number')\n return fromNumber(val, unsigned);\n if (typeof val === 'string')\n return fromString(val, unsigned);\n // Throws for non-objects, converts non-instanceof Long:\n return fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned);\n}\n\n/**\n * Converts the specified value to a Long using the appropriate from* function for its type.\n * @function\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {!Long}\n */\nLong.fromValue = fromValue;\n\n// NOTE: the compiler should inline these constant values below and then remove these variables, so there should be\n// no runtime penalty for these.\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_16_DBL = 1 << 16;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_24_DBL = 1 << 24;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\n\n/**\n * @type {number}\n * @const\n * @inner\n */\nvar TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\n\n/**\n * @type {!Long}\n * @const\n * @inner\n */\nvar TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\n\n/**\n * @type {!Long}\n * @inner\n */\nvar ZERO = fromInt(0);\n\n/**\n * Signed zero.\n * @type {!Long}\n */\nLong.ZERO = ZERO;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar UZERO = fromInt(0, true);\n\n/**\n * Unsigned zero.\n * @type {!Long}\n */\nLong.UZERO = UZERO;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar ONE = fromInt(1);\n\n/**\n * Signed one.\n * @type {!Long}\n */\nLong.ONE = ONE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar UONE = fromInt(1, true);\n\n/**\n * Unsigned one.\n * @type {!Long}\n */\nLong.UONE = UONE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar NEG_ONE = fromInt(-1);\n\n/**\n * Signed negative one.\n * @type {!Long}\n */\nLong.NEG_ONE = NEG_ONE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar MAX_VALUE = fromBits(0xFFFFFFFF | 0, 0x7FFFFFFF | 0, false);\n\n/**\n * Maximum signed value.\n * @type {!Long}\n */\nLong.MAX_VALUE = MAX_VALUE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF | 0, 0xFFFFFFFF | 0, true);\n\n/**\n * Maximum unsigned value.\n * @type {!Long}\n */\nLong.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\n\n/**\n * @type {!Long}\n * @inner\n */\nvar MIN_VALUE = fromBits(0, 0x80000000 | 0, false);\n\n/**\n * Minimum signed value.\n * @type {!Long}\n */\nLong.MIN_VALUE = MIN_VALUE;\n\n/**\n * @alias Long.prototype\n * @inner\n */\nvar LongPrototype = Long.prototype;\n\n/**\n * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.\n * @this {!Long}\n * @returns {number}\n */\nLongPrototype.toInt = function toInt() {\n return this.unsigned ? this.low >>> 0 : this.low;\n};\n\n/**\n * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).\n * @this {!Long}\n * @returns {number}\n */\nLongPrototype.toNumber = function toNumber() {\n if (this.unsigned)\n return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0);\n return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\n};\n\n/**\n * Converts the Long to a string written in the specified radix.\n * @this {!Long}\n * @param {number=} radix Radix (2-36), defaults to 10\n * @returns {string}\n * @override\n * @throws {RangeError} If `radix` is out of range\n */\nLongPrototype.toString = function toString(radix) {\n radix = radix || 10;\n if (radix < 2 || 36 < radix)\n throw RangeError('radix');\n if (this.isZero())\n return '0';\n if (this.isNegative()) { // Unsigned Longs are never negative\n if (this.eq(MIN_VALUE)) {\n // We need to change the Long value before it can be negated, so we remove\n // the bottom-most digit in this base and then recurse to do the rest.\n var radixLong = fromNumber(radix),\n div = this.div(radixLong),\n rem1 = div.mul(radixLong).sub(this);\n return div.toString(radix) + rem1.toInt().toString(radix);\n } else\n return '-' + this.neg().toString(radix);\n }\n\n // Do several (6) digits each time through the loop, so as to\n // minimize the calls to the very expensive emulated div.\n var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),\n rem = this;\n var result = '';\n while (true) {\n var remDiv = rem.div(radixToPower),\n intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,\n digits = intval.toString(radix);\n rem = remDiv;\n if (rem.isZero())\n return digits + result;\n else {\n while (digits.length < 6)\n digits = '0' + digits;\n result = '' + digits + result;\n }\n }\n};\n\n/**\n * Gets the high 32 bits as a signed integer.\n * @this {!Long}\n * @returns {number} Signed high bits\n */\nLongPrototype.getHighBits = function getHighBits() {\n return this.high;\n};\n\n/**\n * Gets the high 32 bits as an unsigned integer.\n * @this {!Long}\n * @returns {number} Unsigned high bits\n */\nLongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\n return this.high >>> 0;\n};\n\n/**\n * Gets the low 32 bits as a signed integer.\n * @this {!Long}\n * @returns {number} Signed low bits\n */\nLongPrototype.getLowBits = function getLowBits() {\n return this.low;\n};\n\n/**\n * Gets the low 32 bits as an unsigned integer.\n * @this {!Long}\n * @returns {number} Unsigned low bits\n */\nLongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\n return this.low >>> 0;\n};\n\n/**\n * Gets the number of bits needed to represent the absolute value of this Long.\n * @this {!Long}\n * @returns {number}\n */\nLongPrototype.getNumBitsAbs = function getNumBitsAbs() {\n if (this.isNegative()) // Unsigned Longs are never negative\n return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\n var val = this.high != 0 ? this.high : this.low;\n for (var bit = 31; bit > 0; bit--)\n if ((val & (1 << bit)) != 0)\n break;\n return this.high != 0 ? bit + 33 : bit + 1;\n};\n\n/**\n * Tests if this Long's value equals zero.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isZero = function isZero() {\n return this.high === 0 && this.low === 0;\n};\n\n/**\n * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}.\n * @returns {boolean}\n */\nLongPrototype.eqz = LongPrototype.isZero;\n\n/**\n * Tests if this Long's value is negative.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isNegative = function isNegative() {\n return !this.unsigned && this.high < 0;\n};\n\n/**\n * Tests if this Long's value is positive or zero.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isPositive = function isPositive() {\n return this.unsigned || this.high >= 0;\n};\n\n/**\n * Tests if this Long's value is odd.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isOdd = function isOdd() {\n return (this.low & 1) === 1;\n};\n\n/**\n * Tests if this Long's value is even.\n * @this {!Long}\n * @returns {boolean}\n */\nLongPrototype.isEven = function isEven() {\n return (this.low & 1) === 0;\n};\n\n/**\n * Tests if this Long's value equals the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.equals = function equals(other) {\n if (!isLong(other))\n other = fromValue(other);\n if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1)\n return false;\n return this.high === other.high && this.low === other.low;\n};\n\n/**\n * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.eq = LongPrototype.equals;\n\n/**\n * Tests if this Long's value differs from the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.notEquals = function notEquals(other) {\n return !this.eq(/* validates */ other);\n};\n\n/**\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.neq = LongPrototype.notEquals;\n\n/**\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.ne = LongPrototype.notEquals;\n\n/**\n * Tests if this Long's value is less than the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.lessThan = function lessThan(other) {\n return this.comp(/* validates */ other) < 0;\n};\n\n/**\n * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.lt = LongPrototype.lessThan;\n\n/**\n * Tests if this Long's value is less than or equal the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\n return this.comp(/* validates */ other) <= 0;\n};\n\n/**\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.lte = LongPrototype.lessThanOrEqual;\n\n/**\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.le = LongPrototype.lessThanOrEqual;\n\n/**\n * Tests if this Long's value is greater than the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.greaterThan = function greaterThan(other) {\n return this.comp(/* validates */ other) > 0;\n};\n\n/**\n * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.gt = LongPrototype.greaterThan;\n\n/**\n * Tests if this Long's value is greater than or equal the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\n return this.comp(/* validates */ other) >= 0;\n};\n\n/**\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.gte = LongPrototype.greaterThanOrEqual;\n\n/**\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {boolean}\n */\nLongPrototype.ge = LongPrototype.greaterThanOrEqual;\n\n/**\n * Compares this Long's value with the specified's.\n * @this {!Long}\n * @param {!Long|number|string} other Other value\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\n * if the given one is greater\n */\nLongPrototype.compare = function compare(other) {\n if (!isLong(other))\n other = fromValue(other);\n if (this.eq(other))\n return 0;\n var thisNeg = this.isNegative(),\n otherNeg = other.isNegative();\n if (thisNeg && !otherNeg)\n return -1;\n if (!thisNeg && otherNeg)\n return 1;\n // At this point the sign bits are the same\n if (!this.unsigned)\n return this.sub(other).isNegative() ? -1 : 1;\n // Both are positive if at least one is unsigned\n return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1;\n};\n\n/**\n * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.\n * @function\n * @param {!Long|number|string} other Other value\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\n * if the given one is greater\n */\nLongPrototype.comp = LongPrototype.compare;\n\n/**\n * Negates this Long's value.\n * @this {!Long}\n * @returns {!Long} Negated Long\n */\nLongPrototype.negate = function negate() {\n if (!this.unsigned && this.eq(MIN_VALUE))\n return MIN_VALUE;\n return this.not().add(ONE);\n};\n\n/**\n * Negates this Long's value. This is an alias of {@link Long#negate}.\n * @function\n * @returns {!Long} Negated Long\n */\nLongPrototype.neg = LongPrototype.negate;\n\n/**\n * Returns the sum of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|string} addend Addend\n * @returns {!Long} Sum\n */\nLongPrototype.add = function add(addend) {\n if (!isLong(addend))\n addend = fromValue(addend);\n\n // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\n\n var a48 = this.high >>> 16;\n var a32 = this.high & 0xFFFF;\n var a16 = this.low >>> 16;\n var a00 = this.low & 0xFFFF;\n\n var b48 = addend.high >>> 16;\n var b32 = addend.high & 0xFFFF;\n var b16 = addend.low >>> 16;\n var b00 = addend.low & 0xFFFF;\n\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\n c00 += a00 + b00;\n c16 += c00 >>> 16;\n c00 &= 0xFFFF;\n c16 += a16 + b16;\n c32 += c16 >>> 16;\n c16 &= 0xFFFF;\n c32 += a32 + b32;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c48 += a48 + b48;\n c48 &= 0xFFFF;\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\n};\n\n/**\n * Returns the difference of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|string} subtrahend Subtrahend\n * @returns {!Long} Difference\n */\nLongPrototype.subtract = function subtract(subtrahend) {\n if (!isLong(subtrahend))\n subtrahend = fromValue(subtrahend);\n return this.add(subtrahend.neg());\n};\n\n/**\n * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.\n * @function\n * @param {!Long|number|string} subtrahend Subtrahend\n * @returns {!Long} Difference\n */\nLongPrototype.sub = LongPrototype.subtract;\n\n/**\n * Returns the product of this and the specified Long.\n * @this {!Long}\n * @param {!Long|number|string} multiplier Multiplier\n * @returns {!Long} Product\n */\nLongPrototype.multiply = function multiply(multiplier) {\n if (this.isZero())\n return this;\n if (!isLong(multiplier))\n multiplier = fromValue(multiplier);\n\n // use wasm support if present\n if (wasm) {\n var low = wasm[\"mul\"](this.low,\n this.high,\n multiplier.low,\n multiplier.high);\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n\n if (multiplier.isZero())\n return this.unsigned ? UZERO : ZERO;\n if (this.eq(MIN_VALUE))\n return multiplier.isOdd() ? MIN_VALUE : ZERO;\n if (multiplier.eq(MIN_VALUE))\n return this.isOdd() ? MIN_VALUE : ZERO;\n\n if (this.isNegative()) {\n if (multiplier.isNegative())\n return this.neg().mul(multiplier.neg());\n else\n return this.neg().mul(multiplier).neg();\n } else if (multiplier.isNegative())\n return this.mul(multiplier.neg()).neg();\n\n // If both longs are small, use float multiplication\n if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\n return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);\n\n // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\n // We can skip products that would overflow.\n\n var a48 = this.high >>> 16;\n var a32 = this.high & 0xFFFF;\n var a16 = this.low >>> 16;\n var a00 = this.low & 0xFFFF;\n\n var b48 = multiplier.high >>> 16;\n var b32 = multiplier.high & 0xFFFF;\n var b16 = multiplier.low >>> 16;\n var b00 = multiplier.low & 0xFFFF;\n\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\n c00 += a00 * b00;\n c16 += c00 >>> 16;\n c00 &= 0xFFFF;\n c16 += a16 * b00;\n c32 += c16 >>> 16;\n c16 &= 0xFFFF;\n c16 += a00 * b16;\n c32 += c16 >>> 16;\n c16 &= 0xFFFF;\n c32 += a32 * b00;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c32 += a16 * b16;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c32 += a00 * b32;\n c48 += c32 >>> 16;\n c32 &= 0xFFFF;\n c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\n c48 &= 0xFFFF;\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\n};\n\n/**\n * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.\n * @function\n * @param {!Long|number|string} multiplier Multiplier\n * @returns {!Long} Product\n */\nLongPrototype.mul = LongPrototype.multiply;\n\n/**\n * Returns this Long divided by the specified. The result is signed if this Long is signed or\n * unsigned if this Long is unsigned.\n * @this {!Long}\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Quotient\n */\nLongPrototype.divide = function divide(divisor) {\n if (!isLong(divisor))\n divisor = fromValue(divisor);\n if (divisor.isZero())\n throw Error('division by zero');\n\n // use wasm support if present\n if (wasm) {\n // guard against signed division overflow: the largest\n // negative number / -1 would be 1 larger than the largest\n // positive number, due to two's complement.\n if (!this.unsigned &&\n this.high === -0x80000000 &&\n divisor.low === -1 && divisor.high === -1) {\n // be consistent with non-wasm code path\n return this;\n }\n var low = (this.unsigned ? wasm[\"div_u\"] : wasm[\"div_s\"])(\n this.low,\n this.high,\n divisor.low,\n divisor.high\n );\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n\n if (this.isZero())\n return this.unsigned ? UZERO : ZERO;\n var approx, rem, res;\n if (!this.unsigned) {\n // This section is only relevant for signed longs and is derived from the\n // closure library as a whole.\n if (this.eq(MIN_VALUE)) {\n if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\n return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE\n else if (divisor.eq(MIN_VALUE))\n return ONE;\n else {\n // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\n var halfThis = this.shr(1);\n approx = halfThis.div(divisor).shl(1);\n if (approx.eq(ZERO)) {\n return divisor.isNegative() ? ONE : NEG_ONE;\n } else {\n rem = this.sub(divisor.mul(approx));\n res = approx.add(rem.div(divisor));\n return res;\n }\n }\n } else if (divisor.eq(MIN_VALUE))\n return this.unsigned ? UZERO : ZERO;\n if (this.isNegative()) {\n if (divisor.isNegative())\n return this.neg().div(divisor.neg());\n return this.neg().div(divisor).neg();\n } else if (divisor.isNegative())\n return this.div(divisor.neg()).neg();\n res = ZERO;\n } else {\n // The algorithm below has not been made for unsigned longs. It's therefore\n // required to take special care of the MSB prior to running it.\n if (!divisor.unsigned)\n divisor = divisor.toUnsigned();\n if (divisor.gt(this))\n return UZERO;\n if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true\n return UONE;\n res = UZERO;\n }\n\n // Repeat the following until the remainder is less than other: find a\n // floating-point that approximates remainder / other *from below*, add this\n // into the result, and subtract it from the remainder. It is critical that\n // the approximate value is less than or equal to the real value so that the\n // remainder never becomes negative.\n rem = this;\n while (rem.gte(divisor)) {\n // Approximate the result of division. This may be a little greater or\n // smaller than the actual value.\n approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\n\n // We will tweak the approximate result by changing it in the 48-th digit or\n // the smallest non-fractional digit, whichever is larger.\n var log2 = Math.ceil(Math.log(approx) / Math.LN2),\n delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48),\n\n // Decrease the approximation until it is smaller than the remainder. Note\n // that if it is too large, the product overflows and is negative.\n approxRes = fromNumber(approx),\n approxRem = approxRes.mul(divisor);\n while (approxRem.isNegative() || approxRem.gt(rem)) {\n approx -= delta;\n approxRes = fromNumber(approx, this.unsigned);\n approxRem = approxRes.mul(divisor);\n }\n\n // We know the answer can't be zero... and actually, zero would cause\n // infinite recursion since we would make no progress.\n if (approxRes.isZero())\n approxRes = ONE;\n\n res = res.add(approxRes);\n rem = rem.sub(approxRem);\n }\n return res;\n};\n\n/**\n * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.\n * @function\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Quotient\n */\nLongPrototype.div = LongPrototype.divide;\n\n/**\n * Returns this Long modulo the specified.\n * @this {!Long}\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Remainder\n */\nLongPrototype.modulo = function modulo(divisor) {\n if (!isLong(divisor))\n divisor = fromValue(divisor);\n\n // use wasm support if present\n if (wasm) {\n var low = (this.unsigned ? wasm[\"rem_u\"] : wasm[\"rem_s\"])(\n this.low,\n this.high,\n divisor.low,\n divisor.high\n );\n return fromBits(low, wasm[\"get_high\"](), this.unsigned);\n }\n\n return this.sub(this.div(divisor).mul(divisor));\n};\n\n/**\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\n * @function\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Remainder\n */\nLongPrototype.mod = LongPrototype.modulo;\n\n/**\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\n * @function\n * @param {!Long|number|string} divisor Divisor\n * @returns {!Long} Remainder\n */\nLongPrototype.rem = LongPrototype.modulo;\n\n/**\n * Returns the bitwise NOT of this Long.\n * @this {!Long}\n * @returns {!Long}\n */\nLongPrototype.not = function not() {\n return fromBits(~this.low, ~this.high, this.unsigned);\n};\n\n/**\n * Returns count leading zeros of this Long.\n * @this {!Long}\n * @returns {!number}\n */\nLongPrototype.countLeadingZeros = function countLeadingZeros() {\n return this.high ? Math.clz32(this.high) : Math.clz32(this.low) + 32;\n};\n\n/**\n * Returns count leading zeros. This is an alias of {@link Long#countLeadingZeros}.\n * @function\n * @param {!Long}\n * @returns {!number}\n */\nLongPrototype.clz = LongPrototype.countLeadingZeros;\n\n/**\n * Returns count trailing zeros of this Long.\n * @this {!Long}\n * @returns {!number}\n */\nLongPrototype.countTrailingZeros = function countTrailingZeros() {\n return this.low ? ctz32(this.low) : ctz32(this.high) + 32;\n};\n\n/**\n * Returns count trailing zeros. This is an alias of {@link Long#countTrailingZeros}.\n * @function\n * @param {!Long}\n * @returns {!number}\n */\nLongPrototype.ctz = LongPrototype.countTrailingZeros;\n\n/**\n * Returns the bitwise AND of this Long and the specified.\n * @this {!Long}\n * @param {!Long|number|string} other Other Long\n * @returns {!Long}\n */\nLongPrototype.and = function and(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low & other.low, this.high & other.high, this.unsigned);\n};\n\n/**\n * Returns the bitwise OR of this Long and the specified.\n * @this {!Long}\n * @param {!Long|number|string} other Other Long\n * @returns {!Long}\n */\nLongPrototype.or = function or(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low | other.low, this.high | other.high, this.unsigned);\n};\n\n/**\n * Returns the bitwise XOR of this Long and the given one.\n * @this {!Long}\n * @param {!Long|number|string} other Other Long\n * @returns {!Long}\n */\nLongPrototype.xor = function xor(other) {\n if (!isLong(other))\n other = fromValue(other);\n return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);\n};\n\n/**\n * Returns this Long with bits shifted to the left by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shiftLeft = function shiftLeft(numBits) {\n if (isLong(numBits))\n numBits = numBits.toInt();\n if ((numBits &= 63) === 0)\n return this;\n else if (numBits < 32)\n return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);\n else\n return fromBits(0, this.low << (numBits - 32), this.unsigned);\n};\n\n/**\n * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shl = LongPrototype.shiftLeft;\n\n/**\n * Returns this Long with bits arithmetically shifted to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shiftRight = function shiftRight(numBits) {\n if (isLong(numBits))\n numBits = numBits.toInt();\n if ((numBits &= 63) === 0)\n return this;\n else if (numBits < 32)\n return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);\n else\n return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);\n};\n\n/**\n * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shr = LongPrototype.shiftRight;\n\n/**\n * Returns this Long with bits logically shifted to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits < 32) return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >>> numBits, this.unsigned);\n if (numBits === 32) return fromBits(this.high, 0, this.unsigned);\n return fromBits(this.high >>> (numBits - 32), 0, this.unsigned);\n};\n\n/**\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shru = LongPrototype.shiftRightUnsigned;\n\n/**\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Shifted Long\n */\nLongPrototype.shr_u = LongPrototype.shiftRightUnsigned;\n\n/**\n * Returns this Long with bits rotated to the left by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nLongPrototype.rotateLeft = function rotateLeft(numBits) {\n var b;\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);\n if (numBits < 32) {\n b = (32 - numBits);\n return fromBits(((this.low << numBits) | (this.high >>> b)), ((this.high << numBits) | (this.low >>> b)), this.unsigned);\n }\n numBits -= 32;\n b = (32 - numBits);\n return fromBits(((this.high << numBits) | (this.low >>> b)), ((this.low << numBits) | (this.high >>> b)), this.unsigned);\n}\n/**\n * Returns this Long with bits rotated to the left by the given amount. This is an alias of {@link Long#rotateLeft}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nLongPrototype.rotl = LongPrototype.rotateLeft;\n\n/**\n * Returns this Long with bits rotated to the right by the given amount.\n * @this {!Long}\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nLongPrototype.rotateRight = function rotateRight(numBits) {\n var b;\n if (isLong(numBits)) numBits = numBits.toInt();\n if ((numBits &= 63) === 0) return this;\n if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);\n if (numBits < 32) {\n b = (32 - numBits);\n return fromBits(((this.high << b) | (this.low >>> numBits)), ((this.low << b) | (this.high >>> numBits)), this.unsigned);\n }\n numBits -= 32;\n b = (32 - numBits);\n return fromBits(((this.low << b) | (this.high >>> numBits)), ((this.high << b) | (this.low >>> numBits)), this.unsigned);\n}\n/**\n * Returns this Long with bits rotated to the right by the given amount. This is an alias of {@link Long#rotateRight}.\n * @function\n * @param {number|!Long} numBits Number of bits\n * @returns {!Long} Rotated Long\n */\nLongPrototype.rotr = LongPrototype.rotateRight;\n\n/**\n * Converts this Long to signed.\n * @this {!Long}\n * @returns {!Long} Signed long\n */\nLongPrototype.toSigned = function toSigned() {\n if (!this.unsigned)\n return this;\n return fromBits(this.low, this.high, false);\n};\n\n/**\n * Converts this Long to unsigned.\n * @this {!Long}\n * @returns {!Long} Unsigned long\n */\nLongPrototype.toUnsigned = function toUnsigned() {\n if (this.unsigned)\n return this;\n return fromBits(this.low, this.high, true);\n};\n\n/**\n * Converts this Long to its byte representation.\n * @param {boolean=} le Whether little or big endian, defaults to big endian\n * @this {!Long}\n * @returns {!Array.} Byte representation\n */\nLongPrototype.toBytes = function toBytes(le) {\n return le ? this.toBytesLE() : this.toBytesBE();\n};\n\n/**\n * Converts this Long to its little endian byte representation.\n * @this {!Long}\n * @returns {!Array.} Little endian byte representation\n */\nLongPrototype.toBytesLE = function toBytesLE() {\n var hi = this.high,\n lo = this.low;\n return [\n lo & 0xff,\n lo >>> 8 & 0xff,\n lo >>> 16 & 0xff,\n lo >>> 24,\n hi & 0xff,\n hi >>> 8 & 0xff,\n hi >>> 16 & 0xff,\n hi >>> 24\n ];\n};\n\n/**\n * Converts this Long to its big endian byte representation.\n * @this {!Long}\n * @returns {!Array.} Big endian byte representation\n */\nLongPrototype.toBytesBE = function toBytesBE() {\n var hi = this.high,\n lo = this.low;\n return [\n hi >>> 24,\n hi >>> 16 & 0xff,\n hi >>> 8 & 0xff,\n hi & 0xff,\n lo >>> 24,\n lo >>> 16 & 0xff,\n lo >>> 8 & 0xff,\n lo & 0xff\n ];\n};\n\n/**\n * Creates a Long from its byte representation.\n * @param {!Array.} bytes Byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @param {boolean=} le Whether little or big endian, defaults to big endian\n * @returns {Long} The corresponding Long value\n */\nLong.fromBytes = function fromBytes(bytes, unsigned, le) {\n return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);\n};\n\n/**\n * Creates a Long from its little endian byte representation.\n * @param {!Array.} bytes Little endian byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {Long} The corresponding Long value\n */\nLong.fromBytesLE = function fromBytesLE(bytes, unsigned) {\n return new Long(\n bytes[0] |\n bytes[1] << 8 |\n bytes[2] << 16 |\n bytes[3] << 24,\n bytes[4] |\n bytes[5] << 8 |\n bytes[6] << 16 |\n bytes[7] << 24,\n unsigned\n );\n};\n\n/**\n * Creates a Long from its big endian byte representation.\n * @param {!Array.} bytes Big endian byte representation\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\n * @returns {Long} The corresponding Long value\n */\nLong.fromBytesBE = function fromBytesBE(bytes, unsigned) {\n return new Long(\n bytes[4] << 24 |\n bytes[5] << 16 |\n bytes[6] << 8 |\n bytes[7],\n bytes[0] << 24 |\n bytes[1] << 16 |\n bytes[2] << 8 |\n bytes[3],\n unsigned\n );\n};\n\nexport default Long;\n","\"use strict\";\r\nmodule.exports = asPromise;\r\n\r\n/**\r\n * Callback as used by {@link util.asPromise}.\r\n * @typedef asPromiseCallback\r\n * @type {function}\r\n * @param {Error|null} error Error, if any\r\n * @param {...*} params Additional arguments\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Returns a promise from a node-style callback function.\r\n * @memberof util\r\n * @param {asPromiseCallback} fn Function to call\r\n * @param {*} ctx Function context\r\n * @param {...*} params Function arguments\r\n * @returns {Promise<*>} Promisified function\r\n */\r\nfunction asPromise(fn, ctx/*, varargs */) {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0,\r\n index = 2,\r\n pending = true;\r\n while (index < arguments.length)\r\n params[offset++] = arguments[index++];\r\n return new Promise(function executor(resolve, reject) {\r\n params[offset] = function callback(err/*, varargs */) {\r\n if (pending) {\r\n pending = false;\r\n if (err)\r\n reject(err);\r\n else {\r\n var params = new Array(arguments.length - 1),\r\n offset = 0;\r\n while (offset < params.length)\r\n params[offset++] = arguments[offset];\r\n resolve.apply(null, params);\r\n }\r\n }\r\n };\r\n try {\r\n fn.apply(ctx || null, params);\r\n } catch (err) {\r\n if (pending) {\r\n pending = false;\r\n reject(err);\r\n }\r\n }\r\n });\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal base64 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar base64 = exports;\r\n\r\n/**\r\n * Calculates the byte length of a base64 encoded string.\r\n * @param {string} string Base64 encoded string\r\n * @returns {number} Byte length\r\n */\r\nbase64.length = function length(string) {\r\n var p = string.length;\r\n if (!p)\r\n return 0;\r\n var n = 0;\r\n while (--p % 4 > 1 && string.charAt(p) === \"=\")\r\n ++n;\r\n return Math.ceil(string.length * 3) / 4 - n;\r\n};\r\n\r\n// Base64 encoding table\r\nvar b64 = new Array(64);\r\n\r\n// Base64 decoding table\r\nvar s64 = new Array(123);\r\n\r\n// 65..90, 97..122, 48..57, 43, 47\r\nfor (var i = 0; i < 64;)\r\n s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n\r\n/**\r\n * Encodes a buffer to a base64 encoded string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} Base64 encoded string\r\n */\r\nbase64.encode = function encode(buffer, start, end) {\r\n var parts = null,\r\n chunk = [];\r\n var i = 0, // output index\r\n j = 0, // goto index\r\n t; // temporary\r\n while (start < end) {\r\n var b = buffer[start++];\r\n switch (j) {\r\n case 0:\r\n chunk[i++] = b64[b >> 2];\r\n t = (b & 3) << 4;\r\n j = 1;\r\n break;\r\n case 1:\r\n chunk[i++] = b64[t | b >> 4];\r\n t = (b & 15) << 2;\r\n j = 2;\r\n break;\r\n case 2:\r\n chunk[i++] = b64[t | b >> 6];\r\n chunk[i++] = b64[b & 63];\r\n j = 0;\r\n break;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (j) {\r\n chunk[i++] = b64[t];\r\n chunk[i++] = 61;\r\n if (j === 1)\r\n chunk[i++] = 61;\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\nvar invalidEncoding = \"invalid encoding\";\r\n\r\n/**\r\n * Decodes a base64 encoded string to a buffer.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Number of bytes written\r\n * @throws {Error} If encoding is invalid\r\n */\r\nbase64.decode = function decode(string, buffer, offset) {\r\n var start = offset;\r\n var j = 0, // goto index\r\n t; // temporary\r\n for (var i = 0; i < string.length;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error(invalidEncoding);\r\n switch (j) {\r\n case 0:\r\n t = c;\r\n j = 1;\r\n break;\r\n case 1:\r\n buffer[offset++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n case 2:\r\n buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n case 3:\r\n buffer[offset++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n if (j === 1)\r\n throw Error(invalidEncoding);\r\n return offset - start;\r\n};\r\n\r\n/**\r\n * Tests if the specified string appears to be base64 encoded.\r\n * @param {string} string String to test\r\n * @returns {boolean} `true` if probably base64 encoded, otherwise false\r\n */\r\nbase64.test = function test(string) {\r\n return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);\r\n};\r\n","\"use strict\";\r\nmodule.exports = EventEmitter;\r\n\r\n/**\r\n * Constructs a new event emitter instance.\r\n * @classdesc A minimal event emitter.\r\n * @memberof util\r\n * @constructor\r\n */\r\nfunction EventEmitter() {\r\n\r\n /**\r\n * Registered listeners.\r\n * @type {Object.}\r\n * @private\r\n */\r\n this._listeners = {};\r\n}\r\n\r\n/**\r\n * Registers an event listener.\r\n * @param {string} evt Event name\r\n * @param {function} fn Listener\r\n * @param {*} [ctx] Listener context\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.on = function on(evt, fn, ctx) {\r\n (this._listeners[evt] || (this._listeners[evt] = [])).push({\r\n fn : fn,\r\n ctx : ctx || this\r\n });\r\n return this;\r\n};\r\n\r\n/**\r\n * Removes an event listener or any matching listeners if arguments are omitted.\r\n * @param {string} [evt] Event name. Removes all listeners if omitted.\r\n * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.off = function off(evt, fn) {\r\n if (evt === undefined)\r\n this._listeners = {};\r\n else {\r\n if (fn === undefined)\r\n this._listeners[evt] = [];\r\n else {\r\n var listeners = this._listeners[evt];\r\n for (var i = 0; i < listeners.length;)\r\n if (listeners[i].fn === fn)\r\n listeners.splice(i, 1);\r\n else\r\n ++i;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emits an event by calling its listeners with the specified arguments.\r\n * @param {string} evt Event name\r\n * @param {...*} args Arguments\r\n * @returns {util.EventEmitter} `this`\r\n */\r\nEventEmitter.prototype.emit = function emit(evt) {\r\n var listeners = this._listeners[evt];\r\n if (listeners) {\r\n var args = [],\r\n i = 1;\r\n for (; i < arguments.length;)\r\n args.push(arguments[i++]);\r\n for (i = 0; i < listeners.length;)\r\n listeners[i].fn.apply(listeners[i++].ctx, args);\r\n }\r\n return this;\r\n};\r\n","\"use strict\";\r\n\r\nmodule.exports = factory(factory);\r\n\r\n/**\r\n * Reads / writes floats / doubles from / to buffers.\r\n * @name util.float\r\n * @namespace\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using little endian byte order.\r\n * @name util.float.writeFloatLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 32 bit float to a buffer using big endian byte order.\r\n * @name util.float.writeFloatBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using little endian byte order.\r\n * @name util.float.readFloatLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 32 bit float from a buffer using big endian byte order.\r\n * @name util.float.readFloatBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using little endian byte order.\r\n * @name util.float.writeDoubleLE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Writes a 64 bit double to a buffer using big endian byte order.\r\n * @name util.float.writeDoubleBE\r\n * @function\r\n * @param {number} val Value to write\r\n * @param {Uint8Array} buf Target buffer\r\n * @param {number} pos Target buffer offset\r\n * @returns {undefined}\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using little endian byte order.\r\n * @name util.float.readDoubleLE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n/**\r\n * Reads a 64 bit double from a buffer using big endian byte order.\r\n * @name util.float.readDoubleBE\r\n * @function\r\n * @param {Uint8Array} buf Source buffer\r\n * @param {number} pos Source buffer offset\r\n * @returns {number} Value read\r\n */\r\n\r\n// Factory function for the purpose of node-based testing in modified global environments\r\nfunction factory(exports) {\r\n\r\n // float: typed array\r\n if (typeof Float32Array !== \"undefined\") (function() {\r\n\r\n var f32 = new Float32Array([ -0 ]),\r\n f8b = new Uint8Array(f32.buffer),\r\n le = f8b[3] === 128;\r\n\r\n function writeFloat_f32_cpy(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n }\r\n\r\n function writeFloat_f32_rev(val, buf, pos) {\r\n f32[0] = val;\r\n buf[pos ] = f8b[3];\r\n buf[pos + 1] = f8b[2];\r\n buf[pos + 2] = f8b[1];\r\n buf[pos + 3] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;\r\n\r\n function readFloat_f32_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n function readFloat_f32_rev(buf, pos) {\r\n f8b[3] = buf[pos ];\r\n f8b[2] = buf[pos + 1];\r\n f8b[1] = buf[pos + 2];\r\n f8b[0] = buf[pos + 3];\r\n return f32[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;\r\n /* istanbul ignore next */\r\n exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;\r\n\r\n // float: ieee754\r\n })(); else (function() {\r\n\r\n function writeFloat_ieee754(writeUint, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0)\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);\r\n else if (isNaN(val))\r\n writeUint(2143289344, buf, pos);\r\n else if (val > 3.4028234663852886e+38) // +-Infinity\r\n writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);\r\n else if (val < 1.1754943508222875e-38) // denormal\r\n writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);\r\n else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2),\r\n mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;\r\n writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);\r\n }\r\n }\r\n\r\n exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);\r\n exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);\r\n\r\n function readFloat_ieee754(readUint, buf, pos) {\r\n var uint = readUint(buf, pos),\r\n sign = (uint >> 31) * 2 + 1,\r\n exponent = uint >>> 23 & 255,\r\n mantissa = uint & 8388607;\r\n return exponent === 255\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 1.401298464324817e-45 * mantissa\r\n : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);\r\n }\r\n\r\n exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);\r\n exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);\r\n\r\n })();\r\n\r\n // double: typed array\r\n if (typeof Float64Array !== \"undefined\") (function() {\r\n\r\n var f64 = new Float64Array([-0]),\r\n f8b = new Uint8Array(f64.buffer),\r\n le = f8b[7] === 128;\r\n\r\n function writeDouble_f64_cpy(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[0];\r\n buf[pos + 1] = f8b[1];\r\n buf[pos + 2] = f8b[2];\r\n buf[pos + 3] = f8b[3];\r\n buf[pos + 4] = f8b[4];\r\n buf[pos + 5] = f8b[5];\r\n buf[pos + 6] = f8b[6];\r\n buf[pos + 7] = f8b[7];\r\n }\r\n\r\n function writeDouble_f64_rev(val, buf, pos) {\r\n f64[0] = val;\r\n buf[pos ] = f8b[7];\r\n buf[pos + 1] = f8b[6];\r\n buf[pos + 2] = f8b[5];\r\n buf[pos + 3] = f8b[4];\r\n buf[pos + 4] = f8b[3];\r\n buf[pos + 5] = f8b[2];\r\n buf[pos + 6] = f8b[1];\r\n buf[pos + 7] = f8b[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;\r\n\r\n function readDouble_f64_cpy(buf, pos) {\r\n f8b[0] = buf[pos ];\r\n f8b[1] = buf[pos + 1];\r\n f8b[2] = buf[pos + 2];\r\n f8b[3] = buf[pos + 3];\r\n f8b[4] = buf[pos + 4];\r\n f8b[5] = buf[pos + 5];\r\n f8b[6] = buf[pos + 6];\r\n f8b[7] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n function readDouble_f64_rev(buf, pos) {\r\n f8b[7] = buf[pos ];\r\n f8b[6] = buf[pos + 1];\r\n f8b[5] = buf[pos + 2];\r\n f8b[4] = buf[pos + 3];\r\n f8b[3] = buf[pos + 4];\r\n f8b[2] = buf[pos + 5];\r\n f8b[1] = buf[pos + 6];\r\n f8b[0] = buf[pos + 7];\r\n return f64[0];\r\n }\r\n\r\n /* istanbul ignore next */\r\n exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;\r\n /* istanbul ignore next */\r\n exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;\r\n\r\n // double: ieee754\r\n })(); else (function() {\r\n\r\n function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {\r\n var sign = val < 0 ? 1 : 0;\r\n if (sign)\r\n val = -val;\r\n if (val === 0) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);\r\n } else if (isNaN(val)) {\r\n writeUint(0, buf, pos + off0);\r\n writeUint(2146959360, buf, pos + off1);\r\n } else if (val > 1.7976931348623157e+308) { // +-Infinity\r\n writeUint(0, buf, pos + off0);\r\n writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);\r\n } else {\r\n var mantissa;\r\n if (val < 2.2250738585072014e-308) { // denormal\r\n mantissa = val / 5e-324;\r\n writeUint(mantissa >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);\r\n } else {\r\n var exponent = Math.floor(Math.log(val) / Math.LN2);\r\n if (exponent === 1024)\r\n exponent = 1023;\r\n mantissa = val * Math.pow(2, -exponent);\r\n writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);\r\n writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);\r\n }\r\n }\r\n }\r\n\r\n exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);\r\n exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);\r\n\r\n function readDouble_ieee754(readUint, off0, off1, buf, pos) {\r\n var lo = readUint(buf, pos + off0),\r\n hi = readUint(buf, pos + off1);\r\n var sign = (hi >> 31) * 2 + 1,\r\n exponent = hi >>> 20 & 2047,\r\n mantissa = 4294967296 * (hi & 1048575) + lo;\r\n return exponent === 2047\r\n ? mantissa\r\n ? NaN\r\n : sign * Infinity\r\n : exponent === 0 // denormal\r\n ? sign * 5e-324 * mantissa\r\n : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);\r\n }\r\n\r\n exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);\r\n exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);\r\n\r\n })();\r\n\r\n return exports;\r\n}\r\n\r\n// uint helpers\r\n\r\nfunction writeUintLE(val, buf, pos) {\r\n buf[pos ] = val & 255;\r\n buf[pos + 1] = val >>> 8 & 255;\r\n buf[pos + 2] = val >>> 16 & 255;\r\n buf[pos + 3] = val >>> 24;\r\n}\r\n\r\nfunction writeUintBE(val, buf, pos) {\r\n buf[pos ] = val >>> 24;\r\n buf[pos + 1] = val >>> 16 & 255;\r\n buf[pos + 2] = val >>> 8 & 255;\r\n buf[pos + 3] = val & 255;\r\n}\r\n\r\nfunction readUintLE(buf, pos) {\r\n return (buf[pos ]\r\n | buf[pos + 1] << 8\r\n | buf[pos + 2] << 16\r\n | buf[pos + 3] << 24) >>> 0;\r\n}\r\n\r\nfunction readUintBE(buf, pos) {\r\n return (buf[pos ] << 24\r\n | buf[pos + 1] << 16\r\n | buf[pos + 2] << 8\r\n | buf[pos + 3]) >>> 0;\r\n}\r\n","\"use strict\";\r\nmodule.exports = inquire;\r\n\r\n/**\r\n * Requires a module only if available.\r\n * @memberof util\r\n * @param {string} moduleName Module to require\r\n * @returns {?Object} Required module if available and not empty, otherwise `null`\r\n */\r\nfunction inquire(moduleName) {\r\n try {\r\n var mod = eval(\"quire\".replace(/^/,\"re\"))(moduleName); // eslint-disable-line no-eval\r\n if (mod && (mod.length || Object.keys(mod).length))\r\n return mod;\r\n } catch (e) {} // eslint-disable-line no-empty\r\n return null;\r\n}\r\n","\"use strict\";\r\n\r\n/**\r\n * A minimal UTF8 implementation for number arrays.\r\n * @memberof util\r\n * @namespace\r\n */\r\nvar utf8 = exports;\r\n\r\n/**\r\n * Calculates the UTF8 byte length of a string.\r\n * @param {string} string String\r\n * @returns {number} Byte length\r\n */\r\nutf8.length = function utf8_length(string) {\r\n var len = 0,\r\n c = 0;\r\n for (var i = 0; i < string.length; ++i) {\r\n c = string.charCodeAt(i);\r\n if (c < 128)\r\n len += 1;\r\n else if (c < 2048)\r\n len += 2;\r\n else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {\r\n ++i;\r\n len += 4;\r\n } else\r\n len += 3;\r\n }\r\n return len;\r\n};\r\n\r\n/**\r\n * Reads UTF8 bytes as a string.\r\n * @param {Uint8Array} buffer Source buffer\r\n * @param {number} start Source start\r\n * @param {number} end Source end\r\n * @returns {string} String read\r\n */\r\nutf8.read = function utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null,\r\n chunk = [],\r\n i = 0, // char offset\r\n t; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128)\r\n chunk[i++] = t;\r\n else if (t > 191 && t < 224)\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n } else\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n};\r\n\r\n/**\r\n * Writes a string as UTF8 bytes.\r\n * @param {string} string Source string\r\n * @param {Uint8Array} buffer Destination buffer\r\n * @param {number} offset Destination offset\r\n * @returns {number} Bytes written\r\n */\r\nutf8.write = function utf8_write(string, buffer, offset) {\r\n var start = offset,\r\n c1, // character 1\r\n c2; // character 2\r\n for (var i = 0; i < string.length; ++i) {\r\n c1 = string.charCodeAt(i);\r\n if (c1 < 128) {\r\n buffer[offset++] = c1;\r\n } else if (c1 < 2048) {\r\n buffer[offset++] = c1 >> 6 | 192;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {\r\n c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);\r\n ++i;\r\n buffer[offset++] = c1 >> 18 | 240;\r\n buffer[offset++] = c1 >> 12 & 63 | 128;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n } else {\r\n buffer[offset++] = c1 >> 12 | 224;\r\n buffer[offset++] = c1 >> 6 & 63 | 128;\r\n buffer[offset++] = c1 & 63 | 128;\r\n }\r\n }\r\n return offset - start;\r\n};\r\n","\"use strict\";\r\nmodule.exports = pool;\r\n\r\n/**\r\n * An allocator as used by {@link util.pool}.\r\n * @typedef PoolAllocator\r\n * @type {function}\r\n * @param {number} size Buffer size\r\n * @returns {Uint8Array} Buffer\r\n */\r\n\r\n/**\r\n * A slicer as used by {@link util.pool}.\r\n * @typedef PoolSlicer\r\n * @type {function}\r\n * @param {number} start Start offset\r\n * @param {number} end End offset\r\n * @returns {Uint8Array} Buffer slice\r\n * @this {Uint8Array}\r\n */\r\n\r\n/**\r\n * A general purpose buffer pool.\r\n * @memberof util\r\n * @function\r\n * @param {PoolAllocator} alloc Allocator\r\n * @param {PoolSlicer} slice Slicer\r\n * @param {number} [size=8192] Slab size\r\n * @returns {PoolAllocator} Pooled allocator\r\n */\r\nfunction pool(alloc, slice, size) {\r\n var SIZE = size || 8192;\r\n var MAX = SIZE >>> 1;\r\n var slab = null;\r\n var offset = SIZE;\r\n return function pool_alloc(size) {\r\n if (size < 1 || size > MAX)\r\n return alloc(size);\r\n if (offset + size > SIZE) {\r\n slab = alloc(SIZE);\r\n offset = 0;\r\n }\r\n var buf = slice.call(slab, offset, offset += size);\r\n if (offset & 7) // align to 32 bit\r\n offset = (offset | 7) + 1;\r\n return buf;\r\n };\r\n}\r\n","\"use strict\";\nmodule.exports = LongBits;\n\nvar util = require(\"../util/minimal\");\n\n/**\n * Constructs new long bits.\n * @classdesc Helper class for working with the low and high bits of a 64 bit value.\n * @memberof util\n * @constructor\n * @param {number} lo Low 32 bits, unsigned\n * @param {number} hi High 32 bits, unsigned\n */\nfunction LongBits(lo, hi) {\n\n // note that the casts below are theoretically unnecessary as of today, but older statically\n // generated converter code might still call the ctor with signed 32bits. kept for compat.\n\n /**\n * Low bits.\n * @type {number}\n */\n this.lo = lo >>> 0;\n\n /**\n * High bits.\n * @type {number}\n */\n this.hi = hi >>> 0;\n}\n\n/**\n * Zero bits.\n * @memberof util.LongBits\n * @type {util.LongBits}\n */\nvar zero = LongBits.zero = new LongBits(0, 0);\n\nzero.toNumber = function() { return 0; };\nzero.zzEncode = zero.zzDecode = function() { return this; };\nzero.length = function() { return 1; };\n\n/**\n * Zero hash.\n * @memberof util.LongBits\n * @type {string}\n */\nvar zeroHash = LongBits.zeroHash = \"\\0\\0\\0\\0\\0\\0\\0\\0\";\n\n/**\n * Constructs new long bits from the specified number.\n * @param {number} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.fromNumber = function fromNumber(value) {\n if (value === 0)\n return zero;\n var sign = value < 0;\n if (sign)\n value = -value;\n var lo = value >>> 0,\n hi = (value - lo) / 4294967296 >>> 0;\n if (sign) {\n hi = ~hi >>> 0;\n lo = ~lo >>> 0;\n if (++lo > 4294967295) {\n lo = 0;\n if (++hi > 4294967295)\n hi = 0;\n }\n }\n return new LongBits(lo, hi);\n};\n\n/**\n * Constructs new long bits from a number, long or string.\n * @param {Long|number|string} value Value\n * @returns {util.LongBits} Instance\n */\nLongBits.from = function from(value) {\n if (typeof value === \"number\")\n return LongBits.fromNumber(value);\n if (util.isString(value)) {\n /* istanbul ignore else */\n if (util.Long)\n value = util.Long.fromString(value);\n else\n return LongBits.fromNumber(parseInt(value, 10));\n }\n return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;\n};\n\n/**\n * Converts this long bits to a possibly unsafe JavaScript number.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {number} Possibly unsafe number\n */\nLongBits.prototype.toNumber = function toNumber(unsigned) {\n if (!unsigned && this.hi >>> 31) {\n var lo = ~this.lo + 1 >>> 0,\n hi = ~this.hi >>> 0;\n if (!lo)\n hi = hi + 1 >>> 0;\n return -(lo + hi * 4294967296);\n }\n return this.lo + this.hi * 4294967296;\n};\n\n/**\n * Converts this long bits to a long.\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long} Long\n */\nLongBits.prototype.toLong = function toLong(unsigned) {\n return util.Long\n ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))\n /* istanbul ignore next */\n : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };\n};\n\nvar charCodeAt = String.prototype.charCodeAt;\n\n/**\n * Constructs new long bits from the specified 8 characters long hash.\n * @param {string} hash Hash\n * @returns {util.LongBits} Bits\n */\nLongBits.fromHash = function fromHash(hash) {\n if (hash === zeroHash)\n return zero;\n return new LongBits(\n ( charCodeAt.call(hash, 0)\n | charCodeAt.call(hash, 1) << 8\n | charCodeAt.call(hash, 2) << 16\n | charCodeAt.call(hash, 3) << 24) >>> 0\n ,\n ( charCodeAt.call(hash, 4)\n | charCodeAt.call(hash, 5) << 8\n | charCodeAt.call(hash, 6) << 16\n | charCodeAt.call(hash, 7) << 24) >>> 0\n );\n};\n\n/**\n * Converts this long bits to a 8 characters long hash.\n * @returns {string} Hash\n */\nLongBits.prototype.toHash = function toHash() {\n return String.fromCharCode(\n this.lo & 255,\n this.lo >>> 8 & 255,\n this.lo >>> 16 & 255,\n this.lo >>> 24 ,\n this.hi & 255,\n this.hi >>> 8 & 255,\n this.hi >>> 16 & 255,\n this.hi >>> 24\n );\n};\n\n/**\n * Zig-zag encodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzEncode = function zzEncode() {\n var mask = this.hi >> 31;\n this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;\n this.lo = ( this.lo << 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Zig-zag decodes this long bits.\n * @returns {util.LongBits} `this`\n */\nLongBits.prototype.zzDecode = function zzDecode() {\n var mask = -(this.lo & 1);\n this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;\n this.hi = ( this.hi >>> 1 ^ mask) >>> 0;\n return this;\n};\n\n/**\n * Calculates the length of this longbits when encoded as a varint.\n * @returns {number} Length\n */\nLongBits.prototype.length = function length() {\n var part0 = this.lo,\n part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,\n part2 = this.hi >>> 24;\n return part2 === 0\n ? part1 === 0\n ? part0 < 16384\n ? part0 < 128 ? 1 : 2\n : part0 < 2097152 ? 3 : 4\n : part1 < 16384\n ? part1 < 128 ? 5 : 6\n : part1 < 2097152 ? 7 : 8\n : part2 < 128 ? 9 : 10;\n};\n","\"use strict\";\nvar util = exports;\n\n// used to return a Promise where callback is omitted\nutil.asPromise = require(\"@protobufjs/aspromise\");\n\n// converts to / from base64 encoded strings\nutil.base64 = require(\"@protobufjs/base64\");\n\n// base class of rpc.Service\nutil.EventEmitter = require(\"@protobufjs/eventemitter\");\n\n// float handling accross browsers\nutil.float = require(\"@protobufjs/float\");\n\n// requires modules optionally and hides the call from bundlers\nutil.inquire = require(\"@protobufjs/inquire\");\n\n// converts to / from utf8 encoded strings\nutil.utf8 = require(\"@protobufjs/utf8\");\n\n// provides a node-like buffer pool in the browser\nutil.pool = require(\"@protobufjs/pool\");\n\n// utility to work with the low and high bits of a 64 bit value\nutil.LongBits = require(\"./longbits\");\n\n/**\n * Whether running within node or not.\n * @memberof util\n * @type {boolean}\n */\nutil.isNode = Boolean(typeof global !== \"undefined\"\n && global\n && global.process\n && global.process.versions\n && global.process.versions.node);\n\n/**\n * Global object reference.\n * @memberof util\n * @type {Object}\n */\nutil.global = util.isNode && global\n || typeof window !== \"undefined\" && window\n || typeof self !== \"undefined\" && self\n || this; // eslint-disable-line no-invalid-this\n\n/**\n * An immuable empty array.\n * @memberof util\n * @type {Array.<*>}\n * @const\n */\nutil.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes\n\n/**\n * An immutable empty object.\n * @type {Object}\n * @const\n */\nutil.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes\n\n/**\n * Tests if the specified value is an integer.\n * @function\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is an integer\n */\nutil.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n};\n\n/**\n * Tests if the specified value is a string.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a string\n */\nutil.isString = function isString(value) {\n return typeof value === \"string\" || value instanceof String;\n};\n\n/**\n * Tests if the specified value is a non-null object.\n * @param {*} value Value to test\n * @returns {boolean} `true` if the value is a non-null object\n */\nutil.isObject = function isObject(value) {\n return value && typeof value === \"object\";\n};\n\n/**\n * Checks if a property on a message is considered to be present.\n * This is an alias of {@link util.isSet}.\n * @function\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isset =\n\n/**\n * Checks if a property on a message is considered to be present.\n * @param {Object} obj Plain object or message instance\n * @param {string} prop Property name\n * @returns {boolean} `true` if considered to be present, otherwise `false`\n */\nutil.isSet = function isSet(obj, prop) {\n var value = obj[prop];\n if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins\n return typeof value !== \"object\" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;\n return false;\n};\n\n/**\n * Any compatible Buffer instance.\n * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.\n * @interface Buffer\n * @extends Uint8Array\n */\n\n/**\n * Node's Buffer class if available.\n * @type {Constructor}\n */\nutil.Buffer = (function() {\n try {\n var Buffer = util.inquire(\"buffer\").Buffer;\n // refuse to use non-node buffers if not explicitly assigned (perf reasons):\n return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;\n } catch (e) {\n /* istanbul ignore next */\n return null;\n }\n})();\n\n// Internal alias of or polyfull for Buffer.from.\nutil._Buffer_from = null;\n\n// Internal alias of or polyfill for Buffer.allocUnsafe.\nutil._Buffer_allocUnsafe = null;\n\n/**\n * Creates a new buffer of whatever type supported by the environment.\n * @param {number|number[]} [sizeOrArray=0] Buffer size or number array\n * @returns {Uint8Array|Buffer} Buffer\n */\nutil.newBuffer = function newBuffer(sizeOrArray) {\n /* istanbul ignore next */\n return typeof sizeOrArray === \"number\"\n ? util.Buffer\n ? util._Buffer_allocUnsafe(sizeOrArray)\n : new util.Array(sizeOrArray)\n : util.Buffer\n ? util._Buffer_from(sizeOrArray)\n : typeof Uint8Array === \"undefined\"\n ? sizeOrArray\n : new Uint8Array(sizeOrArray);\n};\n\n/**\n * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.\n * @type {Constructor}\n */\nutil.Array = typeof Uint8Array !== \"undefined\" ? Uint8Array /* istanbul ignore next */ : Array;\n\n/**\n * Any compatible Long instance.\n * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.\n * @interface Long\n * @property {number} low Low bits\n * @property {number} high High bits\n * @property {boolean} unsigned Whether unsigned or not\n */\n\n/**\n * Long.js's Long class if available.\n * @type {Constructor}\n */\nutil.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long\n || /* istanbul ignore next */ util.global.Long\n || util.inquire(\"long\");\n\n/**\n * Regular expression used to verify 2 bit (`bool`) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key2Re = /^true|false|0|1$/;\n\n/**\n * Regular expression used to verify 32 bit (`int32` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key32Re = /^-?(?:0|[1-9][0-9]*)$/;\n\n/**\n * Regular expression used to verify 64 bit (`int64` etc.) map keys.\n * @type {RegExp}\n * @const\n */\nutil.key64Re = /^(?:[\\\\x00-\\\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;\n\n/**\n * Converts a number or long to an 8 characters long hash string.\n * @param {Long|number} value Value to convert\n * @returns {string} Hash\n */\nutil.longToHash = function longToHash(value) {\n return value\n ? util.LongBits.from(value).toHash()\n : util.LongBits.zeroHash;\n};\n\n/**\n * Converts an 8 characters long hash string to a long or number.\n * @param {string} hash Hash\n * @param {boolean} [unsigned=false] Whether unsigned or not\n * @returns {Long|number} Original value\n */\nutil.longFromHash = function longFromHash(hash, unsigned) {\n var bits = util.LongBits.fromHash(hash);\n if (util.Long)\n return util.Long.fromBits(bits.lo, bits.hi, unsigned);\n return bits.toNumber(Boolean(unsigned));\n};\n\n/**\n * Merges the properties of the source object into the destination object.\n * @memberof util\n * @param {Object.} dst Destination object\n * @param {Object.} src Source object\n * @param {boolean} [ifNotSet=false] Merges only if the key is not already set\n * @returns {Object.} Destination object\n */\nfunction merge(dst, src, ifNotSet) { // used by converters\n for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)\n if (dst[keys[i]] === undefined || !ifNotSet)\n dst[keys[i]] = src[keys[i]];\n return dst;\n}\n\nutil.merge = merge;\n\n/**\n * Converts the first character of a string to lower case.\n * @param {string} str String to convert\n * @returns {string} Converted string\n */\nutil.lcFirst = function lcFirst(str) {\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\n/**\n * Creates a custom error constructor.\n * @memberof util\n * @param {string} name Error name\n * @returns {Constructor} Custom error constructor\n */\nfunction newError(name) {\n\n function CustomError(message, properties) {\n\n if (!(this instanceof CustomError))\n return new CustomError(message, properties);\n\n // Error.call(this, message);\n // ^ just returns a new error instance because the ctor can be called as a function\n\n Object.defineProperty(this, \"message\", { get: function() { return message; } });\n\n /* istanbul ignore next */\n if (Error.captureStackTrace) // node\n Error.captureStackTrace(this, CustomError);\n else\n Object.defineProperty(this, \"stack\", { value: new Error().stack || \"\" });\n\n if (properties)\n merge(this, properties);\n }\n\n CustomError.prototype = Object.create(Error.prototype, {\n constructor: {\n value: CustomError,\n writable: true,\n enumerable: false,\n configurable: true,\n },\n name: {\n get: function get() { return name; },\n set: undefined,\n enumerable: false,\n // configurable: false would accurately preserve the behavior of\n // the original, but I'm guessing that was not intentional.\n // For an actual error subclass, this property would\n // be configurable.\n configurable: true,\n },\n toString: {\n value: function value() { return this.name + \": \" + this.message; },\n writable: true,\n enumerable: false,\n configurable: true,\n },\n });\n\n return CustomError;\n}\n\nutil.newError = newError;\n\n/**\n * Constructs a new protocol error.\n * @classdesc Error subclass indicating a protocol specifc error.\n * @memberof util\n * @extends Error\n * @template T extends Message\n * @constructor\n * @param {string} message Error message\n * @param {Object.} [properties] Additional properties\n * @example\n * try {\n * MyMessage.decode(someBuffer); // throws if required fields are missing\n * } catch (e) {\n * if (e instanceof ProtocolError && e.instance)\n * console.log(\"decoded so far: \" + JSON.stringify(e.instance));\n * }\n */\nutil.ProtocolError = newError(\"ProtocolError\");\n\n/**\n * So far decoded message instance.\n * @name util.ProtocolError#instance\n * @type {Message}\n */\n\n/**\n * A OneOf getter as returned by {@link util.oneOfGetter}.\n * @typedef OneOfGetter\n * @type {function}\n * @returns {string|undefined} Set field name, if any\n */\n\n/**\n * Builds a getter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfGetter} Unbound getter\n */\nutil.oneOfGetter = function getOneOf(fieldNames) {\n var fieldMap = {};\n for (var i = 0; i < fieldNames.length; ++i)\n fieldMap[fieldNames[i]] = 1;\n\n /**\n * @returns {string|undefined} Set field name, if any\n * @this Object\n * @ignore\n */\n return function() { // eslint-disable-line consistent-return\n for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)\n if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)\n return keys[i];\n };\n};\n\n/**\n * A OneOf setter as returned by {@link util.oneOfSetter}.\n * @typedef OneOfSetter\n * @type {function}\n * @param {string|undefined} value Field name\n * @returns {undefined}\n */\n\n/**\n * Builds a setter for a oneof's present field name.\n * @param {string[]} fieldNames Field names\n * @returns {OneOfSetter} Unbound setter\n */\nutil.oneOfSetter = function setOneOf(fieldNames) {\n\n /**\n * @param {string} name Field name\n * @returns {undefined}\n * @this Object\n * @ignore\n */\n return function(name) {\n for (var i = 0; i < fieldNames.length; ++i)\n if (fieldNames[i] !== name)\n delete this[fieldNames[i]];\n };\n};\n\n/**\n * Default conversion options used for {@link Message#toJSON} implementations.\n *\n * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:\n *\n * - Longs become strings\n * - Enums become string keys\n * - Bytes become base64 encoded strings\n * - (Sub-)Messages become plain objects\n * - Maps become plain objects with all string keys\n * - Repeated fields become arrays\n * - NaN and Infinity for float and double fields become strings\n *\n * @type {IConversionOptions}\n * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json\n */\nutil.toJSONOptions = {\n longs: String,\n enums: String,\n bytes: String,\n json: true\n};\n\n// Sets up buffer utility according to the environment (called in index-minimal)\nutil._configure = function() {\n var Buffer = util.Buffer;\n /* istanbul ignore if */\n if (!Buffer) {\n util._Buffer_from = util._Buffer_allocUnsafe = null;\n return;\n }\n // because node 4.x buffers are incompatible & immutable\n // see: https://github.com/dcodeIO/protobuf.js/pull/665\n util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||\n /* istanbul ignore next */\n function Buffer_from(value, encoding) {\n return new Buffer(value, encoding);\n };\n util._Buffer_allocUnsafe = Buffer.allocUnsafe ||\n /* istanbul ignore next */\n function Buffer_allocUnsafe(size) {\n return new Buffer(size);\n };\n};\n","\"use strict\";\nmodule.exports = Writer;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferWriter; // cyclic\n\nvar LongBits = util.LongBits,\n base64 = util.base64,\n utf8 = util.utf8;\n\n/**\n * Constructs a new writer operation instance.\n * @classdesc Scheduled writer operation.\n * @constructor\n * @param {function(*, Uint8Array, number)} fn Function to call\n * @param {number} len Value byte length\n * @param {*} val Value to write\n * @ignore\n */\nfunction Op(fn, len, val) {\n\n /**\n * Function to call.\n * @type {function(Uint8Array, number, *)}\n */\n this.fn = fn;\n\n /**\n * Value byte length.\n * @type {number}\n */\n this.len = len;\n\n /**\n * Next operation.\n * @type {Writer.Op|undefined}\n */\n this.next = undefined;\n\n /**\n * Value to write.\n * @type {*}\n */\n this.val = val; // type varies\n}\n\n/* istanbul ignore next */\nfunction noop() {} // eslint-disable-line no-empty-function\n\n/**\n * Constructs a new writer state instance.\n * @classdesc Copied writer state.\n * @memberof Writer\n * @constructor\n * @param {Writer} writer Writer to copy state from\n * @ignore\n */\nfunction State(writer) {\n\n /**\n * Current head.\n * @type {Writer.Op}\n */\n this.head = writer.head;\n\n /**\n * Current tail.\n * @type {Writer.Op}\n */\n this.tail = writer.tail;\n\n /**\n * Current buffer length.\n * @type {number}\n */\n this.len = writer.len;\n\n /**\n * Next state.\n * @type {State|null}\n */\n this.next = writer.states;\n}\n\n/**\n * Constructs a new writer instance.\n * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n */\nfunction Writer() {\n\n /**\n * Current length.\n * @type {number}\n */\n this.len = 0;\n\n /**\n * Operations head.\n * @type {Object}\n */\n this.head = new Op(noop, 0, 0);\n\n /**\n * Operations tail\n * @type {Object}\n */\n this.tail = this.head;\n\n /**\n * Linked forked states.\n * @type {Object|null}\n */\n this.states = null;\n\n // When a value is written, the writer calculates its byte length and puts it into a linked\n // list of operations to perform when finish() is called. This both allows us to allocate\n // buffers of the exact required size and reduces the amount of work we have to do compared\n // to first calculating over objects and then encoding over objects. In our case, the encoding\n // part is just a linked list walk calling operations with already prepared values.\n}\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup() {\n return (Writer.create = function create_buffer() {\n return new BufferWriter();\n })();\n }\n /* istanbul ignore next */\n : function create_array() {\n return new Writer();\n };\n};\n\n/**\n * Creates a new writer.\n * @function\n * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}\n */\nWriter.create = create();\n\n/**\n * Allocates a buffer of the specified size.\n * @param {number} size Buffer size\n * @returns {Uint8Array} Buffer\n */\nWriter.alloc = function alloc(size) {\n return new util.Array(size);\n};\n\n// Use Uint8Array buffer pool in the browser, just like node does with buffers\n/* istanbul ignore else */\nif (util.Array !== Array)\n Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);\n\n/**\n * Pushes a new operation to the queue.\n * @param {function(Uint8Array, number, *)} fn Function to call\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @returns {Writer} `this`\n * @private\n */\nWriter.prototype._push = function push(fn, len, val) {\n this.tail = this.tail.next = new Op(fn, len, val);\n this.len += len;\n return this;\n};\n\nfunction writeByte(val, buf, pos) {\n buf[pos] = val & 255;\n}\n\nfunction writeVarint32(val, buf, pos) {\n while (val > 127) {\n buf[pos++] = val & 127 | 128;\n val >>>= 7;\n }\n buf[pos] = val;\n}\n\n/**\n * Constructs a new varint writer operation instance.\n * @classdesc Scheduled varint writer operation.\n * @extends Op\n * @constructor\n * @param {number} len Value byte length\n * @param {number} val Value to write\n * @ignore\n */\nfunction VarintOp(len, val) {\n this.len = len;\n this.next = undefined;\n this.val = val;\n}\n\nVarintOp.prototype = Object.create(Op.prototype);\nVarintOp.prototype.fn = writeVarint32;\n\n/**\n * Writes an unsigned 32 bit value as a varint.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.uint32 = function write_uint32(value) {\n // here, the call to this.push has been inlined and a varint specific Op subclass is used.\n // uint32 is by far the most frequently used operation and benefits significantly from this.\n this.len += (this.tail = this.tail.next = new VarintOp(\n (value = value >>> 0)\n < 128 ? 1\n : value < 16384 ? 2\n : value < 2097152 ? 3\n : value < 268435456 ? 4\n : 5,\n value)).len;\n return this;\n};\n\n/**\n * Writes a signed 32 bit value as a varint.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.int32 = function write_int32(value) {\n return value < 0\n ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec\n : this.uint32(value);\n};\n\n/**\n * Writes a 32 bit value as a varint, zig-zag encoded.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sint32 = function write_sint32(value) {\n return this.uint32((value << 1 ^ value >> 31) >>> 0);\n};\n\nfunction writeVarint64(val, buf, pos) {\n while (val.hi) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;\n val.hi >>>= 7;\n }\n while (val.lo > 127) {\n buf[pos++] = val.lo & 127 | 128;\n val.lo = val.lo >>> 7;\n }\n buf[pos++] = val.lo;\n}\n\n/**\n * Writes an unsigned 64 bit value as a varint.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.uint64 = function write_uint64(value) {\n var bits = LongBits.from(value);\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a signed 64 bit value as a varint.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.int64 = Writer.prototype.uint64;\n\n/**\n * Writes a signed 64 bit value as a varint, zig-zag encoded.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sint64 = function write_sint64(value) {\n var bits = LongBits.from(value).zzEncode();\n return this._push(writeVarint64, bits.length(), bits);\n};\n\n/**\n * Writes a boolish value as a varint.\n * @param {boolean} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bool = function write_bool(value) {\n return this._push(writeByte, 1, value ? 1 : 0);\n};\n\nfunction writeFixed32(val, buf, pos) {\n buf[pos ] = val & 255;\n buf[pos + 1] = val >>> 8 & 255;\n buf[pos + 2] = val >>> 16 & 255;\n buf[pos + 3] = val >>> 24;\n}\n\n/**\n * Writes an unsigned 32 bit value as fixed 32 bits.\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.fixed32 = function write_fixed32(value) {\n return this._push(writeFixed32, 4, value >>> 0);\n};\n\n/**\n * Writes a signed 32 bit value as fixed 32 bits.\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.sfixed32 = Writer.prototype.fixed32;\n\n/**\n * Writes an unsigned 64 bit value as fixed 64 bits.\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.fixed64 = function write_fixed64(value) {\n var bits = LongBits.from(value);\n return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);\n};\n\n/**\n * Writes a signed 64 bit value as fixed 64 bits.\n * @function\n * @param {Long|number|string} value Value to write\n * @returns {Writer} `this`\n * @throws {TypeError} If `value` is a string and no long library is present.\n */\nWriter.prototype.sfixed64 = Writer.prototype.fixed64;\n\n/**\n * Writes a float (32 bit).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.float = function write_float(value) {\n return this._push(util.float.writeFloatLE, 4, value);\n};\n\n/**\n * Writes a double (64 bit float).\n * @function\n * @param {number} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.double = function write_double(value) {\n return this._push(util.float.writeDoubleLE, 8, value);\n};\n\nvar writeBytes = util.Array.prototype.set\n ? function writeBytes_set(val, buf, pos) {\n buf.set(val, pos); // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytes_for(val, buf, pos) {\n for (var i = 0; i < val.length; ++i)\n buf[pos + i] = val[i];\n };\n\n/**\n * Writes a sequence of bytes.\n * @param {Uint8Array|string} value Buffer or base64 encoded string to write\n * @returns {Writer} `this`\n */\nWriter.prototype.bytes = function write_bytes(value) {\n var len = value.length >>> 0;\n if (!len)\n return this._push(writeByte, 1, 0);\n if (util.isString(value)) {\n var buf = Writer.alloc(len = base64.length(value));\n base64.decode(value, buf, 0);\n value = buf;\n }\n return this.uint32(len)._push(writeBytes, len, value);\n};\n\n/**\n * Writes a string.\n * @param {string} value Value to write\n * @returns {Writer} `this`\n */\nWriter.prototype.string = function write_string(value) {\n var len = utf8.length(value);\n return len\n ? this.uint32(len)._push(utf8.write, len, value)\n : this._push(writeByte, 1, 0);\n};\n\n/**\n * Forks this writer's state by pushing it to a stack.\n * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.\n * @returns {Writer} `this`\n */\nWriter.prototype.fork = function fork() {\n this.states = new State(this);\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n return this;\n};\n\n/**\n * Resets this instance to the last state.\n * @returns {Writer} `this`\n */\nWriter.prototype.reset = function reset() {\n if (this.states) {\n this.head = this.states.head;\n this.tail = this.states.tail;\n this.len = this.states.len;\n this.states = this.states.next;\n } else {\n this.head = this.tail = new Op(noop, 0, 0);\n this.len = 0;\n }\n return this;\n};\n\n/**\n * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.\n * @returns {Writer} `this`\n */\nWriter.prototype.ldelim = function ldelim() {\n var head = this.head,\n tail = this.tail,\n len = this.len;\n this.reset().uint32(len);\n if (len) {\n this.tail.next = head.next; // skip noop\n this.tail = tail;\n this.len += len;\n }\n return this;\n};\n\n/**\n * Finishes the write operation.\n * @returns {Uint8Array} Finished buffer\n */\nWriter.prototype.finish = function finish() {\n var head = this.head.next, // skip noop\n buf = this.constructor.alloc(this.len),\n pos = 0;\n while (head) {\n head.fn(head.val, buf, pos);\n pos += head.len;\n head = head.next;\n }\n // this.head = this.tail = null;\n return buf;\n};\n\nWriter._configure = function(BufferWriter_) {\n BufferWriter = BufferWriter_;\n Writer.create = create();\n BufferWriter._configure();\n};\n","\"use strict\";\nmodule.exports = BufferWriter;\n\n// extends Writer\nvar Writer = require(\"./writer\");\n(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer writer instance.\n * @classdesc Wire format writer using node buffers.\n * @extends Writer\n * @constructor\n */\nfunction BufferWriter() {\n Writer.call(this);\n}\n\nBufferWriter._configure = function () {\n /**\n * Allocates a buffer of the specified size.\n * @function\n * @param {number} size Buffer size\n * @returns {Buffer} Buffer\n */\n BufferWriter.alloc = util._Buffer_allocUnsafe;\n\n BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === \"set\"\n ? function writeBytesBuffer_set(val, buf, pos) {\n buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)\n // also works for plain array values\n }\n /* istanbul ignore next */\n : function writeBytesBuffer_copy(val, buf, pos) {\n if (val.copy) // Buffer values\n val.copy(buf, pos, 0, val.length);\n else for (var i = 0; i < val.length;) // plain array values\n buf[pos++] = val[i++];\n };\n};\n\n\n/**\n * @override\n */\nBufferWriter.prototype.bytes = function write_bytes_buffer(value) {\n if (util.isString(value))\n value = util._Buffer_from(value, \"base64\");\n var len = value.length >>> 0;\n this.uint32(len);\n if (len)\n this._push(BufferWriter.writeBytesBuffer, len, value);\n return this;\n};\n\nfunction writeStringBuffer(val, buf, pos) {\n if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)\n util.utf8.write(val, buf, pos);\n else if (buf.utf8Write)\n buf.utf8Write(val, pos);\n else\n buf.write(val, pos);\n}\n\n/**\n * @override\n */\nBufferWriter.prototype.string = function write_string_buffer(value) {\n var len = util.Buffer.byteLength(value);\n this.uint32(len);\n if (len)\n this._push(writeStringBuffer, len, value);\n return this;\n};\n\n\n/**\n * Finishes the write operation.\n * @name BufferWriter#finish\n * @function\n * @returns {Buffer} Finished buffer\n */\n\nBufferWriter._configure();\n","\"use strict\";\nmodule.exports = Reader;\n\nvar util = require(\"./util/minimal\");\n\nvar BufferReader; // cyclic\n\nvar LongBits = util.LongBits,\n utf8 = util.utf8;\n\n/* istanbul ignore next */\nfunction indexOutOfRange(reader, writeLength) {\n return RangeError(\"index out of range: \" + reader.pos + \" + \" + (writeLength || 1) + \" > \" + reader.len);\n}\n\n/**\n * Constructs a new reader instance using the specified buffer.\n * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.\n * @constructor\n * @param {Uint8Array} buffer Buffer to read from\n */\nfunction Reader(buffer) {\n\n /**\n * Read buffer.\n * @type {Uint8Array}\n */\n this.buf = buffer;\n\n /**\n * Read buffer position.\n * @type {number}\n */\n this.pos = 0;\n\n /**\n * Read buffer length.\n * @type {number}\n */\n this.len = buffer.length;\n}\n\nvar create_array = typeof Uint8Array !== \"undefined\"\n ? function create_typed_array(buffer) {\n if (buffer instanceof Uint8Array || Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n }\n /* istanbul ignore next */\n : function create_array(buffer) {\n if (Array.isArray(buffer))\n return new Reader(buffer);\n throw Error(\"illegal buffer\");\n };\n\nvar create = function create() {\n return util.Buffer\n ? function create_buffer_setup(buffer) {\n return (Reader.create = function create_buffer(buffer) {\n return util.Buffer.isBuffer(buffer)\n ? new BufferReader(buffer)\n /* istanbul ignore next */\n : create_array(buffer);\n })(buffer);\n }\n /* istanbul ignore next */\n : create_array;\n};\n\n/**\n * Creates a new reader using the specified buffer.\n * @function\n * @param {Uint8Array|Buffer} buffer Buffer to read from\n * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}\n * @throws {Error} If `buffer` is not a valid buffer\n */\nReader.create = create();\n\nReader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice;\n\n/**\n * Reads a varint as an unsigned 32 bit value.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.uint32 = (function read_uint32_setup() {\n var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)\n return function read_uint32() {\n value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;\n value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;\n\n /* istanbul ignore if */\n if ((this.pos += 5) > this.len) {\n this.pos = this.len;\n throw indexOutOfRange(this, 10);\n }\n return value;\n };\n})();\n\n/**\n * Reads a varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.int32 = function read_int32() {\n return this.uint32() | 0;\n};\n\n/**\n * Reads a zig-zag encoded varint as a signed 32 bit value.\n * @returns {number} Value read\n */\nReader.prototype.sint32 = function read_sint32() {\n var value = this.uint32();\n return value >>> 1 ^ -(value & 1) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readLongVarint() {\n // tends to deopt with local vars for octet etc.\n var bits = new LongBits(0, 0);\n var i = 0;\n if (this.len - this.pos > 4) { // fast route (lo)\n for (; i < 4; ++i) {\n // 1st..4th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 5th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n i = 0;\n } else {\n for (; i < 3; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 1st..3th\n bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n // 4th\n bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;\n return bits;\n }\n if (this.len - this.pos > 4) { // fast route (hi)\n for (; i < 5; ++i) {\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n } else {\n for (; i < 5; ++i) {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n // 6th..10th\n bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;\n if (this.buf[this.pos++] < 128)\n return bits;\n }\n }\n /* istanbul ignore next */\n throw Error(\"invalid varint encoding\");\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads a varint as a signed 64 bit value.\n * @name Reader#int64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as an unsigned 64 bit value.\n * @name Reader#uint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a zig-zag encoded varint as a signed 64 bit value.\n * @name Reader#sint64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a varint as a boolean.\n * @returns {boolean} Value read\n */\nReader.prototype.bool = function read_bool() {\n return this.uint32() !== 0;\n};\n\nfunction readFixed32_end(buf, end) { // note that this uses `end`, not `pos`\n return (buf[end - 4]\n | buf[end - 3] << 8\n | buf[end - 2] << 16\n | buf[end - 1] << 24) >>> 0;\n}\n\n/**\n * Reads fixed 32 bits as an unsigned 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.fixed32 = function read_fixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4);\n};\n\n/**\n * Reads fixed 32 bits as a signed 32 bit integer.\n * @returns {number} Value read\n */\nReader.prototype.sfixed32 = function read_sfixed32() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n return readFixed32_end(this.buf, this.pos += 4) | 0;\n};\n\n/* eslint-disable no-invalid-this */\n\nfunction readFixed64(/* this: Reader */) {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 8);\n\n return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));\n}\n\n/* eslint-enable no-invalid-this */\n\n/**\n * Reads fixed 64 bits.\n * @name Reader#fixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads zig-zag encoded fixed 64 bits.\n * @name Reader#sfixed64\n * @function\n * @returns {Long} Value read\n */\n\n/**\n * Reads a float (32 bit) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.float = function read_float() {\n\n /* istanbul ignore if */\n if (this.pos + 4 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readFloatLE(this.buf, this.pos);\n this.pos += 4;\n return value;\n};\n\n/**\n * Reads a double (64 bit float) as a number.\n * @function\n * @returns {number} Value read\n */\nReader.prototype.double = function read_double() {\n\n /* istanbul ignore if */\n if (this.pos + 8 > this.len)\n throw indexOutOfRange(this, 4);\n\n var value = util.float.readDoubleLE(this.buf, this.pos);\n this.pos += 8;\n return value;\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @returns {Uint8Array} Value read\n */\nReader.prototype.bytes = function read_bytes() {\n var length = this.uint32(),\n start = this.pos,\n end = this.pos + length;\n\n /* istanbul ignore if */\n if (end > this.len)\n throw indexOutOfRange(this, length);\n\n this.pos += length;\n if (Array.isArray(this.buf)) // plain array\n return this.buf.slice(start, end);\n\n if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1\n var nativeBuffer = util.Buffer;\n return nativeBuffer\n ? nativeBuffer.alloc(0)\n : new this.buf.constructor(0);\n }\n return this._slice.call(this.buf, start, end);\n};\n\n/**\n * Reads a string preceeded by its byte length as a varint.\n * @returns {string} Value read\n */\nReader.prototype.string = function read_string() {\n var bytes = this.bytes();\n return utf8.read(bytes, 0, bytes.length);\n};\n\n/**\n * Skips the specified number of bytes if specified, otherwise skips a varint.\n * @param {number} [length] Length if known, otherwise a varint is assumed\n * @returns {Reader} `this`\n */\nReader.prototype.skip = function skip(length) {\n if (typeof length === \"number\") {\n /* istanbul ignore if */\n if (this.pos + length > this.len)\n throw indexOutOfRange(this, length);\n this.pos += length;\n } else {\n do {\n /* istanbul ignore if */\n if (this.pos >= this.len)\n throw indexOutOfRange(this);\n } while (this.buf[this.pos++] & 128);\n }\n return this;\n};\n\n/**\n * Skips the next element of the specified wire type.\n * @param {number} wireType Wire type received\n * @returns {Reader} `this`\n */\nReader.prototype.skipType = function(wireType) {\n switch (wireType) {\n case 0:\n this.skip();\n break;\n case 1:\n this.skip(8);\n break;\n case 2:\n this.skip(this.uint32());\n break;\n case 3:\n while ((wireType = this.uint32() & 7) !== 4) {\n this.skipType(wireType);\n }\n break;\n case 5:\n this.skip(4);\n break;\n\n /* istanbul ignore next */\n default:\n throw Error(\"invalid wire type \" + wireType + \" at offset \" + this.pos);\n }\n return this;\n};\n\nReader._configure = function(BufferReader_) {\n BufferReader = BufferReader_;\n Reader.create = create();\n BufferReader._configure();\n\n var fn = util.Long ? \"toLong\" : /* istanbul ignore next */ \"toNumber\";\n util.merge(Reader.prototype, {\n\n int64: function read_int64() {\n return readLongVarint.call(this)[fn](false);\n },\n\n uint64: function read_uint64() {\n return readLongVarint.call(this)[fn](true);\n },\n\n sint64: function read_sint64() {\n return readLongVarint.call(this).zzDecode()[fn](false);\n },\n\n fixed64: function read_fixed64() {\n return readFixed64.call(this)[fn](true);\n },\n\n sfixed64: function read_sfixed64() {\n return readFixed64.call(this)[fn](false);\n }\n\n });\n};\n","\"use strict\";\nmodule.exports = BufferReader;\n\n// extends Reader\nvar Reader = require(\"./reader\");\n(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;\n\nvar util = require(\"./util/minimal\");\n\n/**\n * Constructs a new buffer reader instance.\n * @classdesc Wire format reader using node buffers.\n * @extends Reader\n * @constructor\n * @param {Buffer} buffer Buffer to read from\n */\nfunction BufferReader(buffer) {\n Reader.call(this, buffer);\n\n /**\n * Read buffer.\n * @name BufferReader#buf\n * @type {Buffer}\n */\n}\n\nBufferReader._configure = function () {\n /* istanbul ignore else */\n if (util.Buffer)\n BufferReader.prototype._slice = util.Buffer.prototype.slice;\n};\n\n\n/**\n * @override\n */\nBufferReader.prototype.string = function read_string_buffer() {\n var len = this.uint32(); // modifies pos\n return this.buf.utf8Slice\n ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))\n : this.buf.toString(\"utf-8\", this.pos, this.pos = Math.min(this.pos + len, this.len));\n};\n\n/**\n * Reads a sequence of bytes preceeded by its length as a varint.\n * @name BufferReader#bytes\n * @function\n * @returns {Buffer} Value read\n */\n\nBufferReader._configure();\n","\"use strict\";\nmodule.exports = Service;\n\nvar util = require(\"../util/minimal\");\n\n// Extends EventEmitter\n(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;\n\n/**\n * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.\n *\n * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.\n * @typedef rpc.ServiceMethodCallback\n * @template TRes extends Message\n * @type {function}\n * @param {Error|null} error Error, if any\n * @param {TRes} [response] Response message\n * @returns {undefined}\n */\n\n/**\n * A service method part of a {@link rpc.Service} as created by {@link Service.create}.\n * @typedef rpc.ServiceMethod\n * @template TReq extends Message\n * @template TRes extends Message\n * @type {function}\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message\n * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined`\n */\n\n/**\n * Constructs a new RPC service instance.\n * @classdesc An RPC service as returned by {@link Service#create}.\n * @exports rpc.Service\n * @extends util.EventEmitter\n * @constructor\n * @param {RPCImpl} rpcImpl RPC implementation\n * @param {boolean} [requestDelimited=false] Whether requests are length-delimited\n * @param {boolean} [responseDelimited=false] Whether responses are length-delimited\n */\nfunction Service(rpcImpl, requestDelimited, responseDelimited) {\n\n if (typeof rpcImpl !== \"function\")\n throw TypeError(\"rpcImpl must be a function\");\n\n util.EventEmitter.call(this);\n\n /**\n * RPC implementation. Becomes `null` once the service is ended.\n * @type {RPCImpl|null}\n */\n this.rpcImpl = rpcImpl;\n\n /**\n * Whether requests are length-delimited.\n * @type {boolean}\n */\n this.requestDelimited = Boolean(requestDelimited);\n\n /**\n * Whether responses are length-delimited.\n * @type {boolean}\n */\n this.responseDelimited = Boolean(responseDelimited);\n}\n\n/**\n * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.\n * @param {Method|rpc.ServiceMethod} method Reflected or static method\n * @param {Constructor} requestCtor Request constructor\n * @param {Constructor} responseCtor Response constructor\n * @param {TReq|Properties} request Request message or plain object\n * @param {rpc.ServiceMethodCallback} callback Service callback\n * @returns {undefined}\n * @template TReq extends Message\n * @template TRes extends Message\n */\nService.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {\n\n if (!request)\n throw TypeError(\"request must be specified\");\n\n var self = this;\n if (!callback)\n return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);\n\n if (!self.rpcImpl) {\n setTimeout(function() { callback(Error(\"already ended\")); }, 0);\n return undefined;\n }\n\n try {\n return self.rpcImpl(\n method,\n requestCtor[self.requestDelimited ? \"encodeDelimited\" : \"encode\"](request).finish(),\n function rpcCallback(err, response) {\n\n if (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n\n if (response === null) {\n self.end(/* endedByRPC */ true);\n return undefined;\n }\n\n if (!(response instanceof responseCtor)) {\n try {\n response = responseCtor[self.responseDelimited ? \"decodeDelimited\" : \"decode\"](response);\n } catch (err) {\n self.emit(\"error\", err, method);\n return callback(err);\n }\n }\n\n self.emit(\"data\", response, method);\n return callback(null, response);\n }\n );\n } catch (err) {\n self.emit(\"error\", err, method);\n setTimeout(function() { callback(err); }, 0);\n return undefined;\n }\n};\n\n/**\n * Ends this service and emits the `end` event.\n * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.\n * @returns {rpc.Service} `this`\n */\nService.prototype.end = function end(endedByRPC) {\n if (this.rpcImpl) {\n if (!endedByRPC) // signal end to rpcImpl\n this.rpcImpl(null, null, null);\n this.rpcImpl = null;\n this.emit(\"end\").off();\n }\n return this;\n};\n","\"use strict\";\n\n/**\n * Streaming RPC helpers.\n * @namespace\n */\nvar rpc = exports;\n\n/**\n * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.\n * @typedef RPCImpl\n * @type {function}\n * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called\n * @param {Uint8Array} requestData Request data\n * @param {RPCImplCallback} callback Callback function\n * @returns {undefined}\n * @example\n * function rpcImpl(method, requestData, callback) {\n * if (protobuf.util.lcFirst(method.name) !== \"myMethod\") // compatible with static code\n * throw Error(\"no such method\");\n * asynchronouslyObtainAResponse(requestData, function(err, responseData) {\n * callback(err, responseData);\n * });\n * }\n */\n\n/**\n * Node-style callback as used by {@link RPCImpl}.\n * @typedef RPCImplCallback\n * @type {function}\n * @param {Error|null} error Error, if any, otherwise `null`\n * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error\n * @returns {undefined}\n */\n\nrpc.Service = require(\"./rpc/service\");\n","\"use strict\";\nmodule.exports = {};\n\n/**\n * Named roots.\n * This is where pbjs stores generated structures (the option `-r, --root` specifies a name).\n * Can also be used manually to make roots available across modules.\n * @name roots\n * @type {Object.}\n * @example\n * // pbjs -r myroot -o compiled.js ...\n *\n * // in another module:\n * require(\"./compiled.js\");\n *\n * // in any subsequent module:\n * var root = protobuf.roots[\"myroot\"];\n */\n","\"use strict\";\nvar protobuf = exports;\n\n/**\n * Build type, one of `\"full\"`, `\"light\"` or `\"minimal\"`.\n * @name build\n * @type {string}\n * @const\n */\nprotobuf.build = \"minimal\";\n\n// Serialization\nprotobuf.Writer = require(\"./writer\");\nprotobuf.BufferWriter = require(\"./writer_buffer\");\nprotobuf.Reader = require(\"./reader\");\nprotobuf.BufferReader = require(\"./reader_buffer\");\n\n// Utility\nprotobuf.util = require(\"./util/minimal\");\nprotobuf.rpc = require(\"./rpc\");\nprotobuf.roots = require(\"./roots\");\nprotobuf.configure = configure;\n\n/* istanbul ignore next */\n/**\n * Reconfigures the library according to the environment.\n * @returns {undefined}\n */\nfunction configure() {\n protobuf.util._configure();\n protobuf.Writer._configure(protobuf.BufferWriter);\n protobuf.Reader._configure(protobuf.BufferReader);\n}\n\n// Set up buffer utility according to the environment\nconfigure();\n","// minimal library entry point.\n\n\"use strict\";\nmodule.exports = require(\"./src/index-minimal\");\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Metadata = void 0;\nexports.Metadata = function Metadata(init) {\n const data = new Map();\n const metadata = {\n set(key, value) {\n key = normalizeKey(key);\n if (Array.isArray(value)) {\n if (value.length === 0) {\n data.delete(key);\n }\n else {\n for (const item of value) {\n validate(key, item);\n }\n data.set(key, key.endsWith('-bin') ? value : [value.join(', ')]);\n }\n }\n else {\n validate(key, value);\n data.set(key, [value]);\n }\n return metadata;\n },\n append(key, value) {\n key = normalizeKey(key);\n validate(key, value);\n let values = data.get(key);\n if (values == null) {\n values = [];\n data.set(key, values);\n }\n values.push(value);\n if (!key.endsWith('-bin')) {\n data.set(key, [values.join(', ')]);\n }\n return metadata;\n },\n delete(key) {\n key = normalizeKey(key);\n data.delete(key);\n },\n get(key) {\n var _a;\n key = normalizeKey(key);\n return (_a = data.get(key)) === null || _a === void 0 ? void 0 : _a[0];\n },\n getAll(key) {\n var _a;\n key = normalizeKey(key);\n return ((_a = data.get(key)) !== null && _a !== void 0 ? _a : []);\n },\n has(key) {\n key = normalizeKey(key);\n return data.has(key);\n },\n [Symbol.iterator]() {\n return data[Symbol.iterator]();\n },\n };\n if (init != null) {\n const entries = isIterable(init) ? init : Object.entries(init);\n for (const [key, value] of entries) {\n metadata.set(key, value);\n }\n }\n return metadata;\n};\nfunction normalizeKey(key) {\n return key.toLowerCase();\n}\nfunction validate(key, value) {\n if (!/^[0-9a-z_.-]+$/.test(key)) {\n throw new Error(`Metadata key '${key}' contains illegal characters`);\n }\n if (key.endsWith('-bin')) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`Metadata key '${key}' ends with '-bin', thus it must have binary value`);\n }\n }\n else {\n if (typeof value !== 'string') {\n throw new Error(`Metadata key '${key}' doesn't end with '-bin', thus it must have string value`);\n }\n if (!/^[ -~]*$/.test(value)) {\n throw new Error(`Metadata value '${value}' of key '${key}' contains illegal characters`);\n }\n }\n}\nfunction isIterable(value) {\n return Symbol.iterator in value;\n}\n//# sourceMappingURL=Metadata.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Status = void 0;\n/**\n * gRPC status code.\n *\n * See https://grpc.github.io/grpc/core/md_doc_statuscodes.html.\n */\nvar Status;\n(function (Status) {\n /**\n * Not an error; returned on success.\n */\n Status[Status[\"OK\"] = 0] = \"OK\";\n /**\n * The operation was cancelled, typically by the caller.\n */\n Status[Status[\"CANCELLED\"] = 1] = \"CANCELLED\";\n /**\n * Unknown error.\n *\n * For example, this error may be returned when a `Status` value received from\n * another address space belongs to an error space that is not known in this\n * address space.\n *\n * Also errors raised by APIs that do not return enough error information may\n * be converted to this error.\n */\n Status[Status[\"UNKNOWN\"] = 2] = \"UNKNOWN\";\n /**\n * The client specified an invalid argument.\n *\n * Note that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT`\n * indicates arguments that are problematic regardless of the state of the\n * system (e.g., a malformed file name).\n */\n Status[Status[\"INVALID_ARGUMENT\"] = 3] = \"INVALID_ARGUMENT\";\n /**\n * The deadline expired before the operation could complete.\n *\n * For operations that change the state of the system, this error may be\n * returned even if the operation has completed successfully.\n *\n * For example, a successful response from a server could have been delayed\n * long enough for the deadline to expire.\n */\n Status[Status[\"DEADLINE_EXCEEDED\"] = 4] = \"DEADLINE_EXCEEDED\";\n /**\n * Some requested entity (e.g., file or directory) was not found.\n *\n * Note to server developers: if a request is denied for an entire class of\n * users, such as gradual feature rollout or undocumented allowlist,\n * `NOT_FOUND` may be used. If a request is denied for some users within a\n * class of users, such as user-based access control, `PERMISSION_DENIED` must\n * be used.\n */\n Status[Status[\"NOT_FOUND\"] = 5] = \"NOT_FOUND\";\n /**\n * The entity that a client attempted to create (e.g., file or directory)\n * already exists.\n */\n Status[Status[\"ALREADY_EXISTS\"] = 6] = \"ALREADY_EXISTS\";\n /**\n * The caller does not have permission to execute the specified operation.\n *\n * `PERMISSION_DENIED` must not be used for rejections caused by exhausting\n * some resource (use `RESOURCE_EXHAUSTED` instead for those errors).\n * `PERMISSION_DENIED` must not be used if the caller can not be identified\n * (use `UNAUTHENTICATED` instead for those errors).\n *\n * This error code does not imply the request is valid or the requested entity\n * exists or satisfies other pre-conditions.\n */\n Status[Status[\"PERMISSION_DENIED\"] = 7] = \"PERMISSION_DENIED\";\n /**\n * Some resource has been exhausted, perhaps a per-user quota, or perhaps the\n * entire file system is out of space.\n */\n Status[Status[\"RESOURCE_EXHAUSTED\"] = 8] = \"RESOURCE_EXHAUSTED\";\n /**\n * The operation was rejected because the system is not in a state required\n * for the operation's execution.\n *\n * For example, the directory to be deleted is non-empty, an rmdir operation\n * is applied to a non-directory, etc.\n *\n * Service implementors can use the following guidelines to decide between\n * `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:\n *\n * (a) Use `UNAVAILABLE` if the client can retry just the failing call.\n * (b) Use `ABORTED` if the client should retry at a higher level (e.g.,\n * when a client-specified test-and-set fails, indicating the client\n * should restart a read-modify-write sequence).\n * (c) Use `FAILED_PRECONDITION` if the client should not retry until the\n * system state has been explicitly fixed. E.g., if an \"rmdir\" fails\n * because the directory is non-empty, `FAILED_PRECONDITION` should be\n * returned since the client should not retry unless the files are\n * deleted from the directory.\n */\n Status[Status[\"FAILED_PRECONDITION\"] = 9] = \"FAILED_PRECONDITION\";\n /**\n * The operation was aborted, typically due to a concurrency issue such as a\n * sequencer check failure or transaction abort.\n *\n * See the guidelines above for deciding between `FAILED_PRECONDITION`,\n * `ABORTED`, and `UNAVAILABLE`.\n */\n Status[Status[\"ABORTED\"] = 10] = \"ABORTED\";\n /**\n * The operation was attempted past the valid range.\n *\n * E.g., seeking or reading past end-of-file.\n *\n * Unlike `INVALID_ARGUMENT`, this error indicates a problem that may be fixed\n * if the system state changes. For example, a 32-bit file system will\n * generate `INVALID_ARGUMENT` if asked to read at an offset that is not in\n * the range [0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to read\n * from an offset past the current file size.\n *\n * There is a fair bit of overlap between `FAILED_PRECONDITION` and\n * `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific error)\n * when it applies so that callers who are iterating through a space can\n * easily look for an `OUT_OF_RANGE` error to detect when they are done.\n */\n Status[Status[\"OUT_OF_RANGE\"] = 11] = \"OUT_OF_RANGE\";\n /**\n * The operation is not implemented or is not supported/enabled in this\n * service.\n */\n Status[Status[\"UNIMPLEMENTED\"] = 12] = \"UNIMPLEMENTED\";\n /**\n * Internal errors.\n *\n * This means that some invariants expected by the underlying system have been\n * broken. This error code is reserved for serious errors.\n */\n Status[Status[\"INTERNAL\"] = 13] = \"INTERNAL\";\n /**\n * The service is currently unavailable.\n *\n * This is most likely a transient condition, which can be corrected by\n * retrying with a backoff.\n *\n * Note that it is not always safe to retry non-idempotent operations.\n */\n Status[Status[\"UNAVAILABLE\"] = 14] = \"UNAVAILABLE\";\n /**\n * Unrecoverable data loss or corruption.\n */\n Status[Status[\"DATA_LOSS\"] = 15] = \"DATA_LOSS\";\n /**\n * The request does not have valid authentication credentials for the\n * operation.\n */\n Status[Status[\"UNAUTHENTICATED\"] = 16] = \"UNAUTHENTICATED\";\n})(Status = exports.Status || (exports.Status = {}));\n//# sourceMappingURL=Status.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=MethodDescriptor.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=CallOptions.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=ClientMiddleware.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.composeClientMiddleware = void 0;\nfunction composeClientMiddleware(middleware1, middleware2) {\n return (call, options) => {\n return middleware2(Object.assign(Object.assign({}, call), { next: (request, options2) => {\n return middleware1(Object.assign(Object.assign({}, call), { request }), options2);\n } }), options);\n };\n}\nexports.composeClientMiddleware = composeClientMiddleware;\n//# sourceMappingURL=composeClientMiddleware.js.map","\"use strict\";\nexports.__esModule = undefined;\nexports.__esModule = true;\n\n// Misc helpers\n\nvar objectSetPrototypeOfIsDefined = typeof Object.setPrototypeOf === \"function\";\nvar objectGetPrototypeOfIsDefined = typeof Object.getPrototypeOf === \"function\";\nvar objectDefinePropertyIsDefined = typeof Object.defineProperty === \"function\";\nvar objectCreateIsDefined = typeof Object.create === \"function\";\nvar objectHasOwnPropertyIsDefined =\n typeof Object.prototype.hasOwnProperty === \"function\";\n\nvar setPrototypeOf = function setPrototypeOf(target, prototype) {\n if (objectSetPrototypeOfIsDefined) {\n Object.setPrototypeOf(target, prototype);\n } else {\n target.__proto__ = prototype;\n }\n};\nexports.setPrototypeOf = setPrototypeOf;\n\nvar getPrototypeOf = function getPrototypeOf(target) {\n if (objectGetPrototypeOfIsDefined) {\n return Object.getPrototypeOf(target);\n } else {\n return target.__proto__ || target.prototype;\n }\n};\nexports.getPrototypeOf = getPrototypeOf;\n\n// Object.defineProperty exists in IE8, but the implementation is buggy, so we\n// need to test if the call fails, and, if so, set a flag to use the shim, as if\n// the function were not defined. When this error is caught the first time, the\n// function is called again recursively, after the flag is set, so the desired\n// effect is achieved anyway.\nvar ie8ObjectDefinePropertyBug = false;\nvar defineProperty = function defineProperty(target, name, propertyDescriptor) {\n if (objectDefinePropertyIsDefined && !ie8ObjectDefinePropertyBug) {\n try {\n Object.defineProperty(target, name, propertyDescriptor);\n } catch (e) {\n ie8ObjectDefinePropertyBug = true;\n defineProperty(target, name, propertyDescriptor);\n }\n } else {\n target[name] = propertyDescriptor.value;\n }\n};\nexports.defineProperty = defineProperty;\n\nvar hasOwnProperty = function hasOwnProperty(target, name) {\n if (objectHasOwnPropertyIsDefined) {\n return target.hasOwnProperty(target, name);\n } else {\n return target[name] === undefined;\n }\n};\nexports.hasOwnProperty = hasOwnProperty;\n\nvar objectCreate = function objectCreate(prototype, propertyDescriptors) {\n if (objectCreateIsDefined) {\n return Object.create(prototype, propertyDescriptors);\n } else {\n var F = function F() {};\n F.prototype = prototype;\n var result = new F();\n if (typeof propertyDescriptors === \"undefined\") {\n return result;\n }\n if (typeof propertyDescriptors === \"null\") {\n throw new Error(\"PropertyDescriptors must not be null.\");\n }\n if (typeof propertyDescriptors === \"object\") {\n for (var key in propertyDescriptors) {\n if (hasOwnProperty(propertyDescriptors, key)) {\n result[key] = propertyDescriptors[key].value;\n }\n }\n }\n\n return result;\n }\n};\nexports.objectCreate = objectCreate;\n","\"use strict\";\nexports.__esModule = undefined;\nexports.__esModule = true;\n\nvar helpers = require(\"./helpers\");\nvar setPrototypeOf = helpers.setPrototypeOf;\nvar getPrototypeOf = helpers.getPrototypeOf;\nvar defineProperty = helpers.defineProperty;\nvar objectCreate = helpers.objectCreate;\n\n// Small test for IE6-8, which checks if the environment prints errors \"nicely\"\n// If not, a toString() method to be added to the error objects with formatting\n// like in more modern browsers\nvar uglyErrorPrinting = new Error().toString() === \"[object Error]\";\n\n// For compatibility\nvar extendableErrorName = \"\";\n\nfunction ExtendableError(message) {\n // Get the constructor\n var originalConstructor = this.constructor;\n // Get the constructor name from the non-standard name property. If undefined\n // (on old IEs), it uses the string representation of the function to extract\n // the name. This should work in all cases, except for directly instantiated\n // ExtendableError objects, for which the name of the ExtendableError class /\n // function is used\n var constructorName =\n originalConstructor.name ||\n (function () {\n var constructorNameMatch = originalConstructor\n .toString()\n .match(/^function\\s*([^\\s(]+)/);\n return constructorNameMatch === null\n ? extendableErrorName\n ? extendableErrorName\n : \"Error\"\n : constructorNameMatch[1];\n })();\n // If the constructor name is \"Error\", ...\n var constructorNameIsError = constructorName === \"Error\";\n // change it to the name of the ExtendableError class / function\n var name = constructorNameIsError ? extendableErrorName : constructorName;\n\n // Obtain a new Error instance. This also sets the message property already.\n var instance = Error.apply(this, arguments);\n\n // Set the prototype of this to the prototype of instance\n setPrototypeOf(instance, getPrototypeOf(this));\n\n // On old IEs, the instance will not extend our subclasses this way. The fix is to use this from the function call instead.\n if (\n !(instance instanceof originalConstructor) ||\n !(instance instanceof ExtendableError)\n ) {\n var instance = this;\n Error.apply(this, arguments);\n defineProperty(instance, \"message\", {\n configurable: true,\n enumerable: false,\n value: message,\n writable: true,\n });\n }\n\n // define the name property\n defineProperty(instance, \"name\", {\n configurable: true,\n enumerable: false,\n value: name,\n writable: true,\n });\n\n // Use Error.captureStackTrace on V8 to capture the proper stack trace excluding any of our error classes\n if (Error.captureStackTrace) {\n // prettier-ignore\n Error.captureStackTrace(\n instance,\n constructorNameIsError ? ExtendableError : originalConstructor\n );\n }\n // instance.stack can still be undefined, in which case the best solution is to create a new Error object and get it from there\n if (instance.stack === undefined) {\n var err = new Error(message);\n err.name = instance.name;\n instance.stack = err.stack;\n }\n\n // If the environment does not have a proper string representation (IE), provide an alternative toString()\n if (uglyErrorPrinting) {\n defineProperty(instance, \"toString\", {\n configurable: true,\n enumerable: false,\n value: function toString() {\n return (\n (this.name || \"Error\") +\n (typeof this.message === \"undefined\" ? \"\" : \": \" + this.message)\n );\n },\n writable: true,\n });\n }\n\n // We're done!\n return instance;\n}\n\n// Get the name of the ExtendableError function or use the string literal\nextendableErrorName = ExtendableError.name || \"ExtendableError\";\n\n// Set the prototype of ExtendableError to an Error object\nExtendableError.prototype = objectCreate(Error.prototype, {\n constructor: {\n value: Error,\n enumerable: false,\n writable: true,\n configurable: true,\n },\n});\n\n// Export\nexports.ExtendableError = ExtendableError;\nexports[\"default\"] = exports.ExtendableError;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ClientError = void 0;\nconst ts_error_1 = require(\"ts-error\");\nconst Status_1 = require(\"../Status\");\n/**\n * Represents gRPC errors returned from client calls.\n */\nclass ClientError extends ts_error_1.ExtendableError {\n constructor(path, code, details) {\n super(`${path} ${Status_1.Status[code]}: ${details}`);\n this.path = path;\n this.code = code;\n this.details = details;\n this.name = 'ClientError';\n Object.defineProperty(this, '@@nice-grpc', {\n value: true,\n });\n Object.defineProperty(this, '@@nice-grpc:ClientError', {\n value: true,\n });\n }\n static [Symbol.hasInstance](instance) {\n // allow instances of ClientError from different versions of nice-grpc\n // to work with `instanceof ClientError`\n if (this !== ClientError) {\n return this.prototype.isPrototypeOf(instance);\n }\n return (typeof instance === 'object' &&\n instance !== null &&\n (instance.constructor === ClientError ||\n instance['@@nice-grpc:ClientError'] === true ||\n (instance.name === 'ClientError' && instance['@@nice-grpc'] === true)));\n }\n}\nexports.ClientError = ClientError;\n//# sourceMappingURL=ClientError.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=CallContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=ServerMiddleware.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.composeServerMiddleware = void 0;\nfunction composeServerMiddleware(middleware1, middleware2) {\n return (call, context) => {\n return middleware1(Object.assign(Object.assign({}, call), { next: (request, context1) => {\n return middleware2(Object.assign(Object.assign({}, call), { request }), context1);\n } }), context);\n };\n}\nexports.composeServerMiddleware = composeServerMiddleware;\n//# sourceMappingURL=composeServerMiddleware.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ServerError = void 0;\nconst ts_error_1 = require(\"ts-error\");\nconst Status_1 = require(\"../Status\");\n/**\n * Service implementations may throw this error to report gRPC errors to\n * clients.\n */\nclass ServerError extends ts_error_1.ExtendableError {\n constructor(code, details) {\n super(`${Status_1.Status[code]}: ${details}`);\n this.code = code;\n this.details = details;\n this.name = 'ServerError';\n Object.defineProperty(this, '@@nice-grpc', {\n value: true,\n });\n Object.defineProperty(this, '@@nice-grpc:ServerError', {\n value: true,\n });\n }\n static [Symbol.hasInstance](instance) {\n // allow instances of ServerError from different versions of nice-grpc\n // to work with `instanceof ServerError`\n if (this !== ServerError) {\n return this.prototype.isPrototypeOf(instance);\n }\n return (typeof instance === 'object' &&\n instance !== null &&\n (instance.constructor === ServerError ||\n instance['@@nice-grpc:ServerError'] === true ||\n (instance.name === 'ServerError' && instance['@@nice-grpc'] === true)));\n }\n}\nexports.ServerError = ServerError;\n//# sourceMappingURL=ServerError.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./Metadata\"), exports);\n__exportStar(require(\"./Status\"), exports);\n__exportStar(require(\"./MethodDescriptor\"), exports);\n__exportStar(require(\"./client/CallOptions\"), exports);\n__exportStar(require(\"./client/ClientMiddleware\"), exports);\n__exportStar(require(\"./client/composeClientMiddleware\"), exports);\n__exportStar(require(\"./client/ClientError\"), exports);\n__exportStar(require(\"./server/CallContext\"), exports);\n__exportStar(require(\"./server/ServerMiddleware\"), exports);\n__exportStar(require(\"./server/composeServerMiddleware\"), exports);\n__exportStar(require(\"./server/ServerError\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isGrpcWebServiceDefinition = exports.fromGrpcWebServiceDefinition = void 0;\nfunction fromGrpcWebServiceDefinition(definition) {\n const result = {};\n for (const [key, value] of Object.entries(definition)) {\n if (key === 'serviceName') {\n continue;\n }\n const method = value;\n result[uncapitalize(key)] = {\n path: `/${definition.serviceName}/${key}`,\n requestStream: method.requestStream,\n responseStream: method.responseStream,\n requestDeserialize: method.requestType.deserializeBinary,\n requestSerialize: (value) => value.serializeBinary(),\n responseDeserialize: method.responseType.deserializeBinary,\n responseSerialize: (value) => value.serializeBinary(),\n options: {},\n };\n }\n return result;\n}\nexports.fromGrpcWebServiceDefinition = fromGrpcWebServiceDefinition;\nfunction isGrpcWebServiceDefinition(definition) {\n return 'prototype' in definition;\n}\nexports.isGrpcWebServiceDefinition = isGrpcWebServiceDefinition;\nfunction uncapitalize(value) {\n if (value.length === 0) {\n return value;\n }\n return value[0].toLowerCase() + value.slice(1);\n}\n//# sourceMappingURL=grpc-web.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTsProtoServiceDefinition = exports.fromTsProtoServiceDefinition = void 0;\nfunction fromTsProtoServiceDefinition(definition) {\n const result = {};\n for (const [key, method] of Object.entries(definition.methods)) {\n const requestEncode = method.requestType.encode;\n const requestFromPartial = method.requestType.fromPartial;\n const responseEncode = method.responseType.encode;\n const responseFromPartial = method.responseType.fromPartial;\n result[key] = {\n path: `/${definition.fullName}/${method.name}`,\n requestStream: method.requestStream,\n responseStream: method.responseStream,\n requestDeserialize: method.requestType.decode,\n requestSerialize: requestFromPartial != null\n ? value => requestEncode(requestFromPartial(value)).finish()\n : value => requestEncode(value).finish(),\n responseDeserialize: method.responseType.decode,\n responseSerialize: responseFromPartial != null\n ? value => responseEncode(responseFromPartial(value)).finish()\n : value => responseEncode(value).finish(),\n options: method.options,\n };\n }\n return result;\n}\nexports.fromTsProtoServiceDefinition = fromTsProtoServiceDefinition;\nfunction isTsProtoServiceDefinition(definition) {\n return ('name' in definition && 'fullName' in definition && 'methods' in definition);\n}\nexports.isTsProtoServiceDefinition = isTsProtoServiceDefinition;\n//# sourceMappingURL=ts-proto.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toGrpcWebMethodDefinition = exports.normalizeServiceDefinition = void 0;\nconst grpc_web_1 = require(\"./grpc-web\");\nconst ts_proto_1 = require(\"./ts-proto\");\n/** @internal */\nfunction normalizeServiceDefinition(definition) {\n if ((0, grpc_web_1.isGrpcWebServiceDefinition)(definition)) {\n return (0, grpc_web_1.fromGrpcWebServiceDefinition)(definition);\n }\n else if ((0, ts_proto_1.isTsProtoServiceDefinition)(definition)) {\n return (0, ts_proto_1.fromTsProtoServiceDefinition)(definition);\n }\n else {\n return definition;\n }\n}\nexports.normalizeServiceDefinition = normalizeServiceDefinition;\n/** @internal */\nfunction toGrpcWebMethodDefinition(definition) {\n const [, serviceName, methodName] = definition.path.split('/');\n return {\n service: {\n serviceName,\n },\n methodName,\n requestStream: definition.requestStream,\n responseStream: definition.responseStream,\n requestType: class {\n constructor() {\n throw new Error('Unexpected instantiation');\n }\n static deserializeBinary(bytes) {\n return definition.requestDeserialize(bytes);\n }\n },\n responseType: class {\n constructor() {\n throw new Error('Unexpected instantiation');\n }\n static deserializeBinary(bytes) {\n return definition.responseDeserialize(bytes);\n }\n },\n };\n}\nexports.toGrpcWebMethodDefinition = toGrpcWebMethodDefinition;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createChannel = void 0;\nfunction createChannel(address, transport) {\n return { address, transport };\n}\nexports.createChannel = createChannel;\n//# sourceMappingURL=channel.js.map","!function(e,t){if(\"object\"==typeof exports&&\"object\"==typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)(\"object\"==typeof exports?exports:e)[n]=r[n]}}(this,(function(){return e={418:function(e,t){!function(e,t){for(var r in t)e[r]=t[r]}(t,function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=1)}([function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=r(3),o=function(){function e(e,t){void 0===e&&(e={}),void 0===t&&(t={splitValues:!1});var r,o=this;this.headersMap={},e&&(\"undefined\"!=typeof Headers&&e instanceof Headers?n.getHeaderKeys(e).forEach((function(r){n.getHeaderValues(e,r).forEach((function(e){t.splitValues?o.append(r,n.splitHeaderValue(e)):o.append(r,e)}))})):\"object\"==typeof(r=e)&&\"object\"==typeof r.headersMap&&\"function\"==typeof r.forEach?e.forEach((function(e,t){o.append(e,t)})):\"undefined\"!=typeof Map&&e instanceof Map?e.forEach((function(e,t){o.append(t,e)})):\"string\"==typeof e?this.appendFromString(e):\"object\"==typeof e&&Object.getOwnPropertyNames(e).forEach((function(t){var r=e[t];Array.isArray(r)?r.forEach((function(e){o.append(t,e)})):o.append(t,r)})))}return e.prototype.appendFromString=function(e){for(var t=e.split(\"\\r\\n\"),r=0;r0){var s=n.substring(0,o).trim(),i=n.substring(o+1).trim();this.append(s,i)}}},e.prototype.delete=function(e,t){var r=n.normalizeName(e);if(void 0===t)delete this.headersMap[r];else{var o=this.headersMap[r];if(o){var s=o.indexOf(t);s>=0&&o.splice(s,1),0===o.length&&delete this.headersMap[r]}}},e.prototype.append=function(e,t){var r=this,o=n.normalizeName(e);Array.isArray(this.headersMap[o])||(this.headersMap[o]=[]),Array.isArray(t)?t.forEach((function(e){r.headersMap[o].push(n.normalizeValue(e))})):this.headersMap[o].push(n.normalizeValue(t))},e.prototype.set=function(e,t){var r=n.normalizeName(e);if(Array.isArray(t)){var o=[];t.forEach((function(e){o.push(n.normalizeValue(e))})),this.headersMap[r]=o}else this.headersMap[r]=[n.normalizeValue(t)]},e.prototype.has=function(e,t){var r=this.headersMap[n.normalizeName(e)];if(!Array.isArray(r))return!1;if(void 0!==t){var o=n.normalizeValue(t);return r.indexOf(o)>=0}return!0},e.prototype.get=function(e){var t=this.headersMap[n.normalizeName(e)];return void 0!==t?t.concat():[]},e.prototype.forEach=function(e){var t=this;Object.getOwnPropertyNames(this.headersMap).forEach((function(r){e(r,t.headersMap[r])}),this)},e.prototype.toHeaders=function(){if(\"undefined\"!=typeof Headers){var e=new Headers;return this.forEach((function(t,r){r.forEach((function(r){e.append(t,r)}))})),e}throw new Error(\"Headers class is not defined\")},e}();t.BrowserHeaders=o},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=r(0);t.BrowserHeaders=n.BrowserHeaders},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.iterateHeaders=function(e,t){for(var r=e[Symbol.iterator](),n=r.next();!n.done;)t(n.value[0]),n=r.next()},t.iterateHeadersKeys=function(e,t){for(var r=e.keys(),n=r.next();!n.done;)t(n.value),n=r.next()}},function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0});var n=r(2);t.normalizeName=function(e){if(\"string\"!=typeof e&&(e=String(e)),/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(e))throw new TypeError(\"Invalid character in header field name\");return e.toLowerCase()},t.normalizeValue=function(e){return\"string\"!=typeof e&&(e=String(e)),e},t.getHeaderValues=function(e,t){var r=e;if(r instanceof Headers&&r.getAll)return r.getAll(t);var n=r.get(t);return n&&\"string\"==typeof n?[n]:n},t.getHeaderKeys=function(e){var t=e,r={},o=[];return t.keys?n.iterateHeadersKeys(t,(function(e){r[e]||(r[e]=!0,o.push(e))})):t.forEach?t.forEach((function(e,t){r[t]||(r[t]=!0,o.push(t))})):n.iterateHeaders(t,(function(e){var t=e[0];r[t]||(r[t]=!0,o.push(t))})),o},t.splitHeaderValue=function(e){var t=[];return e.split(\", \").forEach((function(e){e.split(\",\").forEach((function(e){t.push(e)}))})),t}}]))},617:function(e,t,r){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.ChunkParser=t.ChunkType=t.encodeASCII=t.decodeASCII=void 0;var n,o=r(65);function s(e){return 9===(t=e)||10===t||13===t||e>=32&&e<=126;var t}function i(e){for(var t=0;t!==e.length;++t)if(!s(e[t]))throw new Error(\"Metadata is not valid (printable) ASCII\");return String.fromCharCode.apply(String,Array.prototype.slice.call(e))}function a(e){return 128==(128&e.getUint8(0))}function u(e){return e.getUint32(1,!1)}function d(e,t,r){return e.byteLength-t>=r}function c(e,t,r){if(e.slice)return e.slice(t,r);var n=e.length;void 0!==r&&(n=r);for(var o=new Uint8Array(n-t),s=0,i=t;i=0?r:s.httpStatusToCode(t);this.props.debug&&i.debug(\"onHeaders.code\",n);var o=e.get(\"grpc-message\")||[];if(this.props.debug&&i.debug(\"onHeaders.gRPCMessage\",o),this.rawOnHeaders(e),n!==s.Code.OK){var a=this.decodeGRPCStatus(o[0]);this.rawOnError(n,a,e)}}},e.prototype.onTransportChunk=function(e){var t=this;if(this.closed)this.props.debug&&i.debug(\"grpc.onChunk received after request was closed - ignoring\");else{var r=[];try{r=this.parser.parse(e)}catch(e){return this.props.debug&&i.debug(\"onChunk.parsing error\",e,e.message),void this.rawOnError(s.Code.Internal,\"parsing error: \"+e.message)}r.forEach((function(e){if(e.chunkType===o.ChunkType.MESSAGE){var r=t.methodDefinition.responseType.deserializeBinary(e.data);t.rawOnMessage(r)}else e.chunkType===o.ChunkType.TRAILERS&&(t.responseHeaders?(t.responseTrailers=new n.Metadata(e.trailers),t.props.debug&&i.debug(\"onChunk.trailers\",t.responseTrailers)):(t.responseHeaders=new n.Metadata(e.trailers),t.rawOnHeaders(t.responseHeaders)))}))}},e.prototype.onTransportEnd=function(){if(this.props.debug&&i.debug(\"grpc.onEnd\"),this.closed)this.props.debug&&i.debug(\"grpc.onEnd received after request was closed - ignoring\");else if(void 0!==this.responseTrailers){var e=c(this.responseTrailers);if(null!==e){var t=this.responseTrailers.get(\"grpc-message\"),r=this.decodeGRPCStatus(t[0]);this.rawOnEnd(e,r,this.responseTrailers)}else this.rawOnError(s.Code.Internal,\"Response closed without grpc-status (Trailers provided)\")}else{if(void 0===this.responseHeaders)return void this.rawOnError(s.Code.Unknown,\"Response closed without headers\");var n=c(this.responseHeaders),o=this.responseHeaders.get(\"grpc-message\");if(this.props.debug&&i.debug(\"grpc.headers only response \",n,o),null===n)return void this.rawOnEnd(s.Code.Unknown,\"Response closed without grpc-status (Headers only)\",this.responseHeaders);var a=this.decodeGRPCStatus(o[0]);this.rawOnEnd(n,a,this.responseHeaders)}},e.prototype.decodeGRPCStatus=function(e){if(!e)return\"\";try{return decodeURIComponent(e)}catch(t){return e}},e.prototype.rawOnEnd=function(e,t,r){var n=this;this.props.debug&&i.debug(\"rawOnEnd\",e,t,r),this.completed||(this.completed=!0,this.onEndCallbacks.forEach((function(o){if(!n.closed)try{o(e,t,r)}catch(e){setTimeout((function(){throw e}),0)}})))},e.prototype.rawOnHeaders=function(e){this.props.debug&&i.debug(\"rawOnHeaders\",e),this.completed||this.onHeadersCallbacks.forEach((function(t){try{t(e)}catch(e){setTimeout((function(){throw e}),0)}}))},e.prototype.rawOnError=function(e,t,r){var o=this;void 0===r&&(r=new n.Metadata),this.props.debug&&i.debug(\"rawOnError\",e,t),this.completed||(this.completed=!0,this.onEndCallbacks.forEach((function(n){if(!o.closed)try{n(e,t,r)}catch(e){setTimeout((function(){throw e}),0)}})))},e.prototype.rawOnMessage=function(e){var t=this;this.props.debug&&i.debug(\"rawOnMessage\",e.toObject()),this.completed||this.closed||this.onMessageCallbacks.forEach((function(r){if(!t.closed)try{r(e)}catch(e){setTimeout((function(){throw e}),0)}}))},e.prototype.onHeaders=function(e){this.onHeadersCallbacks.push(e)},e.prototype.onMessage=function(e){this.onMessageCallbacks.push(e)},e.prototype.onEnd=function(e){this.onEndCallbacks.push(e)},e.prototype.start=function(e){if(this.started)throw new Error(\"Client already started - cannot .start()\");this.started=!0;var t=new n.Metadata(e||{});t.set(\"content-type\",\"application/grpc-web+proto\"),t.set(\"x-grpc-web\",\"1\"),this.transport.start(t)},e.prototype.send=function(e){if(!this.started)throw new Error(\"Client not started - .start() must be called before .send()\");if(this.closed)throw new Error(\"Client already closed - cannot .send()\");if(this.finishedSending)throw new Error(\"Client already finished sending - cannot .send()\");if(!this.methodDefinition.requestStream&&this.sentFirstMessage)throw new Error(\"Message already sent for non-client-streaming method - cannot .send()\");this.sentFirstMessage=!0;var t=u.frameRequest(e);this.transport.sendMessage(t)},e.prototype.finishSend=function(){if(!this.started)throw new Error(\"Client not started - .finishSend() must be called before .close()\");if(this.closed)throw new Error(\"Client already closed - cannot .send()\");if(this.finishedSending)throw new Error(\"Client already finished sending - cannot .finishSend()\");this.finishedSending=!0,this.transport.finishSend()},e.prototype.close=function(){if(!this.started)throw new Error(\"Client not started - .start() must be called before .close()\");if(this.closed)throw new Error(\"Client already closed - cannot .close()\");this.closed=!0,this.props.debug&&i.debug(\"request.abort aborting request\"),this.transport.cancel()},e}();function c(e){var t=e.get(\"grpc-status\")||[];if(t.length>0)try{var r=t[0];return parseInt(r,10)}catch(e){return null}return null}},346:function(e,t){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.debug=void 0,t.debug=function(){for(var e=[],t=0;t=55296&&r<=56319){var n=e.charCodeAt(t+1);n>=56320&&n<=57343&&(r=65536+(r-55296<<10)+(n-56320))}return r}function p(e){for(var t=new Uint8Array(e.length),r=0,n=0;n {\n if (signal.aborted) {\n reject(new AbortError());\n return;\n }\n let removeAbortListener;\n let finished = false;\n function finish() {\n if (!finished) {\n finished = true;\n if (removeAbortListener != null) {\n removeAbortListener();\n }\n }\n }\n const callback = executor(value => {\n resolve(value);\n finish();\n }, reason => {\n reject(reason);\n finish();\n });\n if (!finished) {\n const listener = () => {\n const callbackResult = callback();\n if (callbackResult == null) {\n reject(new AbortError());\n }\n else {\n callbackResult.then(() => {\n reject(new AbortError());\n }, reason => {\n reject(reason);\n });\n }\n finish();\n };\n signal.addEventListener('abort', listener);\n removeAbortListener = () => {\n signal.removeEventListener('abort', listener);\n };\n }\n });\n}\n//# sourceMappingURL=execute.js.map","import { execute } from './execute';\n/**\n * Wrap a promise to reject with `AbortError` once `signal` is aborted.\n *\n * Useful to wrap non-abortable promises.\n * Note that underlying process will NOT be aborted.\n */\nexport function abortable(signal, promise) {\n if (signal.aborted) {\n // prevent unhandled rejection\n const noop = () => { };\n promise.then(noop, noop);\n }\n return execute(signal, (resolve, reject) => {\n promise.then(resolve, reject);\n return () => { };\n });\n}\n//# sourceMappingURL=abortable.js.map","import { execute } from './execute';\n/**\n * Returns a promise that fulfills after delay and rejects with\n * `AbortError` once `signal` is aborted.\n *\n * The delay time is specified as a `Date` object or as an integer denoting\n * milliseconds to wait.\n *\n * Example:\n *\n * // Make requests repeatedly with a delay between consecutive requests\n * while (true) {\n * await makeRequest(signal, params);\n * await delay(signal, 1000);\n * }\n *\n * Example:\n *\n * // Make requests repeatedly with a fixed interval\n * import {addMilliseconds} from 'date-fns';\n *\n * let date = new Date();\n *\n * while (true) {\n * await makeRequest(signal, params);\n *\n * date = addMilliseconds(date, 1000);\n * await delay(signal, date);\n * }\n */\nexport function delay(signal, dueTime) {\n return execute(signal, resolve => {\n const ms = typeof dueTime === 'number' ? dueTime : dueTime.getTime() - Date.now();\n const timer = setTimeout(resolve, ms);\n return () => {\n clearTimeout(timer);\n };\n });\n}\n//# sourceMappingURL=delay.js.map","import { execute } from './execute';\n/**\n * Return a promise that never fulfills and only rejects with `AbortError` once\n * `signal` is aborted.\n */\nexport function forever(signal) {\n return execute(signal, () => () => { });\n}\n//# sourceMappingURL=forever.js.map","import { execute } from './execute';\n/**\n * Returns a promise that fulfills when an event of specific type is emitted\n * from given event target and rejects with `AbortError` once `signal` is\n * aborted.\n *\n * Example:\n *\n * // Create a WebSocket and wait for connection\n * const webSocket = new WebSocket(url);\n *\n * const openEvent = await race(signal, signal => [\n * waitForEvent(signal, webSocket, 'open'),\n * waitForEvent(signal, webSocket, 'close').then(\n * event => {\n * throw new Error(`Failed to connect to ${url}: ${event.reason}`);\n * },\n * ),\n * ]);\n */\nexport function waitForEvent(signal, target, eventName, options) {\n return execute(signal, resolve => {\n let unlisten;\n let finished = false;\n const handler = (...args) => {\n resolve(args.length > 1 ? args : args[0]);\n finished = true;\n if (unlisten != null) {\n unlisten();\n }\n };\n unlisten = listen(target, eventName, handler, options);\n if (finished) {\n unlisten();\n }\n return () => {\n finished = true;\n if (unlisten != null) {\n unlisten();\n }\n };\n });\n}\nfunction listen(target, eventName, handler, options) {\n if (isEventTarget(target)) {\n target.addEventListener(eventName, handler, options);\n return () => target.removeEventListener(eventName, handler, options);\n }\n if (isJQueryStyleEventEmitter(target)) {\n target.on(eventName, handler);\n return () => target.off(eventName, handler);\n }\n if (isNodeStyleEventEmitter(target)) {\n target.addListener(eventName, handler);\n return () => target.removeListener(eventName, handler);\n }\n throw new Error('Invalid event target');\n}\nfunction isNodeStyleEventEmitter(sourceObj) {\n return (isFunction(sourceObj.addListener) && isFunction(sourceObj.removeListener));\n}\nfunction isJQueryStyleEventEmitter(sourceObj) {\n return isFunction(sourceObj.on) && isFunction(sourceObj.off);\n}\nfunction isEventTarget(sourceObj) {\n return (isFunction(sourceObj.addEventListener) &&\n isFunction(sourceObj.removeEventListener));\n}\nconst isFunction = (obj) => typeof obj === 'function';\n//# sourceMappingURL=waitForEvent.js.map","import { AbortError, isAbortError } from './AbortError';\nexport function all(signal, executor) {\n return new Promise((resolve, reject) => {\n if (signal.aborted) {\n reject(new AbortError());\n return;\n }\n const innerAbortController = new AbortController();\n const promises = executor(innerAbortController.signal);\n if (promises.length === 0) {\n resolve([]);\n return;\n }\n const abortListener = () => {\n innerAbortController.abort();\n };\n signal.addEventListener('abort', abortListener);\n let rejection;\n const results = new Array(promises.length);\n let settledCount = 0;\n function settled() {\n settledCount += 1;\n if (settledCount === promises.length) {\n signal.removeEventListener('abort', abortListener);\n if (rejection != null) {\n reject(rejection.reason);\n }\n else {\n resolve(results);\n }\n }\n }\n for (const [i, promise] of promises.entries()) {\n promise.then(value => {\n results[i] = value;\n settled();\n }, reason => {\n innerAbortController.abort();\n if (rejection == null ||\n (!isAbortError(reason) && isAbortError(rejection.reason))) {\n rejection = { reason };\n }\n settled();\n });\n }\n });\n}\n//# sourceMappingURL=all.js.map","import { AbortError, isAbortError } from './AbortError';\n/**\n * Abortable version of `Promise.race`.\n *\n * Creates new inner `AbortSignal` and passes it to `executor`. That signal is\n * aborted when `signal` is aborted or any of the promises returned from\n * `executor` are fulfilled or rejected.\n *\n * Returns a promise that fulfills or rejects when any of the promises returned\n * from `executor` are fulfilled or rejected, and rejects with `AbortError` when\n * `signal` is aborted.\n *\n * The promises returned from `executor` must be abortable, i.e. once\n * `innerSignal` is aborted, they must reject with `AbortError` either\n * immediately, or after doing any async cleanup.\n *\n * Example:\n *\n * const result = await race(signal, signal => [\n * delay(signal, 1000).then(() => ({status: 'timeout'})),\n * makeRequest(signal, params).then(value => ({status: 'success', value})),\n * ]);\n *\n * if (result.status === 'timeout') {\n * // request timed out\n * } else {\n * const response = result.value;\n * }\n */\nexport function race(signal, executor) {\n return new Promise((resolve, reject) => {\n if (signal.aborted) {\n reject(new AbortError());\n return;\n }\n const innerAbortController = new AbortController();\n const promises = executor(innerAbortController.signal);\n const abortListener = () => {\n innerAbortController.abort();\n };\n signal.addEventListener('abort', abortListener);\n let settledCount = 0;\n function settled(result) {\n innerAbortController.abort();\n settledCount += 1;\n if (settledCount === promises.length) {\n signal.removeEventListener('abort', abortListener);\n if (result.status === 'fulfilled') {\n resolve(result.value);\n }\n else {\n reject(result.reason);\n }\n }\n }\n let result;\n for (const promise of promises) {\n promise.then(value => {\n if (result == null) {\n result = { status: 'fulfilled', value };\n }\n settled(result);\n }, reason => {\n if (result == null ||\n (!isAbortError(reason) &&\n (result.status === 'fulfilled' || isAbortError(result.reason)))) {\n result = { status: 'rejected', reason };\n }\n settled(result);\n });\n }\n });\n}\n//# sourceMappingURL=race.js.map","import { delay } from './delay';\nimport { rethrowAbortError } from './AbortError';\n/**\n * Retry function with exponential backoff.\n *\n * The function receives AbortSignal, attempt number starting with 0, and reset\n * function that sets attempt number to -1 so that the next attempt will be\n * made without delay.\n */\nexport async function retry(signal, fn, options = {}) {\n const { baseMs = 1000, maxDelayMs = 30000, onError, maxAttempts = Infinity, } = options;\n let attempt = 0;\n const reset = () => {\n attempt = -1;\n };\n while (true) {\n try {\n return await fn(signal, attempt, reset);\n }\n catch (error) {\n rethrowAbortError(error);\n if (attempt >= maxAttempts) {\n throw error;\n }\n let delayMs;\n if (attempt === -1) {\n delayMs = 0;\n }\n else {\n // https://aws.amazon.com/ru/blogs/architecture/exponential-backoff-and-jitter/\n const backoff = Math.min(maxDelayMs, Math.pow(2, attempt) * baseMs);\n delayMs = Math.round((backoff * (1 + Math.random())) / 2);\n }\n if (onError) {\n onError(error, attempt, delayMs);\n }\n if (delayMs !== 0) {\n await delay(signal, delayMs);\n }\n attempt += 1;\n }\n }\n}\n//# sourceMappingURL=retry.js.map","import { AbortError, catchAbortError, isAbortError } from './AbortError';\n/**\n * Run an abortable function with `fork` and `defer` effects attached to it.\n *\n * `spawn` allows to write Go-style coroutines.\n *\n * Example:\n *\n * // Connect to a database, then start a server, then block until abort.\n * // On abort, gracefully shutdown the server, and once done, disconnect\n * // from the database.\n * spawn(signal, async (signal, {defer}) => {\n * const db = await connectToDb();\n *\n * defer(async () => {\n * await db.close();\n * });\n *\n * const server = await startServer(db);\n *\n * defer(async () => {\n * await server.close();\n * });\n *\n * await forever(signal);\n * });\n *\n * Example:\n *\n * // Connect to a database, then start an infinite polling loop.\n * // On abort, disconnect from the database.\n * spawn(signal, async (signal, {defer}) => {\n * const db = await connectToDb();\n *\n * defer(async () => {\n * await db.close();\n * });\n *\n * while (true) {\n * await poll(signal, db);\n * await delay(signal, 5000);\n * }\n * });\n *\n * Example:\n *\n * // Acquire a lock and execute a function.\n * // Extend the lock while the function is running.\n * // Once the function finishes or the signal is aborted, stop extending\n * // the lock and release it.\n * import Redlock = require('redlock');\n *\n * const lockTtl = 30_000;\n *\n * function withLock(\n * signal: AbortSignal,\n * redlock: Redlock,\n * key: string,\n * fn: (signal: AbortSignal) => Promise,\n * ): Promise {\n * return spawn(signal, async (signal, {fork, defer}) => {\n * const lock = await redlock.lock(key, lockTtl);\n *\n * defer(() => lock.unlock());\n * ​\n * fork(async signal => {\n * while (true) {\n * await delay(signal, lockTtl / 10);\n * await lock.extend(lockTtl);\n * }\n * });\n *\n * return await fn(signal);\n * });\n * }\n *\n * const redlock = new Redlock([redis], {\n * retryCount: -1,\n * });\n *\n * await withLock(signal, redlock, 'the-lock-key', async signal => {\n * // ...\n * });\n */\nexport function spawn(signal, fn) {\n if (signal.aborted) {\n return Promise.reject(new AbortError());\n }\n const deferredFunctions = [];\n /**\n * Aborted when spawned function finishes\n * or one of forked functions throws\n * or parent signal aborted.\n */\n const spawnAbortController = new AbortController();\n const spawnSignal = spawnAbortController.signal;\n const abortSpawn = () => {\n spawnAbortController.abort();\n };\n signal.addEventListener('abort', abortSpawn);\n const removeAbortListener = () => {\n signal.removeEventListener('abort', abortSpawn);\n };\n const tasks = new Set();\n const abortTasks = () => {\n for (const task of tasks) {\n task.abort();\n }\n };\n spawnSignal.addEventListener('abort', abortTasks);\n const removeSpawnAbortListener = () => {\n spawnSignal.removeEventListener('abort', abortTasks);\n };\n let promise = new Promise((resolve, reject) => {\n let result;\n let failure;\n fork(signal => fn(signal, {\n defer(fn) {\n deferredFunctions.push(fn);\n },\n fork,\n }))\n .join()\n .then(value => {\n spawnAbortController.abort();\n result = { value };\n }, error => {\n spawnAbortController.abort();\n if (!isAbortError(error) || failure == null) {\n failure = { error };\n }\n });\n function fork(forkFn) {\n if (spawnSignal.aborted) {\n // return already aborted task\n return {\n abort() { },\n async join() {\n throw new AbortError();\n },\n };\n }\n const taskAbortController = new AbortController();\n const taskSignal = taskAbortController.signal;\n const taskPromise = forkFn(taskSignal);\n const task = {\n abort() {\n taskAbortController.abort();\n },\n join: () => taskPromise,\n };\n tasks.add(task);\n taskPromise\n .catch(catchAbortError)\n .catch(error => {\n failure = { error };\n // error in forked function\n spawnAbortController.abort();\n })\n .finally(() => {\n tasks.delete(task);\n if (tasks.size === 0) {\n if (failure != null) {\n reject(failure.error);\n }\n else {\n resolve(result.value);\n }\n }\n });\n return task;\n }\n });\n promise = promise.finally(() => {\n removeAbortListener();\n removeSpawnAbortListener();\n let deferPromise = Promise.resolve();\n for (let i = deferredFunctions.length - 1; i >= 0; i--) {\n deferPromise = deferPromise.finally(deferredFunctions[i]);\n }\n return deferPromise;\n });\n return promise;\n}\n//# sourceMappingURL=spawn.js.map","import { catchAbortError } from './AbortError';\n/**\n * Invokes an abortable function with implicitly created `AbortSignal`.\n *\n * Returns a function that aborts that signal and waits until passed function\n * finishes.\n *\n * Any error other than `AbortError` thrown from passed function will result in\n * unhandled promise rejection.\n *\n * Example:\n *\n * const stop = run(async signal => {\n * try {\n * while (true) {\n * await delay(signal, 1000);\n * console.log('tick');\n * }\n * } finally {\n * await doCleanup();\n * }\n * });\n *\n * // abort and wait until cleanup is done\n * await stop();\n */\nexport function run(fn) {\n const abortController = new AbortController();\n const promise = fn(abortController.signal).catch(catchAbortError);\n return () => {\n abortController.abort();\n return promise;\n };\n}\n//# sourceMappingURL=run.js.map","import { isAbortError, catchAbortError } from './AbortError';\nimport { delay } from './delay';\nimport { execute } from './execute';\n/**\n * Proactively retry a function with exponential backoff.\n *\n * Also known as hedging.\n *\n * The function will be called multiple times in parallel until it succeeds, in\n * which case all the other calls will be aborted.\n */\nexport function proactiveRetry(signal, fn, options = {}) {\n const { baseMs = 1000, onError, maxAttempts = Infinity } = options;\n return execute(signal, (resolve, reject) => {\n const innerAbortController = new AbortController();\n let attemptsExhausted = false;\n const promises = new Map();\n function handleFulfilled(value) {\n innerAbortController.abort();\n promises.clear();\n resolve(value);\n }\n function handleRejected(err, attempt) {\n promises.delete(attempt);\n if (attemptsExhausted && promises.size === 0) {\n reject(err);\n return;\n }\n if (isAbortError(err)) {\n return;\n }\n if (onError) {\n try {\n onError(err, attempt);\n }\n catch (err) {\n innerAbortController.abort();\n promises.clear();\n reject(err);\n }\n }\n }\n async function makeAttempts(signal) {\n for (let attempt = 0;; attempt++) {\n const promise = fn(signal, attempt);\n promises.set(attempt, promise);\n promise.then(handleFulfilled, err => handleRejected(err, attempt));\n if (attempt + 1 >= maxAttempts) {\n break;\n }\n // https://aws.amazon.com/ru/blogs/architecture/exponential-backoff-and-jitter/\n const backoff = Math.pow(2, attempt) * baseMs;\n const delayMs = Math.round((backoff * (1 + Math.random())) / 2);\n await delay(signal, delayMs);\n }\n attemptsExhausted = true;\n }\n makeAttempts(innerAbortController.signal).catch(catchAbortError);\n return () => {\n innerAbortController.abort();\n };\n });\n}\n//# sourceMappingURL=proactiveRetry.js.map","\"use strict\";\n// borrowed from IxJS\n// https://github.com/ReactiveX/IxJS/blob/v4.5.1/src/asynciterable/asyncsink.ts\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncSink = void 0;\nconst ARRAY_VALUE = 'value';\nconst ARRAY_ERROR = 'error';\nclass AsyncSink {\n constructor() {\n this._ended = false;\n this._values = [];\n this._resolvers = [];\n }\n [Symbol.asyncIterator]() {\n return this;\n }\n write(value) {\n this._push({ type: ARRAY_VALUE, value });\n }\n error(error) {\n this._push({ type: ARRAY_ERROR, error });\n }\n _push(item) {\n if (this._ended) {\n throw new Error('AsyncSink already ended');\n }\n if (this._resolvers.length > 0) {\n const { resolve, reject } = this._resolvers.shift();\n if (item.type === ARRAY_ERROR) {\n reject(item.error);\n }\n else {\n resolve({ done: false, value: item.value });\n }\n }\n else {\n this._values.push(item);\n }\n }\n next() {\n if (this._values.length > 0) {\n const { type, value, error } = this._values.shift();\n if (type === ARRAY_ERROR) {\n return Promise.reject(error);\n }\n else {\n return Promise.resolve({ done: false, value });\n }\n }\n if (this._ended) {\n return Promise.resolve({ done: true });\n }\n return new Promise((resolve, reject) => {\n this._resolvers.push({ resolve, reject });\n });\n }\n end() {\n while (this._resolvers.length > 0) {\n this._resolvers.shift().resolve({ done: true });\n }\n this._ended = true;\n }\n}\nexports.AsyncSink = AsyncSink;\n//# sourceMappingURL=AsyncSink.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAsyncIterable = void 0;\n/** @internal */\nfunction isAsyncIterable(value) {\n return value != null && Symbol.asyncIterator in value;\n}\nexports.isAsyncIterable = isAsyncIterable;\n//# sourceMappingURL=isAsyncIterable.js.map","//\n// THIS FILE IS AUTOMATICALLY GENERATED! DO NOT EDIT BY HAND!\n//\n;\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n ? module.exports = factory()\n : typeof define === 'function' && define.amd\n ? define(factory) :\n // cf. https://github.com/dankogai/js-base64/issues/119\n (function () {\n // existing version for noConflict()\n var _Base64 = global.Base64;\n var gBase64 = factory();\n gBase64.noConflict = function () {\n global.Base64 = _Base64;\n return gBase64;\n };\n if (global.Meteor) { // Meteor.js\n Base64 = gBase64;\n }\n global.Base64 = gBase64;\n })();\n}((typeof self !== 'undefined' ? self\n : typeof window !== 'undefined' ? window\n : typeof global !== 'undefined' ? global\n : this), function () {\n 'use strict';\n /**\n * base64.ts\n *\n * Licensed under the BSD 3-Clause License.\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * References:\n * http://en.wikipedia.org/wiki/Base64\n *\n * @author Dan Kogai (https://github.com/dankogai)\n */\n var version = '3.7.5';\n /**\n * @deprecated use lowercase `version`.\n */\n var VERSION = version;\n var _hasatob = typeof atob === 'function';\n var _hasbtoa = typeof btoa === 'function';\n var _hasBuffer = typeof Buffer === 'function';\n var _TD = typeof TextDecoder === 'function' ? new TextDecoder() : undefined;\n var _TE = typeof TextEncoder === 'function' ? new TextEncoder() : undefined;\n var b64ch = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n var b64chs = Array.prototype.slice.call(b64ch);\n var b64tab = (function (a) {\n var tab = {};\n a.forEach(function (c, i) { return tab[c] = i; });\n return tab;\n })(b64chs);\n var b64re = /^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/;\n var _fromCC = String.fromCharCode.bind(String);\n var _U8Afrom = typeof Uint8Array.from === 'function'\n ? Uint8Array.from.bind(Uint8Array)\n : function (it) { return new Uint8Array(Array.prototype.slice.call(it, 0)); };\n var _mkUriSafe = function (src) { return src\n .replace(/=/g, '').replace(/[+\\/]/g, function (m0) { return m0 == '+' ? '-' : '_'; }); };\n var _tidyB64 = function (s) { return s.replace(/[^A-Za-z0-9\\+\\/]/g, ''); };\n /**\n * polyfill version of `btoa`\n */\n var btoaPolyfill = function (bin) {\n // console.log('polyfilled');\n var u32, c0, c1, c2, asc = '';\n var pad = bin.length % 3;\n for (var i = 0; i < bin.length;) {\n if ((c0 = bin.charCodeAt(i++)) > 255 ||\n (c1 = bin.charCodeAt(i++)) > 255 ||\n (c2 = bin.charCodeAt(i++)) > 255)\n throw new TypeError('invalid character found');\n u32 = (c0 << 16) | (c1 << 8) | c2;\n asc += b64chs[u32 >> 18 & 63]\n + b64chs[u32 >> 12 & 63]\n + b64chs[u32 >> 6 & 63]\n + b64chs[u32 & 63];\n }\n return pad ? asc.slice(0, pad - 3) + \"===\".substring(pad) : asc;\n };\n /**\n * does what `window.btoa` of web browsers do.\n * @param {String} bin binary string\n * @returns {string} Base64-encoded string\n */\n var _btoa = _hasbtoa ? function (bin) { return btoa(bin); }\n : _hasBuffer ? function (bin) { return Buffer.from(bin, 'binary').toString('base64'); }\n : btoaPolyfill;\n var _fromUint8Array = _hasBuffer\n ? function (u8a) { return Buffer.from(u8a).toString('base64'); }\n : function (u8a) {\n // cf. https://stackoverflow.com/questions/12710001/how-to-convert-uint8-array-to-base64-encoded-string/12713326#12713326\n var maxargs = 0x1000;\n var strs = [];\n for (var i = 0, l = u8a.length; i < l; i += maxargs) {\n strs.push(_fromCC.apply(null, u8a.subarray(i, i + maxargs)));\n }\n return _btoa(strs.join(''));\n };\n /**\n * converts a Uint8Array to a Base64 string.\n * @param {boolean} [urlsafe] URL-and-filename-safe a la RFC4648 §5\n * @returns {string} Base64 string\n */\n var fromUint8Array = function (u8a, urlsafe) {\n if (urlsafe === void 0) { urlsafe = false; }\n return urlsafe ? _mkUriSafe(_fromUint8Array(u8a)) : _fromUint8Array(u8a);\n };\n // This trick is found broken https://github.com/dankogai/js-base64/issues/130\n // const utob = (src: string) => unescape(encodeURIComponent(src));\n // reverting good old fationed regexp\n var cb_utob = function (c) {\n if (c.length < 2) {\n var cc = c.charCodeAt(0);\n return cc < 0x80 ? c\n : cc < 0x800 ? (_fromCC(0xc0 | (cc >>> 6))\n + _fromCC(0x80 | (cc & 0x3f)))\n : (_fromCC(0xe0 | ((cc >>> 12) & 0x0f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n else {\n var cc = 0x10000\n + (c.charCodeAt(0) - 0xD800) * 0x400\n + (c.charCodeAt(1) - 0xDC00);\n return (_fromCC(0xf0 | ((cc >>> 18) & 0x07))\n + _fromCC(0x80 | ((cc >>> 12) & 0x3f))\n + _fromCC(0x80 | ((cc >>> 6) & 0x3f))\n + _fromCC(0x80 | (cc & 0x3f)));\n }\n };\n var re_utob = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g;\n /**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-8 string\n * @returns {string} UTF-16 string\n */\n var utob = function (u) { return u.replace(re_utob, cb_utob); };\n //\n var _encode = _hasBuffer\n ? function (s) { return Buffer.from(s, 'utf8').toString('base64'); }\n : _TE\n ? function (s) { return _fromUint8Array(_TE.encode(s)); }\n : function (s) { return _btoa(utob(s)); };\n /**\n * converts a UTF-8-encoded string to a Base64 string.\n * @param {boolean} [urlsafe] if `true` make the result URL-safe\n * @returns {string} Base64 string\n */\n var encode = function (src, urlsafe) {\n if (urlsafe === void 0) { urlsafe = false; }\n return urlsafe\n ? _mkUriSafe(_encode(src))\n : _encode(src);\n };\n /**\n * converts a UTF-8-encoded string to URL-safe Base64 RFC4648 §5.\n * @returns {string} Base64 string\n */\n var encodeURI = function (src) { return encode(src, true); };\n // This trick is found broken https://github.com/dankogai/js-base64/issues/130\n // const btou = (src: string) => decodeURIComponent(escape(src));\n // reverting good old fationed regexp\n var re_btou = /[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g;\n var cb_btou = function (cccc) {\n switch (cccc.length) {\n case 4:\n var cp = ((0x07 & cccc.charCodeAt(0)) << 18)\n | ((0x3f & cccc.charCodeAt(1)) << 12)\n | ((0x3f & cccc.charCodeAt(2)) << 6)\n | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000;\n return (_fromCC((offset >>> 10) + 0xD800)\n + _fromCC((offset & 0x3FF) + 0xDC00));\n case 3:\n return _fromCC(((0x0f & cccc.charCodeAt(0)) << 12)\n | ((0x3f & cccc.charCodeAt(1)) << 6)\n | (0x3f & cccc.charCodeAt(2)));\n default:\n return _fromCC(((0x1f & cccc.charCodeAt(0)) << 6)\n | (0x3f & cccc.charCodeAt(1)));\n }\n };\n /**\n * @deprecated should have been internal use only.\n * @param {string} src UTF-16 string\n * @returns {string} UTF-8 string\n */\n var btou = function (b) { return b.replace(re_btou, cb_btou); };\n /**\n * polyfill version of `atob`\n */\n var atobPolyfill = function (asc) {\n // console.log('polyfilled');\n asc = asc.replace(/\\s+/g, '');\n if (!b64re.test(asc))\n throw new TypeError('malformed base64.');\n asc += '=='.slice(2 - (asc.length & 3));\n var u24, bin = '', r1, r2;\n for (var i = 0; i < asc.length;) {\n u24 = b64tab[asc.charAt(i++)] << 18\n | b64tab[asc.charAt(i++)] << 12\n | (r1 = b64tab[asc.charAt(i++)]) << 6\n | (r2 = b64tab[asc.charAt(i++)]);\n bin += r1 === 64 ? _fromCC(u24 >> 16 & 255)\n : r2 === 64 ? _fromCC(u24 >> 16 & 255, u24 >> 8 & 255)\n : _fromCC(u24 >> 16 & 255, u24 >> 8 & 255, u24 & 255);\n }\n return bin;\n };\n /**\n * does what `window.atob` of web browsers do.\n * @param {String} asc Base64-encoded string\n * @returns {string} binary string\n */\n var _atob = _hasatob ? function (asc) { return atob(_tidyB64(asc)); }\n : _hasBuffer ? function (asc) { return Buffer.from(asc, 'base64').toString('binary'); }\n : atobPolyfill;\n //\n var _toUint8Array = _hasBuffer\n ? function (a) { return _U8Afrom(Buffer.from(a, 'base64')); }\n : function (a) { return _U8Afrom(_atob(a).split('').map(function (c) { return c.charCodeAt(0); })); };\n /**\n * converts a Base64 string to a Uint8Array.\n */\n var toUint8Array = function (a) { return _toUint8Array(_unURI(a)); };\n //\n var _decode = _hasBuffer\n ? function (a) { return Buffer.from(a, 'base64').toString('utf8'); }\n : _TD\n ? function (a) { return _TD.decode(_toUint8Array(a)); }\n : function (a) { return btou(_atob(a)); };\n var _unURI = function (a) { return _tidyB64(a.replace(/[-_]/g, function (m0) { return m0 == '-' ? '+' : '/'; })); };\n /**\n * converts a Base64 string to a UTF-8 string.\n * @param {String} src Base64 string. Both normal and URL-safe are supported\n * @returns {string} UTF-8 string\n */\n var decode = function (src) { return _decode(_unURI(src)); };\n /**\n * check if a value is a valid Base64 string\n * @param {String} src a value to check\n */\n var isValid = function (src) {\n if (typeof src !== 'string')\n return false;\n var s = src.replace(/\\s+/g, '').replace(/={0,2}$/, '');\n return !/[^\\s0-9a-zA-Z\\+/]/.test(s) || !/[^\\s0-9a-zA-Z\\-_]/.test(s);\n };\n //\n var _noEnum = function (v) {\n return {\n value: v, enumerable: false, writable: true, configurable: true\n };\n };\n /**\n * extend String.prototype with relevant methods\n */\n var extendString = function () {\n var _add = function (name, body) { return Object.defineProperty(String.prototype, name, _noEnum(body)); };\n _add('fromBase64', function () { return decode(this); });\n _add('toBase64', function (urlsafe) { return encode(this, urlsafe); });\n _add('toBase64URI', function () { return encode(this, true); });\n _add('toBase64URL', function () { return encode(this, true); });\n _add('toUint8Array', function () { return toUint8Array(this); });\n };\n /**\n * extend Uint8Array.prototype with relevant methods\n */\n var extendUint8Array = function () {\n var _add = function (name, body) { return Object.defineProperty(Uint8Array.prototype, name, _noEnum(body)); };\n _add('toBase64', function (urlsafe) { return fromUint8Array(this, urlsafe); });\n _add('toBase64URI', function () { return fromUint8Array(this, true); });\n _add('toBase64URL', function () { return fromUint8Array(this, true); });\n };\n /**\n * extend Builtin prototypes with relevant methods\n */\n var extendBuiltins = function () {\n extendString();\n extendUint8Array();\n };\n var gBase64 = {\n version: version,\n VERSION: VERSION,\n atob: _atob,\n atobPolyfill: atobPolyfill,\n btoa: _btoa,\n btoaPolyfill: btoaPolyfill,\n fromBase64: decode,\n toBase64: encode,\n encode: encode,\n encodeURI: encodeURI,\n encodeURL: encodeURI,\n utob: utob,\n btou: btou,\n decode: decode,\n isValid: isValid,\n fromUint8Array: fromUint8Array,\n toUint8Array: toUint8Array,\n extendString: extendString,\n extendUint8Array: extendUint8Array,\n extendBuiltins: extendBuiltins\n };\n //\n // export Base64 to the namespace\n //\n // ES5 is yet to have Object.assign() that may make transpilers unhappy.\n // gBase64.Base64 = Object.assign({}, gBase64);\n gBase64.Base64 = {};\n Object.keys(gBase64).forEach(function (k) { return gBase64.Base64[k] = gBase64[k]; });\n return gBase64;\n}));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertMetadataFromGrpcWeb = exports.convertMetadataToGrpcWeb = void 0;\nconst grpc_web_1 = require(\"@improbable-eng/grpc-web\");\nconst nice_grpc_common_1 = require(\"nice-grpc-common\");\nconst js_base64_1 = require(\"js-base64\");\nfunction convertMetadataToGrpcWeb(metadata) {\n const grpcMetadata = new grpc_web_1.grpc.Metadata();\n for (const [key, values] of metadata) {\n for (const value of values) {\n grpcMetadata.append(key, typeof value === 'string' ? value : js_base64_1.Base64.fromUint8Array(value));\n }\n }\n return grpcMetadata;\n}\nexports.convertMetadataToGrpcWeb = convertMetadataToGrpcWeb;\nfunction convertMetadataFromGrpcWeb(grpcMetadata) {\n const metadata = (0, nice_grpc_common_1.Metadata)();\n for (const [key, values] of Object.entries(grpcMetadata.headersMap)) {\n if (key.endsWith('-bin')) {\n for (const value of values) {\n for (const item of value.split(/,\\s?/)) {\n metadata.append(key, js_base64_1.Base64.toUint8Array(item));\n }\n }\n }\n else {\n metadata.set(key, values);\n }\n }\n return metadata;\n}\nexports.convertMetadataFromGrpcWeb = convertMetadataFromGrpcWeb;\n//# sourceMappingURL=convertMetadata.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createBidiStreamingMethod = void 0;\nconst nice_grpc_common_1 = require(\"nice-grpc-common\");\nconst grpc_web_1 = require(\"@improbable-eng/grpc-web\");\nconst abort_controller_x_1 = require(\"abort-controller-x\");\nconst AsyncSink_1 = require(\"../utils/AsyncSink\");\nconst service_definitions_1 = require(\"../service-definitions\");\nconst isAsyncIterable_1 = require(\"../utils/isAsyncIterable\");\nconst convertMetadata_1 = require(\"../utils/convertMetadata\");\n/** @internal */\nfunction createBidiStreamingMethod(definition, channel, middleware, defaultOptions) {\n const grpcMethodDefinition = (0, service_definitions_1.toGrpcWebMethodDefinition)(definition);\n const methodDescriptor = {\n path: definition.path,\n requestStream: definition.requestStream,\n responseStream: definition.responseStream,\n options: definition.options,\n };\n async function* bidiStreamingMethod(request, options) {\n if (!(0, isAsyncIterable_1.isAsyncIterable)(request)) {\n throw new Error('A middleware passed invalid request to next(): expected a single message for bidirectional streaming method');\n }\n const { metadata = (0, nice_grpc_common_1.Metadata)(), signal = new AbortController().signal, onHeader, onTrailer, } = options;\n const pipeAbortController = new AbortController();\n const sink = new AsyncSink_1.AsyncSink();\n const client = grpc_web_1.grpc.client(grpcMethodDefinition, {\n host: channel.address,\n transport: channel.transport,\n });\n client.onHeaders(headers => {\n onHeader === null || onHeader === void 0 ? void 0 : onHeader((0, convertMetadata_1.convertMetadataFromGrpcWeb)(headers));\n });\n client.onMessage(message => {\n sink.write(message);\n });\n client.onEnd((code, message, trailers) => {\n onTrailer === null || onTrailer === void 0 ? void 0 : onTrailer((0, convertMetadata_1.convertMetadataFromGrpcWeb)(trailers));\n if (code === grpc_web_1.grpc.Code.OK) {\n sink.end();\n }\n else {\n sink.error(new nice_grpc_common_1.ClientError(definition.path, +code, message));\n }\n });\n client.start((0, convertMetadata_1.convertMetadataToGrpcWeb)(metadata));\n let pipeError;\n pipeRequest(pipeAbortController.signal, request, client, definition).then(() => {\n client.finishSend();\n }, err => {\n if (!(0, abort_controller_x_1.isAbortError)(err)) {\n pipeError = err;\n client.close();\n sink.end();\n }\n });\n const abortListener = () => {\n sink.error(new abort_controller_x_1.AbortError());\n pipeAbortController.abort();\n client.close();\n };\n signal.addEventListener('abort', abortListener);\n try {\n yield* sink;\n }\n finally {\n pipeAbortController.abort();\n signal.removeEventListener('abort', abortListener);\n (0, abort_controller_x_1.throwIfAborted)(signal);\n if (pipeError) {\n throw pipeError;\n }\n }\n }\n const method = middleware == null\n ? bidiStreamingMethod\n : (request, options) => middleware({\n method: methodDescriptor,\n requestStream: true,\n request,\n responseStream: true,\n next: bidiStreamingMethod,\n }, options);\n return (request, options) => {\n const iterable = method(request, {\n ...defaultOptions,\n ...options,\n });\n const iterator = iterable[Symbol.asyncIterator]();\n return {\n [Symbol.asyncIterator]() {\n return {\n async next() {\n const result = await iterator.next();\n if (result.done && result.value != null) {\n return await iterator.throw(new Error('A middleware returned a message, but expected to return void for bidirectional streaming method'));\n }\n return result;\n },\n return() {\n return iterator.return();\n },\n throw(err) {\n return iterator.throw(err);\n },\n };\n },\n };\n };\n}\nexports.createBidiStreamingMethod = createBidiStreamingMethod;\nasync function pipeRequest(signal, request, client, definition) {\n for await (const item of request) {\n (0, abort_controller_x_1.throwIfAborted)(signal);\n client.send({\n serializeBinary: () => definition.requestSerialize(item),\n });\n }\n}\n//# sourceMappingURL=createBidiStreamingMethod.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createClientStreamingMethod = void 0;\nconst nice_grpc_common_1 = require(\"nice-grpc-common\");\nconst grpc_web_1 = require(\"@improbable-eng/grpc-web\");\nconst abort_controller_x_1 = require(\"abort-controller-x\");\nconst service_definitions_1 = require(\"../service-definitions\");\nconst isAsyncIterable_1 = require(\"../utils/isAsyncIterable\");\nconst convertMetadata_1 = require(\"../utils/convertMetadata\");\n/** @internal */\nfunction createClientStreamingMethod(definition, channel, middleware, defaultOptions) {\n const grpcMethodDefinition = (0, service_definitions_1.toGrpcWebMethodDefinition)(definition);\n const methodDescriptor = {\n path: definition.path,\n requestStream: definition.requestStream,\n responseStream: definition.responseStream,\n options: definition.options,\n };\n async function* clientStreamingMethod(request, options) {\n if (!(0, isAsyncIterable_1.isAsyncIterable)(request)) {\n throw new Error('A middleware passed invalid request to next(): expected a single message for client streaming method');\n }\n const { metadata = (0, nice_grpc_common_1.Metadata)(), signal = new AbortController().signal, onHeader, onTrailer, } = options;\n return await (0, abort_controller_x_1.execute)(signal, (resolve, reject) => {\n const pipeAbortController = new AbortController();\n let response;\n const client = grpc_web_1.grpc.client(grpcMethodDefinition, {\n host: channel.address,\n transport: channel.transport,\n });\n client.onHeaders(headers => {\n onHeader === null || onHeader === void 0 ? void 0 : onHeader((0, convertMetadata_1.convertMetadataFromGrpcWeb)(headers));\n });\n client.onMessage(message => {\n response = message;\n });\n client.onEnd((code, message, trailers) => {\n onTrailer === null || onTrailer === void 0 ? void 0 : onTrailer((0, convertMetadata_1.convertMetadataFromGrpcWeb)(trailers));\n pipeAbortController.abort();\n if (code === grpc_web_1.grpc.Code.OK) {\n resolve(response);\n }\n else {\n reject(new nice_grpc_common_1.ClientError(definition.path, +code, message));\n }\n });\n client.start((0, convertMetadata_1.convertMetadataToGrpcWeb)(metadata));\n pipeRequest(pipeAbortController.signal, request, client, definition).then(() => {\n client.finishSend();\n }, err => {\n if (!(0, abort_controller_x_1.isAbortError)(err)) {\n reject(err);\n client.close();\n }\n });\n return () => {\n pipeAbortController.abort();\n client.close();\n };\n });\n }\n const method = middleware == null\n ? clientStreamingMethod\n : (request, options) => middleware({\n method: methodDescriptor,\n requestStream: true,\n request,\n responseStream: false,\n next: clientStreamingMethod,\n }, options);\n return async (request, options) => {\n const iterable = method(request, {\n ...defaultOptions,\n ...options,\n });\n const iterator = iterable[Symbol.asyncIterator]();\n let result = await iterator.next();\n while (true) {\n if (!result.done) {\n result = await iterator.throw(new Error('A middleware yielded a message, but expected to only return a message for client streaming method'));\n continue;\n }\n if (result.value == null) {\n result = await iterator.throw(new Error('A middleware returned void, but expected to return a message for client streaming method'));\n continue;\n }\n return result.value;\n }\n };\n}\nexports.createClientStreamingMethod = createClientStreamingMethod;\nasync function pipeRequest(signal, request, client, definition) {\n for await (const item of request) {\n (0, abort_controller_x_1.throwIfAborted)(signal);\n client.send({\n serializeBinary: () => definition.requestSerialize(item),\n });\n }\n}\n//# sourceMappingURL=createClientStreamingMethod.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createServerStreamingMethod = void 0;\nconst grpc_web_1 = require(\"@improbable-eng/grpc-web\");\nconst abort_controller_x_1 = require(\"abort-controller-x\");\nconst AsyncSink_1 = require(\"../utils/AsyncSink\");\nconst nice_grpc_common_1 = require(\"nice-grpc-common\");\nconst service_definitions_1 = require(\"../service-definitions\");\nconst convertMetadata_1 = require(\"../utils/convertMetadata\");\nconst isAsyncIterable_1 = require(\"../utils/isAsyncIterable\");\n/** @internal */\nfunction createServerStreamingMethod(definition, channel, middleware, defaultOptions) {\n const grpcMethodDefinition = (0, service_definitions_1.toGrpcWebMethodDefinition)(definition);\n const methodDescriptor = {\n path: definition.path,\n requestStream: definition.requestStream,\n responseStream: definition.responseStream,\n options: definition.options,\n };\n async function* serverStreamingMethod(request, options) {\n if ((0, isAsyncIterable_1.isAsyncIterable)(request)) {\n throw new Error('A middleware passed invalid request to next(): expected a single message for server streaming method');\n }\n const { metadata = (0, nice_grpc_common_1.Metadata)(), signal = new AbortController().signal, onHeader, onTrailer, } = options;\n const sink = new AsyncSink_1.AsyncSink();\n const client = grpc_web_1.grpc.client(grpcMethodDefinition, {\n host: channel.address,\n transport: channel.transport,\n });\n client.onHeaders(headers => {\n onHeader === null || onHeader === void 0 ? void 0 : onHeader((0, convertMetadata_1.convertMetadataFromGrpcWeb)(headers));\n });\n client.onMessage(message => {\n sink.write(message);\n });\n client.onEnd((code, message, trailers) => {\n onTrailer === null || onTrailer === void 0 ? void 0 : onTrailer((0, convertMetadata_1.convertMetadataFromGrpcWeb)(trailers));\n if (code === grpc_web_1.grpc.Code.OK) {\n sink.end();\n }\n else {\n sink.error(new nice_grpc_common_1.ClientError(definition.path, +code, message));\n }\n });\n client.start((0, convertMetadata_1.convertMetadataToGrpcWeb)(metadata));\n client.send({\n serializeBinary: () => definition.requestSerialize(request),\n });\n client.finishSend();\n const abortListener = () => {\n sink.error(new abort_controller_x_1.AbortError());\n client.close();\n };\n signal.addEventListener('abort', abortListener);\n try {\n yield* sink;\n }\n finally {\n signal.removeEventListener('abort', abortListener);\n (0, abort_controller_x_1.throwIfAborted)(signal);\n }\n }\n const method = middleware == null\n ? serverStreamingMethod\n : (request, options) => middleware({\n method: methodDescriptor,\n requestStream: false,\n request,\n responseStream: true,\n next: serverStreamingMethod,\n }, options);\n return (request, options) => {\n const iterable = method(request, {\n ...defaultOptions,\n ...options,\n });\n const iterator = iterable[Symbol.asyncIterator]();\n return {\n [Symbol.asyncIterator]() {\n return {\n async next() {\n const result = await iterator.next();\n if (result.done && result.value != null) {\n return await iterator.throw(new Error('A middleware returned a message, but expected to return void for server streaming method'));\n }\n return result;\n },\n return() {\n return iterator.return();\n },\n throw(err) {\n return iterator.throw(err);\n },\n };\n },\n };\n };\n}\nexports.createServerStreamingMethod = createServerStreamingMethod;\n//# sourceMappingURL=createServerStreamingMethod.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createUnaryMethod = void 0;\nconst nice_grpc_common_1 = require(\"nice-grpc-common\");\nconst grpc_web_1 = require(\"@improbable-eng/grpc-web\");\nconst abort_controller_x_1 = require(\"abort-controller-x\");\nconst service_definitions_1 = require(\"../service-definitions\");\nconst isAsyncIterable_1 = require(\"../utils/isAsyncIterable\");\nconst convertMetadata_1 = require(\"../utils/convertMetadata\");\n/** @internal */\nfunction createUnaryMethod(definition, channel, middleware, defaultOptions) {\n const grpcMethodDefinition = (0, service_definitions_1.toGrpcWebMethodDefinition)(definition);\n const methodDescriptor = {\n path: definition.path,\n requestStream: definition.requestStream,\n responseStream: definition.responseStream,\n options: definition.options,\n };\n async function* unaryMethod(request, options) {\n if ((0, isAsyncIterable_1.isAsyncIterable)(request)) {\n throw new Error('A middleware passed invalid request to next(): expected a single message for unary method');\n }\n const { metadata = (0, nice_grpc_common_1.Metadata)(), signal = new AbortController().signal, onHeader, onTrailer, } = options;\n return await (0, abort_controller_x_1.execute)(signal, (resolve, reject) => {\n let response;\n const client = grpc_web_1.grpc.client(grpcMethodDefinition, {\n host: channel.address,\n transport: channel.transport,\n });\n client.onHeaders(headers => {\n onHeader === null || onHeader === void 0 ? void 0 : onHeader((0, convertMetadata_1.convertMetadataFromGrpcWeb)(headers));\n });\n client.onMessage(message => {\n response = message;\n });\n client.onEnd((code, message, trailers) => {\n onTrailer === null || onTrailer === void 0 ? void 0 : onTrailer((0, convertMetadata_1.convertMetadataFromGrpcWeb)(trailers));\n if (code === grpc_web_1.grpc.Code.OK) {\n resolve(response);\n }\n else {\n reject(new nice_grpc_common_1.ClientError(definition.path, +code, message));\n }\n });\n client.start((0, convertMetadata_1.convertMetadataToGrpcWeb)(metadata));\n client.send({\n serializeBinary: () => definition.requestSerialize(request),\n });\n client.finishSend();\n return () => {\n client.close();\n };\n });\n }\n const method = middleware == null\n ? unaryMethod\n : (request, options) => middleware({\n method: methodDescriptor,\n requestStream: false,\n request,\n responseStream: false,\n next: unaryMethod,\n }, options);\n return async (request, options) => {\n const iterable = method(request, {\n ...defaultOptions,\n ...options,\n });\n const iterator = iterable[Symbol.asyncIterator]();\n let result = await iterator.next();\n while (true) {\n if (!result.done) {\n result = await iterator.throw(new Error('A middleware yielded a message, but expected to only return a message for unary method'));\n continue;\n }\n if (result.value == null) {\n result = await iterator.throw(new Error('A middleware returned void, but expected to return a message for unary method'));\n continue;\n }\n return result.value;\n }\n };\n}\nexports.createUnaryMethod = createUnaryMethod;\n//# sourceMappingURL=createUnaryMethod.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createClient = exports.createClientFactory = void 0;\nconst nice_grpc_common_1 = require(\"nice-grpc-common\");\nconst service_definitions_1 = require(\"../service-definitions\");\nconst createBidiStreamingMethod_1 = require(\"./createBidiStreamingMethod\");\nconst createClientStreamingMethod_1 = require(\"./createClientStreamingMethod\");\nconst createServerStreamingMethod_1 = require(\"./createServerStreamingMethod\");\nconst createUnaryMethod_1 = require(\"./createUnaryMethod\");\nfunction createClientFactory() {\n return createClientFactoryWithMiddleware();\n}\nexports.createClientFactory = createClientFactory;\nfunction createClient(definition, channel, defaultCallOptions) {\n return createClientFactory().create(definition, channel, defaultCallOptions);\n}\nexports.createClient = createClient;\nfunction createClientFactoryWithMiddleware(middleware) {\n return {\n use(newMiddleware) {\n return createClientFactoryWithMiddleware(middleware == null\n ? newMiddleware\n : (0, nice_grpc_common_1.composeClientMiddleware)(middleware, newMiddleware));\n },\n create(definition, channel, defaultCallOptions = {}) {\n const client = {};\n const methodEntries = Object.entries((0, service_definitions_1.normalizeServiceDefinition)(definition));\n for (const [methodName, methodDefinition] of methodEntries) {\n const defaultOptions = {\n ...defaultCallOptions['*'],\n ...defaultCallOptions[methodName],\n };\n if (!methodDefinition.requestStream) {\n if (!methodDefinition.responseStream) {\n client[methodName] = (0, createUnaryMethod_1.createUnaryMethod)(methodDefinition, channel, middleware, defaultOptions);\n }\n else {\n client[methodName] = (0, createServerStreamingMethod_1.createServerStreamingMethod)(methodDefinition, channel, middleware, defaultOptions);\n }\n }\n else {\n if (!methodDefinition.responseStream) {\n client[methodName] = (0, createClientStreamingMethod_1.createClientStreamingMethod)(methodDefinition, channel, middleware, defaultOptions);\n }\n else {\n client[methodName] = (0, createBidiStreamingMethod_1.createBidiStreamingMethod)(methodDefinition, channel, middleware, defaultOptions);\n }\n }\n }\n return client;\n },\n };\n}\n//# sourceMappingURL=ClientFactory.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=Client.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Status = exports.Metadata = exports.composeClientMiddleware = exports.ClientError = void 0;\nvar nice_grpc_common_1 = require(\"nice-grpc-common\");\nObject.defineProperty(exports, \"ClientError\", { enumerable: true, get: function () { return nice_grpc_common_1.ClientError; } });\nObject.defineProperty(exports, \"composeClientMiddleware\", { enumerable: true, get: function () { return nice_grpc_common_1.composeClientMiddleware; } });\nObject.defineProperty(exports, \"Metadata\", { enumerable: true, get: function () { return nice_grpc_common_1.Metadata; } });\nObject.defineProperty(exports, \"Status\", { enumerable: true, get: function () { return nice_grpc_common_1.Status; } });\n__exportStar(require(\"./service-definitions\"), exports);\n__exportStar(require(\"./client/channel\"), exports);\n__exportStar(require(\"./client/ClientFactory\"), exports);\n__exportStar(require(\"./client/Client\"), exports);\n//# sourceMappingURL=index.js.map","// protobuf/ts/faucet/faucet.ts\nimport Long from \"long\";\nimport _m0 from \"protobufjs/minimal.js\";\nvar protobufPackage = \"faucet\";\nfunction createBaseLinkedTwitterPair() {\n return { username: \"\", address: \"\" };\n}\nvar LinkedTwitterPair = {\n encode(message, writer = _m0.Writer.create()) {\n if (message.username !== \"\") {\n writer.uint32(10).string(message.username);\n }\n if (message.address !== \"\") {\n writer.uint32(18).string(message.address);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseLinkedTwitterPair();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n message.username = reader.string();\n continue;\n case 2:\n if (tag != 18) {\n break;\n }\n message.address = reader.string();\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return LinkedTwitterPair.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseLinkedTwitterPair();\n message.username = object.username ?? \"\";\n message.address = object.address ?? \"\";\n return message;\n }\n};\nfunction createBaseFaucetStore() {\n return { addressToUsername: {}, usernameToAddress: {}, latestDrip: {}, totalDripCount: 0 };\n}\nvar FaucetStore = {\n encode(message, writer = _m0.Writer.create()) {\n Object.entries(message.addressToUsername).forEach(([key, value]) => {\n FaucetStore_AddressToUsernameEntry.encode({ key, value }, writer.uint32(10).fork()).ldelim();\n });\n Object.entries(message.usernameToAddress).forEach(([key, value]) => {\n FaucetStore_UsernameToAddressEntry.encode({ key, value }, writer.uint32(18).fork()).ldelim();\n });\n Object.entries(message.latestDrip).forEach(([key, value]) => {\n FaucetStore_LatestDripEntry.encode({ key, value }, writer.uint32(26).fork()).ldelim();\n });\n if (message.totalDripCount !== 0) {\n writer.uint32(33).double(message.totalDripCount);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseFaucetStore();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n const entry1 = FaucetStore_AddressToUsernameEntry.decode(reader, reader.uint32());\n if (entry1.value !== void 0) {\n message.addressToUsername[entry1.key] = entry1.value;\n }\n continue;\n case 2:\n if (tag != 18) {\n break;\n }\n const entry2 = FaucetStore_UsernameToAddressEntry.decode(reader, reader.uint32());\n if (entry2.value !== void 0) {\n message.usernameToAddress[entry2.key] = entry2.value;\n }\n continue;\n case 3:\n if (tag != 26) {\n break;\n }\n const entry3 = FaucetStore_LatestDripEntry.decode(reader, reader.uint32());\n if (entry3.value !== void 0) {\n message.latestDrip[entry3.key] = entry3.value;\n }\n continue;\n case 4:\n if (tag != 33) {\n break;\n }\n message.totalDripCount = reader.double();\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return FaucetStore.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseFaucetStore();\n message.addressToUsername = Object.entries(object.addressToUsername ?? {}).reduce(\n (acc, [key, value]) => {\n if (value !== void 0) {\n acc[key] = String(value);\n }\n return acc;\n },\n {}\n );\n message.usernameToAddress = Object.entries(object.usernameToAddress ?? {}).reduce(\n (acc, [key, value]) => {\n if (value !== void 0) {\n acc[key] = String(value);\n }\n return acc;\n },\n {}\n );\n message.latestDrip = Object.entries(object.latestDrip ?? {}).reduce(\n (acc, [key, value]) => {\n if (value !== void 0) {\n acc[key] = Number(value);\n }\n return acc;\n },\n {}\n );\n message.totalDripCount = object.totalDripCount ?? 0;\n return message;\n }\n};\nfunction createBaseFaucetStore_AddressToUsernameEntry() {\n return { key: \"\", value: \"\" };\n}\nvar FaucetStore_AddressToUsernameEntry = {\n encode(message, writer = _m0.Writer.create()) {\n if (message.key !== \"\") {\n writer.uint32(10).string(message.key);\n }\n if (message.value !== \"\") {\n writer.uint32(18).string(message.value);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseFaucetStore_AddressToUsernameEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n message.key = reader.string();\n continue;\n case 2:\n if (tag != 18) {\n break;\n }\n message.value = reader.string();\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return FaucetStore_AddressToUsernameEntry.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseFaucetStore_AddressToUsernameEntry();\n message.key = object.key ?? \"\";\n message.value = object.value ?? \"\";\n return message;\n }\n};\nfunction createBaseFaucetStore_UsernameToAddressEntry() {\n return { key: \"\", value: \"\" };\n}\nvar FaucetStore_UsernameToAddressEntry = {\n encode(message, writer = _m0.Writer.create()) {\n if (message.key !== \"\") {\n writer.uint32(10).string(message.key);\n }\n if (message.value !== \"\") {\n writer.uint32(18).string(message.value);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseFaucetStore_UsernameToAddressEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n message.key = reader.string();\n continue;\n case 2:\n if (tag != 18) {\n break;\n }\n message.value = reader.string();\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return FaucetStore_UsernameToAddressEntry.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseFaucetStore_UsernameToAddressEntry();\n message.key = object.key ?? \"\";\n message.value = object.value ?? \"\";\n return message;\n }\n};\nfunction createBaseFaucetStore_LatestDripEntry() {\n return { key: \"\", value: 0 };\n}\nvar FaucetStore_LatestDripEntry = {\n encode(message, writer = _m0.Writer.create()) {\n if (message.key !== \"\") {\n writer.uint32(10).string(message.key);\n }\n if (message.value !== 0) {\n writer.uint32(16).int64(message.value);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseFaucetStore_LatestDripEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n message.key = reader.string();\n continue;\n case 2:\n if (tag != 16) {\n break;\n }\n message.value = longToNumber(reader.int64());\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return FaucetStore_LatestDripEntry.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseFaucetStore_LatestDripEntry();\n message.key = object.key ?? \"\";\n message.value = object.value ?? 0;\n return message;\n }\n};\nfunction createBaseDripRequest() {\n return { username: \"\", address: \"\" };\n}\nvar DripRequest = {\n encode(message, writer = _m0.Writer.create()) {\n if (message.username !== \"\") {\n writer.uint32(10).string(message.username);\n }\n if (message.address !== \"\") {\n writer.uint32(18).string(message.address);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseDripRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n message.username = reader.string();\n continue;\n case 2:\n if (tag != 18) {\n break;\n }\n message.address = reader.string();\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return DripRequest.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseDripRequest();\n message.username = object.username ?? \"\";\n message.address = object.address ?? \"\";\n return message;\n }\n};\nfunction createBaseDripDevRequest() {\n return { address: \"\" };\n}\nvar DripDevRequest = {\n encode(message, writer = _m0.Writer.create()) {\n if (message.address !== \"\") {\n writer.uint32(10).string(message.address);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseDripDevRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n message.address = reader.string();\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return DripDevRequest.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseDripDevRequest();\n message.address = object.address ?? \"\";\n return message;\n }\n};\nfunction createBaseDripResponse() {\n return { dripTxHash: \"\", ecsTxHash: \"\" };\n}\nvar DripResponse = {\n encode(message, writer = _m0.Writer.create()) {\n if (message.dripTxHash !== \"\") {\n writer.uint32(10).string(message.dripTxHash);\n }\n if (message.ecsTxHash !== \"\") {\n writer.uint32(18).string(message.ecsTxHash);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseDripResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n message.dripTxHash = reader.string();\n continue;\n case 2:\n if (tag != 18) {\n break;\n }\n message.ecsTxHash = reader.string();\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return DripResponse.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseDripResponse();\n message.dripTxHash = object.dripTxHash ?? \"\";\n message.ecsTxHash = object.ecsTxHash ?? \"\";\n return message;\n }\n};\nfunction createBaseTimeUntilDripResponse() {\n return { timeUntilDripMinutes: 0, timeUntilDripSeconds: 0 };\n}\nvar TimeUntilDripResponse = {\n encode(message, writer = _m0.Writer.create()) {\n if (message.timeUntilDripMinutes !== 0) {\n writer.uint32(9).double(message.timeUntilDripMinutes);\n }\n if (message.timeUntilDripSeconds !== 0) {\n writer.uint32(17).double(message.timeUntilDripSeconds);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseTimeUntilDripResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 9) {\n break;\n }\n message.timeUntilDripMinutes = reader.double();\n continue;\n case 2:\n if (tag != 17) {\n break;\n }\n message.timeUntilDripSeconds = reader.double();\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return TimeUntilDripResponse.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseTimeUntilDripResponse();\n message.timeUntilDripMinutes = object.timeUntilDripMinutes ?? 0;\n message.timeUntilDripSeconds = object.timeUntilDripSeconds ?? 0;\n return message;\n }\n};\nfunction createBaseGetLinkedTwittersRequest() {\n return {};\n}\nvar GetLinkedTwittersRequest = {\n encode(_, writer = _m0.Writer.create()) {\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseGetLinkedTwittersRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return GetLinkedTwittersRequest.fromPartial(base ?? {});\n },\n fromPartial(_) {\n const message = createBaseGetLinkedTwittersRequest();\n return message;\n }\n};\nfunction createBaseGetLinkedTwittersResponse() {\n return { linkedTwitters: [] };\n}\nvar GetLinkedTwittersResponse = {\n encode(message, writer = _m0.Writer.create()) {\n for (const v of message.linkedTwitters) {\n LinkedTwitterPair.encode(v, writer.uint32(10).fork()).ldelim();\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseGetLinkedTwittersResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n message.linkedTwitters.push(LinkedTwitterPair.decode(reader, reader.uint32()));\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return GetLinkedTwittersResponse.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseGetLinkedTwittersResponse();\n message.linkedTwitters = object.linkedTwitters?.map((e) => LinkedTwitterPair.fromPartial(e)) || [];\n return message;\n }\n};\nfunction createBaseLinkedTwitterForAddressRequest() {\n return { address: \"\" };\n}\nvar LinkedTwitterForAddressRequest = {\n encode(message, writer = _m0.Writer.create()) {\n if (message.address !== \"\") {\n writer.uint32(10).string(message.address);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseLinkedTwitterForAddressRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n message.address = reader.string();\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return LinkedTwitterForAddressRequest.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseLinkedTwitterForAddressRequest();\n message.address = object.address ?? \"\";\n return message;\n }\n};\nfunction createBaseLinkedTwitterForAddressResponse() {\n return { username: \"\" };\n}\nvar LinkedTwitterForAddressResponse = {\n encode(message, writer = _m0.Writer.create()) {\n if (message.username !== \"\") {\n writer.uint32(10).string(message.username);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseLinkedTwitterForAddressResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n message.username = reader.string();\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return LinkedTwitterForAddressResponse.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseLinkedTwitterForAddressResponse();\n message.username = object.username ?? \"\";\n return message;\n }\n};\nfunction createBaseLinkedAddressForTwitterRequest() {\n return { username: \"\" };\n}\nvar LinkedAddressForTwitterRequest = {\n encode(message, writer = _m0.Writer.create()) {\n if (message.username !== \"\") {\n writer.uint32(10).string(message.username);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseLinkedAddressForTwitterRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n message.username = reader.string();\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return LinkedAddressForTwitterRequest.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseLinkedAddressForTwitterRequest();\n message.username = object.username ?? \"\";\n return message;\n }\n};\nfunction createBaseLinkedAddressForTwitterResponse() {\n return { address: \"\" };\n}\nvar LinkedAddressForTwitterResponse = {\n encode(message, writer = _m0.Writer.create()) {\n if (message.address !== \"\") {\n writer.uint32(10).string(message.address);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseLinkedAddressForTwitterResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n message.address = reader.string();\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return LinkedAddressForTwitterResponse.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseLinkedAddressForTwitterResponse();\n message.address = object.address ?? \"\";\n return message;\n }\n};\nfunction createBaseSetLinkedTwitterRequest() {\n return { address: \"\", username: \"\", signature: \"\" };\n}\nvar SetLinkedTwitterRequest = {\n encode(message, writer = _m0.Writer.create()) {\n if (message.address !== \"\") {\n writer.uint32(10).string(message.address);\n }\n if (message.username !== \"\") {\n writer.uint32(18).string(message.username);\n }\n if (message.signature !== \"\") {\n writer.uint32(26).string(message.signature);\n }\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseSetLinkedTwitterRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1:\n if (tag != 10) {\n break;\n }\n message.address = reader.string();\n continue;\n case 2:\n if (tag != 18) {\n break;\n }\n message.username = reader.string();\n continue;\n case 3:\n if (tag != 26) {\n break;\n }\n message.signature = reader.string();\n continue;\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return SetLinkedTwitterRequest.fromPartial(base ?? {});\n },\n fromPartial(object) {\n const message = createBaseSetLinkedTwitterRequest();\n message.address = object.address ?? \"\";\n message.username = object.username ?? \"\";\n message.signature = object.signature ?? \"\";\n return message;\n }\n};\nfunction createBaseSetLinkedTwitterResponse() {\n return {};\n}\nvar SetLinkedTwitterResponse = {\n encode(_, writer = _m0.Writer.create()) {\n return writer;\n },\n decode(input, length) {\n const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);\n let end = length === void 0 ? reader.len : reader.pos + length;\n const message = createBaseSetLinkedTwitterResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n }\n if ((tag & 7) == 4 || tag == 0) {\n break;\n }\n reader.skipType(tag & 7);\n }\n return message;\n },\n create(base) {\n return SetLinkedTwitterResponse.fromPartial(base ?? {});\n },\n fromPartial(_) {\n const message = createBaseSetLinkedTwitterResponse();\n return message;\n }\n};\nvar FaucetServiceDefinition = {\n name: \"FaucetService\",\n fullName: \"faucet.FaucetService\",\n methods: {\n drip: {\n name: \"Drip\",\n requestType: DripRequest,\n requestStream: false,\n responseType: DripResponse,\n responseStream: false,\n options: {}\n },\n dripDev: {\n name: \"DripDev\",\n requestType: DripDevRequest,\n requestStream: false,\n responseType: DripResponse,\n responseStream: false,\n options: {}\n },\n dripVerifyTweet: {\n name: \"DripVerifyTweet\",\n requestType: DripRequest,\n requestStream: false,\n responseType: DripResponse,\n responseStream: false,\n options: {}\n },\n timeUntilDrip: {\n name: \"TimeUntilDrip\",\n requestType: DripRequest,\n requestStream: false,\n responseType: TimeUntilDripResponse,\n responseStream: false,\n options: {}\n },\n getLinkedTwitters: {\n name: \"GetLinkedTwitters\",\n requestType: GetLinkedTwittersRequest,\n requestStream: false,\n responseType: GetLinkedTwittersResponse,\n responseStream: false,\n options: {}\n },\n getLinkedTwitterForAddress: {\n name: \"GetLinkedTwitterForAddress\",\n requestType: LinkedTwitterForAddressRequest,\n requestStream: false,\n responseType: LinkedTwitterForAddressResponse,\n responseStream: false,\n options: {}\n },\n getLinkedAddressForTwitter: {\n name: \"GetLinkedAddressForTwitter\",\n requestType: LinkedAddressForTwitterRequest,\n requestStream: false,\n responseType: LinkedAddressForTwitterResponse,\n responseStream: false,\n options: {}\n },\n /** Admin utility endpoints for modifying state. Requires a signature with faucet private key. */\n setLinkedTwitter: {\n name: \"SetLinkedTwitter\",\n requestType: SetLinkedTwitterRequest,\n requestStream: false,\n responseType: SetLinkedTwitterResponse,\n responseStream: false,\n options: {}\n }\n }\n};\nvar tsProtoGlobalThis = (() => {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n if (typeof self !== \"undefined\") {\n return self;\n }\n if (typeof window !== \"undefined\") {\n return window;\n }\n if (typeof global !== \"undefined\") {\n return global;\n }\n throw \"Unable to locate global object\";\n})();\nfunction longToNumber(long) {\n if (long.gt(Number.MAX_SAFE_INTEGER)) {\n throw new tsProtoGlobalThis.Error(\"Value is larger than Number.MAX_SAFE_INTEGER\");\n }\n return long.toNumber();\n}\nif (_m0.util.Long !== Long) {\n _m0.util.Long = Long;\n _m0.configure();\n}\n\n// ts/faucet/createFaucetService.ts\nimport { createChannel, createClient } from \"nice-grpc-web\";\nfunction createFaucetService(url) {\n return createClient(FaucetServiceDefinition, createChannel(url));\n}\nexport {\n DripDevRequest,\n DripRequest,\n DripResponse,\n FaucetServiceDefinition,\n FaucetStore,\n FaucetStore_AddressToUsernameEntry,\n FaucetStore_LatestDripEntry,\n FaucetStore_UsernameToAddressEntry,\n GetLinkedTwittersRequest,\n GetLinkedTwittersResponse,\n LinkedAddressForTwitterRequest,\n LinkedAddressForTwitterResponse,\n LinkedTwitterForAddressRequest,\n LinkedTwitterForAddressResponse,\n LinkedTwitterPair,\n SetLinkedTwitterRequest,\n SetLinkedTwitterResponse,\n TimeUntilDripResponse,\n createFaucetService,\n protobufPackage\n};\n//# sourceMappingURL=faucet.js.map","// src/arbitrum.ts\nvar arbitrum = {\n id: 42161,\n name: \"Arbitrum One\",\n network: \"arbitrum\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://arb-mainnet.g.alchemy.com/v2\"],\n webSocket: [\"wss://arb-mainnet.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://arbitrum-mainnet.infura.io/v3\"],\n webSocket: [\"wss://arbitrum-mainnet.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://arb1.arbitrum.io/rpc\"]\n },\n public: {\n http: [\"https://arb1.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n etherscan: { name: \"Arbiscan\", url: \"https://arbiscan.io\" },\n default: { name: \"Arbiscan\", url: \"https://arbiscan.io\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 7654707\n }\n }\n};\n\n// src/arbitrumGoerli.ts\nvar arbitrumGoerli = {\n id: 421613,\n name: \"Arbitrum Goerli\",\n network: \"arbitrum-goerli\",\n nativeCurrency: {\n name: \"Arbitrum Goerli Ether\",\n symbol: \"ETH\",\n decimals: 18\n },\n rpcUrls: {\n alchemy: {\n http: [\"https://arb-goerli.g.alchemy.com/v2\"],\n webSocket: [\"wss://arb-goerli.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://arbitrum-goerli.infura.io/v3\"],\n webSocket: [\"wss://arbitrum-goerli.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://goerli-rollup.arbitrum.io/rpc\"]\n },\n public: {\n http: [\"https://goerli-rollup.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n etherscan: { name: \"Arbiscan\", url: \"https://goerli.arbiscan.io/\" },\n default: { name: \"Arbiscan\", url: \"https://goerli.arbiscan.io/\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 88114\n }\n },\n testnet: true\n};\n\n// src/arbitrumNova.ts\nvar arbitrumNova = {\n id: 42170,\n name: \"Arbitrum Nova\",\n network: \"arbitrum-nova\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n blast: {\n http: [\"https://arbitrum-nova.public.blastapi.io\"],\n webSocket: [\"wss://arbitrum-nova.public.blastapi.io\"]\n },\n default: {\n http: [\"https://nova.arbitrum.io/rpc\"]\n },\n public: {\n http: [\"https://nova.arbitrum.io/rpc\"]\n }\n },\n blockExplorers: {\n etherscan: { name: \"Arbiscan\", url: \"https://nova.arbiscan.io\" },\n blockScout: {\n name: \"BlockScout\",\n url: \"https://nova-explorer.arbitrum.io/\"\n },\n default: { name: \"Arbiscan\", url: \"https://nova.arbiscan.io\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1746963\n }\n }\n};\n\n// src/aurora.ts\nvar aurora = {\n id: 1313161554,\n name: \"Aurora\",\n network: \"aurora\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n infura: { http: [\"https://aurora-mainnet.infura.io/v3\"] },\n default: { http: [\"https://mainnet.aurora.dev\"] },\n public: { http: [\"https://mainnet.aurora.dev\"] }\n },\n blockExplorers: {\n etherscan: { name: \"Aurorascan\", url: \"https://aurorascan.dev\" },\n default: { name: \"Aurorascan\", url: \"https://aurorascan.dev\" }\n }\n};\n\n// src/auroraTestnet.ts\nvar auroraTestnet = {\n id: 1313161555,\n name: \"Aurora Testnet\",\n network: \"aurora-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n infura: { http: [\"https://aurora-testnet.infura.io/v3\"] },\n default: { http: [\"https://testnet.aurora.dev\"] },\n public: { http: [\"https://testnet.aurora.dev\"] }\n },\n blockExplorers: {\n etherscan: { name: \"Aurorascan\", url: \"https://testnet.aurorascan.dev\" },\n default: { name: \"Aurorascan\", url: \"https://testnet.aurorascan.dev\" }\n },\n testnet: true\n};\n\n// src/avalanche.ts\nvar avalanche = {\n id: 43114,\n name: \"Avalanche\",\n network: \"avalanche\",\n nativeCurrency: {\n decimals: 18,\n name: \"Avalanche\",\n symbol: \"AVAX\"\n },\n rpcUrls: {\n default: { http: [\"https://api.avax.network/ext/bc/C/rpc\"] },\n public: { http: [\"https://api.avax.network/ext/bc/C/rpc\"] }\n },\n blockExplorers: {\n etherscan: { name: \"SnowTrace\", url: \"https://snowtrace.io\" },\n default: { name: \"SnowTrace\", url: \"https://snowtrace.io\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 11907934\n }\n }\n};\n\n// src/avalancheFuji.ts\nvar avalancheFuji = {\n id: 43113,\n name: \"Avalanche Fuji\",\n network: \"avalanche-fuji\",\n nativeCurrency: {\n decimals: 18,\n name: \"Avalanche Fuji\",\n symbol: \"AVAX\"\n },\n rpcUrls: {\n default: { http: [\"https://api.avax-test.network/ext/bc/C/rpc\"] },\n public: { http: [\"https://api.avax-test.network/ext/bc/C/rpc\"] }\n },\n blockExplorers: {\n etherscan: { name: \"SnowTrace\", url: \"https://testnet.snowtrace.io\" },\n default: { name: \"SnowTrace\", url: \"https://testnet.snowtrace.io\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 7096959\n }\n },\n testnet: true\n};\n\n// src/base.ts\nvar base = {\n id: 8453,\n network: \"base\",\n name: \"Base\",\n nativeCurrency: { name: \"Base\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://developer-access-mainnet.base.org\"]\n },\n public: {\n http: [\"https://developer-access-mainnet.base.org\"]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"Basescout\",\n url: \"https://base.blockscout.com\"\n },\n default: {\n name: \"Basescan\",\n url: \"https://basescan.org\"\n },\n etherscan: {\n name: \"Basescan\",\n url: \"https://basescan.org\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 5022\n }\n }\n};\n\n// src/baseGoerli.ts\nvar baseGoerli = {\n id: 84531,\n network: \"base-goerli\",\n name: \"Base Goerli\",\n nativeCurrency: { name: \"Base Goerli\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://goerli.base.org\"]\n },\n public: {\n http: [\"https://goerli.base.org\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"Basescan\",\n url: \"https://goerli.basescan.org\"\n },\n default: {\n name: \"Basescan\",\n url: \"https://goerli.basescan.org\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1376988\n }\n },\n testnet: true\n};\n\n// src/bearNetworkChainMainnet.ts\nvar bearNetworkChainMainnet = {\n id: 641230,\n name: \"Bear Network Chain Mainnet\",\n network: \"BearNetworkChainMainnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"BearNetworkChain\",\n symbol: \"BRNKC\"\n },\n rpcUrls: {\n public: { http: [\"https://brnkc-mainnet.bearnetwork.net\"] },\n default: { http: [\"https://brnkc-mainnet.bearnetwork.net\"] }\n },\n blockExplorers: {\n default: { name: \"BrnkScan\", url: \"https://brnkscan.bearnetwork.net\" }\n }\n};\n\n// src/bearNetworkChainTestnet.ts\nvar bearNetworkChainTestnet = {\n id: 751230,\n name: \"Bear Network Chain Testnet\",\n network: \"BearNetworkChainTestnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"tBRNKC\",\n symbol: \"tBRNKC\"\n },\n rpcUrls: {\n public: { http: [\"https://brnkc-test.bearnetwork.net\"] },\n default: { http: [\"https://brnkc-test.bearnetwork.net\"] }\n },\n blockExplorers: {\n default: {\n name: \"BrnkTestScan\",\n url: \"https://brnktest-scan.bearnetwork.net\"\n }\n },\n testnet: true\n};\n\n// src/boba.ts\nvar boba = {\n id: 288,\n name: \"Boba Network\",\n network: \"boba\",\n nativeCurrency: {\n decimals: 18,\n name: \"Boba\",\n symbol: \"BOBA\"\n },\n rpcUrls: {\n default: { http: [\"https://mainnet.boba.network\"] },\n public: { http: [\"https://mainnet.boba.network\"] }\n },\n blockExplorers: {\n etherscan: { name: \"BOBAScan\", url: \"https://bobascan.com\" },\n default: { name: \"BOBAScan\", url: \"https://bobascan.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 446859\n }\n }\n};\n\n// src/bronos.ts\nvar bronos = {\n id: 1039,\n name: \"Bronos\",\n network: \"bronos\",\n nativeCurrency: {\n decimals: 18,\n name: \"BRO\",\n symbol: \"BRO\"\n },\n rpcUrls: {\n default: { http: [\"https://evm.bronos.org\"] },\n public: { http: [\"https://evm.bronos.org\"] }\n },\n blockExplorers: {\n default: { name: \"BronoScan\", url: \"https://broscan.bronos.org\" }\n }\n};\n\n// src/bronosTestnet.ts\nvar bronosTestnet = {\n id: 1038,\n name: \"Bronos Testnet\",\n network: \"bronos-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Bronos Coin\",\n symbol: \"tBRO\"\n },\n rpcUrls: {\n default: { http: [\"https://evm-testnet.bronos.org\"] },\n public: { http: [\"https://evm-testnet.bronos.org\"] }\n },\n blockExplorers: {\n default: { name: \"BronoScan\", url: \"https://tbroscan.bronos.org\" }\n },\n testnet: true\n};\n\n// src/bsc.ts\nvar bsc = {\n id: 56,\n name: \"BNB Smart Chain\",\n network: \"bsc\",\n nativeCurrency: {\n decimals: 18,\n name: \"BNB\",\n symbol: \"BNB\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.ankr.com/bsc\"] },\n public: { http: [\"https://rpc.ankr.com/bsc\"] }\n },\n blockExplorers: {\n etherscan: { name: \"BscScan\", url: \"https://bscscan.com\" },\n default: { name: \"BscScan\", url: \"https://bscscan.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 15921452\n }\n }\n};\n\n// src/bscTestnet.ts\nvar bscTestnet = {\n id: 97,\n name: \"Binance Smart Chain Testnet\",\n network: \"bsc-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"BNB\",\n symbol: \"tBNB\"\n },\n rpcUrls: {\n default: { http: [\"https://data-seed-prebsc-1-s1.binance.org:8545\"] },\n public: { http: [\"https://data-seed-prebsc-1-s1.binance.org:8545\"] }\n },\n blockExplorers: {\n etherscan: { name: \"BscScan\", url: \"https://testnet.bscscan.com\" },\n default: { name: \"BscScan\", url: \"https://testnet.bscscan.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 17422483\n }\n },\n testnet: true\n};\n\n// src/bxn.ts\nvar bxn = {\n id: 4999,\n name: \"BlackFort Exchange Network\",\n network: \"bxn\",\n nativeCurrency: { name: \"BlackFort Token\", symbol: \"BXN\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.blackfort.network/rpc\"]\n },\n public: {\n http: [\"https://mainnet.blackfort.network/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://explorer.blackfort.network\"\n }\n }\n};\n\n// src/bxnTestnet.ts\nvar bxnTestnet = {\n id: 4777,\n name: \"BlackFort Exchange Network Testnet\",\n network: \"bxnTestnet\",\n nativeCurrency: {\n name: \"BlackFort Testnet Token\",\n symbol: \"TBXN\",\n decimals: 18\n },\n rpcUrls: {\n default: {\n http: [\"https://testnet.blackfort.network/rpc\"]\n },\n public: {\n http: [\"https://testnet.blackfort.network/rpc\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://testnet-explorer.blackfort.network\"\n }\n }\n};\n\n// src/canto.ts\nvar canto = {\n id: 7700,\n name: \"Canto\",\n network: \"canto\",\n nativeCurrency: {\n decimals: 18,\n name: \"Canto\",\n symbol: \"CANTO\"\n },\n rpcUrls: {\n default: { http: [\"https://canto.gravitychain.io\"] },\n public: { http: [\"https://canto.gravitychain.io\"] }\n },\n blockExplorers: {\n default: {\n name: \"Tuber.Build (Blockscout)\",\n url: \"https://tuber.build\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 2905789\n }\n }\n};\n\n// src/celo.ts\nvar celo = {\n id: 42220,\n name: \"Celo\",\n network: \"celo\",\n nativeCurrency: {\n decimals: 18,\n name: \"CELO\",\n symbol: \"CELO\"\n },\n rpcUrls: {\n default: { http: [\"https://forno.celo.org\"] },\n infura: {\n http: [\"https://celo-mainnet.infura.io/v3\"]\n },\n public: {\n http: [\"https://forno.celo.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Celo Explorer\",\n url: \"https://explorer.celo.org/mainnet\"\n },\n etherscan: { name: \"CeloScan\", url: \"https://celoscan.io\" }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 13112599\n }\n },\n testnet: false\n};\n\n// src/celoAlfajores.ts\nvar celoAlfajores = {\n id: 44787,\n name: \"Alfajores\",\n network: \"celo-alfajores\",\n nativeCurrency: {\n decimals: 18,\n name: \"CELO\",\n symbol: \"A-CELO\"\n },\n rpcUrls: {\n default: {\n http: [\"https://alfajores-forno.celo-testnet.org\"]\n },\n infura: {\n http: [\"https://celo-alfajores.infura.io/v3\"]\n },\n public: {\n http: [\"https://alfajores-forno.celo-testnet.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Celo Explorer\",\n url: \"https://explorer.celo.org/alfajores\"\n },\n etherscan: { name: \"CeloScan\", url: \"https://alfajores.celoscan.io/\" }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 14569001\n }\n },\n testnet: true\n};\n\n// src/celoCannoli.ts\nvar celoCannoli = {\n id: 17323,\n name: \"Cannoli\",\n network: \"celo-cannoli\",\n nativeCurrency: {\n decimals: 18,\n name: \"CELO\",\n symbol: \"C-CELO\"\n },\n rpcUrls: {\n default: {\n http: [\"https://forno.cannoli.celo-testnet.org\"]\n },\n public: {\n http: [\"https://forno.cannoli.celo-testnet.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Celo Explorer\",\n url: \"https://explorer.celo.org/cannoli\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0x5Acb0aa8BF4E8Ff0d882Ee187140713C12BF9718\",\n blockCreated: 87429\n }\n },\n testnet: true\n};\n\n// src/confluxESpace.ts\nvar confluxESpace = {\n id: 1030,\n name: \"Conflux eSpace\",\n network: \"cfx-espace\",\n nativeCurrency: { name: \"Conflux\", symbol: \"CFX\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://evm.confluxrpc.org\"]\n },\n public: {\n http: [\"https://evm.confluxrpc.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"ConfluxScan\",\n url: \"https://evm.confluxscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xEFf0078910f638cd81996cc117bccD3eDf2B072F\",\n blockCreated: 68602935\n }\n }\n};\n\n// src/cronos.ts\nvar cronos = {\n id: 25,\n name: \"Cronos\",\n network: \"cronos\",\n nativeCurrency: {\n decimals: 18,\n name: \"Cronos\",\n symbol: \"CRO\"\n },\n rpcUrls: {\n default: { http: [\"https://node.croswap.com/rpc\"] },\n public: { http: [\"https://node.croswap.com/rpc\"] }\n },\n blockExplorers: {\n default: { name: \"CronosScan\", url: \"https://cronoscan.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 1963112\n }\n }\n};\n\n// src/cronosTestnet.ts\nvar cronosTestnet = {\n id: 338,\n name: \"Cronos Testnet\",\n network: \"cronos-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"CRO\",\n symbol: \"tCRO\"\n },\n rpcUrls: {\n default: { http: [\"https://evm-t3.cronos.org\"] },\n public: { http: [\"https://evm-t3.cronos.org\"] }\n },\n blockExplorers: {\n default: {\n name: \"Cronos Explorer\",\n url: \"https://cronos.org/explorer/testnet3\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 10191251\n }\n },\n testnet: true\n};\n\n// src/crossbell.ts\nvar crossbell = {\n id: 3737,\n network: \"crossbell\",\n name: \"Crossbell\",\n nativeCurrency: {\n decimals: 18,\n name: \"CSB\",\n symbol: \"CSB\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.crossbell.io\"]\n },\n public: {\n http: [\"https://rpc.crossbell.io\"]\n }\n },\n blockExplorers: {\n default: { name: \"CrossScan\", url: \"https://scan.crossbell.io\" }\n },\n contracts: {\n multicall3: {\n address: \"0xBB9759009cDaC82774EfC84D94cD9F7440f75Fcf\",\n blockCreated: 23499787\n }\n }\n};\n\n// src/dfk.ts\nvar dfk = {\n id: 53935,\n name: \"DFK Chain\",\n network: \"dfk\",\n nativeCurrency: {\n decimals: 18,\n name: \"Jewel\",\n symbol: \"JEWEL\"\n },\n rpcUrls: {\n default: {\n http: [\"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc\"]\n },\n public: {\n http: [\"https://subnets.avax.network/defi-kingdoms/dfk-chain/rpc\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"DFKSubnetScan\",\n url: \"https://subnets.avax.network/defi-kingdoms\"\n },\n default: {\n name: \"DFKSubnetScan\",\n url: \"https://subnets.avax.network/defi-kingdoms\"\n }\n }\n};\n\n// src/dogechain.ts\nvar dogechain = {\n id: 2e3,\n name: \"Dogechain\",\n network: \"dogechain\",\n nativeCurrency: {\n decimals: 18,\n name: \"Dogechain\",\n symbol: \"DC\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.dogechain.dog\"] },\n public: { http: [\"https://rpc.dogechain.dog\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"DogeChainExplorer\",\n url: \"https://explorer.dogechain.dog\"\n },\n default: {\n name: \"DogeChainExplorer\",\n url: \"https://explorer.dogechain.dog\"\n }\n }\n};\n\n// src/edgeware.ts\nvar edgeware = {\n id: 2021,\n name: \"Edgeware EdgeEVM Mainnet\",\n network: \"edgeware\",\n nativeCurrency: {\n decimals: 18,\n name: \"Edgeware\",\n symbol: \"EDG\"\n },\n rpcUrls: {\n default: { http: [\"https://edgeware-evm.jelliedowl.net\"] },\n public: { http: [\"https://edgeware-evm.jelliedowl.net\"] }\n },\n blockExplorers: {\n etherscan: { name: \"Edgscan by Bharathcoorg\", url: \"https://edgscan.live\" },\n default: { name: \"Edgscan by Bharathcoorg\", url: \"https://edgscan.live\" }\n },\n contracts: {\n multicall3: {\n address: \"0xDDF47eEB4e5FF4AA60e063E0Ec4f7C35B47Ed445\",\n blockCreated: 17126780\n }\n }\n};\n\n// src/edgewareTestnet.ts\nvar edgewareTestnet = {\n id: 2022,\n name: \"Beresheet BereEVM Testnet\",\n network: \"edgewareTestnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Testnet EDG\",\n symbol: \"tEDG\"\n },\n rpcUrls: {\n default: { http: [\"https://beresheet-evm.jelliedowl.net\"] },\n public: { http: [\"https://beresheet-evm.jelliedowl.net\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"Edgscan by Bharathcoorg\",\n url: \"https://testnet.edgscan.live\"\n },\n default: {\n name: \"Edgscan by Bharathcoorg\",\n url: \"https://testnet.edgscan.live\"\n }\n }\n};\n\n// src/eos.ts\nvar eos = {\n id: 17777,\n name: \"EOS EVM\",\n network: \"eos\",\n nativeCurrency: {\n decimals: 18,\n name: \"EOS\",\n symbol: \"EOS\"\n },\n rpcUrls: {\n default: { http: [\"https://api.evm.eosnetwork.com\"] },\n public: { http: [\"https://api.evm.eosnetwork.com\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"EOS EVM Explorer\",\n url: \"https://explorer.evm.eosnetwork.com\"\n },\n default: {\n name: \"EOS EVM Explorer\",\n url: \"https://explorer.evm.eosnetwork.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 7943933\n }\n }\n};\n\n// src/eosTestnet.ts\nvar eosTestnet = {\n id: 15557,\n name: \"EOS EVM Testnet\",\n network: \"eos\",\n nativeCurrency: {\n decimals: 18,\n name: \"EOS\",\n symbol: \"EOS\"\n },\n rpcUrls: {\n default: { http: [\"https://api.testnet.evm.eosnetwork.com\"] },\n public: { http: [\"https://api.testnet.evm.eosnetwork.com\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"EOS EVM Testnet Explorer\",\n url: \"https://explorer.testnet.evm.eosnetwork.com\"\n },\n default: {\n name: \"EOS EVM Testnet Explorer\",\n url: \"https://explorer.testnet.evm.eosnetwork.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 9067940\n }\n },\n testnet: true\n};\n\n// src/evmos.ts\nvar evmos = {\n id: 9001,\n name: \"Evmos\",\n network: \"evmos\",\n nativeCurrency: {\n decimals: 18,\n name: \"Evmos\",\n symbol: \"EVMOS\"\n },\n rpcUrls: {\n default: { http: [\"https://eth.bd.evmos.org:8545\"] },\n public: { http: [\"https://eth.bd.evmos.org:8545\"] }\n },\n blockExplorers: {\n default: { name: \"Evmos Block Explorer\", url: \"https://escan.live\" }\n }\n};\n\n// src/evmosTestnet.ts\nvar evmosTestnet = {\n id: 9e3,\n name: \"Evmos Testnet\",\n network: \"evmos-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Evmos\",\n symbol: \"EVMOS\"\n },\n rpcUrls: {\n default: { http: [\"https://eth.bd.evmos.dev:8545\"] },\n public: { http: [\"https://eth.bd.evmos.dev:8545\"] }\n },\n blockExplorers: {\n default: {\n name: \"Evmos Testnet Block Explorer\",\n url: \"https://evm.evmos.dev/\"\n }\n }\n};\n\n// src/ekta.ts\nvar ekta = {\n id: 1994,\n name: \"Ekta\",\n network: \"ekta\",\n nativeCurrency: {\n decimals: 18,\n name: \"EKTA\",\n symbol: \"EKTA\"\n },\n rpcUrls: {\n public: { http: [\"https://main.ekta.io\"] },\n default: { http: [\"https://main.ekta.io\"] }\n },\n blockExplorers: {\n default: { name: \"Ektascan\", url: \"https://ektascan.io\" }\n }\n};\n\n// src/ektaTestnet.ts\nvar ektaTestnet = {\n id: 1004,\n name: \"Ekta Testnet\",\n network: \"ekta-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"EKTA\",\n symbol: \"EKTA\"\n },\n rpcUrls: {\n public: { http: [\"https://test.ekta.io:8545\"] },\n default: { http: [\"https://test.ekta.io:8545\"] }\n },\n blockExplorers: {\n default: { name: \"Test Ektascan\", url: \"https://test.ektascan.io\" }\n },\n testnet: true\n};\n\n// src/fantom.ts\nvar fantom = {\n id: 250,\n name: \"Fantom\",\n network: \"fantom\",\n nativeCurrency: {\n decimals: 18,\n name: \"Fantom\",\n symbol: \"FTM\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.ankr.com/fantom\"] },\n public: { http: [\"https://rpc.ankr.com/fantom\"] }\n },\n blockExplorers: {\n etherscan: { name: \"FTMScan\", url: \"https://ftmscan.com\" },\n default: { name: \"FTMScan\", url: \"https://ftmscan.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 33001987\n }\n }\n};\n\n// src/fantomTestnet.ts\nvar fantomTestnet = {\n id: 4002,\n name: \"Fantom Testnet\",\n network: \"fantom-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Fantom\",\n symbol: \"FTM\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.testnet.fantom.network\"] },\n public: { http: [\"https://rpc.testnet.fantom.network\"] }\n },\n blockExplorers: {\n etherscan: { name: \"FTMScan\", url: \"https://testnet.ftmscan.com\" },\n default: { name: \"FTMScan\", url: \"https://testnet.ftmscan.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 8328688\n }\n }\n};\n\n// src/fibo.ts\nvar fibo = {\n id: 12306,\n name: \"Fibo Chain\",\n network: \"fibochain\",\n nativeCurrency: {\n decimals: 18,\n name: \"fibo\",\n symbol: \"FIBO\"\n },\n rpcUrls: {\n default: { http: [\"https://network.hzroc.art\"] },\n public: { http: [\"https://network.hzroc.art\"] }\n },\n blockExplorers: {\n default: { name: \"FiboScan\", url: \"https://scan.fibochain.org\" }\n }\n};\n\n// src/filecoin.ts\nvar filecoin = {\n id: 314,\n name: \"Filecoin Mainnet\",\n network: \"filecoin-mainnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"filecoin\",\n symbol: \"FIL\"\n },\n rpcUrls: {\n default: { http: [\"https://api.node.glif.io/rpc/v1\"] },\n public: { http: [\"https://api.node.glif.io/rpc/v1\"] }\n },\n blockExplorers: {\n default: { name: \"Filfox\", url: \"https://filfox.info/en\" },\n filscan: { name: \"Filscan\", url: \"https://filscan.io\" },\n filscout: { name: \"Filscout\", url: \"https://filscout.io/en\" },\n glif: { name: \"Glif\", url: \"https://explorer.glif.io\" }\n }\n};\n\n// src/filecoinCalibration.ts\nvar filecoinCalibration = {\n id: 314159,\n name: \"Filecoin Calibration\",\n network: \"filecoin-calibration\",\n nativeCurrency: {\n decimals: 18,\n name: \"testnet filecoin\",\n symbol: \"tFIL\"\n },\n rpcUrls: {\n default: { http: [\"https://api.calibration.node.glif.io/rpc/v1\"] },\n public: { http: [\"https://api.calibration.node.glif.io/rpc/v1\"] }\n },\n blockExplorers: {\n default: { name: \"Filscan\", url: \"https://calibration.filscan.io\" }\n }\n};\n\n// src/filecoinHyperspace.ts\nvar filecoinHyperspace = {\n id: 3141,\n name: \"Filecoin Hyperspace\",\n network: \"filecoin-hyperspace\",\n nativeCurrency: {\n decimals: 18,\n name: \"testnet filecoin\",\n symbol: \"tFIL\"\n },\n rpcUrls: {\n default: { http: [\"https://api.hyperspace.node.glif.io/rpc/v1\"] },\n public: { http: [\"https://api.hyperspace.node.glif.io/rpc/v1\"] }\n },\n blockExplorers: {\n default: { name: \"Filfox\", url: \"https://hyperspace.filfox.info/en\" },\n filscan: { name: \"Filscan\", url: \"https://hyperspace.filscan.io\" }\n }\n};\n\n// src/flare.ts\nvar flare = {\n id: 14,\n name: \"Flare Mainnet\",\n network: \"flare-mainnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"flare\",\n symbol: \"FLR\"\n },\n rpcUrls: {\n default: { http: [\"https://flare-api.flare.network/ext/C/rpc\"] },\n public: { http: [\"https://flare-api.flare.network/ext/C/rpc\"] }\n },\n blockExplorers: {\n default: {\n name: \"Flare Explorer\",\n url: \"https://flare-explorer.flare.network\"\n }\n }\n};\n\n// src/flareTestnet.ts\nvar flareTestnet = {\n id: 114,\n name: \"Coston2\",\n network: \"coston2\",\n nativeCurrency: {\n decimals: 18,\n name: \"coston2flare\",\n symbol: \"C2FLR\"\n },\n rpcUrls: {\n default: { http: [\"https://coston2-api.flare.network/ext/C/rpc\"] },\n public: { http: [\"https://coston2-api.flare.network/ext/C/rpc\"] }\n },\n blockExplorers: {\n default: {\n name: \"Coston2 Explorer\",\n url: \"https://coston2-explorer.flare.network\"\n }\n },\n testnet: true\n};\n\n// src/foundry.ts\nvar foundry = {\n id: 31337,\n name: \"Foundry\",\n network: \"foundry\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"http://127.0.0.1:8545\"],\n webSocket: [\"ws://127.0.0.1:8545\"]\n },\n public: {\n http: [\"http://127.0.0.1:8545\"],\n webSocket: [\"ws://127.0.0.1:8545\"]\n }\n }\n};\n\n// src/fuse.ts\nvar fuse = {\n id: 122,\n name: \"Fuse\",\n network: \"fuse\",\n nativeCurrency: { name: \"Fuse\", symbol: \"FUSE\", decimals: 18 },\n rpcUrls: {\n default: { http: [\"https://rpc.fuse.io\"] },\n public: { http: [\"https://fuse-mainnet.chainstacklabs.com\"] }\n },\n blockExplorers: {\n default: { name: \"Fuse Explorer\", url: \"https://explorer.fuse.io\" }\n }\n};\n\n// src/iotex.ts\nvar iotex = {\n id: 4689,\n name: \"IoTeX\",\n network: \"iotex\",\n nativeCurrency: {\n decimals: 18,\n name: \"IoTeX\",\n symbol: \"IOTX\"\n },\n rpcUrls: {\n default: {\n http: [\"https://babel-api.mainnet.iotex.io\"],\n webSocket: [\"wss://babel-api.mainnet.iotex.io\"]\n },\n public: {\n http: [\"https://babel-api.mainnet.iotex.io\"],\n webSocket: [\"wss://babel-api.mainnet.iotex.io\"]\n }\n },\n blockExplorers: {\n default: { name: \"IoTeXScan\", url: \"https://iotexscan.io\" }\n }\n};\n\n// src/iotexTestnet.ts\nvar iotexTestnet = {\n id: 4690,\n name: \"IoTeX Testnet\",\n network: \"iotex-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"IoTeX\",\n symbol: \"IOTX\"\n },\n rpcUrls: {\n default: {\n http: [\"https://babel-api.testnet.iotex.io\"],\n webSocket: [\"wss://babel-api.testnet.iotex.io\"]\n },\n public: {\n http: [\"https://babel-api.testnet.iotex.io\"],\n webSocket: [\"wss://babel-api.testnet.iotex.io\"]\n }\n },\n blockExplorers: {\n default: { name: \"IoTeXScan\", url: \"https://testnet.iotexscan.io\" }\n }\n};\n\n// src/goerli.ts\nvar goerli = {\n id: 5,\n network: \"goerli\",\n name: \"Goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://eth-goerli.g.alchemy.com/v2\"],\n webSocket: [\"wss://eth-goerli.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://goerli.infura.io/v3\"],\n webSocket: [\"wss://goerli.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://rpc.ankr.com/eth_goerli\"]\n },\n public: {\n http: [\"https://rpc.ankr.com/eth_goerli\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"Etherscan\",\n url: \"https://goerli.etherscan.io\"\n },\n default: {\n name: \"Etherscan\",\n url: \"https://goerli.etherscan.io\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n ensUniversalResolver: {\n address: \"0x56522D00C410a43BFfDF00a9A569489297385790\",\n blockCreated: 8765204\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 6507670\n }\n },\n testnet: true\n};\n\n// src/gnosis.ts\nvar gnosis = {\n id: 100,\n name: \"Gnosis\",\n network: \"gnosis\",\n nativeCurrency: {\n decimals: 18,\n name: \"Gnosis\",\n symbol: \"xDAI\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.gnosischain.com\"] },\n public: { http: [\"https://rpc.gnosischain.com\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"Gnosisscan\",\n url: \"https://gnosisscan.io\"\n },\n default: {\n name: \"Gnosis Chain Explorer\",\n url: \"https://blockscout.com/xdai/mainnet\"\n }\n }\n};\n\n// src/gnosisChiado.ts\nvar gnosisChiado = {\n id: 10200,\n name: \"Gnosis Chiado\",\n network: \"chiado\",\n nativeCurrency: {\n decimals: 18,\n name: \"Gnosis\",\n symbol: \"xDAI\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.chiadochain.net\"] },\n public: { http: [\"https://rpc.chiadochain.net\"] }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://blockscout.chiadochain.net\"\n }\n }\n};\n\n// src/hardhat.ts\nvar hardhat = {\n id: 31337,\n name: \"Hardhat\",\n network: \"hardhat\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: { http: [\"http://127.0.0.1:8545\"] },\n public: { http: [\"http://127.0.0.1:8545\"] }\n }\n};\n\n// src/harmonyOne.ts\nvar harmonyOne = {\n id: 16666e5,\n name: \"Harmony One\",\n network: \"harmony\",\n nativeCurrency: {\n name: \"Harmony\",\n symbol: \"ONE\",\n decimals: 18\n },\n rpcUrls: {\n public: { http: [\"https://rpc.ankr.com/harmony\"] },\n default: { http: [\"https://rpc.ankr.com/harmony\"] }\n },\n blockExplorers: {\n default: { name: \"Harmony Explorer\", url: \"https://explorer.harmony.one\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 24185753\n }\n }\n};\n\n// src/haqqMainnet.ts\nvar haqqMainnet = {\n id: 11235,\n name: \"HAQQ Mainnet\",\n network: \"haqq-mainnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Islamic Coin\",\n symbol: \"ISLM\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.eth.haqq.network\"]\n },\n public: {\n http: [\"https://rpc.eth.haqq.network\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"HAQQ Explorer\",\n url: \"https://explorer.haqq.network\"\n }\n }\n};\n\n// src/haqqTestedge2.ts\nvar haqqTestedge2 = {\n id: 54211,\n name: \"HAQQ Testedge 2\",\n network: \"haqq-testedge-2\",\n nativeCurrency: {\n decimals: 18,\n name: \"Islamic Coin\",\n symbol: \"ISLMT\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.eth.testedge2.haqq.network\"]\n },\n public: {\n http: [\"https://rpc.eth.testedge2.haqq.network\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"HAQQ Explorer\",\n url: \"https://explorer.testedge2.haqq.network\"\n }\n }\n};\n\n// src/klaytn.ts\nvar klaytn = {\n id: 8217,\n name: \"Klaytn\",\n network: \"klaytn\",\n nativeCurrency: {\n decimals: 18,\n name: \"Klaytn\",\n symbol: \"KLAY\"\n },\n rpcUrls: {\n default: { http: [\"https://cypress.fautor.app/archive\"] },\n public: { http: [\"https://cypress.fautor.app/archive\"] }\n },\n blockExplorers: {\n etherscan: { name: \"KlaytnScope\", url: \"https://scope.klaytn.com\" },\n default: { name: \"KlaytnScope\", url: \"https://scope.klaytn.com\" }\n }\n};\n\n// src/lineaTestnet.ts\nvar lineaTestnet = {\n id: 59140,\n name: \"Linea Goerli Testnet\",\n network: \"linea-testnet\",\n nativeCurrency: { name: \"Linea Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n infura: {\n http: [\"https://consensys-zkevm-goerli-prealpha.infura.io/v3\"],\n webSocket: [\"wss://consensys-zkevm-goerli-prealpha.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://rpc.goerli.linea.build\"],\n webSocket: [\"wss://rpc.goerli.linea.build\"]\n },\n public: {\n http: [\"https://rpc.goerli.linea.build\"],\n webSocket: [\"wss://rpc.goerli.linea.build\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"BlockScout\",\n url: \"https://explorer.goerli.linea.build\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 498623\n }\n },\n testnet: true\n};\n\n// src/localhost.ts\nvar localhost = {\n id: 1337,\n name: \"Localhost\",\n network: \"localhost\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: { http: [\"http://127.0.0.1:8545\"] },\n public: { http: [\"http://127.0.0.1:8545\"] }\n }\n};\n\n// src/mainnet.ts\nvar mainnet = {\n id: 1,\n network: \"homestead\",\n name: \"Ethereum\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://eth-mainnet.g.alchemy.com/v2\"],\n webSocket: [\"wss://eth-mainnet.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://mainnet.infura.io/v3\"],\n webSocket: [\"wss://mainnet.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://cloudflare-eth.com\"]\n },\n public: {\n http: [\"https://cloudflare-eth.com\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"Etherscan\",\n url: \"https://etherscan.io\"\n },\n default: {\n name: \"Etherscan\",\n url: \"https://etherscan.io\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n ensUniversalResolver: {\n address: \"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62\",\n blockCreated: 16966585\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 14353601\n }\n }\n};\n\n// src/mantle.ts\nvar mantle = {\n id: 5e3,\n name: \"Mantle\",\n network: \"mantle\",\n nativeCurrency: {\n decimals: 18,\n name: \"MNT\",\n symbol: \"MNT\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.mantle.xyz\"] },\n public: { http: [\"https://rpc.mantle.xyz\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"Mantle Testnet Explorer\",\n url: \"https://explorer.mantle.xyz\"\n },\n default: {\n name: \"Mantle Testnet Explorer\",\n url: \"https://explorer.mantle.xyz\"\n }\n }\n};\n\n// src/mantleTestnet.ts\nvar mantleTestnet = {\n id: 5001,\n name: \"Mantle Testnet\",\n network: \"mantle\",\n nativeCurrency: {\n decimals: 18,\n name: \"MNT\",\n symbol: \"MNT\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.testnet.mantle.xyz\"] },\n public: { http: [\"https://rpc.testnet.mantle.xyz\"] }\n },\n blockExplorers: {\n etherscan: {\n name: \"Mantle Testnet Explorer\",\n url: \"https://explorer.testnet.mantle.xyz\"\n },\n default: {\n name: \"Mantle Testnet Explorer\",\n url: \"https://explorer.testnet.mantle.xyz\"\n }\n },\n testnet: true\n};\n\n// src/metis.ts\nvar metis = {\n id: 1088,\n name: \"Metis\",\n network: \"andromeda\",\n nativeCurrency: {\n decimals: 18,\n name: \"Metis\",\n symbol: \"METIS\"\n },\n rpcUrls: {\n default: { http: [\"https://andromeda.metis.io/?owner=1088\"] },\n public: { http: [\"https://andromeda.metis.io/?owner=1088\"] }\n },\n blockExplorers: {\n default: {\n name: \"Andromeda Explorer\",\n url: \"https://andromeda-explorer.metis.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 2338552\n }\n }\n};\n\n// src/metisGoerli.ts\nvar metisGoerli = {\n id: 599,\n name: \"Metis Goerli\",\n network: \"metis-goerli\",\n nativeCurrency: {\n decimals: 18,\n name: \"Metis Goerli\",\n symbol: \"METIS\"\n },\n rpcUrls: {\n default: { http: [\"https://goerli.gateway.metisdevops.link\"] },\n public: { http: [\"https://goerli.gateway.metisdevops.link\"] }\n },\n blockExplorers: {\n default: {\n name: \"Metis Goerli Explorer\",\n url: \"https://goerli.explorer.metisdevops.link\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 1006207\n }\n }\n};\n\n// src/mev.ts\nvar mev = {\n id: 7518,\n network: \"MEVerse\",\n name: \"MEVerse Chain Mainnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"MEVerse\",\n symbol: \"MEV\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.meversemainnet.io\"]\n },\n public: {\n http: [\"https://rpc.meversemainnet.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Explorer\",\n url: \"https://www.meversescan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 86881340\n }\n }\n};\n\n// src/mevTestnet.ts\nvar mevTestnet = {\n id: 4759,\n network: \"MEVerse Testnet\",\n name: \"MEVerse Chain Testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"MEVerse\",\n symbol: \"MEV\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.meversetestnet.io\"]\n },\n public: {\n http: [\"https://rpc.meversetestnet.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Explorer\",\n url: \"https://testnet.meversescan.io/\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 64371115\n }\n },\n testnet: true\n};\n\n// src/moonbaseAlpha.ts\nvar moonbaseAlpha = {\n id: 1287,\n name: \"Moonbase Alpha\",\n network: \"moonbase-alpha\",\n nativeCurrency: {\n decimals: 18,\n name: \"DEV\",\n symbol: \"DEV\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.api.moonbase.moonbeam.network\"],\n webSocket: [\"wss://wss.api.moonbase.moonbeam.network\"]\n },\n public: {\n http: [\"https://rpc.api.moonbase.moonbeam.network\"],\n webSocket: [\"wss://wss.api.moonbase.moonbeam.network\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Moonscan\",\n url: \"https://moonbase.moonscan.io\"\n },\n etherscan: {\n name: \"Moonscan\",\n url: \"https://moonbase.moonscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 1850686\n }\n },\n testnet: true\n};\n\n// src/moonbeam.ts\nvar moonbeam = {\n id: 1284,\n name: \"Moonbeam\",\n network: \"moonbeam\",\n nativeCurrency: {\n decimals: 18,\n name: \"GLMR\",\n symbol: \"GLMR\"\n },\n rpcUrls: {\n public: {\n http: [\"https://moonbeam.public.blastapi.io\"],\n webSocket: [\"wss://moonbeam.public.blastapi.io\"]\n },\n default: {\n http: [\"https://moonbeam.public.blastapi.io\"],\n webSocket: [\"wss://moonbeam.public.blastapi.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Moonscan\",\n url: \"https://moonscan.io\"\n },\n etherscan: {\n name: \"Moonscan\",\n url: \"https://moonscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 609002\n }\n },\n testnet: false\n};\n\n// src/moonriver.ts\nvar moonriver = {\n id: 1285,\n name: \"Moonriver\",\n network: \"moonriver\",\n nativeCurrency: {\n decimals: 18,\n name: \"MOVR\",\n symbol: \"MOVR\"\n },\n rpcUrls: {\n public: {\n http: [\"https://moonriver.public.blastapi.io\"],\n webSocket: [\"wss://moonriver.public.blastapi.io\"]\n },\n default: {\n http: [\"https://moonriver.public.blastapi.io\"],\n webSocket: [\"wss://moonriver.public.blastapi.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Moonscan\",\n url: \"https://moonriver.moonscan.io\"\n },\n etherscan: {\n name: \"Moonscan\",\n url: \"https://moonriver.moonscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 1597904\n }\n },\n testnet: false\n};\n\n// src/neonDevnet.ts\nvar neonDevnet = {\n id: 245022926,\n network: \"neonDevnet\",\n name: \"Neon EVM DevNet\",\n nativeCurrency: { name: \"NEON\", symbol: \"NEON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://devnet.neonevm.org\"]\n },\n public: {\n http: [\"https://devnet.neonevm.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Neonscan\",\n url: \"https://neonscan.org\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 205206112\n }\n },\n testnet: true\n};\n\n// src/nexi.ts\nvar nexi = {\n id: 4242,\n name: \"Nexi\",\n network: \"nexi\",\n nativeCurrency: { name: \"Nexi\", symbol: \"NEXI\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.chain.nexi.technology\"]\n },\n public: {\n http: [\"https://rpc.chain.nexi.technology\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"NexiScan\",\n url: \"https://www.nexiscan.com\"\n },\n default: {\n name: \"NexiScan\",\n url: \"https://www.nexiscan.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0x0277A46Cc69A57eE3A6C8c158bA874832F718B8E\",\n blockCreated: 25770160\n }\n }\n};\n\n// src/nexilix.ts\nvar nexilix = {\n id: 240,\n name: \"Nexilix Smart Chain\",\n network: \"nexilix\",\n nativeCurrency: {\n decimals: 18,\n name: \"Nexilix\",\n symbol: \"NEXILIX\"\n },\n rpcUrls: {\n default: { http: [\"https://rpcurl.pos.nexilix.com\"] },\n public: { http: [\"https://rpcurl.pos.nexilix.com\"] }\n },\n blockExplorers: {\n etherscan: { name: \"NexilixScan\", url: \"https://scan.nexilix.com\" },\n default: { name: \"NexilixScan\", url: \"https://scan.nexilix.com\" }\n },\n contracts: {\n multicall3: {\n address: \"0x58381c8e2BF9d0C2C4259cA14BdA9Afe02831244\",\n blockCreated: 74448\n }\n }\n};\n\n// src/oasys.ts\nvar oasys = {\n id: 248,\n name: \"Oasys\",\n network: \"oasys\",\n nativeCurrency: { name: \"Oasys\", symbol: \"OAS\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mainnet.oasys.games\"]\n },\n public: {\n http: [\"https://rpc.mainnet.oasys.games\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"OasysScan\",\n url: \"https://scan.oasys.games\"\n }\n }\n};\n\n// src/okc.ts\nvar okc = {\n id: 66,\n name: \"OKC\",\n network: \"okc\",\n nativeCurrency: {\n decimals: 18,\n name: \"OKT\",\n symbol: \"OKT\"\n },\n rpcUrls: {\n default: { http: [\"https://exchainrpc.okex.org\"] },\n public: { http: [\"https://exchainrpc.okex.org\"] }\n },\n blockExplorers: {\n default: { name: \"oklink\", url: \"https://www.oklink.com/okc\" }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 10364792\n }\n }\n};\n\n// src/optimism.ts\nvar optimism = {\n id: 10,\n name: \"OP Mainnet\",\n network: \"optimism\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://opt-mainnet.g.alchemy.com/v2\"],\n webSocket: [\"wss://opt-mainnet.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://optimism-mainnet.infura.io/v3\"],\n webSocket: [\"wss://optimism-mainnet.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://mainnet.optimism.io\"]\n },\n public: {\n http: [\"https://mainnet.optimism.io\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"Etherscan\",\n url: \"https://optimistic.etherscan.io\"\n },\n default: {\n name: \"Optimism Explorer\",\n url: \"https://explorer.optimism.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 4286263\n }\n }\n};\n\n// src/optimismGoerli.ts\nvar optimismGoerli = {\n id: 420,\n name: \"Optimism Goerli\",\n network: \"optimism-goerli\",\n nativeCurrency: { name: \"Goerli Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://opt-goerli.g.alchemy.com/v2\"],\n webSocket: [\"wss://opt-goerli.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://optimism-goerli.infura.io/v3\"],\n webSocket: [\"wss://optimism-goerli.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://goerli.optimism.io\"]\n },\n public: {\n http: [\"https://goerli.optimism.io\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"Etherscan\",\n url: \"https://goerli-optimism.etherscan.io\"\n },\n default: {\n name: \"Etherscan\",\n url: \"https://goerli-optimism.etherscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 49461\n }\n },\n testnet: true\n};\n\n// src/polygon.ts\nvar polygon = {\n id: 137,\n name: \"Polygon\",\n network: \"matic\",\n nativeCurrency: { name: \"MATIC\", symbol: \"MATIC\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://polygon-mainnet.g.alchemy.com/v2\"],\n webSocket: [\"wss://polygon-mainnet.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://polygon-mainnet.infura.io/v3\"],\n webSocket: [\"wss://polygon-mainnet.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://polygon-rpc.com\"]\n },\n public: {\n http: [\"https://polygon-rpc.com\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"PolygonScan\",\n url: \"https://polygonscan.com\"\n },\n default: {\n name: \"PolygonScan\",\n url: \"https://polygonscan.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 25770160\n }\n }\n};\n\n// src/polygonMumbai.ts\nvar polygonMumbai = {\n id: 80001,\n name: \"Polygon Mumbai\",\n network: \"maticmum\",\n nativeCurrency: { name: \"MATIC\", symbol: \"MATIC\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://polygon-mumbai.g.alchemy.com/v2\"],\n webSocket: [\"wss://polygon-mumbai.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://polygon-mumbai.infura.io/v3\"],\n webSocket: [\"wss://polygon-mumbai.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://matic-mumbai.chainstacklabs.com\"]\n },\n public: {\n http: [\"https://matic-mumbai.chainstacklabs.com\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"PolygonScan\",\n url: \"https://mumbai.polygonscan.com\"\n },\n default: {\n name: \"PolygonScan\",\n url: \"https://mumbai.polygonscan.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 25770160\n }\n },\n testnet: true\n};\n\n// src/polygonZkEvmTestnet.ts\nvar polygonZkEvmTestnet = {\n id: 1442,\n name: \"Polygon zkEVM Testnet\",\n network: \"polygon-zkevm-testnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.public.zkevm-test.net\"]\n },\n public: {\n http: [\"https://rpc.public.zkevm-test.net\"]\n }\n },\n blockExplorers: {\n blockscout: {\n name: \"Blockscout\",\n url: \"https://explorer.public.zkevm-test.net\"\n },\n default: {\n name: \"PolygonScan\",\n url: \"https://testnet-zkevm.polygonscan.com\"\n }\n },\n testnet: true,\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 525686\n }\n }\n};\n\n// src/polygonZkEvm.ts\nvar polygonZkEvm = {\n id: 1101,\n name: \"Polygon zkEVM\",\n network: \"polygon-zkevm\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://zkevm-rpc.com\"]\n },\n public: {\n http: [\"https://zkevm-rpc.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PolygonScan\",\n url: \"https://zkevm.polygonscan.com\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 57746\n }\n }\n};\n\n// src/pulsechain.ts\nvar pulsechain = {\n id: 369,\n network: \"pulsechain\",\n name: \"PulseChain\",\n nativeCurrency: { name: \"Pulse\", symbol: \"PLS\", decimals: 18 },\n testnet: false,\n rpcUrls: {\n default: {\n http: [\"https://rpc.pulsechain.com\"],\n webSocket: [\"wss://ws.pulsechain.com\"]\n },\n public: {\n http: [\"https://rpc.pulsechain.com\"],\n webSocket: [\"wss://ws.pulsechain.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PulseScan\",\n url: \"https://scan.pulsechain.com\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 14353601\n }\n }\n};\n\n// src/pulsechainV4.ts\nvar pulsechainV4 = {\n id: 943,\n network: \"pulsechainV4\",\n name: \"PulseChain V4\",\n testnet: true,\n nativeCurrency: { name: \"V4 Pulse\", symbol: \"v4PLS\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.v4.testnet.pulsechain.com\"],\n webSocket: [\"wss://ws.v4.testnet.pulsechain.com\"]\n },\n public: {\n http: [\"https://rpc.v4.testnet.pulsechain.com\"],\n webSocket: [\"wss://ws.v4.testnet.pulsechain.com\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"PulseScan\",\n url: \"https://scan.v4.testnet.pulsechain.com\"\n }\n },\n contracts: {\n ensRegistry: {\n address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\"\n },\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 14353601\n }\n }\n};\n\n// src/scrollTestnet.ts\nvar scrollTestnet = {\n id: 534353,\n name: \"Scroll Testnet\",\n network: \"scroll-testnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://alpha-rpc.scroll.io/l2\"],\n webSocket: [\"wss://alpha-rpc.scroll.io/l2/ws\"]\n },\n public: {\n http: [\"https://alpha-rpc.scroll.io/l2\"],\n webSocket: [\"wss://alpha-rpc.scroll.io/l2/ws\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Blockscout\",\n url: \"https://blockscout.scroll.io\"\n }\n },\n testnet: true\n};\n\n// src/sepolia.ts\nvar sepolia = {\n id: 11155111,\n network: \"sepolia\",\n name: \"Sepolia\",\n nativeCurrency: { name: \"Sepolia Ether\", symbol: \"SEP\", decimals: 18 },\n rpcUrls: {\n alchemy: {\n http: [\"https://eth-sepolia.g.alchemy.com/v2\"],\n webSocket: [\"wss://eth-sepolia.g.alchemy.com/v2\"]\n },\n infura: {\n http: [\"https://sepolia.infura.io/v3\"],\n webSocket: [\"wss://sepolia.infura.io/ws/v3\"]\n },\n default: {\n http: [\"https://rpc.sepolia.org\"]\n },\n public: {\n http: [\"https://rpc.sepolia.org\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"Etherscan\",\n url: \"https://sepolia.etherscan.io\"\n },\n default: {\n name: \"Etherscan\",\n url: \"https://sepolia.etherscan.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 6507670\n }\n },\n testnet: true\n};\n\n// src/skale/brawl.ts\nvar skaleBlockBrawlers = {\n id: 391845894,\n name: \"SKALE | Block Brawlers\",\n network: \"skale-brawl\",\n nativeCurrency: { name: \"BRAWL\", symbol: \"BRAWL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/frayed-decent-antares\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/frayed-decent-antares\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://frayed-decent-antares.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://frayed-decent-antares.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/calypso.ts\nvar skaleCalypso = {\n id: 1564830818,\n name: \"SKALE | Calypso NFT Hub\",\n network: \"skale-calypso\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/honorable-steel-rasalhague\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/calypsoTestnet.ts\nvar skaleCalypsoTestnet = {\n id: 344106930,\n name: \"SKALE | Calypso NFT Hub Testnet\",\n network: \"skale-calypso-testnet\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n \"https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar\"\n ]\n },\n public: {\n http: [\n \"https://staging-v3.skalenodes.com/v1/staging-utter-unripe-menkar\"\n ]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://staging-utter-unripe-menkar.explorer.staging-v3.skalenodes.com\"\n }\n },\n contracts: {},\n testnet: true\n};\n\n// src/skale/chaosTestnet.ts\nvar skaleChaosTestnet = {\n id: 1351057110,\n name: \"SKALE | Chaos Testnet\",\n network: \"skale-chaos-testnet\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n \"https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix\"\n ]\n },\n public: {\n http: [\n \"https://staging-v3.skalenodes.com/v1/staging-fast-active-bellatrix\"\n ]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://staging-fast-active-bellatrix.explorer.staging-v3.skalenodes.com\"\n }\n },\n contracts: {},\n testnet: true\n};\n\n// src/skale/cryptoBlades.ts\nvar skaleCryptoBlades = {\n id: 1026062157,\n name: \"SKALE | CryptoBlades\",\n network: \"skale-cryptoblades\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/affectionate-immediate-pollux\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://affectionate-immediate-pollux.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/cryptoColosseum.ts\nvar skaleCryptoColosseum = {\n id: 2046399126,\n name: \"SKALE | Crypto Colosseum\",\n network: \"skale-crypto-coloseeum\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/haunting-devoted-deneb\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/haunting-devoted-deneb\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://haunting-devoted-deneb.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/europa.ts\nvar skaleEuropa = {\n id: 2046399126,\n name: \"SKALE | Europa Liquidity Hub\",\n network: \"skale-europa\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/elated-tan-skat\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/elated-tan-skat\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://elated-tan-skat.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://elated-tan-skat.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/europaTestnet.ts\nvar skaleEuropaTestnet = {\n id: 476158412,\n name: \"SKALE | Europa Liquidity Hub Testnet\",\n network: \"skale-europa-testnet\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor\"]\n },\n public: {\n http: [\"https://staging-v3.skalenodes.com/v1/staging-legal-crazy-castor\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://staging-legal-crazy-castor.explorer.staging-v3.skalenodes.com\"\n }\n },\n contracts: {},\n testnet: true\n};\n\n// src/skale/exorde.ts\nvar skaleExorde = {\n id: 2139927552,\n name: \"SKALE | Exorde\",\n network: \"skale-exorde\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/light-vast-diphda\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/light-vast-diphda\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://light-vast-diphda.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://light-vast-diphda.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/humanProtocol.ts\nvar skaleHumanProtocol = {\n id: 1273227453,\n name: \"SKALE | Human Protocol\",\n network: \"skale-human-protocol\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/wan-red-ain\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/wan-red-ain\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://wan-red-ain.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://wan-red-ain.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/nebula.ts\nvar skaleNebula = {\n id: 1482601649,\n name: \"SKALE | Nebula Gaming Hub\",\n network: \"skale-nebula\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/green-giddy-denebola\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/green-giddy-denebola\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://green-giddy-denebola.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://green-giddy-denebola.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/nebulaTestnet.ts\nvar skaleNebulaTestnet = {\n id: 503129905,\n name: \"SKALE | Nebula Gaming Hub Testnet\",\n network: \"skale-nebula-testnet\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird\"]\n },\n public: {\n http: [\"https://staging-v3.skalenodes.com/v1/staging-faint-slimy-achird\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://staging-faint-slimy-achird.explorer.staging-v3.skalenodes.com\"\n }\n },\n contracts: {},\n testnet: true\n};\n\n// src/skale/razor.ts\nvar skaleRazor = {\n id: 278611351,\n name: \"SKALE | Razor Network\",\n network: \"skale-razor\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/turbulent-unique-scheat\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/turbulent-unique-scheat\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://turbulent-unique-scheat.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/titan.ts\nvar skaleTitan = {\n id: 1350216234,\n name: \"SKALE | Titan Community Hub\",\n network: \"skale-titan\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.skalenodes.com/v1/parallel-stormy-spica\"]\n },\n public: {\n http: [\"https://mainnet.skalenodes.com/v1/parallel-stormy-spica\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com\"\n }\n },\n contracts: {}\n};\n\n// src/skale/titanTestnet.ts\nvar skaleTitanTestnet = {\n id: 1517929550,\n name: \"SKALE | Titan Community Hub Testnet\",\n network: \"skale-titan-testnet\",\n nativeCurrency: { name: \"sFUEL\", symbol: \"sFUEL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n \"https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar\"\n ]\n },\n public: {\n http: [\n \"https://staging-v3.skalenodes.com/v1/staging-aware-chief-gianfar\"\n ]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"SKALE Explorer\",\n url: \"https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com\"\n },\n default: {\n name: \"SKALE Explorer\",\n url: \"https://staging-aware-chief-gianfar.explorer.staging-v3.skalenodes.com\"\n }\n },\n contracts: {},\n testnet: true\n};\n\n// src/songbird.ts\nvar songbird = {\n id: 19,\n name: \"Songbird Mainnet\",\n network: \"songbird-mainnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"songbird\",\n symbol: \"SGB\"\n },\n rpcUrls: {\n default: { http: [\"https://songbird-api.flare.network/ext/C/rpc\"] },\n public: { http: [\"https://songbird-api.flare.network/ext/C/rpc\"] }\n },\n blockExplorers: {\n default: {\n name: \"Songbird Explorer\",\n url: \"https://songbird-explorer.flare.network\"\n }\n }\n};\n\n// src/songbirdTestnet.ts\nvar songbirdTestnet = {\n id: 16,\n name: \"Coston\",\n network: \"coston\",\n nativeCurrency: {\n decimals: 18,\n name: \"costonflare\",\n symbol: \"CFLR\"\n },\n rpcUrls: {\n default: { http: [\"https://coston-api.flare.network/ext/C/rpc\"] },\n public: { http: [\"https://coston-api.flare.network/ext/C/rpc\"] }\n },\n blockExplorers: {\n default: {\n name: \"Coston Explorer\",\n url: \"https://coston-explorer.flare.network\"\n }\n },\n testnet: true\n};\n\n// src/shardeumSphinx.ts\nvar shardeumSphinx = {\n id: 8082,\n name: \"Shardeum Sphinx\",\n network: \"shmSphinx\",\n nativeCurrency: { name: \"SHARDEUM\", symbol: \"SHM\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://sphinx.shardeum.org\"]\n },\n public: {\n http: [\"https://sphinx.shardeum.org\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Shardeum Explorer\",\n url: \"https://explorer-sphinx.shardeum.org\"\n }\n },\n testnet: true\n};\n\n// src/syscoin.ts\nvar syscoin = {\n id: 57,\n name: \"Syscoin Mainnet\",\n network: \"syscoin\",\n nativeCurrency: {\n decimals: 8,\n name: \"Syscoin\",\n symbol: \"SYS\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.syscoin.org\"] },\n public: { http: [\"https://rpc.syscoin.org\"] }\n },\n blockExplorers: {\n default: { name: \"SyscoinExplorer\", url: \"https://explorer.syscoin.org\" }\n },\n contracts: {\n multicall3: {\n address: \"0x000562033783B1136159E10d976B519C929cdE8e\",\n blockCreated: 80637\n }\n }\n};\n\n// src/taraxa.ts\nvar taraxa = {\n id: 841,\n name: \"Taraxa Mainnet\",\n network: \"taraxa\",\n nativeCurrency: { name: \"Tara\", symbol: \"TARA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mainnet.taraxa.io\"]\n },\n public: {\n http: [\"https://rpc.mainnet.taraxa.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Taraxa Explorer\",\n url: \"https://explorer.mainnet.taraxa.io\"\n }\n }\n};\n\n// src/taikoTestnetSepolia.ts\nvar taikoTestnetSepolia = {\n id: 167005,\n name: \"Taiko (Alpha-3 Testnet)\",\n network: \"taiko-sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.test.taiko.xyz\"]\n },\n public: {\n http: [\"https://rpc.test.taiko.xyz\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"blockscout\",\n url: \"https://explorer.test.taiko.xyz\"\n }\n }\n};\n\n// src/taraxaTestnet.ts\nvar taraxaTestnet = {\n id: 842,\n name: \"Taraxa Testnet\",\n network: \"taraxa-testnet\",\n nativeCurrency: { name: \"Tara\", symbol: \"TARA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.testnet.taraxa.io\"]\n },\n public: {\n http: [\"https://rpc.testnet.taraxa.io\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"Taraxa Explorer\",\n url: \"https://explorer.testnet.taraxa.io\"\n }\n },\n testnet: true\n};\n\n// src/telos.ts\nvar telos = {\n id: 40,\n name: \"Telos\",\n network: \"telos\",\n nativeCurrency: {\n decimals: 18,\n name: \"Telos\",\n symbol: \"TLOS\"\n },\n rpcUrls: {\n default: { http: [\"https://mainnet.telos.net/evm\"] },\n public: { http: [\"https://mainnet.telos.net/evm\"] }\n },\n blockExplorers: {\n default: {\n name: \"Teloscan\",\n url: \"https://www.teloscan.io/\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 246530709\n }\n }\n};\n\n// src/telosTestnet.ts\nvar telosTestnet = {\n id: 41,\n name: \"Telos\",\n network: \"telosTestnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Telos\",\n symbol: \"TLOS\"\n },\n rpcUrls: {\n default: { http: [\"https://testnet.telos.net/evm\"] },\n public: { http: [\"https://testnet.telos.net/evm\"] }\n },\n blockExplorers: {\n default: {\n name: \"Teloscan (testnet)\",\n url: \"https://testnet.teloscan.io/\"\n }\n },\n testnet: true\n};\n\n// src/thunderTestnet.ts\nvar thunderTestnet = {\n id: 997,\n name: \"5ireChain Thunder Testnet\",\n network: \"5ireChain\",\n nativeCurrency: { name: \"5ire Token\", symbol: \"5IRE\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc-testnet.5ire.network\"]\n },\n public: {\n http: [\"https://rpc-testnet.5ire.network\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"5ireChain Explorer\",\n url: \"https://explorer.5ire.network\"\n }\n },\n testnet: true\n};\n\n// src/wanchain.ts\nvar wanchain = {\n id: 888,\n name: \"Wanchain\",\n network: \"wanchain\",\n nativeCurrency: { name: \"WANCHAIN\", symbol: \"WAN\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\n \"https://gwan-ssl.wandevs.org:56891\",\n \"https://gwan2-ssl.wandevs.org\"\n ]\n },\n public: {\n http: [\n \"https://gwan-ssl.wandevs.org:56891\",\n \"https://gwan2-ssl.wandevs.org\"\n ]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"WanScan\",\n url: \"https://wanscan.org\"\n },\n default: {\n name: \"WanScan\",\n url: \"https://wanscan.org\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xcDF6A1566e78EB4594c86Fe73Fcdc82429e97fbB\",\n blockCreated: 25312390\n }\n }\n};\n\n// src/wanchainTestnet.ts\nvar wanchainTestnet = {\n id: 999,\n name: \"Wanchain Testnet\",\n network: \"wanchainTestnet\",\n nativeCurrency: { name: \"WANCHAIN\", symbol: \"WANt\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://gwan-ssl.wandevs.org:46891\"]\n },\n public: {\n http: [\"https://gwan-ssl.wandevs.org:46891\"]\n }\n },\n blockExplorers: {\n etherscan: {\n name: \"WanScanTest\",\n url: \"https://wanscan.org\"\n },\n default: {\n name: \"WanScanTest\",\n url: \"https://wanscan.org\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0x11c89bF4496c39FB80535Ffb4c92715839CC5324\",\n blockCreated: 24743448\n }\n },\n testnet: true\n};\n\n// src/xdc.ts\nvar xdc = {\n id: 50,\n name: \"XinFin Network\",\n network: \"xdc\",\n nativeCurrency: {\n decimals: 18,\n name: \"XDC\",\n symbol: \"XDC\"\n },\n rpcUrls: {\n default: { http: [\"https://rpc.xinfin.network\"] },\n public: { http: [\"https://rpc.xinfin.network\"] }\n },\n blockExplorers: {\n xinfin: { name: \"XinFin\", url: \"https://explorer.xinfin.network\" },\n default: { name: \"Blocksscan\", url: \"https://xdc.blocksscan.io\" }\n }\n};\n\n// src/xdcTestnet.ts\nvar xdcTestnet = {\n id: 51,\n name: \"Apothem Network\",\n network: \"xdc-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"TXDC\",\n symbol: \"TXDC\"\n },\n rpcUrls: {\n default: { http: [\"https://erpc.apothem.network\"] },\n public: { http: [\"https://erpc.apothem.network\"] }\n },\n blockExplorers: {\n xinfin: { name: \"XinFin\", url: \"https://explorer.apothem.network\" },\n default: { name: \"Blocksscan\", url: \"https://apothem.blocksscan.io\" }\n }\n};\n\n// src/zhejiang.ts\nvar zhejiang = {\n id: 1337803,\n network: \"zhejiang\",\n name: \"Zhejiang\",\n nativeCurrency: { name: \"Zhejiang Ether\", symbol: \"ZhejETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.zhejiang.ethpandaops.io\"]\n },\n public: {\n http: [\"https://rpc.zhejiang.ethpandaops.io\"]\n }\n },\n blockExplorers: {\n beaconchain: {\n name: \"Etherscan\",\n url: \"https://zhejiang.beaconcha.in\"\n },\n blockscout: {\n name: \"Blockscout\",\n url: \"https://blockscout.com/eth/zhejiang-testnet\"\n },\n default: {\n name: \"Beaconchain\",\n url: \"https://zhejiang.beaconcha.in\"\n }\n },\n testnet: true\n};\n\n// src/zkSync.ts\nvar zkSync = {\n id: 324,\n name: \"zkSync Era\",\n network: \"zksync-era\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://mainnet.era.zksync.io\"],\n webSocket: [\"wss://mainnet.era.zksync.io/ws\"]\n },\n public: {\n http: [\"https://mainnet.era.zksync.io\"],\n webSocket: [\"wss://mainnet.era.zksync.io/ws\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"zkExplorer\",\n url: \"https://explorer.zksync.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xF9cda624FBC7e059355ce98a31693d299FACd963\"\n }\n }\n};\n\n// src/zkSyncTestnet.ts\nvar zkSyncTestnet = {\n id: 280,\n name: \"zkSync Era Testnet\",\n network: \"zksync-era-testnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://testnet.era.zksync.dev\"],\n webSocket: [\"wss://testnet.era.zksync.dev/ws\"]\n },\n public: {\n http: [\"https://testnet.era.zksync.dev\"],\n webSocket: [\"wss://testnet.era.zksync.dev/ws\"]\n }\n },\n blockExplorers: {\n default: {\n name: \"zkExplorer\",\n url: \"https://goerli.explorer.zksync.io\"\n }\n },\n contracts: {\n multicall3: {\n address: \"0xF9cda624FBC7e059355ce98a31693d299FACd963\"\n }\n },\n testnet: true\n};\n\n// src/zora.ts\nvar zora = {\n id: 7777777,\n name: \"Zora\",\n network: \"zora\",\n nativeCurrency: {\n decimals: 18,\n name: \"Ether\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://rpc.zora.energy\"],\n webSocket: [\"wss://rpc.zora.energy\"]\n },\n public: {\n http: [\"https://rpc.zora.energy\"],\n webSocket: [\"wss://rpc.zora.energy\"]\n }\n },\n blockExplorers: {\n default: { name: \"Explorer\", url: \"https://explorer.zora.energy\" }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 5882\n }\n }\n};\n\n// src/zoraTestnet.ts\nvar zoraTestnet = {\n id: 999,\n name: \"Zora Goerli Testnet\",\n network: \"zora-testnet\",\n nativeCurrency: {\n decimals: 18,\n name: \"Zora Goerli\",\n symbol: \"ETH\"\n },\n rpcUrls: {\n default: {\n http: [\"https://testnet.rpc.zora.energy\"],\n webSocket: [\"wss://testnet.rpc.zora.energy\"]\n },\n public: {\n http: [\"https://testnet.rpc.zora.energy\"],\n webSocket: [\"wss://testnet.rpc.zora.energy\"]\n }\n },\n blockExplorers: {\n default: { name: \"Explorer\", url: \"https://testnet.explorer.zora.energy\" }\n },\n contracts: {\n multicall3: {\n address: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n blockCreated: 189123\n }\n },\n testnet: true\n};\nexport {\n arbitrum,\n arbitrumGoerli,\n arbitrumNova,\n aurora,\n auroraTestnet,\n avalanche,\n avalancheFuji,\n base,\n baseGoerli,\n bearNetworkChainMainnet,\n bearNetworkChainTestnet,\n boba,\n bronos,\n bronosTestnet,\n bsc,\n bscTestnet,\n bxn,\n bxnTestnet,\n canto,\n celo,\n celoAlfajores,\n celoCannoli,\n confluxESpace,\n cronos,\n cronosTestnet,\n crossbell,\n dfk,\n dogechain,\n edgeware,\n edgewareTestnet,\n ekta,\n ektaTestnet,\n eos,\n eosTestnet,\n evmos,\n evmosTestnet,\n fantom,\n fantomTestnet,\n fibo,\n filecoin,\n filecoinCalibration,\n filecoinHyperspace,\n flare,\n flareTestnet,\n foundry,\n fuse,\n gnosis,\n gnosisChiado,\n goerli,\n haqqMainnet,\n haqqTestedge2,\n hardhat,\n harmonyOne,\n iotex,\n iotexTestnet,\n klaytn,\n lineaTestnet,\n localhost,\n mainnet,\n mantle,\n mantleTestnet,\n metis,\n metisGoerli,\n mev,\n mevTestnet,\n moonbaseAlpha,\n moonbeam,\n moonriver,\n neonDevnet,\n nexi,\n nexilix,\n oasys,\n okc,\n optimism,\n optimismGoerli,\n polygon,\n polygonMumbai,\n polygonZkEvm,\n polygonZkEvmTestnet,\n pulsechain,\n pulsechainV4,\n scrollTestnet,\n sepolia,\n shardeumSphinx,\n skaleBlockBrawlers,\n skaleCalypso,\n skaleCalypsoTestnet,\n skaleChaosTestnet,\n skaleCryptoBlades,\n skaleCryptoColosseum,\n skaleEuropa,\n skaleEuropaTestnet,\n skaleExorde,\n skaleHumanProtocol,\n skaleNebula,\n skaleNebulaTestnet,\n skaleRazor,\n skaleTitan,\n skaleTitanTestnet,\n songbird,\n songbirdTestnet,\n syscoin,\n taikoTestnetSepolia,\n taraxa,\n taraxaTestnet,\n telos,\n telosTestnet,\n thunderTestnet,\n wanchain,\n wanchainTestnet,\n xdc,\n xdcTestnet,\n zhejiang,\n zkSync,\n zkSyncTestnet,\n zora,\n zoraTestnet\n};\n","import * as chains from '@wagmi/chains';\nimport { defineChain } from '../utils/chain.js';\nimport { formattersCelo } from './celo/formatters.js';\nimport { serializersCelo } from './celo/serializers.js';\nimport { feesOptimism } from './optimism/fees.js';\nimport { formattersOptimism } from './optimism/formatters.js';\nexport const arbitrum = /*#__PURE__*/ defineChain(chains.arbitrum);\nexport const arbitrumGoerli = /*#__PURE__*/ defineChain(chains.arbitrumGoerli);\nexport const aurora = /*#__PURE__*/ defineChain(chains.aurora);\nexport const auroraTestnet = /*#__PURE__*/ defineChain(chains.auroraTestnet);\nexport const avalanche = /*#__PURE__*/ defineChain(chains.avalanche);\nexport const avalancheFuji = /*#__PURE__*/ defineChain(chains.avalancheFuji);\nexport const base = /*#__PURE__*/ defineChain(chains.base, {\n fees: feesOptimism,\n formatters: formattersOptimism,\n});\nexport const baseGoerli = /*#__PURE__*/ defineChain(chains.baseGoerli, {\n fees: feesOptimism,\n formatters: formattersOptimism,\n});\nexport const boba = /*#__PURE__*/ defineChain(chains.boba);\nexport const bronos = /*#__PURE__*/ defineChain(chains.bronos);\nexport const bronosTestnet = /*#__PURE__*/ defineChain(chains.bronosTestnet);\nexport const bsc = /*#__PURE__*/ defineChain(chains.bsc);\nexport const bscTestnet = /*#__PURE__*/ defineChain(chains.bscTestnet);\nexport const canto = /*#__PURE__*/ defineChain(chains.canto);\nexport const celo = /*#__PURE__*/ defineChain(chains.celo, {\n formatters: formattersCelo,\n serializers: serializersCelo,\n});\nexport const celoAlfajores = /*#__PURE__*/ defineChain(chains.celoAlfajores, {\n formatters: formattersCelo,\n serializers: serializersCelo,\n});\nexport const celoCannoli = /*#__PURE__*/ defineChain(chains.celoCannoli, {\n formatters: formattersCelo,\n serializers: serializersCelo,\n});\nexport const cronos = /*#__PURE__*/ defineChain(chains.cronos);\nexport const crossbell = /*#__PURE__*/ defineChain(chains.crossbell);\nexport const dfk = /*#__PURE__*/ defineChain(chains.dfk);\nexport const dogechain = /*#__PURE__*/ defineChain(chains.dogechain);\nexport const evmos = /*#__PURE__*/ defineChain(chains.evmos);\nexport const evmosTestnet = /*#__PURE__*/ defineChain(chains.evmosTestnet);\nexport const fantom = /*#__PURE__*/ defineChain(chains.fantom);\nexport const fantomTestnet = /*#__PURE__*/ defineChain(chains.fantomTestnet);\nexport const filecoin = /*#__PURE__*/ defineChain(chains.filecoin);\nexport const filecoinCalibration = /*#__PURE__*/ defineChain(chains.filecoinCalibration);\nexport const filecoinHyperspace = /*#__PURE__*/ defineChain(chains.filecoinHyperspace);\nexport const flare = /*#__PURE__*/ defineChain(chains.flare);\nexport const flareTestnet = /*#__PURE__*/ defineChain(chains.flareTestnet);\nexport const foundry = /*#__PURE__*/ defineChain(chains.foundry);\nexport const iotex = /*#__PURE__*/ defineChain(chains.iotex);\nexport const iotexTestnet = /*#__PURE__*/ defineChain(chains.iotexTestnet);\nexport const goerli = /*#__PURE__*/ defineChain(chains.goerli);\nexport const gnosis = /*#__PURE__*/ defineChain(chains.gnosis);\nexport const gnosisChiado = /*#__PURE__*/ defineChain(chains.gnosisChiado);\nexport const haqqMainnet = /*#__PURE__*/ defineChain(chains.haqqMainnet);\nexport const haqqTestedge2 = /*#__PURE__*/ defineChain(chains.haqqTestedge2);\nexport const hardhat = /*#__PURE__*/ defineChain(chains.hardhat);\nexport const harmonyOne = /*#__PURE__*/ defineChain(chains.harmonyOne);\nexport const klaytn = /*#__PURE__*/ defineChain(chains.klaytn);\nexport const lineaTestnet = /*#__PURE__*/ defineChain(chains.lineaTestnet);\nexport const localhost = /*#__PURE__*/ defineChain(chains.localhost);\nexport const mainnet = /*#__PURE__*/ defineChain(chains.mainnet);\nexport const metis = /*#__PURE__*/ defineChain(chains.metis);\nexport const metisGoerli = /*#__PURE__*/ defineChain(chains.metisGoerli);\nexport const mev = /*#__PURE__*/ defineChain(chains.mev);\nexport const mevTestnet = /*#__PURE__*/ defineChain(chains.mevTestnet);\nexport const moonbaseAlpha = /*#__PURE__*/ defineChain(chains.moonbaseAlpha);\nexport const moonbeam = /*#__PURE__*/ defineChain(chains.moonbeam);\nexport const moonriver = /*#__PURE__*/ defineChain(chains.moonriver);\nexport const nexi = /*#__PURE__*/ defineChain(chains.nexi);\nexport const okc = /*#__PURE__*/ defineChain(chains.okc);\nexport const optimism = /*#__PURE__*/ defineChain(chains.optimism, {\n fees: feesOptimism,\n formatters: formattersOptimism,\n});\nexport const optimismGoerli = /*#__PURE__*/ defineChain(chains.optimismGoerli, {\n fees: feesOptimism,\n formatters: formattersOptimism,\n});\nexport const polygon = /*#__PURE__*/ defineChain(chains.polygon);\nexport const polygonMumbai = /*#__PURE__*/ defineChain(chains.polygonMumbai);\nexport const polygonZkEvm = /*#__PURE__*/ defineChain(chains.polygonZkEvm);\nexport const polygonZkEvmTestnet = /*#__PURE__*/ defineChain(chains.polygonZkEvmTestnet);\nexport const pulsechain = /*#__PURE__*/ defineChain(chains.pulsechain);\nexport const pulsechainV4 = /*#__PURE__*/ defineChain(chains.pulsechainV4);\nexport const scrollTestnet = /*#__PURE__*/ defineChain(chains.scrollTestnet);\nexport const sepolia = /*#__PURE__*/ defineChain(chains.sepolia);\nexport const skaleBlockBrawlers = /*#__PURE__*/ defineChain(chains.skaleBlockBrawlers);\nexport const skaleCalypso = /*#__PURE__*/ defineChain(chains.skaleCalypso);\nexport const skaleCalypsoTestnet = /*#__PURE__*/ defineChain(chains.skaleCalypsoTestnet);\nexport const skaleChaosTestnet = /*#__PURE__*/ defineChain(chains.skaleChaosTestnet);\nexport const skaleCryptoBlades = /*#__PURE__*/ defineChain(chains.skaleCryptoBlades);\nexport const skaleCryptoColosseum = /*#__PURE__*/ defineChain(chains.skaleCryptoColosseum);\nexport const skaleEuropa = /*#__PURE__*/ defineChain(chains.skaleEuropa);\nexport const skaleEuropaTestnet = /*#__PURE__*/ defineChain(chains.skaleEuropaTestnet);\nexport const skaleExorde = /*#__PURE__*/ defineChain(chains.skaleExorde);\nexport const skaleHumanProtocol = /*#__PURE__*/ defineChain(chains.skaleHumanProtocol);\nexport const skaleNebula = /*#__PURE__*/ defineChain(chains.skaleNebula);\nexport const skaleNebulaTestnet = /*#__PURE__*/ defineChain(chains.skaleNebulaTestnet);\nexport const skaleRazor = /*#__PURE__*/ defineChain(chains.skaleRazor);\nexport const skaleTitan = /*#__PURE__*/ defineChain(chains.skaleTitan);\nexport const skaleTitanTestnet = /*#__PURE__*/ defineChain(chains.skaleTitanTestnet);\nexport const songbird = /*#__PURE__*/ defineChain(chains.songbird);\nexport const songbirdTestnet = /*#__PURE__*/ defineChain(chains.songbirdTestnet);\nexport const shardeumSphinx = /*#__PURE__*/ defineChain(chains.shardeumSphinx);\nexport const syscoin = /*#__PURE__*/ defineChain(chains.syscoin);\nexport const taraxa = /*#__PURE__*/ defineChain(chains.taraxa);\nexport const taraxaTestnet = /*#__PURE__*/ defineChain(chains.taraxaTestnet);\nexport const telos = /*#__PURE__*/ defineChain(chains.telos);\nexport const telosTestnet = /*#__PURE__*/ defineChain(chains.telosTestnet);\nexport const thunderTestnet = /*#__PURE__*/ defineChain(chains.thunderTestnet);\nexport const wanchain = /*#__PURE__*/ defineChain(chains.wanchain);\nexport const wanchainTestnet = /*#__PURE__*/ defineChain(chains.wanchainTestnet);\nexport const xdc = /*#__PURE__*/ defineChain(chains.xdc);\nexport const xdcTestnet = /*#__PURE__*/ defineChain(chains.xdcTestnet);\nexport const zhejiang = /*#__PURE__*/ defineChain(chains.zhejiang);\nexport const zkSync = /*#__PURE__*/ defineChain(chains.zkSync);\nexport const zkSyncTestnet = /*#__PURE__*/ defineChain(chains.zkSyncTestnet);\nexport const zora = /*#__PURE__*/ defineChain(chains.zora, {\n fees: feesOptimism,\n formatters: formattersOptimism,\n});\nexport const zoraTestnet = /*#__PURE__*/ defineChain(chains.zoraTestnet, {\n fees: feesOptimism,\n formatters: formattersOptimism,\n});\n//# sourceMappingURL=index.js.map","var t={name:\"Lattice Testnet\",id:4242,network:\"lattice-testnet\",nativeCurrency:{decimals:18,name:\"Ether\",symbol:\"ETH\"},rpcUrls:{default:{http:[\"https://follower.testnet-chain.linfra.xyz\"],webSocket:[\"wss://follower.testnet-chain.linfra.xyz\"]},public:{http:[\"https://follower.testnet-chain.linfra.xyz\"],webSocket:[\"wss://follower.testnet-chain.linfra.xyz\"]}},blockExplorers:{otterscan:{name:\"Otterscan\",url:\"https://explorer.testnet-chain.linfra.xyz\"},default:{name:\"Otterscan\",url:\"https://explorer.testnet-chain.linfra.xyz\"}},faucetUrl:\"https://faucet.testnet-mud-services.linfra.xyz\"};import{foundry as e}from\"viem/chains\";var r={...e,fees:{defaultPriorityFee:0n}};export{t as latticeTestnet,r as mudFoundry};\n//# sourceMappingURL=chains.js.map","import { MUDChain, latticeTestnet, mudFoundry } from \"@latticexyz/common/chains\";\n\nimport { sepolia, arbitrumGoerli } from 'viem/chains'\n\narbitrumGoerli.rpcUrls.default.http = ['https://arbitrum-goerli.infura.io/v3/5ca372516740427e97512d4dfefd9c47'];\narbitrumGoerli.rpcUrls.default.webSocket = [ 'wss://arbitrum-goerli.infura.io/ws/v3/5ca372516740427e97512d4dfefd9c47'];\n\nconst testnet = {\n name: \"Lidamao Testnet\",\n id: 33784,\n network: \"lidamao-testnet\",\n nativeCurrency: { decimals: 18, name: \"Ether\", symbol: \"ETH\" },\n rpcUrls: {\n default: {\n http: [\"https://rpc.0xmssp.xyz\"],\n webSocket: [\"https://rpc.0xmssp.xyz\"],\n },\n public: {\n http: [\"https://rpc.0xmssp.xyz\"],\n webSocket: [\"https://rpc.0xmssp.xyz\"],\n },\n }\n }\n\n// If you are deploying to chains other than anvil or Lattice testnet, add them here\nexport const supportedChains: MUDChain[] = [mudFoundry, latticeTestnet, sepolia, arbitrumGoerli, testnet];\n","import { getBurnerPrivateKey } from \"@latticexyz/common\";\nimport worldsJson from \"contracts/worlds.json\";\nimport { supportedChains } from \"./supportedChains\";\n\nconst worlds = worldsJson as Partial>;\n\nexport async function getNetworkConfig() {\n const params = new URLSearchParams(window.location.search);\n const chainId = Number(params.get(\"chainId\") || params.get(\"chainid\") || (import.meta.env.DEV ? import.meta.env.TEST_CHAIN_ID : import.meta.env.VITE_CHAIN_ID) || 31337);\n // const chainId = import.meta.env.DEV ? 31337 : 33784\n // const chainId = 31337;\n // const chainId = 421613;\n // console.log(supportedChains);\n if (import.meta.env.DEV) {\n \n }\n const chainIndex = supportedChains.findIndex((c) => c.id === chainId);\n const chain = supportedChains[chainIndex];\n if (!chain) {\n throw new Error(`Chain ${chainId} not found`);\n }\n\n const world = worlds[chain.id.toString()];\n const worldAddress = params.get(\"worldAddress\") || world?.address;\n if (!worldAddress) {\n throw new Error(`No world address found for chain ${chainId}. Did you run \\`mud deploy\\`?`);\n }\n\n const initialBlockNumber = params.has(\"initialBlockNumber\")\n ? Number(params.get(\"initialBlockNumber\"))\n : world?.blockNumber ?? 0n;\n\n return {\n privateKey: getBurnerPrivateKey(),\n chainId,\n chain,\n faucetServiceUrl: params.get(\"faucet\") ?? chain.faucetUrl,\n worldAddress,\n initialBlockNumber,\n };\n}\n","import { createWorld } from \"@latticexyz/recs\";\n\nexport const world = createWorld();\n","/* Autogenerated file. Do not edit manually. */\n/* tslint:disable */\n/* eslint-disable */\n\nimport { Contract, Signer, utils } from \"ethers\";\nimport type { Provider } from \"@ethersproject/providers\";\nimport type { IWorld, IWorldInterface } from \"../IWorld\";\n\nconst _abi = [\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"resource\",\n type: \"string\",\n },\n {\n internalType: \"address\",\n name: \"caller\",\n type: \"address\",\n },\n ],\n name: \"AccessDenied\",\n type: \"error\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"functionSelector\",\n type: \"bytes4\",\n },\n ],\n name: \"FunctionSelectorExists\",\n type: \"error\",\n },\n {\n inputs: [\n {\n internalType: \"bytes4\",\n name: \"functionSelector\",\n type: \"bytes4\",\n },\n ],\n name: \"FunctionSelectorNotFound\",\n type: \"error\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"resource\",\n type: \"string\",\n },\n ],\n name: \"InvalidSelector\",\n type: \"error\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"module\",\n type: \"string\",\n },\n ],\n name: \"ModuleAlreadyInstalled\",\n type: \"error\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"resource\",\n type: \"string\",\n },\n ],\n name: \"ResourceExists\",\n type: \"error\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"resource\",\n type: \"string\",\n },\n ],\n name: \"ResourceNotFound\",\n type: \"error\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"length\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"received\",\n type: \"uint256\",\n },\n ],\n name: \"StoreCore_DataIndexOverflow\",\n type: \"error\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"expected\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"received\",\n type: \"uint256\",\n },\n ],\n name: \"StoreCore_InvalidDataLength\",\n type: \"error\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"expected\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"received\",\n type: \"uint256\",\n },\n ],\n name: \"StoreCore_InvalidFieldNamesLength\",\n type: \"error\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"expected\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"received\",\n type: \"uint256\",\n },\n ],\n name: \"StoreCore_InvalidKeyNamesLength\",\n type: \"error\",\n },\n {\n inputs: [],\n name: \"StoreCore_NotDynamicField\",\n type: \"error\",\n },\n {\n inputs: [],\n name: \"StoreCore_NotImplemented\",\n type: \"error\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"tableId\",\n type: \"bytes32\",\n },\n {\n internalType: \"string\",\n name: \"tableIdString\",\n type: \"string\",\n },\n ],\n name: \"StoreCore_TableAlreadyExists\",\n type: \"error\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"tableId\",\n type: \"bytes32\",\n },\n {\n internalType: \"string\",\n name: \"tableIdString\",\n type: \"string\",\n },\n ],\n name: \"StoreCore_TableNotFound\",\n type: \"error\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"system\",\n type: \"address\",\n },\n ],\n name: \"SystemExists\",\n type: \"error\",\n },\n {\n anonymous: false,\n inputs: [],\n name: \"HelloWorld\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n ],\n name: \"StoreDeleteRecord\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\",\n },\n ],\n name: \"StoreEphemeralRecord\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n indexed: false,\n internalType: \"uint8\",\n name: \"schemaIndex\",\n type: \"uint8\",\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\",\n },\n ],\n name: \"StoreSetField\",\n type: \"event\",\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: false,\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n indexed: false,\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n indexed: false,\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\",\n },\n ],\n name: \"StoreSetRecord\",\n type: \"event\",\n },\n {\n inputs: [\n {\n internalType: \"uint16\",\n name: \"_x\",\n type: \"uint16\",\n },\n {\n internalType: \"uint16\",\n name: \"_y\",\n type: \"uint16\",\n },\n ],\n name: \"CreateBox\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"GetSeasonInfo\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"_root\",\n type: \"bytes32\",\n },\n ],\n name: \"SetMapMerkleRoot\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_start\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_end\",\n type: \"uint256\",\n },\n ],\n name: \"SetSeasonInfo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_user\",\n type: \"address\",\n },\n ],\n name: \"SetUserContract\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_targetAddress\",\n type: \"address\",\n },\n {\n components: [\n {\n internalType: \"uint16\",\n name: \"x\",\n type: \"uint16\",\n },\n {\n internalType: \"uint16\",\n name: \"y\",\n type: \"uint16\",\n },\n {\n internalType: \"bytes32[]\",\n name: \"proof\",\n type: \"bytes32[]\",\n },\n ],\n internalType: \"struct Position[]\",\n name: \"positionList\",\n type: \"tuple[]\",\n },\n ],\n name: \"battleInvitation\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"resourceSelector\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes\",\n name: \"funcSelectorAndArgs\",\n type: \"bytes\",\n },\n ],\n name: \"call\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"payable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"_buffHash\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"_battleId\",\n type: \"uint256\",\n },\n ],\n name: \"confirmBattle\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"Schema\",\n name: \"valueSchema\",\n type: \"bytes32\",\n },\n ],\n name: \"deleteRecord\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\",\n },\n {\n internalType: \"Schema\",\n name: \"valueSchema\",\n type: \"bytes32\",\n },\n ],\n name: \"emitEphemeralRecord\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_battleId\",\n type: \"uint256\",\n },\n ],\n name: \"forceEnd\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_battleId\",\n type: \"uint256\",\n },\n {\n internalType: \"address\",\n name: \"addr\",\n type: \"address\",\n },\n ],\n name: \"getBattlePlayerHp\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_boxId\",\n type: \"uint256\",\n },\n {\n internalType: \"uint16\",\n name: \"_oreAmount\",\n type: \"uint16\",\n },\n {\n internalType: \"uint16\",\n name: \"_treasureAmount\",\n type: \"uint16\",\n },\n ],\n name: \"getCollections\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"uint8\",\n name: \"schemaIndex\",\n type: \"uint8\",\n },\n {\n internalType: \"Schema\",\n name: \"valueSchema\",\n type: \"bytes32\",\n },\n ],\n name: \"getField\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"uint8\",\n name: \"schemaIndex\",\n type: \"uint8\",\n },\n {\n internalType: \"Schema\",\n name: \"valueSchema\",\n type: \"bytes32\",\n },\n ],\n name: \"getFieldLength\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"uint8\",\n name: \"schemaIndex\",\n type: \"uint8\",\n },\n {\n internalType: \"Schema\",\n name: \"valueSchema\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"start\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"end\",\n type: \"uint256\",\n },\n ],\n name: \"getFieldSlice\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"addr\",\n type: \"address\",\n },\n ],\n name: \"getInfo\",\n outputs: [\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"\",\n type: \"string\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n ],\n name: \"getKeySchema\",\n outputs: [\n {\n internalType: \"Schema\",\n name: \"schema\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"addr\",\n type: \"address\",\n },\n ],\n name: \"getPosition\",\n outputs: [\n {\n internalType: \"uint16\",\n name: \"\",\n type: \"uint16\",\n },\n {\n internalType: \"uint16\",\n name: \"\",\n type: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"Schema\",\n name: \"valueSchema\",\n type: \"bytes32\",\n },\n ],\n name: \"getRecord\",\n outputs: [\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getSenderPosition\",\n outputs: [\n {\n internalType: \"uint16\",\n name: \"\",\n type: \"uint16\",\n },\n {\n internalType: \"uint16\",\n name: \"\",\n type: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"tokenId\",\n type: \"uint256\",\n },\n ],\n name: \"getUserInfo\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n ],\n name: \"getValueSchema\",\n outputs: [\n {\n internalType: \"Schema\",\n name: \"schema\",\n type: \"bytes32\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"goHome\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"resourceSelector\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"grantee\",\n type: \"address\",\n },\n ],\n name: \"grantAccess\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"_player\",\n type: \"address\",\n },\n ],\n name: \"initPlayerHp\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"initUserInfo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IModule\",\n name: \"module\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"args\",\n type: \"bytes\",\n },\n ],\n name: \"installModule\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"contract IModule\",\n name: \"module\",\n type: \"address\",\n },\n {\n internalType: \"bytes\",\n name: \"args\",\n type: \"bytes\",\n },\n ],\n name: \"installRootModule\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"joinBattlefield\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n components: [\n {\n internalType: \"uint16\",\n name: \"x\",\n type: \"uint16\",\n },\n {\n internalType: \"uint16\",\n name: \"y\",\n type: \"uint16\",\n },\n {\n internalType: \"bytes32[]\",\n name: \"proof\",\n type: \"bytes32[]\",\n },\n ],\n internalType: \"struct Position[]\",\n name: \"moveList\",\n type: \"tuple[]\",\n },\n ],\n name: \"move\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_boxId\",\n type: \"uint256\",\n },\n ],\n name: \"openBox\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"uint8\",\n name: \"schemaIndex\",\n type: \"uint8\",\n },\n {\n internalType: \"uint256\",\n name: \"byteLengthToPop\",\n type: \"uint256\",\n },\n {\n internalType: \"Schema\",\n name: \"valueSchema\",\n type: \"bytes32\",\n },\n ],\n name: \"popFromField\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"uint8\",\n name: \"schemaIndex\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes\",\n name: \"dataToPush\",\n type: \"bytes\",\n },\n {\n internalType: \"Schema\",\n name: \"valueSchema\",\n type: \"bytes32\",\n },\n ],\n name: \"pushToField\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"resourceSelector\",\n type: \"bytes32\",\n },\n {\n internalType: \"string\",\n name: \"systemFunctionName\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"systemFunctionArguments\",\n type: \"string\",\n },\n ],\n name: \"registerFunctionSelector\",\n outputs: [\n {\n internalType: \"bytes4\",\n name: \"worldFunctionSelector\",\n type: \"bytes4\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes16\",\n name: \"namespace\",\n type: \"bytes16\",\n },\n ],\n name: \"registerNamespace\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"resourceSelector\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes4\",\n name: \"worldFunctionSelector\",\n type: \"bytes4\",\n },\n {\n internalType: \"bytes4\",\n name: \"systemFunctionSelector\",\n type: \"bytes4\",\n },\n ],\n name: \"registerRootFunctionSelector\",\n outputs: [\n {\n internalType: \"bytes4\",\n name: \"\",\n type: \"bytes4\",\n },\n ],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract IStoreHook\",\n name: \"hook\",\n type: \"address\",\n },\n ],\n name: \"registerStoreHook\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"resourceSelector\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract System\",\n name: \"system\",\n type: \"address\",\n },\n {\n internalType: \"bool\",\n name: \"publicAccess\",\n type: \"bool\",\n },\n ],\n name: \"registerSystem\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"resourceSelector\",\n type: \"bytes32\",\n },\n {\n internalType: \"contract ISystemHook\",\n name: \"hook\",\n type: \"address\",\n },\n ],\n name: \"registerSystemHook\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n internalType: \"Schema\",\n name: \"keySchema\",\n type: \"bytes32\",\n },\n {\n internalType: \"Schema\",\n name: \"valueSchema\",\n type: \"bytes32\",\n },\n {\n internalType: \"string[]\",\n name: \"keyNames\",\n type: \"string[]\",\n },\n {\n internalType: \"string[]\",\n name: \"fieldNames\",\n type: \"string[]\",\n },\n ],\n name: \"registerTable\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_battleId\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"_action\",\n type: \"bytes32\",\n },\n {\n internalType: \"uint256\",\n name: \"_arg\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes32\",\n name: \"_nonce\",\n type: \"bytes32\",\n },\n ],\n name: \"revealBattle\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_boxId\",\n type: \"uint256\",\n },\n ],\n name: \"revealBox\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_battleId\",\n type: \"uint256\",\n },\n ],\n name: \"revealWinner\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"resourceSelector\",\n type: \"bytes32\",\n },\n {\n internalType: \"address\",\n name: \"grantee\",\n type: \"address\",\n },\n ],\n name: \"revokeAccess\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_userTokenId\",\n type: \"uint256\",\n },\n {\n internalType: \"uint256\",\n name: \"_lootTokenId\",\n type: \"uint256\",\n },\n ],\n name: \"selectBothNFT\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_tokenId\",\n type: \"uint256\",\n },\n ],\n name: \"selectLootNFT\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"uint256\",\n name: \"_tokenId\",\n type: \"uint256\",\n },\n ],\n name: \"selectUserNft\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"uint8\",\n name: \"schemaIndex\",\n type: \"uint8\",\n },\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\",\n },\n {\n internalType: \"Schema\",\n name: \"valueSchema\",\n type: \"bytes32\",\n },\n ],\n name: \"setField\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"string\",\n name: \"name\",\n type: \"string\",\n },\n {\n internalType: \"string\",\n name: \"url\",\n type: \"string\",\n },\n ],\n name: \"setInfo\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"bytes\",\n name: \"data\",\n type: \"bytes\",\n },\n {\n internalType: \"Schema\",\n name: \"valueSchema\",\n type: \"bytes32\",\n },\n ],\n name: \"setRecord\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"submitGem\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"addr\",\n type: \"address\",\n },\n {\n internalType: \"uint16\",\n name: \"x\",\n type: \"uint16\",\n },\n {\n internalType: \"uint16\",\n name: \"y\",\n type: \"uint16\",\n },\n ],\n name: \"transfer\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"unlockUserLocation\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"bytes32\",\n name: \"table\",\n type: \"bytes32\",\n },\n {\n internalType: \"bytes32[]\",\n name: \"key\",\n type: \"bytes32[]\",\n },\n {\n internalType: \"uint8\",\n name: \"schemaIndex\",\n type: \"uint8\",\n },\n {\n internalType: \"uint256\",\n name: \"startByteIndex\",\n type: \"uint256\",\n },\n {\n internalType: \"bytes\",\n name: \"dataToSet\",\n type: \"bytes\",\n },\n {\n internalType: \"Schema\",\n name: \"valueSchema\",\n type: \"bytes32\",\n },\n ],\n name: \"updateInField\",\n outputs: [],\n stateMutability: \"nonpayable\",\n type: \"function\",\n },\n] as const;\n\nexport class IWorld__factory {\n static readonly abi = _abi;\n static createInterface(): IWorldInterface {\n return new utils.Interface(_abi) as IWorldInterface;\n }\n static connect(address: string, signerOrProvider: Signer | Provider): IWorld {\n return new Contract(address, _abi, signerOrProvider) as IWorld;\n }\n}\n","import { mudConfig } from \"@latticexyz/world/register\";\n\nexport default mudConfig({\n systems: {\n BattleSystem: {\n name: \"battle\",\n openAccess: true,\n },\n GameSystem: {\n name: \"game\",\n openAccess: true,\n },\n GMSystem: {\n name: \"gm\",\n openAccess: true,\n },\n PlayerSystem: {\n name: \"player\",\n openAccess: true,\n },\n BoxSystem: {\n name: \"box\",\n openAccess: true,\n },\n MoveSystem: {\n name: \"move\",\n openAccess: true,\n }\n },\n enums: {\n BattleState: [\"Inited\", \"Confirmed\", \"Revealed\"],\n PlayerState: [\"Idle\", \"Preparing\", \"Exploring\", \"Attacking\"],\n ActionType: [\"Attack\", \"Escape\", \"Props\"],\n Buff: [\"None\", \"Fire\", \"Water\", \"Wind\"],\n RandomState:[\"Inited\",\"Pending\",\"Confirmed\"],\n BattleEndType: [\"NotEnd\", \"NormalEnd\", \"AllEscape\", \"RoundEnd\"],\n },\n tables: {\n Season: {\n schema: {\n start: \"uint256\",\n end: \"uint256\",\n no: \"uint256\",\n\n }\n },\n PlayerSeason: {\n keySchema: {\n addr: \"address\",\n },\n schema: {\n oreBalance: \"uint16\",//为什么要用uint16\n attackCount: \"uint16\",\n }\n },\n Player: {\n keySchema: {\n addr: \"address\",\n },\n schema: {\n suitId : \"uint256\",\n equipmentId : \"uint256\",\n x : \"uint16\",\n y : \"uint16\",\n hp : \"uint256\",\n attack : \"uint256\",\n attackRange : \"uint256\",\n speed : \"uint256\",\n strength : \"uint256\",\n space : \"uint256\",\n oreBalance: \"uint16\",\n treasureBalance: \"uint16\",\n state : \"PlayerState\",\n lastBattleTime: \"uint256\",\n maxHp: \"uint256\",\n name: \"string\",\n url: \"string\",\n \n }\n },\n PlayerAddon:{\n keySchema: {\n addr: \"address\",\n },\n schema: {\n lootId: \"uint256\",\n userId: \"uint256\"\n }\n\n },\n Ownable: {\n schema: {\n owner: \"address\",\n }\n },\n GameConfig: {\n dataStruct: false,\n schema: {\n merkleRoot: \"bytes32\",\n battleId: \"uint256\",\n randomId: \"uint256\",\n originX: \"uint16\",\n originY: \"uint16\",\n roomId: \"uint256\",\n boxId : \"uint256\",\n }\n },\n BattleConfig: {\n dataStruct: false,\n schema: {\n maxAttackzDistance: \"uint256\",\n maxMoveDistance: \"uint256\",\n maxTimeLimit: \"uint256\",\n maxUserLocationLockTime: \"uint256\",\n maxBoxBindTime : \"uint256\",\n battlefieldPlayers: \"address[]\",\n }\n },\n Board: { \n keySchema: {\n addr: \"address\"\n },\n schema: {\n x: \"uint16\",\n y: \"uint16\",\n }\n },\n MapBoard: {\n keySchema: {\n x: \"uint16\",\n y: \"uint16\",\n },\n schema: {\n addresses: \"address[]\",\n }\n },\n RandomList: {\n keySchema:{\n id: \"uint256\",\n },\n schema: {\n blockNumber: \"uint256\",\n author: \"address\",\n }},\n BattleList: {\n keySchema: {\n battleId: \"uint256\",\n },\n schema: {\n attacker: \"address\",\n defender: \"address\",\n winner: \"address\",\n round: \"uint16\",\n attackerHP: \"uint256\",\n defenderHP: \"uint256\",\n isEnd: \"bool\",\n attackerState: \"BattleState\",\n defenderState: \"BattleState\",\n attackerAction: \"bytes32\",\n defenderAction: \"bytes32\",\n attackerBuffHash: \"bytes32\",\n defenderBuffHash: \"bytes32\",\n startTimestamp: \"uint256\",\n attackerArg: \"uint256\",\n defenderArg: \"uint256\",\n endTimestamp: \"uint256\",\n }\n },\n PlayerLocationLock: {\n keySchema: {\n addr: \"address\",\n },\n schema: {\n lockTime: \"uint256\",\n }\n },\n BoxList : {\n keySchema: {\n boxId: \"uint256\",\n },\n schema: {\n lockTime: \"uint256\",\n x: \"uint16\",\n y: \"uint16\",\n oreBalance: \"uint16\",\n treasureBalance: \"uint16\",\n randomId: \"uint256\",\n dropTime: \"uint256\",\n openTime: \"uint256\",\n opened: \"bool\",\n owner: \"address\",\n }\n }, \n LootList1:{\n keySchema:{\n addr: \"address\",\n },\n schema:{\n weapon:\"string\",\n chest:\"string\",\n head:\"string\",\n waist:\"string\",\n foot:\"string\",\n }\n\n },\n LootList2:{\n keySchema:{\n addr: \"address\",\n },\n schema:{\n hand:\"string\",\n neck:\"string\",\n ring:\"string\"\n }\n\n },\n GlobalConfig: {\n dataStruct: false,\n schema: {\n userContract: \"address\",\n lootContract: \"address\",\n pluginContract: \"address\",\n }\n }\n }\n});\n","import { createPublicClient, fallback, webSocket, http, createWalletClient, Hex, parseEther, ClientConfig } from \"viem\";\nimport { createFaucetService } from \"@latticexyz/services/faucet\";\nimport { encodeEntity, syncToRecs } from \"@latticexyz/store-sync/recs\";\nimport { getNetworkConfig } from \"./getNetworkConfig\";\nimport { world } from \"./world\";\nimport { IWorld__factory } from \"contracts/types/ethers-contracts/factories/IWorld__factory\";\nimport { createBurnerAccount, createContract, transportObserver, ContractWrite } from \"@latticexyz/common\";\nimport { Subject, share } from \"rxjs\";\nimport mudConfig from \"contracts/mud.config\";\n\nexport type SetupNetworkResult = Awaited>;\n\nexport async function setupNetwork() {\n const networkConfig = await getNetworkConfig();\n\n const clientOptions = {\n chain: networkConfig.chain,\n transport: transportObserver(fallback([webSocket(), http()])),\n pollingInterval: 1000,\n } as const satisfies ClientConfig;\n\n const publicClient = createPublicClient(clientOptions);\n\n const burnerAccount = createBurnerAccount(networkConfig.privateKey as Hex);\n const burnerWalletClient = createWalletClient({\n ...clientOptions,\n account: burnerAccount,\n });\n\n const write$ = new Subject();\n const worldContract = createContract({\n address: networkConfig.worldAddress as Hex,\n abi: IWorld__factory.abi,\n publicClient,\n walletClient: burnerWalletClient,\n onWrite: (write) => write$.next(write),\n });\n\n const { components, latestBlock$, blockStorageOperations$, waitForTransaction } = await syncToRecs({\n world,\n config: mudConfig,\n address: networkConfig.worldAddress as Hex,\n publicClient,\n startBlock: BigInt(networkConfig.initialBlockNumber),\n });\n\n // Request drip from faucet\n if (networkConfig.faucetServiceUrl) {\n const address = burnerAccount.address;\n console.info(\"[Dev Faucet]: Player address -> \", address);\n\n const faucet = createFaucetService(networkConfig.faucetServiceUrl);\n\n const requestDrip = async () => {\n const balance = await publicClient.getBalance({ address });\n console.info(`[Dev Faucet]: Player balance -> ${balance}`);\n const lowBalance = balance < parseEther(\"1\");\n if (lowBalance) {\n console.info(\"[Dev Faucet]: Balance is low, dripping funds to player\");\n // Double drip\n await faucet.dripDev({ address });\n await faucet.dripDev({ address });\n }\n };\n\n requestDrip();\n // Request a drip every 20 seconds\n setInterval(requestDrip, 20000);\n }\n\n return {\n world,\n components,\n playerEntity: encodeEntity({ addr: \"address\" }, { addr: burnerWalletClient.account.address }),\n publicClient,\n walletClient: burnerWalletClient,\n latestBlock$,\n blockStorageOperations$,\n waitForTransaction,\n worldContract,\n write$: write$.asObservable().pipe(share()),\n account: burnerWalletClient.account.address,\n privateKey: networkConfig.privateKey,\n };\n}\n","import { createClientComponents } from \"./createClientComponents\";\nimport { createSystemCalls } from \"./createSystemCalls\";\nimport { setupNetwork } from \"./setupNetwork\";\n\nexport type SetupResult = Awaited>;\n\nexport async function setup() {\n const network = await setupNetwork();\n const components = createClientComponents(network);\n const systemCalls = createSystemCalls(network, components);\n return {\n network,\n components,\n systemCalls,\n };\n}\n","'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","/**\n * @remix-run/router v1.9.0\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Actions represent the type of change to a location value.\n */\nvar Action;\n(function (Action) {\n /**\n * A POP indicates a change to an arbitrary index in the history stack, such\n * as a back or forward navigation. It does not describe the direction of the\n * navigation, only that the current index changed.\n *\n * Note: This is the default action for newly created history objects.\n */\n Action[\"Pop\"] = \"POP\";\n /**\n * A PUSH indicates a new entry being added to the history stack, such as when\n * a link is clicked and a new page loads. When this happens, all subsequent\n * entries in the stack are lost.\n */\n Action[\"Push\"] = \"PUSH\";\n /**\n * A REPLACE indicates the entry at the current index in the history stack\n * being replaced by a new one.\n */\n Action[\"Replace\"] = \"REPLACE\";\n})(Action || (Action = {}));\nconst PopStateEventType = \"popstate\";\n/**\n * Memory history stores the current location in memory. It is designed for use\n * in stateful non-browser environments like tests and React Native.\n */\nfunction createMemoryHistory(options) {\n if (options === void 0) {\n options = {};\n }\n let {\n initialEntries = [\"/\"],\n initialIndex,\n v5Compat = false\n } = options;\n let entries; // Declare so we can access from createMemoryLocation\n entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === \"string\" ? null : entry.state, index === 0 ? \"default\" : undefined));\n let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);\n let action = Action.Pop;\n let listener = null;\n function clampIndex(n) {\n return Math.min(Math.max(n, 0), entries.length - 1);\n }\n function getCurrentLocation() {\n return entries[index];\n }\n function createMemoryLocation(to, state, key) {\n if (state === void 0) {\n state = null;\n }\n let location = createLocation(entries ? getCurrentLocation().pathname : \"/\", to, state, key);\n warning(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in memory history: \" + JSON.stringify(to));\n return location;\n }\n function createHref(to) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n let history = {\n get index() {\n return index;\n },\n get action() {\n return action;\n },\n get location() {\n return getCurrentLocation();\n },\n createHref,\n createURL(to) {\n return new URL(createHref(to), \"http://localhost\");\n },\n encodeLocation(to) {\n let path = typeof to === \"string\" ? parsePath(to) : to;\n return {\n pathname: path.pathname || \"\",\n search: path.search || \"\",\n hash: path.hash || \"\"\n };\n },\n push(to, state) {\n action = Action.Push;\n let nextLocation = createMemoryLocation(to, state);\n index += 1;\n entries.splice(index, entries.length, nextLocation);\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation,\n delta: 1\n });\n }\n },\n replace(to, state) {\n action = Action.Replace;\n let nextLocation = createMemoryLocation(to, state);\n entries[index] = nextLocation;\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation,\n delta: 0\n });\n }\n },\n go(delta) {\n action = Action.Pop;\n let nextIndex = clampIndex(index + delta);\n let nextLocation = entries[nextIndex];\n index = nextIndex;\n if (listener) {\n listener({\n action,\n location: nextLocation,\n delta\n });\n }\n },\n listen(fn) {\n listener = fn;\n return () => {\n listener = null;\n };\n }\n };\n return history;\n}\n/**\n * Browser history stores the location in regular URLs. This is the standard for\n * most web apps, but it requires some configuration on the server to ensure you\n * serve the same app at multiple URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n */\nfunction createBrowserHistory(options) {\n if (options === void 0) {\n options = {};\n }\n function createBrowserLocation(window, globalHistory) {\n let {\n pathname,\n search,\n hash\n } = window.location;\n return createLocation(\"\", {\n pathname,\n search,\n hash\n },\n // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n }\n function createBrowserHref(window, to) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);\n}\n/**\n * Hash history stores the location in window.location.hash. This makes it ideal\n * for situations where you don't want to send the location to the server for\n * some reason, either because you do cannot configure it or the URL space is\n * reserved for something else.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n */\nfunction createHashHistory(options) {\n if (options === void 0) {\n options = {};\n }\n function createHashLocation(window, globalHistory) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\"\n } = parsePath(window.location.hash.substr(1));\n // Hash URL should always have a leading / just like window.location.pathname\n // does, so if an app ends up at a route like /#something then we add a\n // leading slash so all of our path-matching behaves the same as if it would\n // in a browser router. This is particularly important when there exists a\n // root splat route () since that matches internally against\n // \"/*\" and we'd expect /#something to 404 in a hash router app.\n if (!pathname.startsWith(\"/\") && !pathname.startsWith(\".\")) {\n pathname = \"/\" + pathname;\n }\n return createLocation(\"\", {\n pathname,\n search,\n hash\n },\n // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n }\n function createHashHref(window, to) {\n let base = window.document.querySelector(\"base\");\n let href = \"\";\n if (base && base.getAttribute(\"href\")) {\n let url = window.location.href;\n let hashIndex = url.indexOf(\"#\");\n href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n }\n return href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n }\n function validateHashLocation(location, to) {\n warning(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in hash history.push(\" + JSON.stringify(to) + \")\");\n }\n return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);\n}\nfunction invariant(value, message) {\n if (value === false || value === null || typeof value === \"undefined\") {\n throw new Error(message);\n }\n}\nfunction warning(cond, message) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n try {\n // Welcome to debugging history!\n //\n // This error is thrown as a convenience, so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\nfunction createKey() {\n return Math.random().toString(36).substr(2, 8);\n}\n/**\n * For browser-based histories, we combine the state and key into an object\n */\nfunction getHistoryState(location, index) {\n return {\n usr: location.state,\n key: location.key,\n idx: index\n };\n}\n/**\n * Creates a Location object with a unique key from the given Path\n */\nfunction createLocation(current, to, state, key) {\n if (state === void 0) {\n state = null;\n }\n let location = _extends({\n pathname: typeof current === \"string\" ? current : current.pathname,\n search: \"\",\n hash: \"\"\n }, typeof to === \"string\" ? parsePath(to) : to, {\n state,\n // TODO: This could be cleaned up. push/replace should probably just take\n // full Locations now and avoid the need to run through this flow at all\n // But that's a pretty big refactor to the current test suite so going to\n // keep as is for the time being and just let any incoming keys take precedence\n key: to && to.key || key || createKey()\n });\n return location;\n}\n/**\n * Creates a string URL path from the given pathname, search, and hash components.\n */\nfunction createPath(_ref) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\"\n } = _ref;\n if (search && search !== \"?\") pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n if (hash && hash !== \"#\") pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n return pathname;\n}\n/**\n * Parses a string URL path into its separate pathname, search, and hash components.\n */\nfunction parsePath(path) {\n let parsedPath = {};\n if (path) {\n let hashIndex = path.indexOf(\"#\");\n if (hashIndex >= 0) {\n parsedPath.hash = path.substr(hashIndex);\n path = path.substr(0, hashIndex);\n }\n let searchIndex = path.indexOf(\"?\");\n if (searchIndex >= 0) {\n parsedPath.search = path.substr(searchIndex);\n path = path.substr(0, searchIndex);\n }\n if (path) {\n parsedPath.pathname = path;\n }\n }\n return parsedPath;\n}\nfunction getUrlBasedHistory(getLocation, createHref, validateLocation, options) {\n if (options === void 0) {\n options = {};\n }\n let {\n window = document.defaultView,\n v5Compat = false\n } = options;\n let globalHistory = window.history;\n let action = Action.Pop;\n let listener = null;\n let index = getIndex();\n // Index should only be null when we initialize. If not, it's because the\n // user called history.pushState or history.replaceState directly, in which\n // case we should log a warning as it will result in bugs.\n if (index == null) {\n index = 0;\n globalHistory.replaceState(_extends({}, globalHistory.state, {\n idx: index\n }), \"\");\n }\n function getIndex() {\n let state = globalHistory.state || {\n idx: null\n };\n return state.idx;\n }\n function handlePop() {\n action = Action.Pop;\n let nextIndex = getIndex();\n let delta = nextIndex == null ? null : nextIndex - index;\n index = nextIndex;\n if (listener) {\n listener({\n action,\n location: history.location,\n delta\n });\n }\n }\n function push(to, state) {\n action = Action.Push;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n index = getIndex() + 1;\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n // try...catch because iOS limits us to 100 pushState calls :/\n try {\n globalHistory.pushState(historyState, \"\", url);\n } catch (error) {\n // If the exception is because `state` can't be serialized, let that throw\n // outwards just like a replace call would so the dev knows the cause\n // https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps\n // https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal\n if (error instanceof DOMException && error.name === \"DataCloneError\") {\n throw error;\n }\n // They are going to lose state here, but there is no real\n // way to warn them about it since the page will refresh...\n window.location.assign(url);\n }\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location,\n delta: 1\n });\n }\n }\n function replace(to, state) {\n action = Action.Replace;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n index = getIndex();\n let historyState = getHistoryState(location, index);\n let url = history.createHref(location);\n globalHistory.replaceState(historyState, \"\", url);\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location,\n delta: 0\n });\n }\n }\n function createURL(to) {\n // window.location.origin is \"null\" (the literal string value) in Firefox\n // under certain conditions, notably when serving from a local HTML file\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297\n let base = window.location.origin !== \"null\" ? window.location.origin : window.location.href;\n let href = typeof to === \"string\" ? to : createPath(to);\n invariant(base, \"No window.location.(origin|href) available to create URL for href: \" + href);\n return new URL(href, base);\n }\n let history = {\n get action() {\n return action;\n },\n get location() {\n return getLocation(window, globalHistory);\n },\n listen(fn) {\n if (listener) {\n throw new Error(\"A history only accepts one active listener\");\n }\n window.addEventListener(PopStateEventType, handlePop);\n listener = fn;\n return () => {\n window.removeEventListener(PopStateEventType, handlePop);\n listener = null;\n };\n },\n createHref(to) {\n return createHref(window, to);\n },\n createURL,\n encodeLocation(to) {\n // Encode a Location the same way window.location would\n let url = createURL(to);\n return {\n pathname: url.pathname,\n search: url.search,\n hash: url.hash\n };\n },\n push,\n replace,\n go(n) {\n return globalHistory.go(n);\n }\n };\n return history;\n}\n//#endregion\n\nvar ResultType;\n(function (ResultType) {\n ResultType[\"data\"] = \"data\";\n ResultType[\"deferred\"] = \"deferred\";\n ResultType[\"redirect\"] = \"redirect\";\n ResultType[\"error\"] = \"error\";\n})(ResultType || (ResultType = {}));\nconst immutableRouteKeys = new Set([\"lazy\", \"caseSensitive\", \"path\", \"id\", \"index\", \"children\"]);\nfunction isIndexRoute(route) {\n return route.index === true;\n}\n// Walk the route tree generating unique IDs where necessary, so we are working\n// solely with AgnosticDataRouteObject's within the Router\nfunction convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manifest) {\n if (parentPath === void 0) {\n parentPath = [];\n }\n if (manifest === void 0) {\n manifest = {};\n }\n return routes.map((route, index) => {\n let treePath = [...parentPath, index];\n let id = typeof route.id === \"string\" ? route.id : treePath.join(\"-\");\n invariant(route.index !== true || !route.children, \"Cannot specify children on an index route\");\n invariant(!manifest[id], \"Found a route id collision on id \\\"\" + id + \"\\\". Route \" + \"id's must be globally unique within Data Router usages\");\n if (isIndexRoute(route)) {\n let indexRoute = _extends({}, route, mapRouteProperties(route), {\n id\n });\n manifest[id] = indexRoute;\n return indexRoute;\n } else {\n let pathOrLayoutRoute = _extends({}, route, mapRouteProperties(route), {\n id,\n children: undefined\n });\n manifest[id] = pathOrLayoutRoute;\n if (route.children) {\n pathOrLayoutRoute.children = convertRoutesToDataRoutes(route.children, mapRouteProperties, treePath, manifest);\n }\n return pathOrLayoutRoute;\n }\n });\n}\n/**\n * Matches the given routes to a location and returns the match data.\n *\n * @see https://reactrouter.com/utils/match-routes\n */\nfunction matchRoutes(routes, locationArg, basename) {\n if (basename === void 0) {\n basename = \"/\";\n }\n let location = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n let pathname = stripBasename(location.pathname || \"/\", basename);\n if (pathname == null) {\n return null;\n }\n let branches = flattenRoutes(routes);\n rankRouteBranches(branches);\n let matches = null;\n for (let i = 0; matches == null && i < branches.length; ++i) {\n matches = matchRouteBranch(branches[i],\n // Incoming pathnames are generally encoded from either window.location\n // or from router.navigate, but we want to match against the unencoded\n // paths in the route definitions. Memory router locations won't be\n // encoded here but there also shouldn't be anything to decode so this\n // should be a safe operation. This avoids needing matchRoutes to be\n // history-aware.\n safelyDecodeURI(pathname));\n }\n return matches;\n}\nfunction convertRouteMatchToUiMatch(match, loaderData) {\n let {\n route,\n pathname,\n params\n } = match;\n return {\n id: route.id,\n pathname,\n params,\n data: loaderData[route.id],\n handle: route.handle\n };\n}\nfunction flattenRoutes(routes, branches, parentsMeta, parentPath) {\n if (branches === void 0) {\n branches = [];\n }\n if (parentsMeta === void 0) {\n parentsMeta = [];\n }\n if (parentPath === void 0) {\n parentPath = \"\";\n }\n let flattenRoute = (route, index, relativePath) => {\n let meta = {\n relativePath: relativePath === undefined ? route.path || \"\" : relativePath,\n caseSensitive: route.caseSensitive === true,\n childrenIndex: index,\n route\n };\n if (meta.relativePath.startsWith(\"/\")) {\n invariant(meta.relativePath.startsWith(parentPath), \"Absolute route path \\\"\" + meta.relativePath + \"\\\" nested under path \" + (\"\\\"\" + parentPath + \"\\\" is not valid. An absolute child route path \") + \"must start with the combined path of all its parent routes.\");\n meta.relativePath = meta.relativePath.slice(parentPath.length);\n }\n let path = joinPaths([parentPath, meta.relativePath]);\n let routesMeta = parentsMeta.concat(meta);\n // Add the children before adding this route to the array, so we traverse the\n // route tree depth-first and child routes appear before their parents in\n // the \"flattened\" version.\n if (route.children && route.children.length > 0) {\n invariant(\n // Our types know better, but runtime JS may not!\n // @ts-expect-error\n route.index !== true, \"Index routes must not have child routes. Please remove \" + (\"all child routes from route path \\\"\" + path + \"\\\".\"));\n flattenRoutes(route.children, branches, routesMeta, path);\n }\n // Routes without a path shouldn't ever match by themselves unless they are\n // index routes, so don't add them to the list of possible branches.\n if (route.path == null && !route.index) {\n return;\n }\n branches.push({\n path,\n score: computeScore(path, route.index),\n routesMeta\n });\n };\n routes.forEach((route, index) => {\n var _route$path;\n // coarse-grain check for optional params\n if (route.path === \"\" || !((_route$path = route.path) != null && _route$path.includes(\"?\"))) {\n flattenRoute(route, index);\n } else {\n for (let exploded of explodeOptionalSegments(route.path)) {\n flattenRoute(route, index, exploded);\n }\n }\n });\n return branches;\n}\n/**\n * Computes all combinations of optional path segments for a given path,\n * excluding combinations that are ambiguous and of lower priority.\n *\n * For example, `/one/:two?/three/:four?/:five?` explodes to:\n * - `/one/three`\n * - `/one/:two/three`\n * - `/one/three/:four`\n * - `/one/three/:five`\n * - `/one/:two/three/:four`\n * - `/one/:two/three/:five`\n * - `/one/three/:four/:five`\n * - `/one/:two/three/:four/:five`\n */\nfunction explodeOptionalSegments(path) {\n let segments = path.split(\"/\");\n if (segments.length === 0) return [];\n let [first, ...rest] = segments;\n // Optional path segments are denoted by a trailing `?`\n let isOptional = first.endsWith(\"?\");\n // Compute the corresponding required segment: `foo?` -> `foo`\n let required = first.replace(/\\?$/, \"\");\n if (rest.length === 0) {\n // Intepret empty string as omitting an optional segment\n // `[\"one\", \"\", \"three\"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`\n return isOptional ? [required, \"\"] : [required];\n }\n let restExploded = explodeOptionalSegments(rest.join(\"/\"));\n let result = [];\n // All child paths with the prefix. Do this for all children before the\n // optional version for all children, so we get consistent ordering where the\n // parent optional aspect is preferred as required. Otherwise, we can get\n // child sections interspersed where deeper optional segments are higher than\n // parent optional segments, where for example, /:two would explode _earlier_\n // then /:one. By always including the parent as required _for all children_\n // first, we avoid this issue\n result.push(...restExploded.map(subpath => subpath === \"\" ? required : [required, subpath].join(\"/\")));\n // Then, if this is an optional value, add all child versions without\n if (isOptional) {\n result.push(...restExploded);\n }\n // for absolute paths, ensure `/` instead of empty segment\n return result.map(exploded => path.startsWith(\"/\") && exploded === \"\" ? \"/\" : exploded);\n}\nfunction rankRouteBranches(branches) {\n branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first\n : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));\n}\nconst paramRe = /^:\\w+$/;\nconst dynamicSegmentValue = 3;\nconst indexRouteValue = 2;\nconst emptySegmentValue = 1;\nconst staticSegmentValue = 10;\nconst splatPenalty = -2;\nconst isSplat = s => s === \"*\";\nfunction computeScore(path, index) {\n let segments = path.split(\"/\");\n let initialScore = segments.length;\n if (segments.some(isSplat)) {\n initialScore += splatPenalty;\n }\n if (index) {\n initialScore += indexRouteValue;\n }\n return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === \"\" ? emptySegmentValue : staticSegmentValue), initialScore);\n}\nfunction compareIndexes(a, b) {\n let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n return siblings ?\n // If two routes are siblings, we should try to match the earlier sibling\n // first. This allows people to have fine-grained control over the matching\n // behavior by simply putting routes with identical paths in the order they\n // want them tried.\n a[a.length - 1] - b[b.length - 1] :\n // Otherwise, it doesn't really make sense to rank non-siblings by index,\n // so they sort equally.\n 0;\n}\nfunction matchRouteBranch(branch, pathname) {\n let {\n routesMeta\n } = branch;\n let matchedParams = {};\n let matchedPathname = \"/\";\n let matches = [];\n for (let i = 0; i < routesMeta.length; ++i) {\n let meta = routesMeta[i];\n let end = i === routesMeta.length - 1;\n let remainingPathname = matchedPathname === \"/\" ? pathname : pathname.slice(matchedPathname.length) || \"/\";\n let match = matchPath({\n path: meta.relativePath,\n caseSensitive: meta.caseSensitive,\n end\n }, remainingPathname);\n if (!match) return null;\n Object.assign(matchedParams, match.params);\n let route = meta.route;\n matches.push({\n // TODO: Can this as be avoided?\n params: matchedParams,\n pathname: joinPaths([matchedPathname, match.pathname]),\n pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),\n route\n });\n if (match.pathnameBase !== \"/\") {\n matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n }\n }\n return matches;\n}\n/**\n * Returns a path with params interpolated.\n *\n * @see https://reactrouter.com/utils/generate-path\n */\nfunction generatePath(originalPath, params) {\n if (params === void 0) {\n params = {};\n }\n let path = originalPath;\n if (path.endsWith(\"*\") && path !== \"*\" && !path.endsWith(\"/*\")) {\n warning(false, \"Route path \\\"\" + path + \"\\\" will be treated as if it were \" + (\"\\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\" because the `*` character must \") + \"always follow a `/` in the pattern. To get rid of this warning, \" + (\"please change the route path to \\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\".\"));\n path = path.replace(/\\*$/, \"/*\");\n }\n // ensure `/` is added at the beginning if the path is absolute\n const prefix = path.startsWith(\"/\") ? \"/\" : \"\";\n const stringify = p => p == null ? \"\" : typeof p === \"string\" ? p : String(p);\n const segments = path.split(/\\/+/).map((segment, index, array) => {\n const isLastSegment = index === array.length - 1;\n // only apply the splat if it's the last segment\n if (isLastSegment && segment === \"*\") {\n const star = \"*\";\n // Apply the splat\n return stringify(params[star]);\n }\n const keyMatch = segment.match(/^:(\\w+)(\\??)$/);\n if (keyMatch) {\n const [, key, optional] = keyMatch;\n let param = params[key];\n invariant(optional === \"?\" || param != null, \"Missing \\\":\" + key + \"\\\" param\");\n return stringify(param);\n }\n // Remove any optional markers from optional static segments\n return segment.replace(/\\?$/g, \"\");\n })\n // Remove empty segments\n .filter(segment => !!segment);\n return prefix + segments.join(\"/\");\n}\n/**\n * Performs pattern matching on a URL pathname and returns information about\n * the match.\n *\n * @see https://reactrouter.com/utils/match-path\n */\nfunction matchPath(pattern, pathname) {\n if (typeof pattern === \"string\") {\n pattern = {\n path: pattern,\n caseSensitive: false,\n end: true\n };\n }\n let [matcher, paramNames] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);\n let match = pathname.match(matcher);\n if (!match) return null;\n let matchedPathname = match[0];\n let pathnameBase = matchedPathname.replace(/(.)\\/+$/, \"$1\");\n let captureGroups = match.slice(1);\n let params = paramNames.reduce((memo, paramName, index) => {\n // We need to compute the pathnameBase here using the raw splat value\n // instead of using params[\"*\"] later because it will be decoded then\n if (paramName === \"*\") {\n let splatValue = captureGroups[index] || \"\";\n pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\\/+$/, \"$1\");\n }\n memo[paramName] = safelyDecodeURIComponent(captureGroups[index] || \"\", paramName);\n return memo;\n }, {});\n return {\n params,\n pathname: matchedPathname,\n pathnameBase,\n pattern\n };\n}\nfunction compilePath(path, caseSensitive, end) {\n if (caseSensitive === void 0) {\n caseSensitive = false;\n }\n if (end === void 0) {\n end = true;\n }\n warning(path === \"*\" || !path.endsWith(\"*\") || path.endsWith(\"/*\"), \"Route path \\\"\" + path + \"\\\" will be treated as if it were \" + (\"\\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\" because the `*` character must \") + \"always follow a `/` in the pattern. To get rid of this warning, \" + (\"please change the route path to \\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\".\"));\n let paramNames = [];\n let regexpSource = \"^\" + path.replace(/\\/*\\*?$/, \"\") // Ignore trailing / and /*, we'll handle it below\n .replace(/^\\/*/, \"/\") // Make sure it has a leading /\n .replace(/[\\\\.*+^$?{}|()[\\]]/g, \"\\\\$&\") // Escape special regex chars\n .replace(/\\/:(\\w+)/g, (_, paramName) => {\n paramNames.push(paramName);\n return \"/([^\\\\/]+)\";\n });\n if (path.endsWith(\"*\")) {\n paramNames.push(\"*\");\n regexpSource += path === \"*\" || path === \"/*\" ? \"(.*)$\" // Already matched the initial /, just match the rest\n : \"(?:\\\\/(.+)|\\\\/*)$\"; // Don't include the / in params[\"*\"]\n } else if (end) {\n // When matching to the end, ignore trailing slashes\n regexpSource += \"\\\\/*$\";\n } else if (path !== \"\" && path !== \"/\") {\n // If our path is non-empty and contains anything beyond an initial slash,\n // then we have _some_ form of path in our regex, so we should expect to\n // match only if we find the end of this path segment. Look for an optional\n // non-captured trailing slash (to match a portion of the URL) or the end\n // of the path (if we've matched to the end). We used to do this with a\n // word boundary but that gives false positives on routes like\n // /user-preferences since `-` counts as a word boundary.\n regexpSource += \"(?:(?=\\\\/|$))\";\n } else ;\n let matcher = new RegExp(regexpSource, caseSensitive ? undefined : \"i\");\n return [matcher, paramNames];\n}\nfunction safelyDecodeURI(value) {\n try {\n return decodeURI(value);\n } catch (error) {\n warning(false, \"The URL path \\\"\" + value + \"\\\" could not be decoded because it is is a \" + \"malformed URL segment. This is probably due to a bad percent \" + (\"encoding (\" + error + \").\"));\n return value;\n }\n}\nfunction safelyDecodeURIComponent(value, paramName) {\n try {\n return decodeURIComponent(value);\n } catch (error) {\n warning(false, \"The value for the URL param \\\"\" + paramName + \"\\\" will not be decoded because\" + (\" the string \\\"\" + value + \"\\\" is a malformed URL segment. This is probably\") + (\" due to a bad percent encoding (\" + error + \").\"));\n return value;\n }\n}\n/**\n * @private\n */\nfunction stripBasename(pathname, basename) {\n if (basename === \"/\") return pathname;\n if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n return null;\n }\n // We want to leave trailing slash behavior in the user's control, so if they\n // specify a basename with a trailing slash, we should support it\n let startIndex = basename.endsWith(\"/\") ? basename.length - 1 : basename.length;\n let nextChar = pathname.charAt(startIndex);\n if (nextChar && nextChar !== \"/\") {\n // pathname does not start with basename/\n return null;\n }\n return pathname.slice(startIndex) || \"/\";\n}\n/**\n * Returns a resolved path object relative to the given pathname.\n *\n * @see https://reactrouter.com/utils/resolve-path\n */\nfunction resolvePath(to, fromPathname) {\n if (fromPathname === void 0) {\n fromPathname = \"/\";\n }\n let {\n pathname: toPathname,\n search = \"\",\n hash = \"\"\n } = typeof to === \"string\" ? parsePath(to) : to;\n let pathname = toPathname ? toPathname.startsWith(\"/\") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;\n return {\n pathname,\n search: normalizeSearch(search),\n hash: normalizeHash(hash)\n };\n}\nfunction resolvePathname(relativePath, fromPathname) {\n let segments = fromPathname.replace(/\\/+$/, \"\").split(\"/\");\n let relativeSegments = relativePath.split(\"/\");\n relativeSegments.forEach(segment => {\n if (segment === \"..\") {\n // Keep the root \"\" segment so the pathname starts at /\n if (segments.length > 1) segments.pop();\n } else if (segment !== \".\") {\n segments.push(segment);\n }\n });\n return segments.length > 1 ? segments.join(\"/\") : \"/\";\n}\nfunction getInvalidPathError(char, field, dest, path) {\n return \"Cannot include a '\" + char + \"' character in a manually specified \" + (\"`to.\" + field + \"` field [\" + JSON.stringify(path) + \"]. Please separate it out to the \") + (\"`to.\" + dest + \"` field. Alternatively you may provide the full path as \") + \"a string in and the router will parse it for you.\";\n}\n/**\n * @private\n *\n * When processing relative navigation we want to ignore ancestor routes that\n * do not contribute to the path, such that index/pathless layout routes don't\n * interfere.\n *\n * For example, when moving a route element into an index route and/or a\n * pathless layout route, relative link behavior contained within should stay\n * the same. Both of the following examples should link back to the root:\n *\n * \n * \n * \n *\n * \n * \n * }> // <-- Does not contribute\n * // <-- Does not contribute\n * \n * \n */\nfunction getPathContributingMatches(matches) {\n return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);\n}\n/**\n * @private\n */\nfunction resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {\n if (isPathRelative === void 0) {\n isPathRelative = false;\n }\n let to;\n if (typeof toArg === \"string\") {\n to = parsePath(toArg);\n } else {\n to = _extends({}, toArg);\n invariant(!to.pathname || !to.pathname.includes(\"?\"), getInvalidPathError(\"?\", \"pathname\", \"search\", to));\n invariant(!to.pathname || !to.pathname.includes(\"#\"), getInvalidPathError(\"#\", \"pathname\", \"hash\", to));\n invariant(!to.search || !to.search.includes(\"#\"), getInvalidPathError(\"#\", \"search\", \"hash\", to));\n }\n let isEmptyPath = toArg === \"\" || to.pathname === \"\";\n let toPathname = isEmptyPath ? \"/\" : to.pathname;\n let from;\n // Routing is relative to the current pathname if explicitly requested.\n //\n // If a pathname is explicitly provided in `to`, it should be relative to the\n // route context. This is explained in `Note on `` values` in our\n // migration guide from v5 as a means of disambiguation between `to` values\n // that begin with `/` and those that do not. However, this is problematic for\n // `to` values that do not provide a pathname. `to` can simply be a search or\n // hash string, in which case we should assume that the navigation is relative\n // to the current location's pathname and *not* the route pathname.\n if (isPathRelative || toPathname == null) {\n from = locationPathname;\n } else {\n let routePathnameIndex = routePathnames.length - 1;\n if (toPathname.startsWith(\"..\")) {\n let toSegments = toPathname.split(\"/\");\n // Each leading .. segment means \"go up one route\" instead of \"go up one\n // URL segment\". This is a key difference from how works and a\n // major reason we call this a \"to\" value instead of a \"href\".\n while (toSegments[0] === \"..\") {\n toSegments.shift();\n routePathnameIndex -= 1;\n }\n to.pathname = toSegments.join(\"/\");\n }\n // If there are more \"..\" segments than parent routes, resolve relative to\n // the root / URL.\n from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : \"/\";\n }\n let path = resolvePath(to, from);\n // Ensure the pathname has a trailing slash if the original \"to\" had one\n let hasExplicitTrailingSlash = toPathname && toPathname !== \"/\" && toPathname.endsWith(\"/\");\n // Or if this was a link to the current path which has a trailing slash\n let hasCurrentTrailingSlash = (isEmptyPath || toPathname === \".\") && locationPathname.endsWith(\"/\");\n if (!path.pathname.endsWith(\"/\") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {\n path.pathname += \"/\";\n }\n return path;\n}\n/**\n * @private\n */\nfunction getToPathname(to) {\n // Empty strings should be treated the same as / paths\n return to === \"\" || to.pathname === \"\" ? \"/\" : typeof to === \"string\" ? parsePath(to).pathname : to.pathname;\n}\n/**\n * @private\n */\nconst joinPaths = paths => paths.join(\"/\").replace(/\\/\\/+/g, \"/\");\n/**\n * @private\n */\nconst normalizePathname = pathname => pathname.replace(/\\/+$/, \"\").replace(/^\\/*/, \"/\");\n/**\n * @private\n */\nconst normalizeSearch = search => !search || search === \"?\" ? \"\" : search.startsWith(\"?\") ? search : \"?\" + search;\n/**\n * @private\n */\nconst normalizeHash = hash => !hash || hash === \"#\" ? \"\" : hash.startsWith(\"#\") ? hash : \"#\" + hash;\n/**\n * This is a shortcut for creating `application/json` responses. Converts `data`\n * to JSON and sets the `Content-Type` header.\n */\nconst json = function json(data, init) {\n if (init === void 0) {\n init = {};\n }\n let responseInit = typeof init === \"number\" ? {\n status: init\n } : init;\n let headers = new Headers(responseInit.headers);\n if (!headers.has(\"Content-Type\")) {\n headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n return new Response(JSON.stringify(data), _extends({}, responseInit, {\n headers\n }));\n};\nclass AbortedDeferredError extends Error {}\nclass DeferredData {\n constructor(data, responseInit) {\n this.pendingKeysSet = new Set();\n this.subscribers = new Set();\n this.deferredKeys = [];\n invariant(data && typeof data === \"object\" && !Array.isArray(data), \"defer() only accepts plain objects\");\n // Set up an AbortController + Promise we can race against to exit early\n // cancellation\n let reject;\n this.abortPromise = new Promise((_, r) => reject = r);\n this.controller = new AbortController();\n let onAbort = () => reject(new AbortedDeferredError(\"Deferred data aborted\"));\n this.unlistenAbortSignal = () => this.controller.signal.removeEventListener(\"abort\", onAbort);\n this.controller.signal.addEventListener(\"abort\", onAbort);\n this.data = Object.entries(data).reduce((acc, _ref) => {\n let [key, value] = _ref;\n return Object.assign(acc, {\n [key]: this.trackPromise(key, value)\n });\n }, {});\n if (this.done) {\n // All incoming values were resolved\n this.unlistenAbortSignal();\n }\n this.init = responseInit;\n }\n trackPromise(key, value) {\n if (!(value instanceof Promise)) {\n return value;\n }\n this.deferredKeys.push(key);\n this.pendingKeysSet.add(key);\n // We store a little wrapper promise that will be extended with\n // _data/_error props upon resolve/reject\n let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, undefined, data), error => this.onSettle(promise, key, error));\n // Register rejection listeners to avoid uncaught promise rejections on\n // errors or aborted deferred values\n promise.catch(() => {});\n Object.defineProperty(promise, \"_tracked\", {\n get: () => true\n });\n return promise;\n }\n onSettle(promise, key, error, data) {\n if (this.controller.signal.aborted && error instanceof AbortedDeferredError) {\n this.unlistenAbortSignal();\n Object.defineProperty(promise, \"_error\", {\n get: () => error\n });\n return Promise.reject(error);\n }\n this.pendingKeysSet.delete(key);\n if (this.done) {\n // Nothing left to abort!\n this.unlistenAbortSignal();\n }\n // If the promise was resolved/rejected with undefined, we'll throw an error as you\n // should always resolve with a value or null\n if (error === undefined && data === undefined) {\n let undefinedError = new Error(\"Deferred data for key \\\"\" + key + \"\\\" resolved/rejected with `undefined`, \" + \"you must resolve/reject with a value or `null`.\");\n Object.defineProperty(promise, \"_error\", {\n get: () => undefinedError\n });\n this.emit(false, key);\n return Promise.reject(undefinedError);\n }\n if (data === undefined) {\n Object.defineProperty(promise, \"_error\", {\n get: () => error\n });\n this.emit(false, key);\n return Promise.reject(error);\n }\n Object.defineProperty(promise, \"_data\", {\n get: () => data\n });\n this.emit(false, key);\n return data;\n }\n emit(aborted, settledKey) {\n this.subscribers.forEach(subscriber => subscriber(aborted, settledKey));\n }\n subscribe(fn) {\n this.subscribers.add(fn);\n return () => this.subscribers.delete(fn);\n }\n cancel() {\n this.controller.abort();\n this.pendingKeysSet.forEach((v, k) => this.pendingKeysSet.delete(k));\n this.emit(true);\n }\n async resolveData(signal) {\n let aborted = false;\n if (!this.done) {\n let onAbort = () => this.cancel();\n signal.addEventListener(\"abort\", onAbort);\n aborted = await new Promise(resolve => {\n this.subscribe(aborted => {\n signal.removeEventListener(\"abort\", onAbort);\n if (aborted || this.done) {\n resolve(aborted);\n }\n });\n });\n }\n return aborted;\n }\n get done() {\n return this.pendingKeysSet.size === 0;\n }\n get unwrappedData() {\n invariant(this.data !== null && this.done, \"Can only unwrap data on initialized and settled deferreds\");\n return Object.entries(this.data).reduce((acc, _ref2) => {\n let [key, value] = _ref2;\n return Object.assign(acc, {\n [key]: unwrapTrackedPromise(value)\n });\n }, {});\n }\n get pendingKeys() {\n return Array.from(this.pendingKeysSet);\n }\n}\nfunction isTrackedPromise(value) {\n return value instanceof Promise && value._tracked === true;\n}\nfunction unwrapTrackedPromise(value) {\n if (!isTrackedPromise(value)) {\n return value;\n }\n if (value._error) {\n throw value._error;\n }\n return value._data;\n}\nconst defer = function defer(data, init) {\n if (init === void 0) {\n init = {};\n }\n let responseInit = typeof init === \"number\" ? {\n status: init\n } : init;\n return new DeferredData(data, responseInit);\n};\n/**\n * A redirect response. Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nconst redirect = function redirect(url, init) {\n if (init === void 0) {\n init = 302;\n }\n let responseInit = init;\n if (typeof responseInit === \"number\") {\n responseInit = {\n status: responseInit\n };\n } else if (typeof responseInit.status === \"undefined\") {\n responseInit.status = 302;\n }\n let headers = new Headers(responseInit.headers);\n headers.set(\"Location\", url);\n return new Response(null, _extends({}, responseInit, {\n headers\n }));\n};\n/**\n * A redirect response that will force a document reload to the new location.\n * Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\nconst redirectDocument = (url, init) => {\n let response = redirect(url, init);\n response.headers.set(\"X-Remix-Reload-Document\", \"true\");\n return response;\n};\n/**\n * @private\n * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies\n */\nclass ErrorResponseImpl {\n constructor(status, statusText, data, internal) {\n if (internal === void 0) {\n internal = false;\n }\n this.status = status;\n this.statusText = statusText || \"\";\n this.internal = internal;\n if (data instanceof Error) {\n this.data = data.toString();\n this.error = data;\n } else {\n this.data = data;\n }\n }\n}\n/**\n * Check if the given error is an ErrorResponse generated from a 4xx/5xx\n * Response thrown from an action/loader\n */\nfunction isRouteErrorResponse(error) {\n return error != null && typeof error.status === \"number\" && typeof error.statusText === \"string\" && typeof error.internal === \"boolean\" && \"data\" in error;\n}\n\nconst validMutationMethodsArr = [\"post\", \"put\", \"patch\", \"delete\"];\nconst validMutationMethods = new Set(validMutationMethodsArr);\nconst validRequestMethodsArr = [\"get\", ...validMutationMethodsArr];\nconst validRequestMethods = new Set(validRequestMethodsArr);\nconst redirectStatusCodes = new Set([301, 302, 303, 307, 308]);\nconst redirectPreserveMethodStatusCodes = new Set([307, 308]);\nconst IDLE_NAVIGATION = {\n state: \"idle\",\n location: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined\n};\nconst IDLE_FETCHER = {\n state: \"idle\",\n data: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined\n};\nconst IDLE_BLOCKER = {\n state: \"unblocked\",\n proceed: undefined,\n reset: undefined,\n location: undefined\n};\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\nconst defaultMapRouteProperties = route => ({\n hasErrorBoundary: Boolean(route.hasErrorBoundary)\n});\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createRouter\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Create a router and listen to history POP navigations\n */\nfunction createRouter(init) {\n const routerWindow = init.window ? init.window : typeof window !== \"undefined\" ? window : undefined;\n const isBrowser = typeof routerWindow !== \"undefined\" && typeof routerWindow.document !== \"undefined\" && typeof routerWindow.document.createElement !== \"undefined\";\n const isServer = !isBrowser;\n invariant(init.routes.length > 0, \"You must provide a non-empty routes array to createRouter\");\n let mapRouteProperties;\n if (init.mapRouteProperties) {\n mapRouteProperties = init.mapRouteProperties;\n } else if (init.detectErrorBoundary) {\n // If they are still using the deprecated version, wrap it with the new API\n let detectErrorBoundary = init.detectErrorBoundary;\n mapRouteProperties = route => ({\n hasErrorBoundary: detectErrorBoundary(route)\n });\n } else {\n mapRouteProperties = defaultMapRouteProperties;\n }\n // Routes keyed by ID\n let manifest = {};\n // Routes in tree format for matching\n let dataRoutes = convertRoutesToDataRoutes(init.routes, mapRouteProperties, undefined, manifest);\n let inFlightDataRoutes;\n let basename = init.basename || \"/\";\n // Config driven behavior flags\n let future = _extends({\n v7_normalizeFormMethod: false,\n v7_prependBasename: false\n }, init.future);\n // Cleanup function for history\n let unlistenHistory = null;\n // Externally-provided functions to call on all state changes\n let subscribers = new Set();\n // Externally-provided object to hold scroll restoration locations during routing\n let savedScrollPositions = null;\n // Externally-provided function to get scroll restoration keys\n let getScrollRestorationKey = null;\n // Externally-provided function to get current scroll position\n let getScrollPosition = null;\n // One-time flag to control the initial hydration scroll restoration. Because\n // we don't get the saved positions from until _after_\n // the initial render, we need to manually trigger a separate updateState to\n // send along the restoreScrollPosition\n // Set to true if we have `hydrationData` since we assume we were SSR'd and that\n // SSR did the initial scroll restoration.\n let initialScrollRestored = init.hydrationData != null;\n let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);\n let initialErrors = null;\n if (initialMatches == null) {\n // If we do not match a user-provided-route, fall back to the root\n // to allow the error boundary to take over\n let error = getInternalRouterError(404, {\n pathname: init.history.location.pathname\n });\n let {\n matches,\n route\n } = getShortCircuitMatches(dataRoutes);\n initialMatches = matches;\n initialErrors = {\n [route.id]: error\n };\n }\n let initialized =\n // All initialMatches need to be loaded before we're ready. If we have lazy\n // functions around still then we'll need to run them in initialize()\n !initialMatches.some(m => m.route.lazy) && (\n // And we have to either have no loaders or have been provided hydrationData\n !initialMatches.some(m => m.route.loader) || init.hydrationData != null);\n let router;\n let state = {\n historyAction: init.history.action,\n location: init.history.location,\n matches: initialMatches,\n initialized,\n navigation: IDLE_NAVIGATION,\n // Don't restore on initial updateState() if we were SSR'd\n restoreScrollPosition: init.hydrationData != null ? false : null,\n preventScrollReset: false,\n revalidation: \"idle\",\n loaderData: init.hydrationData && init.hydrationData.loaderData || {},\n actionData: init.hydrationData && init.hydrationData.actionData || null,\n errors: init.hydrationData && init.hydrationData.errors || initialErrors,\n fetchers: new Map(),\n blockers: new Map()\n };\n // -- Stateful internal variables to manage navigations --\n // Current navigation in progress (to be committed in completeNavigation)\n let pendingAction = Action.Pop;\n // Should the current navigation prevent the scroll reset if scroll cannot\n // be restored?\n let pendingPreventScrollReset = false;\n // AbortController for the active navigation\n let pendingNavigationController;\n // We use this to avoid touching history in completeNavigation if a\n // revalidation is entirely uninterrupted\n let isUninterruptedRevalidation = false;\n // Use this internal flag to force revalidation of all loaders:\n // - submissions (completed or interrupted)\n // - useRevalidator()\n // - X-Remix-Revalidate (from redirect)\n let isRevalidationRequired = false;\n // Use this internal array to capture routes that require revalidation due\n // to a cancelled deferred on action submission\n let cancelledDeferredRoutes = [];\n // Use this internal array to capture fetcher loads that were cancelled by an\n // action navigation and require revalidation\n let cancelledFetcherLoads = [];\n // AbortControllers for any in-flight fetchers\n let fetchControllers = new Map();\n // Track loads based on the order in which they started\n let incrementingLoadId = 0;\n // Track the outstanding pending navigation data load to be compared against\n // the globally incrementing load when a fetcher load lands after a completed\n // navigation\n let pendingNavigationLoadId = -1;\n // Fetchers that triggered data reloads as a result of their actions\n let fetchReloadIds = new Map();\n // Fetchers that triggered redirect navigations\n let fetchRedirectIds = new Set();\n // Most recent href/match for fetcher.load calls for fetchers\n let fetchLoadMatches = new Map();\n // Store DeferredData instances for active route matches. When a\n // route loader returns defer() we stick one in here. Then, when a nested\n // promise resolves we update loaderData. If a new navigation starts we\n // cancel active deferreds for eliminated routes.\n let activeDeferreds = new Map();\n // Store blocker functions in a separate Map outside of router state since\n // we don't need to update UI state if they change\n let blockerFunctions = new Map();\n // Flag to ignore the next history update, so we can revert the URL change on\n // a POP navigation that was blocked by the user without touching router state\n let ignoreNextHistoryUpdate = false;\n // Initialize the router, all side effects should be kicked off from here.\n // Implemented as a Fluent API for ease of:\n // let router = createRouter(init).initialize();\n function initialize() {\n // If history informs us of a POP navigation, start the navigation but do not update\n // state. We'll update our own state once the navigation completes\n unlistenHistory = init.history.listen(_ref => {\n let {\n action: historyAction,\n location,\n delta\n } = _ref;\n // Ignore this event if it was just us resetting the URL from a\n // blocked POP navigation\n if (ignoreNextHistoryUpdate) {\n ignoreNextHistoryUpdate = false;\n return;\n }\n warning(blockerFunctions.size === 0 || delta != null, \"You are trying to use a blocker on a POP navigation to a location \" + \"that was not created by @remix-run/router. This will fail silently in \" + \"production. This can happen if you are navigating outside the router \" + \"via `window.history.pushState`/`window.location.hash` instead of using \" + \"router navigation APIs. This can also happen if you are using \" + \"createHashRouter and the user manually changes the URL.\");\n let blockerKey = shouldBlockNavigation({\n currentLocation: state.location,\n nextLocation: location,\n historyAction\n });\n if (blockerKey && delta != null) {\n // Restore the URL to match the current UI, but don't update router state\n ignoreNextHistoryUpdate = true;\n init.history.go(delta * -1);\n // Put the blocker into a blocked state\n updateBlocker(blockerKey, {\n state: \"blocked\",\n location,\n proceed() {\n updateBlocker(blockerKey, {\n state: \"proceeding\",\n proceed: undefined,\n reset: undefined,\n location\n });\n // Re-do the same POP navigation we just blocked\n init.history.go(delta);\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey, IDLE_BLOCKER);\n updateState({\n blockers\n });\n }\n });\n return;\n }\n return startNavigation(historyAction, location);\n });\n // Kick off initial data load if needed. Use Pop to avoid modifying history\n // Note we don't do any handling of lazy here. For SPA's it'll get handled\n // in the normal navigation flow. For SSR it's expected that lazy modules are\n // resolved prior to router creation since we can't go into a fallbackElement\n // UI for SSR'd apps\n if (!state.initialized) {\n startNavigation(Action.Pop, state.location);\n }\n return router;\n }\n // Clean up a router and it's side effects\n function dispose() {\n if (unlistenHistory) {\n unlistenHistory();\n }\n subscribers.clear();\n pendingNavigationController && pendingNavigationController.abort();\n state.fetchers.forEach((_, key) => deleteFetcher(key));\n state.blockers.forEach((_, key) => deleteBlocker(key));\n }\n // Subscribe to state updates for the router\n function subscribe(fn) {\n subscribers.add(fn);\n return () => subscribers.delete(fn);\n }\n // Update our state and notify the calling context of the change\n function updateState(newState) {\n state = _extends({}, state, newState);\n subscribers.forEach(subscriber => subscriber(state));\n }\n // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION\n // and setting state.[historyAction/location/matches] to the new route.\n // - Location is a required param\n // - Navigation will always be set to IDLE_NAVIGATION\n // - Can pass any other state in newState\n function completeNavigation(location, newState) {\n var _location$state, _location$state2;\n // Deduce if we're in a loading/actionReload state:\n // - We have committed actionData in the store\n // - The current navigation was a mutation submission\n // - We're past the submitting state and into the loading state\n // - The location being loaded is not the result of a redirect\n let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === \"loading\" && ((_location$state = location.state) == null ? void 0 : _location$state._isRedirect) !== true;\n let actionData;\n if (newState.actionData) {\n if (Object.keys(newState.actionData).length > 0) {\n actionData = newState.actionData;\n } else {\n // Empty actionData -> clear prior actionData due to an action error\n actionData = null;\n }\n } else if (isActionReload) {\n // Keep the current data if we're wrapping up the action reload\n actionData = state.actionData;\n } else {\n // Clear actionData on any other completed navigations\n actionData = null;\n }\n // Always preserve any existing loaderData from re-used routes\n let loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData;\n // On a successful navigation we can assume we got through all blockers\n // so we can start fresh\n let blockers = state.blockers;\n if (blockers.size > 0) {\n blockers = new Map(blockers);\n blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));\n }\n // Always respect the user flag. Otherwise don't reset on mutation\n // submission navigations unless they redirect\n let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_location$state2 = location.state) == null ? void 0 : _location$state2._isRedirect) !== true;\n if (inFlightDataRoutes) {\n dataRoutes = inFlightDataRoutes;\n inFlightDataRoutes = undefined;\n }\n if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) {\n init.history.push(location, location.state);\n } else if (pendingAction === Action.Replace) {\n init.history.replace(location, location.state);\n }\n updateState(_extends({}, newState, {\n actionData,\n loaderData,\n historyAction: pendingAction,\n location,\n initialized: true,\n navigation: IDLE_NAVIGATION,\n revalidation: \"idle\",\n restoreScrollPosition: getSavedScrollPosition(location, newState.matches || state.matches),\n preventScrollReset,\n blockers\n }));\n // Reset stateful navigation vars\n pendingAction = Action.Pop;\n pendingPreventScrollReset = false;\n isUninterruptedRevalidation = false;\n isRevalidationRequired = false;\n cancelledDeferredRoutes = [];\n cancelledFetcherLoads = [];\n }\n // Trigger a navigation event, which can either be a numerical POP or a PUSH\n // replace with an optional submission\n async function navigate(to, opts) {\n if (typeof to === \"number\") {\n init.history.go(to);\n return;\n }\n let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, to, opts == null ? void 0 : opts.fromRouteId, opts == null ? void 0 : opts.relative);\n let {\n path,\n submission,\n error\n } = normalizeNavigateOptions(future.v7_normalizeFormMethod, false, normalizedPath, opts);\n let currentLocation = state.location;\n let nextLocation = createLocation(state.location, path, opts && opts.state);\n // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded\n // URL from window.location, so we need to encode it here so the behavior\n // remains the same as POP and non-data-router usages. new URL() does all\n // the same encoding we'd get from a history.pushState/window.location read\n // without having to touch history\n nextLocation = _extends({}, nextLocation, init.history.encodeLocation(nextLocation));\n let userReplace = opts && opts.replace != null ? opts.replace : undefined;\n let historyAction = Action.Push;\n if (userReplace === true) {\n historyAction = Action.Replace;\n } else if (userReplace === false) ; else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) {\n // By default on submissions to the current location we REPLACE so that\n // users don't have to double-click the back button to get to the prior\n // location. If the user redirects to a different location from the\n // action/loader this will be ignored and the redirect will be a PUSH\n historyAction = Action.Replace;\n }\n let preventScrollReset = opts && \"preventScrollReset\" in opts ? opts.preventScrollReset === true : undefined;\n let blockerKey = shouldBlockNavigation({\n currentLocation,\n nextLocation,\n historyAction\n });\n if (blockerKey) {\n // Put the blocker into a blocked state\n updateBlocker(blockerKey, {\n state: \"blocked\",\n location: nextLocation,\n proceed() {\n updateBlocker(blockerKey, {\n state: \"proceeding\",\n proceed: undefined,\n reset: undefined,\n location: nextLocation\n });\n // Send the same navigation through\n navigate(to, opts);\n },\n reset() {\n let blockers = new Map(state.blockers);\n blockers.set(blockerKey, IDLE_BLOCKER);\n updateState({\n blockers\n });\n }\n });\n return;\n }\n return await startNavigation(historyAction, nextLocation, {\n submission,\n // Send through the formData serialization error if we have one so we can\n // render at the right error boundary after we match routes\n pendingError: error,\n preventScrollReset,\n replace: opts && opts.replace\n });\n }\n // Revalidate all current loaders. If a navigation is in progress or if this\n // is interrupted by a navigation, allow this to \"succeed\" by calling all\n // loaders during the next loader round\n function revalidate() {\n interruptActiveLoads();\n updateState({\n revalidation: \"loading\"\n });\n // If we're currently submitting an action, we don't need to start a new\n // navigation, we'll just let the follow up loader execution call all loaders\n if (state.navigation.state === \"submitting\") {\n return;\n }\n // If we're currently in an idle state, start a new navigation for the current\n // action/location and mark it as uninterrupted, which will skip the history\n // update in completeNavigation\n if (state.navigation.state === \"idle\") {\n startNavigation(state.historyAction, state.location, {\n startUninterruptedRevalidation: true\n });\n return;\n }\n // Otherwise, if we're currently in a loading state, just start a new\n // navigation to the navigation.location but do not trigger an uninterrupted\n // revalidation so that history correctly updates once the navigation completes\n startNavigation(pendingAction || state.historyAction, state.navigation.location, {\n overrideNavigation: state.navigation\n });\n }\n // Start a navigation to the given action/location. Can optionally provide a\n // overrideNavigation which will override the normalLoad in the case of a redirect\n // navigation\n async function startNavigation(historyAction, location, opts) {\n // Abort any in-progress navigations and start a new one. Unset any ongoing\n // uninterrupted revalidations unless told otherwise, since we want this\n // new navigation to update history normally\n pendingNavigationController && pendingNavigationController.abort();\n pendingNavigationController = null;\n pendingAction = historyAction;\n isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true;\n // Save the current scroll position every time we start a new navigation,\n // and track whether we should reset scroll on completion\n saveScrollPosition(state.location, state.matches);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let loadingNavigation = opts && opts.overrideNavigation;\n let matches = matchRoutes(routesToUse, location, basename);\n // Short circuit with a 404 on the root error boundary if we match nothing\n if (!matches) {\n let error = getInternalRouterError(404, {\n pathname: location.pathname\n });\n let {\n matches: notFoundMatches,\n route\n } = getShortCircuitMatches(routesToUse);\n // Cancel all pending deferred on 404s since we don't keep any routes\n cancelActiveDeferreds();\n completeNavigation(location, {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error\n }\n });\n return;\n }\n // Short circuit if it's only a hash change and not a revalidation or\n // mutation submission.\n //\n // Ignore on initial page loads because since the initial load will always\n // be \"same hash\". For example, on /page#hash and submit a
\n // which will default to a navigation to /page\n if (state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {\n completeNavigation(location, {\n matches\n });\n return;\n }\n // Create a controller/Request for this navigation\n pendingNavigationController = new AbortController();\n let request = createClientSideRequest(init.history, location, pendingNavigationController.signal, opts && opts.submission);\n let pendingActionData;\n let pendingError;\n if (opts && opts.pendingError) {\n // If we have a pendingError, it means the user attempted a GET submission\n // with binary FormData so assign here and skip to handleLoaders. That\n // way we handle calling loaders above the boundary etc. It's not really\n // different from an actionError in that sense.\n pendingError = {\n [findNearestBoundary(matches).route.id]: opts.pendingError\n };\n } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {\n // Call action if we received an action submission\n let actionOutput = await handleAction(request, location, opts.submission, matches, {\n replace: opts.replace\n });\n if (actionOutput.shortCircuited) {\n return;\n }\n pendingActionData = actionOutput.pendingActionData;\n pendingError = actionOutput.pendingActionError;\n loadingNavigation = getLoadingNavigation(location, opts.submission);\n // Create a GET request for the loaders\n request = new Request(request.url, {\n signal: request.signal\n });\n }\n // Call loaders\n let {\n shortCircuited,\n loaderData,\n errors\n } = await handleLoaders(request, location, matches, loadingNavigation, opts && opts.submission, opts && opts.fetcherSubmission, opts && opts.replace, pendingActionData, pendingError);\n if (shortCircuited) {\n return;\n }\n // Clean up now that the action/loaders have completed. Don't clean up if\n // we short circuited because pendingNavigationController will have already\n // been assigned to a new controller for the next navigation\n pendingNavigationController = null;\n completeNavigation(location, _extends({\n matches\n }, pendingActionData ? {\n actionData: pendingActionData\n } : {}, {\n loaderData,\n errors\n }));\n }\n // Call the action matched by the leaf route for this navigation and handle\n // redirects/errors\n async function handleAction(request, location, submission, matches, opts) {\n if (opts === void 0) {\n opts = {};\n }\n interruptActiveLoads();\n // Put us in a submitting state\n let navigation = getSubmittingNavigation(location, submission);\n updateState({\n navigation\n });\n // Call our action and get the result\n let result;\n let actionMatch = getTargetMatch(matches, location);\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n result = {\n type: ResultType.error,\n error: getInternalRouterError(405, {\n method: request.method,\n pathname: location.pathname,\n routeId: actionMatch.route.id\n })\n };\n } else {\n result = await callLoaderOrAction(\"action\", request, actionMatch, matches, manifest, mapRouteProperties, basename);\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n }\n }\n if (isRedirectResult(result)) {\n let replace;\n if (opts && opts.replace != null) {\n replace = opts.replace;\n } else {\n // If the user didn't explicity indicate replace behavior, replace if\n // we redirected to the exact same location we're currently at to avoid\n // double back-buttons\n replace = result.location === state.location.pathname + state.location.search;\n }\n await startRedirectNavigation(state, result, {\n submission,\n replace\n });\n return {\n shortCircuited: true\n };\n }\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n // By default, all submissions are REPLACE navigations, but if the\n // action threw an error that'll be rendered in an errorElement, we fall\n // back to PUSH so that the user can use the back button to get back to\n // the pre-submission form location to try again\n if ((opts && opts.replace) !== true) {\n pendingAction = Action.Push;\n }\n return {\n // Send back an empty object we can use to clear out any prior actionData\n pendingActionData: {},\n pendingActionError: {\n [boundaryMatch.route.id]: result.error\n }\n };\n }\n if (isDeferredResult(result)) {\n throw getInternalRouterError(400, {\n type: \"defer-action\"\n });\n }\n return {\n pendingActionData: {\n [actionMatch.route.id]: result.data\n }\n };\n }\n // Call all applicable loaders for the given matches, handling redirects,\n // errors, etc.\n async function handleLoaders(request, location, matches, overrideNavigation, submission, fetcherSubmission, replace, pendingActionData, pendingError) {\n // Figure out the right navigation we want to use for data loading\n let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission);\n // If this was a redirect from an action we don't have a \"submission\" but\n // we have it on the loading navigation so use that if available\n let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation);\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, activeSubmission, location, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionData, pendingError);\n // Cancel pending deferreds for no-longer-matched routes or routes we're\n // about to reload. Note that if this is an action reload we would have\n // already cancelled all pending deferreds so this would be a no-op\n cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId));\n pendingNavigationLoadId = ++incrementingLoadId;\n // Short circuit if we have no loaders to run\n if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {\n let updatedFetchers = markFetchRedirectsDone();\n completeNavigation(location, _extends({\n matches,\n loaderData: {},\n // Commit pending error if we're short circuiting\n errors: pendingError || null\n }, pendingActionData ? {\n actionData: pendingActionData\n } : {}, updatedFetchers ? {\n fetchers: new Map(state.fetchers)\n } : {}));\n return {\n shortCircuited: true\n };\n }\n // If this is an uninterrupted revalidation, we remain in our current idle\n // state. If not, we need to switch to our loading state and load data,\n // preserving any new action data or existing action data (in the case of\n // a revalidation interrupting an actionReload)\n if (!isUninterruptedRevalidation) {\n revalidatingFetchers.forEach(rf => {\n let fetcher = state.fetchers.get(rf.key);\n let revalidatingFetcher = getLoadingFetcher(undefined, fetcher ? fetcher.data : undefined);\n state.fetchers.set(rf.key, revalidatingFetcher);\n });\n let actionData = pendingActionData || state.actionData;\n updateState(_extends({\n navigation: loadingNavigation\n }, actionData ? Object.keys(actionData).length === 0 ? {\n actionData: null\n } : {\n actionData\n } : {}, revalidatingFetchers.length > 0 ? {\n fetchers: new Map(state.fetchers)\n } : {}));\n }\n revalidatingFetchers.forEach(rf => {\n if (fetchControllers.has(rf.key)) {\n abortFetcher(rf.key);\n }\n if (rf.controller) {\n // Fetchers use an independent AbortController so that aborting a fetcher\n // (via deleteFetcher) does not abort the triggering navigation that\n // triggered the revalidation\n fetchControllers.set(rf.key, rf.controller);\n }\n });\n // Proxy navigation abort through to revalidation fetchers\n let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(f => abortFetcher(f.key));\n if (pendingNavigationController) {\n pendingNavigationController.signal.addEventListener(\"abort\", abortPendingFetchRevalidations);\n }\n let {\n results,\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request);\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n }\n // Clean up _after_ loaders have completed. Don't clean up if we short\n // circuited because fetchControllers would have been aborted and\n // reassigned to new controllers for the next navigation\n if (pendingNavigationController) {\n pendingNavigationController.signal.removeEventListener(\"abort\", abortPendingFetchRevalidations);\n }\n revalidatingFetchers.forEach(rf => fetchControllers.delete(rf.key));\n // If any loaders returned a redirect Response, start a new REPLACE navigation\n let redirect = findRedirect(results);\n if (redirect) {\n if (redirect.idx >= matchesToLoad.length) {\n // If this redirect came from a fetcher make sure we mark it in\n // fetchRedirectIds so it doesn't get revalidated on the next set of\n // loader executions\n let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n fetchRedirectIds.add(fetcherKey);\n }\n await startRedirectNavigation(state, redirect.result, {\n replace\n });\n return {\n shortCircuited: true\n };\n }\n // Process and commit output from loaders\n let {\n loaderData,\n errors\n } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds);\n // Wire up subscribers to update loaderData as promises settle\n activeDeferreds.forEach((deferredData, routeId) => {\n deferredData.subscribe(aborted => {\n // Note: No need to updateState here since the TrackedPromise on\n // loaderData is stable across resolve/reject\n // Remove this instance if we were aborted or if promises have settled\n if (aborted || deferredData.done) {\n activeDeferreds.delete(routeId);\n }\n });\n });\n let updatedFetchers = markFetchRedirectsDone();\n let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);\n let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;\n return _extends({\n loaderData,\n errors\n }, shouldUpdateFetchers ? {\n fetchers: new Map(state.fetchers)\n } : {});\n }\n function getFetcher(key) {\n return state.fetchers.get(key) || IDLE_FETCHER;\n }\n // Trigger a fetcher load/submit for the given fetcher key\n function fetch(key, routeId, href, opts) {\n if (isServer) {\n throw new Error(\"router.fetch() was called during the server render, but it shouldn't be. \" + \"You are likely calling a useFetcher() method in the body of your component. \" + \"Try moving it to a useEffect or a callback.\");\n }\n if (fetchControllers.has(key)) abortFetcher(key);\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, href, routeId, opts == null ? void 0 : opts.relative);\n let matches = matchRoutes(routesToUse, normalizedPath, basename);\n if (!matches) {\n setFetcherError(key, routeId, getInternalRouterError(404, {\n pathname: normalizedPath\n }));\n return;\n }\n let {\n path,\n submission,\n error\n } = normalizeNavigateOptions(future.v7_normalizeFormMethod, true, normalizedPath, opts);\n if (error) {\n setFetcherError(key, routeId, error);\n return;\n }\n let match = getTargetMatch(matches, path);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n if (submission && isMutationMethod(submission.formMethod)) {\n handleFetcherAction(key, routeId, path, match, matches, submission);\n return;\n }\n // Store off the match so we can call it's shouldRevalidate on subsequent\n // revalidations\n fetchLoadMatches.set(key, {\n routeId,\n path\n });\n handleFetcherLoader(key, routeId, path, match, matches, submission);\n }\n // Call the action for the matched fetcher.submit(), and then handle redirects,\n // errors, and revalidation\n async function handleFetcherAction(key, routeId, path, match, requestMatches, submission) {\n interruptActiveLoads();\n fetchLoadMatches.delete(key);\n if (!match.route.action && !match.route.lazy) {\n let error = getInternalRouterError(405, {\n method: submission.formMethod,\n pathname: path,\n routeId: routeId\n });\n setFetcherError(key, routeId, error);\n return;\n }\n // Put this fetcher into it's submitting state\n let existingFetcher = state.fetchers.get(key);\n let fetcher = getSubmittingFetcher(submission, existingFetcher);\n state.fetchers.set(key, fetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n });\n // Call the action for the fetcher\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(init.history, path, abortController.signal, submission);\n fetchControllers.set(key, abortController);\n let originatingLoadId = incrementingLoadId;\n let actionResult = await callLoaderOrAction(\"action\", fetchRequest, match, requestMatches, manifest, mapRouteProperties, basename);\n if (fetchRequest.signal.aborted) {\n // We can delete this so long as we weren't aborted by ou our own fetcher\n // re-submit which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n return;\n }\n if (isRedirectResult(actionResult)) {\n fetchControllers.delete(key);\n if (pendingNavigationLoadId > originatingLoadId) {\n // A new navigation was kicked off after our action started, so that\n // should take precedence over this redirect navigation. We already\n // set isRevalidationRequired so all loaders for the new route should\n // fire unless opted out via shouldRevalidate\n let doneFetcher = getDoneFetcher(undefined);\n state.fetchers.set(key, doneFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n });\n return;\n } else {\n fetchRedirectIds.add(key);\n let loadingFetcher = getLoadingFetcher(submission);\n state.fetchers.set(key, loadingFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n });\n return startRedirectNavigation(state, actionResult, {\n fetcherSubmission: submission\n });\n }\n }\n // Process any non-redirect errors thrown\n if (isErrorResult(actionResult)) {\n setFetcherError(key, routeId, actionResult.error);\n return;\n }\n if (isDeferredResult(actionResult)) {\n throw getInternalRouterError(400, {\n type: \"defer-action\"\n });\n }\n // Start the data load for current matches, or the next location if we're\n // in the middle of a navigation\n let nextLocation = state.navigation.location || state.location;\n let revalidationRequest = createClientSideRequest(init.history, nextLocation, abortController.signal);\n let routesToUse = inFlightDataRoutes || dataRoutes;\n let matches = state.navigation.state !== \"idle\" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches;\n invariant(matches, \"Didn't find any matches after fetcher action\");\n let loadId = ++incrementingLoadId;\n fetchReloadIds.set(key, loadId);\n let loadFetcher = getLoadingFetcher(submission, actionResult.data);\n state.fetchers.set(key, loadFetcher);\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, submission, nextLocation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, {\n [match.route.id]: actionResult.data\n }, undefined // No need to send through errors since we short circuit above\n );\n // Put all revalidating fetchers into the loading state, except for the\n // current fetcher which we want to keep in it's current loading state which\n // contains it's action submission info + action data\n revalidatingFetchers.filter(rf => rf.key !== key).forEach(rf => {\n let staleKey = rf.key;\n let existingFetcher = state.fetchers.get(staleKey);\n let revalidatingFetcher = getLoadingFetcher(undefined, existingFetcher ? existingFetcher.data : undefined);\n state.fetchers.set(staleKey, revalidatingFetcher);\n if (fetchControllers.has(staleKey)) {\n abortFetcher(staleKey);\n }\n if (rf.controller) {\n fetchControllers.set(staleKey, rf.controller);\n }\n });\n updateState({\n fetchers: new Map(state.fetchers)\n });\n let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(rf => abortFetcher(rf.key));\n abortController.signal.addEventListener(\"abort\", abortPendingFetchRevalidations);\n let {\n results,\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);\n if (abortController.signal.aborted) {\n return;\n }\n abortController.signal.removeEventListener(\"abort\", abortPendingFetchRevalidations);\n fetchReloadIds.delete(key);\n fetchControllers.delete(key);\n revalidatingFetchers.forEach(r => fetchControllers.delete(r.key));\n let redirect = findRedirect(results);\n if (redirect) {\n if (redirect.idx >= matchesToLoad.length) {\n // If this redirect came from a fetcher make sure we mark it in\n // fetchRedirectIds so it doesn't get revalidated on the next set of\n // loader executions\n let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;\n fetchRedirectIds.add(fetcherKey);\n }\n return startRedirectNavigation(state, redirect.result);\n }\n // Process and commit output from loaders\n let {\n loaderData,\n errors\n } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds);\n // Since we let revalidations complete even if the submitting fetcher was\n // deleted, only put it back to idle if it hasn't been deleted\n if (state.fetchers.has(key)) {\n let doneFetcher = getDoneFetcher(actionResult.data);\n state.fetchers.set(key, doneFetcher);\n }\n let didAbortFetchLoads = abortStaleFetchLoads(loadId);\n // If we are currently in a navigation loading state and this fetcher is\n // more recent than the navigation, we want the newer data so abort the\n // navigation and complete it with the fetcher data\n if (state.navigation.state === \"loading\" && loadId > pendingNavigationLoadId) {\n invariant(pendingAction, \"Expected pending action\");\n pendingNavigationController && pendingNavigationController.abort();\n completeNavigation(state.navigation.location, {\n matches,\n loaderData,\n errors,\n fetchers: new Map(state.fetchers)\n });\n } else {\n // otherwise just update with the fetcher data, preserving any existing\n // loaderData for loaders that did not need to reload. We have to\n // manually merge here since we aren't going through completeNavigation\n updateState(_extends({\n errors,\n loaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors)\n }, didAbortFetchLoads || revalidatingFetchers.length > 0 ? {\n fetchers: new Map(state.fetchers)\n } : {}));\n isRevalidationRequired = false;\n }\n }\n // Call the matched loader for fetcher.load(), handling redirects, errors, etc.\n async function handleFetcherLoader(key, routeId, path, match, matches, submission) {\n let existingFetcher = state.fetchers.get(key);\n // Put this fetcher into it's loading state\n let loadingFetcher = getLoadingFetcher(submission, existingFetcher ? existingFetcher.data : undefined);\n state.fetchers.set(key, loadingFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n });\n // Call the loader for this fetcher route match\n let abortController = new AbortController();\n let fetchRequest = createClientSideRequest(init.history, path, abortController.signal);\n fetchControllers.set(key, abortController);\n let originatingLoadId = incrementingLoadId;\n let result = await callLoaderOrAction(\"loader\", fetchRequest, match, matches, manifest, mapRouteProperties, basename);\n // Deferred isn't supported for fetcher loads, await everything and treat it\n // as a normal load. resolveDeferredData will return undefined if this\n // fetcher gets aborted, so we just leave result untouched and short circuit\n // below if that happens\n if (isDeferredResult(result)) {\n result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result;\n }\n // We can delete this so long as we weren't aborted by our our own fetcher\n // re-load which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n if (fetchRequest.signal.aborted) {\n return;\n }\n // If the loader threw a redirect Response, start a new REPLACE navigation\n if (isRedirectResult(result)) {\n if (pendingNavigationLoadId > originatingLoadId) {\n // A new navigation was kicked off after our loader started, so that\n // should take precedence over this redirect navigation\n let doneFetcher = getDoneFetcher(undefined);\n state.fetchers.set(key, doneFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n });\n return;\n } else {\n fetchRedirectIds.add(key);\n await startRedirectNavigation(state, result);\n return;\n }\n }\n // Process any non-redirect errors thrown\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n state.fetchers.delete(key);\n // TODO: In remix, this would reset to IDLE_NAVIGATION if it was a catch -\n // do we need to behave any differently with our non-redirect errors?\n // What if it was a non-redirect Response?\n updateState({\n fetchers: new Map(state.fetchers),\n errors: {\n [boundaryMatch.route.id]: result.error\n }\n });\n return;\n }\n invariant(!isDeferredResult(result), \"Unhandled fetcher deferred data\");\n // Put the fetcher back into an idle state\n let doneFetcher = getDoneFetcher(result.data);\n state.fetchers.set(key, doneFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n });\n }\n /**\n * Utility function to handle redirects returned from an action or loader.\n * Normally, a redirect \"replaces\" the navigation that triggered it. So, for\n * example:\n *\n * - user is on /a\n * - user clicks a link to /b\n * - loader for /b redirects to /c\n *\n * In a non-JS app the browser would track the in-flight navigation to /b and\n * then replace it with /c when it encountered the redirect response. In\n * the end it would only ever update the URL bar with /c.\n *\n * In client-side routing using pushState/replaceState, we aim to emulate\n * this behavior and we also do not update history until the end of the\n * navigation (including processed redirects). This means that we never\n * actually touch history until we've processed redirects, so we just use\n * the history action from the original navigation (PUSH or REPLACE).\n */\n async function startRedirectNavigation(state, redirect, _temp) {\n let {\n submission,\n fetcherSubmission,\n replace\n } = _temp === void 0 ? {} : _temp;\n if (redirect.revalidate) {\n isRevalidationRequired = true;\n }\n let redirectLocation = createLocation(state.location, redirect.location, {\n _isRedirect: true\n });\n invariant(redirectLocation, \"Expected a location on the redirect navigation\");\n if (isBrowser) {\n let isDocumentReload = false;\n if (redirect.reloadDocument) {\n // Hard reload if the response contained X-Remix-Reload-Document\n isDocumentReload = true;\n } else if (ABSOLUTE_URL_REGEX.test(redirect.location)) {\n const url = init.history.createURL(redirect.location);\n isDocumentReload =\n // Hard reload if it's an absolute URL to a new origin\n url.origin !== routerWindow.location.origin ||\n // Hard reload if it's an absolute URL that does not match our basename\n stripBasename(url.pathname, basename) == null;\n }\n if (isDocumentReload) {\n if (replace) {\n routerWindow.location.replace(redirect.location);\n } else {\n routerWindow.location.assign(redirect.location);\n }\n return;\n }\n }\n // There's no need to abort on redirects, since we don't detect the\n // redirect until the action/loaders have settled\n pendingNavigationController = null;\n let redirectHistoryAction = replace === true ? Action.Replace : Action.Push;\n // Use the incoming submission if provided, fallback on the active one in\n // state.navigation\n let {\n formMethod,\n formAction,\n formEncType\n } = state.navigation;\n if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) {\n submission = getSubmissionFromNavigation(state.navigation);\n }\n // If this was a 307/308 submission we want to preserve the HTTP method and\n // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the\n // redirected location\n let activeSubmission = submission || fetcherSubmission;\n if (redirectPreserveMethodStatusCodes.has(redirect.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) {\n await startNavigation(redirectHistoryAction, redirectLocation, {\n submission: _extends({}, activeSubmission, {\n formAction: redirect.location\n }),\n // Preserve this flag across redirects\n preventScrollReset: pendingPreventScrollReset\n });\n } else {\n // If we have a navigation submission, we will preserve it through the\n // redirect navigation\n let overrideNavigation = getLoadingNavigation(redirectLocation, submission);\n await startNavigation(redirectHistoryAction, redirectLocation, {\n overrideNavigation,\n // Send fetcher submissions through for shouldRevalidate\n fetcherSubmission,\n // Preserve this flag across redirects\n preventScrollReset: pendingPreventScrollReset\n });\n }\n }\n async function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) {\n // Call all navigation loaders and revalidating fetcher loaders in parallel,\n // then slice off the results into separate arrays so we can handle them\n // accordingly\n let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction(\"loader\", request, match, matches, manifest, mapRouteProperties, basename)), ...fetchersToLoad.map(f => {\n if (f.matches && f.match && f.controller) {\n return callLoaderOrAction(\"loader\", createClientSideRequest(init.history, f.path, f.controller.signal), f.match, f.matches, manifest, mapRouteProperties, basename);\n } else {\n let error = {\n type: ResultType.error,\n error: getInternalRouterError(404, {\n pathname: f.path\n })\n };\n return error;\n }\n })]);\n let loaderResults = results.slice(0, matchesToLoad.length);\n let fetcherResults = results.slice(matchesToLoad.length);\n await Promise.all([resolveDeferredResults(currentMatches, matchesToLoad, loaderResults, loaderResults.map(() => request.signal), false, state.loaderData), resolveDeferredResults(currentMatches, fetchersToLoad.map(f => f.match), fetcherResults, fetchersToLoad.map(f => f.controller ? f.controller.signal : null), true)]);\n return {\n results,\n loaderResults,\n fetcherResults\n };\n }\n function interruptActiveLoads() {\n // Every interruption triggers a revalidation\n isRevalidationRequired = true;\n // Cancel pending route-level deferreds and mark cancelled routes for\n // revalidation\n cancelledDeferredRoutes.push(...cancelActiveDeferreds());\n // Abort in-flight fetcher loads\n fetchLoadMatches.forEach((_, key) => {\n if (fetchControllers.has(key)) {\n cancelledFetcherLoads.push(key);\n abortFetcher(key);\n }\n });\n }\n function setFetcherError(key, routeId, error) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n deleteFetcher(key);\n updateState({\n errors: {\n [boundaryMatch.route.id]: error\n },\n fetchers: new Map(state.fetchers)\n });\n }\n function deleteFetcher(key) {\n let fetcher = state.fetchers.get(key);\n // Don't abort the controller if this is a deletion of a fetcher.submit()\n // in it's loading phase since - we don't want to abort the corresponding\n // revalidation and want them to complete and land\n if (fetchControllers.has(key) && !(fetcher && fetcher.state === \"loading\" && fetchReloadIds.has(key))) {\n abortFetcher(key);\n }\n fetchLoadMatches.delete(key);\n fetchReloadIds.delete(key);\n fetchRedirectIds.delete(key);\n state.fetchers.delete(key);\n }\n function abortFetcher(key) {\n let controller = fetchControllers.get(key);\n invariant(controller, \"Expected fetch controller: \" + key);\n controller.abort();\n fetchControllers.delete(key);\n }\n function markFetchersDone(keys) {\n for (let key of keys) {\n let fetcher = getFetcher(key);\n let doneFetcher = getDoneFetcher(fetcher.data);\n state.fetchers.set(key, doneFetcher);\n }\n }\n function markFetchRedirectsDone() {\n let doneKeys = [];\n let updatedFetchers = false;\n for (let key of fetchRedirectIds) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, \"Expected fetcher: \" + key);\n if (fetcher.state === \"loading\") {\n fetchRedirectIds.delete(key);\n doneKeys.push(key);\n updatedFetchers = true;\n }\n }\n markFetchersDone(doneKeys);\n return updatedFetchers;\n }\n function abortStaleFetchLoads(landedId) {\n let yeetedKeys = [];\n for (let [key, id] of fetchReloadIds) {\n if (id < landedId) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, \"Expected fetcher: \" + key);\n if (fetcher.state === \"loading\") {\n abortFetcher(key);\n fetchReloadIds.delete(key);\n yeetedKeys.push(key);\n }\n }\n }\n markFetchersDone(yeetedKeys);\n return yeetedKeys.length > 0;\n }\n function getBlocker(key, fn) {\n let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n if (blockerFunctions.get(key) !== fn) {\n blockerFunctions.set(key, fn);\n }\n return blocker;\n }\n function deleteBlocker(key) {\n state.blockers.delete(key);\n blockerFunctions.delete(key);\n }\n // Utility function to update blockers, ensuring valid state transitions\n function updateBlocker(key, newBlocker) {\n let blocker = state.blockers.get(key) || IDLE_BLOCKER;\n // Poor mans state machine :)\n // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM\n invariant(blocker.state === \"unblocked\" && newBlocker.state === \"blocked\" || blocker.state === \"blocked\" && newBlocker.state === \"blocked\" || blocker.state === \"blocked\" && newBlocker.state === \"proceeding\" || blocker.state === \"blocked\" && newBlocker.state === \"unblocked\" || blocker.state === \"proceeding\" && newBlocker.state === \"unblocked\", \"Invalid blocker state transition: \" + blocker.state + \" -> \" + newBlocker.state);\n let blockers = new Map(state.blockers);\n blockers.set(key, newBlocker);\n updateState({\n blockers\n });\n }\n function shouldBlockNavigation(_ref2) {\n let {\n currentLocation,\n nextLocation,\n historyAction\n } = _ref2;\n if (blockerFunctions.size === 0) {\n return;\n }\n // We ony support a single active blocker at the moment since we don't have\n // any compelling use cases for multi-blocker yet\n if (blockerFunctions.size > 1) {\n warning(false, \"A router only supports one blocker at a time\");\n }\n let entries = Array.from(blockerFunctions.entries());\n let [blockerKey, blockerFunction] = entries[entries.length - 1];\n let blocker = state.blockers.get(blockerKey);\n if (blocker && blocker.state === \"proceeding\") {\n // If the blocker is currently proceeding, we don't need to re-check\n // it and can let this navigation continue\n return;\n }\n // At this point, we know we're unblocked/blocked so we need to check the\n // user-provided blocker function\n if (blockerFunction({\n currentLocation,\n nextLocation,\n historyAction\n })) {\n return blockerKey;\n }\n }\n function cancelActiveDeferreds(predicate) {\n let cancelledRouteIds = [];\n activeDeferreds.forEach((dfd, routeId) => {\n if (!predicate || predicate(routeId)) {\n // Cancel the deferred - but do not remove from activeDeferreds here -\n // we rely on the subscribers to do that so our tests can assert proper\n // cleanup via _internalActiveDeferreds\n dfd.cancel();\n cancelledRouteIds.push(routeId);\n activeDeferreds.delete(routeId);\n }\n });\n return cancelledRouteIds;\n }\n // Opt in to capturing and reporting scroll positions during navigations,\n // used by the component\n function enableScrollRestoration(positions, getPosition, getKey) {\n savedScrollPositions = positions;\n getScrollPosition = getPosition;\n getScrollRestorationKey = getKey || null;\n // Perform initial hydration scroll restoration, since we miss the boat on\n // the initial updateState() because we've not yet rendered \n // and therefore have no savedScrollPositions available\n if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n initialScrollRestored = true;\n let y = getSavedScrollPosition(state.location, state.matches);\n if (y != null) {\n updateState({\n restoreScrollPosition: y\n });\n }\n }\n return () => {\n savedScrollPositions = null;\n getScrollPosition = null;\n getScrollRestorationKey = null;\n };\n }\n function getScrollKey(location, matches) {\n if (getScrollRestorationKey) {\n let key = getScrollRestorationKey(location, matches.map(m => convertRouteMatchToUiMatch(m, state.loaderData)));\n return key || location.key;\n }\n return location.key;\n }\n function saveScrollPosition(location, matches) {\n if (savedScrollPositions && getScrollPosition) {\n let key = getScrollKey(location, matches);\n savedScrollPositions[key] = getScrollPosition();\n }\n }\n function getSavedScrollPosition(location, matches) {\n if (savedScrollPositions) {\n let key = getScrollKey(location, matches);\n let y = savedScrollPositions[key];\n if (typeof y === \"number\") {\n return y;\n }\n }\n return null;\n }\n function _internalSetRoutes(newRoutes) {\n manifest = {};\n inFlightDataRoutes = convertRoutesToDataRoutes(newRoutes, mapRouteProperties, undefined, manifest);\n }\n router = {\n get basename() {\n return basename;\n },\n get state() {\n return state;\n },\n get routes() {\n return dataRoutes;\n },\n initialize,\n subscribe,\n enableScrollRestoration,\n navigate,\n fetch,\n revalidate,\n // Passthrough to history-aware createHref used by useHref so we get proper\n // hash-aware URLs in DOM paths\n createHref: to => init.history.createHref(to),\n encodeLocation: to => init.history.encodeLocation(to),\n getFetcher,\n deleteFetcher,\n dispose,\n getBlocker,\n deleteBlocker,\n _internalFetchControllers: fetchControllers,\n _internalActiveDeferreds: activeDeferreds,\n // TODO: Remove setRoutes, it's temporary to avoid dealing with\n // updating the tree while validating the update algorithm.\n _internalSetRoutes\n };\n return router;\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createStaticHandler\n////////////////////////////////////////////////////////////////////////////////\nconst UNSAFE_DEFERRED_SYMBOL = Symbol(\"deferred\");\nfunction createStaticHandler(routes, opts) {\n invariant(routes.length > 0, \"You must provide a non-empty routes array to createStaticHandler\");\n let manifest = {};\n let basename = (opts ? opts.basename : null) || \"/\";\n let mapRouteProperties;\n if (opts != null && opts.mapRouteProperties) {\n mapRouteProperties = opts.mapRouteProperties;\n } else if (opts != null && opts.detectErrorBoundary) {\n // If they are still using the deprecated version, wrap it with the new API\n let detectErrorBoundary = opts.detectErrorBoundary;\n mapRouteProperties = route => ({\n hasErrorBoundary: detectErrorBoundary(route)\n });\n } else {\n mapRouteProperties = defaultMapRouteProperties;\n }\n let dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, undefined, manifest);\n /**\n * The query() method is intended for document requests, in which we want to\n * call an optional action and potentially multiple loaders for all nested\n * routes. It returns a StaticHandlerContext object, which is very similar\n * to the router state (location, loaderData, actionData, errors, etc.) and\n * also adds SSR-specific information such as the statusCode and headers\n * from action/loaders Responses.\n *\n * It _should_ never throw and should report all errors through the\n * returned context.errors object, properly associating errors to their error\n * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be\n * used to emulate React error boundaries during SSr by performing a second\n * pass only down to the boundaryId.\n *\n * The one exception where we do not return a StaticHandlerContext is when a\n * redirect response is returned or thrown from any action/loader. We\n * propagate that out and return the raw Response so the HTTP server can\n * return it directly.\n */\n async function query(request, _temp2) {\n let {\n requestContext\n } = _temp2 === void 0 ? {} : _temp2;\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename);\n // SSR supports HEAD requests while SPA doesn't\n if (!isValidMethod(method) && method !== \"HEAD\") {\n let error = getInternalRouterError(405, {\n method\n });\n let {\n matches: methodNotAllowedMatches,\n route\n } = getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: methodNotAllowedMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null\n };\n } else if (!matches) {\n let error = getInternalRouterError(404, {\n pathname: location.pathname\n });\n let {\n matches: notFoundMatches,\n route\n } = getShortCircuitMatches(dataRoutes);\n return {\n basename,\n location,\n matches: notFoundMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null\n };\n }\n let result = await queryImpl(request, location, matches, requestContext);\n if (isResponse(result)) {\n return result;\n }\n // When returning StaticHandlerContext, we patch back in the location here\n // since we need it for React Context. But this helps keep our submit and\n // loadRouteData operating on a Request instead of a Location\n return _extends({\n location,\n basename\n }, result);\n }\n /**\n * The queryRoute() method is intended for targeted route requests, either\n * for fetch ?_data requests or resource route requests. In this case, we\n * are only ever calling a single action or loader, and we are returning the\n * returned value directly. In most cases, this will be a Response returned\n * from the action/loader, but it may be a primitive or other value as well -\n * and in such cases the calling context should handle that accordingly.\n *\n * We do respect the throw/return differentiation, so if an action/loader\n * throws, then this method will throw the value. This is important so we\n * can do proper boundary identification in Remix where a thrown Response\n * must go to the Catch Boundary but a returned Response is happy-path.\n *\n * One thing to note is that any Router-initiated Errors that make sense\n * to associate with a status code will be thrown as an ErrorResponse\n * instance which include the raw Error, such that the calling context can\n * serialize the error as they see fit while including the proper response\n * code. Examples here are 404 and 405 errors that occur prior to reaching\n * any user-defined loaders.\n */\n async function queryRoute(request, _temp3) {\n let {\n routeId,\n requestContext\n } = _temp3 === void 0 ? {} : _temp3;\n let url = new URL(request.url);\n let method = request.method;\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location, basename);\n // SSR supports HEAD requests while SPA doesn't\n if (!isValidMethod(method) && method !== \"HEAD\" && method !== \"OPTIONS\") {\n throw getInternalRouterError(405, {\n method\n });\n } else if (!matches) {\n throw getInternalRouterError(404, {\n pathname: location.pathname\n });\n }\n let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location);\n if (routeId && !match) {\n throw getInternalRouterError(403, {\n pathname: location.pathname,\n routeId\n });\n } else if (!match) {\n // This should never hit I don't think?\n throw getInternalRouterError(404, {\n pathname: location.pathname\n });\n }\n let result = await queryImpl(request, location, matches, requestContext, match);\n if (isResponse(result)) {\n return result;\n }\n let error = result.errors ? Object.values(result.errors)[0] : undefined;\n if (error !== undefined) {\n // If we got back result.errors, that means the loader/action threw\n // _something_ that wasn't a Response, but it's not guaranteed/required\n // to be an `instanceof Error` either, so we have to use throw here to\n // preserve the \"error\" state outside of queryImpl.\n throw error;\n }\n // Pick off the right state value to return\n if (result.actionData) {\n return Object.values(result.actionData)[0];\n }\n if (result.loaderData) {\n var _result$activeDeferre;\n let data = Object.values(result.loaderData)[0];\n if ((_result$activeDeferre = result.activeDeferreds) != null && _result$activeDeferre[match.route.id]) {\n data[UNSAFE_DEFERRED_SYMBOL] = result.activeDeferreds[match.route.id];\n }\n return data;\n }\n return undefined;\n }\n async function queryImpl(request, location, matches, requestContext, routeMatch) {\n invariant(request.signal, \"query()/queryRoute() requests must contain an AbortController signal\");\n try {\n if (isMutationMethod(request.method.toLowerCase())) {\n let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), requestContext, routeMatch != null);\n return result;\n }\n let result = await loadRouteData(request, matches, requestContext, routeMatch);\n return isResponse(result) ? result : _extends({}, result, {\n actionData: null,\n actionHeaders: {}\n });\n } catch (e) {\n // If the user threw/returned a Response in callLoaderOrAction, we throw\n // it to bail out and then return or throw here based on whether the user\n // returned or threw\n if (isQueryRouteResponse(e)) {\n if (e.type === ResultType.error) {\n throw e.response;\n }\n return e.response;\n }\n // Redirects are always returned since they don't propagate to catch\n // boundaries\n if (isRedirectResponse(e)) {\n return e;\n }\n throw e;\n }\n }\n async function submit(request, matches, actionMatch, requestContext, isRouteRequest) {\n let result;\n if (!actionMatch.route.action && !actionMatch.route.lazy) {\n let error = getInternalRouterError(405, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: actionMatch.route.id\n });\n if (isRouteRequest) {\n throw error;\n }\n result = {\n type: ResultType.error,\n error\n };\n } else {\n result = await callLoaderOrAction(\"action\", request, actionMatch, matches, manifest, mapRouteProperties, basename, {\n isStaticRequest: true,\n isRouteRequest,\n requestContext\n });\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(method + \"() call aborted: \" + request.method + \" \" + request.url);\n }\n }\n if (isRedirectResult(result)) {\n // Uhhhh - this should never happen, we should always throw these from\n // callLoaderOrAction, but the type narrowing here keeps TS happy and we\n // can get back on the \"throw all redirect responses\" train here should\n // this ever happen :/\n throw new Response(null, {\n status: result.status,\n headers: {\n Location: result.location\n }\n });\n }\n if (isDeferredResult(result)) {\n let error = getInternalRouterError(400, {\n type: \"defer-action\"\n });\n if (isRouteRequest) {\n throw error;\n }\n result = {\n type: ResultType.error,\n error\n };\n }\n if (isRouteRequest) {\n // Note: This should only be non-Response values if we get here, since\n // isRouteRequest should throw any Response received in callLoaderOrAction\n if (isErrorResult(result)) {\n throw result.error;\n }\n return {\n matches: [actionMatch],\n loaderData: {},\n actionData: {\n [actionMatch.route.id]: result.data\n },\n errors: null,\n // Note: statusCode + headers are unused here since queryRoute will\n // return the raw Response or value\n statusCode: 200,\n loaderHeaders: {},\n actionHeaders: {},\n activeDeferreds: null\n };\n }\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n let context = await loadRouteData(request, matches, requestContext, undefined, {\n [boundaryMatch.route.id]: result.error\n });\n // action status codes take precedence over loader status codes\n return _extends({}, context, {\n statusCode: isRouteErrorResponse(result.error) ? result.error.status : 500,\n actionData: null,\n actionHeaders: _extends({}, result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {})\n });\n }\n // Create a GET request for the loaders\n let loaderRequest = new Request(request.url, {\n headers: request.headers,\n redirect: request.redirect,\n signal: request.signal\n });\n let context = await loadRouteData(loaderRequest, matches, requestContext);\n return _extends({}, context, result.statusCode ? {\n statusCode: result.statusCode\n } : {}, {\n actionData: {\n [actionMatch.route.id]: result.data\n },\n actionHeaders: _extends({}, result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {})\n });\n }\n async function loadRouteData(request, matches, requestContext, routeMatch, pendingActionError) {\n let isRouteRequest = routeMatch != null;\n // Short circuit if we have no loaders to run (queryRoute())\n if (isRouteRequest && !(routeMatch != null && routeMatch.route.loader) && !(routeMatch != null && routeMatch.route.lazy)) {\n throw getInternalRouterError(400, {\n method: request.method,\n pathname: new URL(request.url).pathname,\n routeId: routeMatch == null ? void 0 : routeMatch.route.id\n });\n }\n let requestMatches = routeMatch ? [routeMatch] : getLoaderMatchesUntilBoundary(matches, Object.keys(pendingActionError || {})[0]);\n let matchesToLoad = requestMatches.filter(m => m.route.loader || m.route.lazy);\n // Short circuit if we have no loaders to run (query())\n if (matchesToLoad.length === 0) {\n return {\n matches,\n // Add a null for all matched routes for proper revalidation on the client\n loaderData: matches.reduce((acc, m) => Object.assign(acc, {\n [m.route.id]: null\n }), {}),\n errors: pendingActionError || null,\n statusCode: 200,\n loaderHeaders: {},\n activeDeferreds: null\n };\n }\n let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction(\"loader\", request, match, matches, manifest, mapRouteProperties, basename, {\n isStaticRequest: true,\n isRouteRequest,\n requestContext\n }))]);\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(method + \"() call aborted: \" + request.method + \" \" + request.url);\n }\n // Process and commit output from loaders\n let activeDeferreds = new Map();\n let context = processRouteLoaderData(matches, matchesToLoad, results, pendingActionError, activeDeferreds);\n // Add a null for any non-loader matches for proper revalidation on the client\n let executedLoaders = new Set(matchesToLoad.map(match => match.route.id));\n matches.forEach(match => {\n if (!executedLoaders.has(match.route.id)) {\n context.loaderData[match.route.id] = null;\n }\n });\n return _extends({}, context, {\n matches,\n activeDeferreds: activeDeferreds.size > 0 ? Object.fromEntries(activeDeferreds.entries()) : null\n });\n }\n return {\n dataRoutes,\n query,\n queryRoute\n };\n}\n//#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Helpers\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Given an existing StaticHandlerContext and an error thrown at render time,\n * provide an updated StaticHandlerContext suitable for a second SSR render\n */\nfunction getStaticContextFromError(routes, context, error) {\n let newContext = _extends({}, context, {\n statusCode: 500,\n errors: {\n [context._deepestRenderedBoundaryId || routes[0].id]: error\n }\n });\n return newContext;\n}\nfunction isSubmissionNavigation(opts) {\n return opts != null && (\"formData\" in opts && opts.formData != null || \"body\" in opts && opts.body !== undefined);\n}\nfunction normalizeTo(location, matches, basename, prependBasename, to, fromRouteId, relative) {\n let contextualMatches;\n let activeRouteMatch;\n if (fromRouteId != null && relative !== \"path\") {\n // Grab matches up to the calling route so our route-relative logic is\n // relative to the correct source route. When using relative:path,\n // fromRouteId is ignored since that is always relative to the current\n // location path\n contextualMatches = [];\n for (let match of matches) {\n contextualMatches.push(match);\n if (match.route.id === fromRouteId) {\n activeRouteMatch = match;\n break;\n }\n }\n } else {\n contextualMatches = matches;\n activeRouteMatch = matches[matches.length - 1];\n }\n // Resolve the relative path\n let path = resolveTo(to ? to : \".\", getPathContributingMatches(contextualMatches).map(m => m.pathnameBase), stripBasename(location.pathname, basename) || location.pathname, relative === \"path\");\n // When `to` is not specified we inherit search/hash from the current\n // location, unlike when to=\".\" and we just inherit the path.\n // See https://github.com/remix-run/remix/issues/927\n if (to == null) {\n path.search = location.search;\n path.hash = location.hash;\n }\n // Add an ?index param for matched index routes if we don't already have one\n if ((to == null || to === \"\" || to === \".\") && activeRouteMatch && activeRouteMatch.route.index && !hasNakedIndexQuery(path.search)) {\n path.search = path.search ? path.search.replace(/^\\?/, \"?index&\") : \"?index\";\n }\n // If we're operating within a basename, prepend it to the pathname. If\n // this is a root navigation, then just use the raw basename which allows\n // the basename to have full control over the presence of a trailing slash\n // on root actions\n if (prependBasename && basename !== \"/\") {\n path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n return createPath(path);\n}\n// Normalize navigation options by converting formMethod=GET formData objects to\n// URLSearchParams so they behave identically to links with query params\nfunction normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) {\n // Return location verbatim on non-submission navigations\n if (!opts || !isSubmissionNavigation(opts)) {\n return {\n path\n };\n }\n if (opts.formMethod && !isValidMethod(opts.formMethod)) {\n return {\n path,\n error: getInternalRouterError(405, {\n method: opts.formMethod\n })\n };\n }\n let getInvalidBodyError = () => ({\n path,\n error: getInternalRouterError(400, {\n type: \"invalid-body\"\n })\n });\n // Create a Submission on non-GET navigations\n let rawFormMethod = opts.formMethod || \"get\";\n let formMethod = normalizeFormMethod ? rawFormMethod.toUpperCase() : rawFormMethod.toLowerCase();\n let formAction = stripHashFromPath(path);\n if (opts.body !== undefined) {\n if (opts.formEncType === \"text/plain\") {\n // text only support POST/PUT/PATCH/DELETE submissions\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n let text = typeof opts.body === \"string\" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ?\n // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data\n Array.from(opts.body.entries()).reduce((acc, _ref3) => {\n let [name, value] = _ref3;\n return \"\" + acc + name + \"=\" + value + \"\\n\";\n }, \"\") : String(opts.body);\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: undefined,\n json: undefined,\n text\n }\n };\n } else if (opts.formEncType === \"application/json\") {\n // json only supports POST/PUT/PATCH/DELETE submissions\n if (!isMutationMethod(formMethod)) {\n return getInvalidBodyError();\n }\n try {\n let json = typeof opts.body === \"string\" ? JSON.parse(opts.body) : opts.body;\n return {\n path,\n submission: {\n formMethod,\n formAction,\n formEncType: opts.formEncType,\n formData: undefined,\n json,\n text: undefined\n }\n };\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n }\n invariant(typeof FormData === \"function\", \"FormData is not available in this environment\");\n let searchParams;\n let formData;\n if (opts.formData) {\n searchParams = convertFormDataToSearchParams(opts.formData);\n formData = opts.formData;\n } else if (opts.body instanceof FormData) {\n searchParams = convertFormDataToSearchParams(opts.body);\n formData = opts.body;\n } else if (opts.body instanceof URLSearchParams) {\n searchParams = opts.body;\n formData = convertSearchParamsToFormData(searchParams);\n } else if (opts.body == null) {\n searchParams = new URLSearchParams();\n formData = new FormData();\n } else {\n try {\n searchParams = new URLSearchParams(opts.body);\n formData = convertSearchParamsToFormData(searchParams);\n } catch (e) {\n return getInvalidBodyError();\n }\n }\n let submission = {\n formMethod,\n formAction,\n formEncType: opts && opts.formEncType || \"application/x-www-form-urlencoded\",\n formData,\n json: undefined,\n text: undefined\n };\n if (isMutationMethod(submission.formMethod)) {\n return {\n path,\n submission\n };\n }\n // Flatten submission onto URLSearchParams for GET submissions\n let parsedPath = parsePath(path);\n // On GET navigation submissions we can drop the ?index param from the\n // resulting location since all loaders will run. But fetcher GET submissions\n // only run a single loader so we need to preserve any incoming ?index params\n if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {\n searchParams.append(\"index\", \"\");\n }\n parsedPath.search = \"?\" + searchParams;\n return {\n path: createPath(parsedPath),\n submission\n };\n}\n// Filter out all routes below any caught error as they aren't going to\n// render so we don't need to load them\nfunction getLoaderMatchesUntilBoundary(matches, boundaryId) {\n let boundaryMatches = matches;\n if (boundaryId) {\n let index = matches.findIndex(m => m.route.id === boundaryId);\n if (index >= 0) {\n boundaryMatches = matches.slice(0, index);\n }\n }\n return boundaryMatches;\n}\nfunction getMatchesToLoad(history, state, matches, submission, location, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionData, pendingError) {\n let actionResult = pendingError ? Object.values(pendingError)[0] : pendingActionData ? Object.values(pendingActionData)[0] : undefined;\n let currentUrl = history.createURL(state.location);\n let nextUrl = history.createURL(location);\n // Pick navigation matches that are net-new or qualify for revalidation\n let boundaryId = pendingError ? Object.keys(pendingError)[0] : undefined;\n let boundaryMatches = getLoaderMatchesUntilBoundary(matches, boundaryId);\n let navigationMatches = boundaryMatches.filter((match, index) => {\n if (match.route.lazy) {\n // We haven't loaded this route yet so we don't know if it's got a loader!\n return true;\n }\n if (match.route.loader == null) {\n return false;\n }\n // Always call the loader on new route instances and pending defer cancellations\n if (isNewLoader(state.loaderData, state.matches[index], match) || cancelledDeferredRoutes.some(id => id === match.route.id)) {\n return true;\n }\n // This is the default implementation for when we revalidate. If the route\n // provides it's own implementation, then we give them full control but\n // provide this value so they can leverage it if needed after they check\n // their own specific use cases\n let currentRouteMatch = state.matches[index];\n let nextRouteMatch = match;\n return shouldRevalidateLoader(match, _extends({\n currentUrl,\n currentParams: currentRouteMatch.params,\n nextUrl,\n nextParams: nextRouteMatch.params\n }, submission, {\n actionResult,\n defaultShouldRevalidate:\n // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate\n isRevalidationRequired ||\n // Clicked the same link, resubmitted a GET form\n currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search ||\n // Search params affect all loaders\n currentUrl.search !== nextUrl.search || isNewRouteInstance(currentRouteMatch, nextRouteMatch)\n }));\n });\n // Pick fetcher.loads that need to be revalidated\n let revalidatingFetchers = [];\n fetchLoadMatches.forEach((f, key) => {\n // Don't revalidate if fetcher won't be present in the subsequent render\n if (!matches.some(m => m.route.id === f.routeId)) {\n return;\n }\n let fetcherMatches = matchRoutes(routesToUse, f.path, basename);\n // If the fetcher path no longer matches, push it in with null matches so\n // we can trigger a 404 in callLoadersAndMaybeResolveData. Note this is\n // currently only a use-case for Remix HMR where the route tree can change\n // at runtime and remove a route previously loaded via a fetcher\n if (!fetcherMatches) {\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: null,\n match: null,\n controller: null\n });\n return;\n }\n // Revalidating fetchers are decoupled from the route matches since they\n // load from a static href. They revalidate based on explicit revalidation\n // (submission, useRevalidator, or X-Remix-Revalidate)\n let fetcher = state.fetchers.get(key);\n let fetcherMatch = getTargetMatch(fetcherMatches, f.path);\n let shouldRevalidate = false;\n if (fetchRedirectIds.has(key)) {\n // Never trigger a revalidation of an actively redirecting fetcher\n shouldRevalidate = false;\n } else if (cancelledFetcherLoads.includes(key)) {\n // Always revalidate if the fetcher was cancelled\n shouldRevalidate = true;\n } else if (fetcher && fetcher.state !== \"idle\" && fetcher.data === undefined) {\n // If the fetcher hasn't ever completed loading yet, then this isn't a\n // revalidation, it would just be a brand new load if an explicit\n // revalidation is required\n shouldRevalidate = isRevalidationRequired;\n } else {\n // Otherwise fall back on any user-defined shouldRevalidate, defaulting\n // to explicit revalidations only\n shouldRevalidate = shouldRevalidateLoader(fetcherMatch, _extends({\n currentUrl,\n currentParams: state.matches[state.matches.length - 1].params,\n nextUrl,\n nextParams: matches[matches.length - 1].params\n }, submission, {\n actionResult,\n defaultShouldRevalidate: isRevalidationRequired\n }));\n }\n if (shouldRevalidate) {\n revalidatingFetchers.push({\n key,\n routeId: f.routeId,\n path: f.path,\n matches: fetcherMatches,\n match: fetcherMatch,\n controller: new AbortController()\n });\n }\n });\n return [navigationMatches, revalidatingFetchers];\n}\nfunction isNewLoader(currentLoaderData, currentMatch, match) {\n let isNew =\n // [a] -> [a, b]\n !currentMatch ||\n // [a, b] -> [a, c]\n match.route.id !== currentMatch.route.id;\n // Handle the case that we don't have data for a re-used route, potentially\n // from a prior error or from a cancelled pending deferred\n let isMissingData = currentLoaderData[match.route.id] === undefined;\n // Always load if this is a net-new route or we don't yet have data\n return isNew || isMissingData;\n}\nfunction isNewRouteInstance(currentMatch, match) {\n let currentPath = currentMatch.route.path;\n return (\n // param change for this match, /users/123 -> /users/456\n currentMatch.pathname !== match.pathname ||\n // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n currentPath != null && currentPath.endsWith(\"*\") && currentMatch.params[\"*\"] !== match.params[\"*\"]\n );\n}\nfunction shouldRevalidateLoader(loaderMatch, arg) {\n if (loaderMatch.route.shouldRevalidate) {\n let routeChoice = loaderMatch.route.shouldRevalidate(arg);\n if (typeof routeChoice === \"boolean\") {\n return routeChoice;\n }\n }\n return arg.defaultShouldRevalidate;\n}\n/**\n * Execute route.lazy() methods to lazily load route modules (loader, action,\n * shouldRevalidate) and update the routeManifest in place which shares objects\n * with dataRoutes so those get updated as well.\n */\nasync function loadLazyRouteModule(route, mapRouteProperties, manifest) {\n if (!route.lazy) {\n return;\n }\n let lazyRoute = await route.lazy();\n // If the lazy route function was executed and removed by another parallel\n // call then we can return - first lazy() to finish wins because the return\n // value of lazy is expected to be static\n if (!route.lazy) {\n return;\n }\n let routeToUpdate = manifest[route.id];\n invariant(routeToUpdate, \"No route found in manifest\");\n // Update the route in place. This should be safe because there's no way\n // we could yet be sitting on this route as we can't get there without\n // resolving lazy() first.\n //\n // This is different than the HMR \"update\" use-case where we may actively be\n // on the route being updated. The main concern boils down to \"does this\n // mutation affect any ongoing navigations or any current state.matches\n // values?\". If not, it should be safe to update in place.\n let routeUpdates = {};\n for (let lazyRouteProperty in lazyRoute) {\n let staticRouteValue = routeToUpdate[lazyRouteProperty];\n let isPropertyStaticallyDefined = staticRouteValue !== undefined &&\n // This property isn't static since it should always be updated based\n // on the route updates\n lazyRouteProperty !== \"hasErrorBoundary\";\n warning(!isPropertyStaticallyDefined, \"Route \\\"\" + routeToUpdate.id + \"\\\" has a static property \\\"\" + lazyRouteProperty + \"\\\" \" + \"defined but its lazy function is also returning a value for this property. \" + (\"The lazy route property \\\"\" + lazyRouteProperty + \"\\\" will be ignored.\"));\n if (!isPropertyStaticallyDefined && !immutableRouteKeys.has(lazyRouteProperty)) {\n routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];\n }\n }\n // Mutate the route with the provided updates. Do this first so we pass\n // the updated version to mapRouteProperties\n Object.assign(routeToUpdate, routeUpdates);\n // Mutate the `hasErrorBoundary` property on the route based on the route\n // updates and remove the `lazy` function so we don't resolve the lazy\n // route again.\n Object.assign(routeToUpdate, _extends({}, mapRouteProperties(routeToUpdate), {\n lazy: undefined\n }));\n}\nasync function callLoaderOrAction(type, request, match, matches, manifest, mapRouteProperties, basename, opts) {\n if (opts === void 0) {\n opts = {};\n }\n let resultType;\n let result;\n let onReject;\n let runHandler = handler => {\n // Setup a promise we can race against so that abort signals short circuit\n let reject;\n let abortPromise = new Promise((_, r) => reject = r);\n onReject = () => reject();\n request.signal.addEventListener(\"abort\", onReject);\n return Promise.race([handler({\n request,\n params: match.params,\n context: opts.requestContext\n }), abortPromise]);\n };\n try {\n let handler = match.route[type];\n if (match.route.lazy) {\n if (handler) {\n // Run statically defined handler in parallel with lazy()\n let handlerError;\n let values = await Promise.all([\n // If the handler throws, don't let it immediately bubble out,\n // since we need to let the lazy() execution finish so we know if this\n // route has a boundary that can handle the error\n runHandler(handler).catch(e => {\n handlerError = e;\n }), loadLazyRouteModule(match.route, mapRouteProperties, manifest)]);\n if (handlerError) {\n throw handlerError;\n }\n result = values[0];\n } else {\n // Load lazy route module, then run any returned handler\n await loadLazyRouteModule(match.route, mapRouteProperties, manifest);\n handler = match.route[type];\n if (handler) {\n // Handler still run even if we got interrupted to maintain consistency\n // with un-abortable behavior of handler execution on non-lazy or\n // previously-lazy-loaded routes\n result = await runHandler(handler);\n } else if (type === \"action\") {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(405, {\n method: request.method,\n pathname,\n routeId: match.route.id\n });\n } else {\n // lazy() route has no loader to run. Short circuit here so we don't\n // hit the invariant below that errors on returning undefined.\n return {\n type: ResultType.data,\n data: undefined\n };\n }\n }\n } else if (!handler) {\n let url = new URL(request.url);\n let pathname = url.pathname + url.search;\n throw getInternalRouterError(404, {\n pathname\n });\n } else {\n result = await runHandler(handler);\n }\n invariant(result !== undefined, \"You defined \" + (type === \"action\" ? \"an action\" : \"a loader\") + \" for route \" + (\"\\\"\" + match.route.id + \"\\\" but didn't return anything from your `\" + type + \"` \") + \"function. Please return a value or `null`.\");\n } catch (e) {\n resultType = ResultType.error;\n result = e;\n } finally {\n if (onReject) {\n request.signal.removeEventListener(\"abort\", onReject);\n }\n }\n if (isResponse(result)) {\n let status = result.status;\n // Process redirects\n if (redirectStatusCodes.has(status)) {\n let location = result.headers.get(\"Location\");\n invariant(location, \"Redirects returned/thrown from loaders/actions must have a Location header\");\n // Support relative routing in internal redirects\n if (!ABSOLUTE_URL_REGEX.test(location)) {\n location = normalizeTo(new URL(request.url), matches.slice(0, matches.indexOf(match) + 1), basename, true, location);\n } else if (!opts.isStaticRequest) {\n // Strip off the protocol+origin for same-origin + same-basename absolute\n // redirects. If this is a static request, we can let it go back to the\n // browser as-is\n let currentUrl = new URL(request.url);\n let url = location.startsWith(\"//\") ? new URL(currentUrl.protocol + location) : new URL(location);\n let isSameBasename = stripBasename(url.pathname, basename) != null;\n if (url.origin === currentUrl.origin && isSameBasename) {\n location = url.pathname + url.search + url.hash;\n }\n }\n // Don't process redirects in the router during static requests requests.\n // Instead, throw the Response and let the server handle it with an HTTP\n // redirect. We also update the Location header in place in this flow so\n // basename and relative routing is taken into account\n if (opts.isStaticRequest) {\n result.headers.set(\"Location\", location);\n throw result;\n }\n return {\n type: ResultType.redirect,\n status,\n location,\n revalidate: result.headers.get(\"X-Remix-Revalidate\") !== null,\n reloadDocument: result.headers.get(\"X-Remix-Reload-Document\") !== null\n };\n }\n // For SSR single-route requests, we want to hand Responses back directly\n // without unwrapping. We do this with the QueryRouteResponse wrapper\n // interface so we can know whether it was returned or thrown\n if (opts.isRouteRequest) {\n let queryRouteResponse = {\n type: resultType === ResultType.error ? ResultType.error : ResultType.data,\n response: result\n };\n throw queryRouteResponse;\n }\n let data;\n let contentType = result.headers.get(\"Content-Type\");\n // Check between word boundaries instead of startsWith() due to the last\n // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type\n if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n data = await result.json();\n } else {\n data = await result.text();\n }\n if (resultType === ResultType.error) {\n return {\n type: resultType,\n error: new ErrorResponseImpl(status, result.statusText, data),\n headers: result.headers\n };\n }\n return {\n type: ResultType.data,\n data,\n statusCode: result.status,\n headers: result.headers\n };\n }\n if (resultType === ResultType.error) {\n return {\n type: resultType,\n error: result\n };\n }\n if (isDeferredData(result)) {\n var _result$init, _result$init2;\n return {\n type: ResultType.deferred,\n deferredData: result,\n statusCode: (_result$init = result.init) == null ? void 0 : _result$init.status,\n headers: ((_result$init2 = result.init) == null ? void 0 : _result$init2.headers) && new Headers(result.init.headers)\n };\n }\n return {\n type: ResultType.data,\n data: result\n };\n}\n// Utility method for creating the Request instances for loaders/actions during\n// client-side navigations and fetches. During SSR we will always have a\n// Request instance from the static handler (query/queryRoute)\nfunction createClientSideRequest(history, location, signal, submission) {\n let url = history.createURL(stripHashFromPath(location)).toString();\n let init = {\n signal\n };\n if (submission && isMutationMethod(submission.formMethod)) {\n let {\n formMethod,\n formEncType\n } = submission;\n // Didn't think we needed this but it turns out unlike other methods, patch\n // won't be properly normalized to uppercase and results in a 405 error.\n // See: https://fetch.spec.whatwg.org/#concept-method\n init.method = formMethod.toUpperCase();\n if (formEncType === \"application/json\") {\n init.headers = new Headers({\n \"Content-Type\": formEncType\n });\n init.body = JSON.stringify(submission.json);\n } else if (formEncType === \"text/plain\") {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = submission.text;\n } else if (formEncType === \"application/x-www-form-urlencoded\" && submission.formData) {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = convertFormDataToSearchParams(submission.formData);\n } else {\n // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n init.body = submission.formData;\n }\n }\n return new Request(url, init);\n}\nfunction convertFormDataToSearchParams(formData) {\n let searchParams = new URLSearchParams();\n for (let [key, value] of formData.entries()) {\n // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs\n searchParams.append(key, typeof value === \"string\" ? value : value.name);\n }\n return searchParams;\n}\nfunction convertSearchParamsToFormData(searchParams) {\n let formData = new FormData();\n for (let [key, value] of searchParams.entries()) {\n formData.append(key, value);\n }\n return formData;\n}\nfunction processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds) {\n // Fill in loaderData/errors from our loaders\n let loaderData = {};\n let errors = null;\n let statusCode;\n let foundError = false;\n let loaderHeaders = {};\n // Process loader results into state.loaderData/state.errors\n results.forEach((result, index) => {\n let id = matchesToLoad[index].route.id;\n invariant(!isRedirectResult(result), \"Cannot handle redirect results in processLoaderData\");\n if (isErrorResult(result)) {\n // Look upwards from the matched route for the closest ancestor\n // error boundary, defaulting to the root match\n let boundaryMatch = findNearestBoundary(matches, id);\n let error = result.error;\n // If we have a pending action error, we report it at the highest-route\n // that throws a loader error, and then clear it out to indicate that\n // it was consumed\n if (pendingError) {\n error = Object.values(pendingError)[0];\n pendingError = undefined;\n }\n errors = errors || {};\n // Prefer higher error values if lower errors bubble to the same boundary\n if (errors[boundaryMatch.route.id] == null) {\n errors[boundaryMatch.route.id] = error;\n }\n // Clear our any prior loaderData for the throwing route\n loaderData[id] = undefined;\n // Once we find our first (highest) error, we set the status code and\n // prevent deeper status codes from overriding\n if (!foundError) {\n foundError = true;\n statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n } else {\n if (isDeferredResult(result)) {\n activeDeferreds.set(id, result.deferredData);\n loaderData[id] = result.deferredData.data;\n } else {\n loaderData[id] = result.data;\n }\n // Error status codes always override success status codes, but if all\n // loaders are successful we take the deepest status code.\n if (result.statusCode != null && result.statusCode !== 200 && !foundError) {\n statusCode = result.statusCode;\n }\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n }\n });\n // If we didn't consume the pending action error (i.e., all loaders\n // resolved), then consume it here. Also clear out any loaderData for the\n // throwing route\n if (pendingError) {\n errors = pendingError;\n loaderData[Object.keys(pendingError)[0]] = undefined;\n }\n return {\n loaderData,\n errors,\n statusCode: statusCode || 200,\n loaderHeaders\n };\n}\nfunction processLoaderData(state, matches, matchesToLoad, results, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds) {\n let {\n loaderData,\n errors\n } = processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds);\n // Process results from our revalidating fetchers\n for (let index = 0; index < revalidatingFetchers.length; index++) {\n let {\n key,\n match,\n controller\n } = revalidatingFetchers[index];\n invariant(fetcherResults !== undefined && fetcherResults[index] !== undefined, \"Did not find corresponding fetcher result\");\n let result = fetcherResults[index];\n // Process fetcher non-redirect errors\n if (controller && controller.signal.aborted) {\n // Nothing to do for aborted fetchers\n continue;\n } else if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id);\n if (!(errors && errors[boundaryMatch.route.id])) {\n errors = _extends({}, errors, {\n [boundaryMatch.route.id]: result.error\n });\n }\n state.fetchers.delete(key);\n } else if (isRedirectResult(result)) {\n // Should never get here, redirects should get processed above, but we\n // keep this to type narrow to a success result in the else\n invariant(false, \"Unhandled fetcher revalidation redirect\");\n } else if (isDeferredResult(result)) {\n // Should never get here, deferred data should be awaited for fetchers\n // in resolveDeferredResults\n invariant(false, \"Unhandled fetcher deferred data\");\n } else {\n let doneFetcher = getDoneFetcher(result.data);\n state.fetchers.set(key, doneFetcher);\n }\n }\n return {\n loaderData,\n errors\n };\n}\nfunction mergeLoaderData(loaderData, newLoaderData, matches, errors) {\n let mergedLoaderData = _extends({}, newLoaderData);\n for (let match of matches) {\n let id = match.route.id;\n if (newLoaderData.hasOwnProperty(id)) {\n if (newLoaderData[id] !== undefined) {\n mergedLoaderData[id] = newLoaderData[id];\n }\n } else if (loaderData[id] !== undefined && match.route.loader) {\n // Preserve existing keys not included in newLoaderData and where a loader\n // wasn't removed by HMR\n mergedLoaderData[id] = loaderData[id];\n }\n if (errors && errors.hasOwnProperty(id)) {\n // Don't keep any loader data below the boundary\n break;\n }\n }\n return mergedLoaderData;\n}\n// Find the nearest error boundary, looking upwards from the leaf route (or the\n// route specified by routeId) for the closest ancestor error boundary,\n// defaulting to the root match\nfunction findNearestBoundary(matches, routeId) {\n let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches];\n return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0];\n}\nfunction getShortCircuitMatches(routes) {\n // Prefer a root layout route if present, otherwise shim in a route object\n let route = routes.find(r => r.index || !r.path || r.path === \"/\") || {\n id: \"__shim-error-route__\"\n };\n return {\n matches: [{\n params: {},\n pathname: \"\",\n pathnameBase: \"\",\n route\n }],\n route\n };\n}\nfunction getInternalRouterError(status, _temp4) {\n let {\n pathname,\n routeId,\n method,\n type\n } = _temp4 === void 0 ? {} : _temp4;\n let statusText = \"Unknown Server Error\";\n let errorMessage = \"Unknown @remix-run/router error\";\n if (status === 400) {\n statusText = \"Bad Request\";\n if (method && pathname && routeId) {\n errorMessage = \"You made a \" + method + \" request to \\\"\" + pathname + \"\\\" but \" + (\"did not provide a `loader` for route \\\"\" + routeId + \"\\\", \") + \"so there is no way to handle the request.\";\n } else if (type === \"defer-action\") {\n errorMessage = \"defer() is not supported in actions\";\n } else if (type === \"invalid-body\") {\n errorMessage = \"Unable to encode submission body\";\n }\n } else if (status === 403) {\n statusText = \"Forbidden\";\n errorMessage = \"Route \\\"\" + routeId + \"\\\" does not match URL \\\"\" + pathname + \"\\\"\";\n } else if (status === 404) {\n statusText = \"Not Found\";\n errorMessage = \"No route matches URL \\\"\" + pathname + \"\\\"\";\n } else if (status === 405) {\n statusText = \"Method Not Allowed\";\n if (method && pathname && routeId) {\n errorMessage = \"You made a \" + method.toUpperCase() + \" request to \\\"\" + pathname + \"\\\" but \" + (\"did not provide an `action` for route \\\"\" + routeId + \"\\\", \") + \"so there is no way to handle the request.\";\n } else if (method) {\n errorMessage = \"Invalid request method \\\"\" + method.toUpperCase() + \"\\\"\";\n }\n }\n return new ErrorResponseImpl(status || 500, statusText, new Error(errorMessage), true);\n}\n// Find any returned redirect errors, starting from the lowest match\nfunction findRedirect(results) {\n for (let i = results.length - 1; i >= 0; i--) {\n let result = results[i];\n if (isRedirectResult(result)) {\n return {\n result,\n idx: i\n };\n }\n }\n}\nfunction stripHashFromPath(path) {\n let parsedPath = typeof path === \"string\" ? parsePath(path) : path;\n return createPath(_extends({}, parsedPath, {\n hash: \"\"\n }));\n}\nfunction isHashChangeOnly(a, b) {\n if (a.pathname !== b.pathname || a.search !== b.search) {\n return false;\n }\n if (a.hash === \"\") {\n // /page -> /page#hash\n return b.hash !== \"\";\n } else if (a.hash === b.hash) {\n // /page#hash -> /page#hash\n return true;\n } else if (b.hash !== \"\") {\n // /page#hash -> /page#other\n return true;\n }\n // If the hash is removed the browser will re-perform a request to the server\n // /page#hash -> /page\n return false;\n}\nfunction isDeferredResult(result) {\n return result.type === ResultType.deferred;\n}\nfunction isErrorResult(result) {\n return result.type === ResultType.error;\n}\nfunction isRedirectResult(result) {\n return (result && result.type) === ResultType.redirect;\n}\nfunction isDeferredData(value) {\n let deferred = value;\n return deferred && typeof deferred === \"object\" && typeof deferred.data === \"object\" && typeof deferred.subscribe === \"function\" && typeof deferred.cancel === \"function\" && typeof deferred.resolveData === \"function\";\n}\nfunction isResponse(value) {\n return value != null && typeof value.status === \"number\" && typeof value.statusText === \"string\" && typeof value.headers === \"object\" && typeof value.body !== \"undefined\";\n}\nfunction isRedirectResponse(result) {\n if (!isResponse(result)) {\n return false;\n }\n let status = result.status;\n let location = result.headers.get(\"Location\");\n return status >= 300 && status <= 399 && location != null;\n}\nfunction isQueryRouteResponse(obj) {\n return obj && isResponse(obj.response) && (obj.type === ResultType.data || obj.type === ResultType.error);\n}\nfunction isValidMethod(method) {\n return validRequestMethods.has(method.toLowerCase());\n}\nfunction isMutationMethod(method) {\n return validMutationMethods.has(method.toLowerCase());\n}\nasync function resolveDeferredResults(currentMatches, matchesToLoad, results, signals, isFetcher, currentLoaderData) {\n for (let index = 0; index < results.length; index++) {\n let result = results[index];\n let match = matchesToLoad[index];\n // If we don't have a match, then we can have a deferred result to do\n // anything with. This is for revalidating fetchers where the route was\n // removed during HMR\n if (!match) {\n continue;\n }\n let currentMatch = currentMatches.find(m => m.route.id === match.route.id);\n let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;\n if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {\n // Note: we do not have to touch activeDeferreds here since we race them\n // against the signal in resolveDeferredData and they'll get aborted\n // there if needed\n let signal = signals[index];\n invariant(signal, \"Expected an AbortSignal for revalidating fetcher deferred result\");\n await resolveDeferredData(result, signal, isFetcher).then(result => {\n if (result) {\n results[index] = result || results[index];\n }\n });\n }\n }\n}\nasync function resolveDeferredData(result, signal, unwrap) {\n if (unwrap === void 0) {\n unwrap = false;\n }\n let aborted = await result.deferredData.resolveData(signal);\n if (aborted) {\n return;\n }\n if (unwrap) {\n try {\n return {\n type: ResultType.data,\n data: result.deferredData.unwrappedData\n };\n } catch (e) {\n // Handle any TrackedPromise._error values encountered while unwrapping\n return {\n type: ResultType.error,\n error: e\n };\n }\n }\n return {\n type: ResultType.data,\n data: result.deferredData.data\n };\n}\nfunction hasNakedIndexQuery(search) {\n return new URLSearchParams(search).getAll(\"index\").some(v => v === \"\");\n}\nfunction getTargetMatch(matches, location) {\n let search = typeof location === \"string\" ? parsePath(location).search : location.search;\n if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || \"\")) {\n // Return the leaf index route when index is present\n return matches[matches.length - 1];\n }\n // Otherwise grab the deepest \"path contributing\" match (ignoring index and\n // pathless layout routes)\n let pathMatches = getPathContributingMatches(matches);\n return pathMatches[pathMatches.length - 1];\n}\nfunction getSubmissionFromNavigation(navigation) {\n let {\n formMethod,\n formAction,\n formEncType,\n text,\n formData,\n json\n } = navigation;\n if (!formMethod || !formAction || !formEncType) {\n return;\n }\n if (text != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: undefined,\n json: undefined,\n text\n };\n } else if (formData != null) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData,\n json: undefined,\n text: undefined\n };\n } else if (json !== undefined) {\n return {\n formMethod,\n formAction,\n formEncType,\n formData: undefined,\n json,\n text: undefined\n };\n }\n}\nfunction getLoadingNavigation(location, submission) {\n if (submission) {\n let navigation = {\n state: \"loading\",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text\n };\n return navigation;\n } else {\n let navigation = {\n state: \"loading\",\n location,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined\n };\n return navigation;\n }\n}\nfunction getSubmittingNavigation(location, submission) {\n let navigation = {\n state: \"submitting\",\n location,\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text\n };\n return navigation;\n}\nfunction getLoadingFetcher(submission, data) {\n if (submission) {\n let fetcher = {\n state: \"loading\",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data\n };\n return fetcher;\n } else {\n let fetcher = {\n state: \"loading\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n data\n };\n return fetcher;\n }\n}\nfunction getSubmittingFetcher(submission, existingFetcher) {\n let fetcher = {\n state: \"submitting\",\n formMethod: submission.formMethod,\n formAction: submission.formAction,\n formEncType: submission.formEncType,\n formData: submission.formData,\n json: submission.json,\n text: submission.text,\n data: existingFetcher ? existingFetcher.data : undefined\n };\n return fetcher;\n}\nfunction getDoneFetcher(data) {\n let fetcher = {\n state: \"idle\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n data\n };\n return fetcher;\n}\n//#endregion\n\nexport { AbortedDeferredError, Action, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, UNSAFE_DEFERRED_SYMBOL, DeferredData as UNSAFE_DeferredData, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, getPathContributingMatches as UNSAFE_getPathContributingMatches, invariant as UNSAFE_invariant, warning as UNSAFE_warning, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, createRouter, createStaticHandler, defer, generatePath, getStaticContextFromError, getToPathname, isDeferredData, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, parsePath, redirect, redirectDocument, resolvePath, resolveTo, stripBasename };\n//# sourceMappingURL=router.js.map\n","/**\n * React Router v6.16.0\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport * as React from 'react';\nimport { UNSAFE_invariant, joinPaths, matchPath, UNSAFE_getPathContributingMatches, UNSAFE_warning, resolveTo, parsePath, matchRoutes, Action, UNSAFE_convertRouteMatchToUiMatch, stripBasename, IDLE_BLOCKER, isRouteErrorResponse, createMemoryHistory, AbortedDeferredError, createRouter } from '@remix-run/router';\nexport { AbortedDeferredError, Action as NavigationType, createPath, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, resolvePath } from '@remix-run/router';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n// Create react-specific types from the agnostic types in @remix-run/router to\n// export from react-router\nconst DataRouterContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n DataRouterContext.displayName = \"DataRouter\";\n}\nconst DataRouterStateContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n DataRouterStateContext.displayName = \"DataRouterState\";\n}\nconst AwaitContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n AwaitContext.displayName = \"Await\";\n}\n\n/**\n * A Navigator is a \"location changer\"; it's how you get to different locations.\n *\n * Every history instance conforms to the Navigator interface, but the\n * distinction is useful primarily when it comes to the low-level API\n * where both the location and a navigator must be provided separately in order\n * to avoid \"tearing\" that may occur in a suspense-enabled app if the action\n * and/or location were to be read directly from the history instance.\n */\n\nconst NavigationContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n NavigationContext.displayName = \"Navigation\";\n}\nconst LocationContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n LocationContext.displayName = \"Location\";\n}\nconst RouteContext = /*#__PURE__*/React.createContext({\n outlet: null,\n matches: [],\n isDataRoute: false\n});\nif (process.env.NODE_ENV !== \"production\") {\n RouteContext.displayName = \"Route\";\n}\nconst RouteErrorContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") {\n RouteErrorContext.displayName = \"RouteError\";\n}\n\n/**\n * Returns the full href for the given \"to\" value. This is useful for building\n * custom links that are also accessible and preserve right-click behavior.\n *\n * @see https://reactrouter.com/hooks/use-href\n */\nfunction useHref(to, _temp) {\n let {\n relative\n } = _temp === void 0 ? {} : _temp;\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useHref() may be used only in the context of a component.\") : UNSAFE_invariant(false) : void 0;\n let {\n basename,\n navigator\n } = React.useContext(NavigationContext);\n let {\n hash,\n pathname,\n search\n } = useResolvedPath(to, {\n relative\n });\n let joinedPathname = pathname;\n\n // If we're operating within a basename, prepend it to the pathname prior\n // to creating the href. If this is a root navigation, then just use the raw\n // basename which allows the basename to have full control over the presence\n // of a trailing slash on root links\n if (basename !== \"/\") {\n joinedPathname = pathname === \"/\" ? basename : joinPaths([basename, pathname]);\n }\n return navigator.createHref({\n pathname: joinedPathname,\n search,\n hash\n });\n}\n\n/**\n * Returns true if this component is a descendant of a .\n *\n * @see https://reactrouter.com/hooks/use-in-router-context\n */\nfunction useInRouterContext() {\n return React.useContext(LocationContext) != null;\n}\n\n/**\n * Returns the current location object, which represents the current URL in web\n * browsers.\n *\n * Note: If you're using this it may mean you're doing some of your own\n * \"routing\" in your app, and we'd like to know what your use case is. We may\n * be able to provide something higher-level to better suit your needs.\n *\n * @see https://reactrouter.com/hooks/use-location\n */\nfunction useLocation() {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useLocation() may be used only in the context of a component.\") : UNSAFE_invariant(false) : void 0;\n return React.useContext(LocationContext).location;\n}\n\n/**\n * Returns the current navigation action which describes how the router came to\n * the current location, either by a pop, push, or replace on the history stack.\n *\n * @see https://reactrouter.com/hooks/use-navigation-type\n */\nfunction useNavigationType() {\n return React.useContext(LocationContext).navigationType;\n}\n\n/**\n * Returns a PathMatch object if the given pattern matches the current URL.\n * This is useful for components that need to know \"active\" state, e.g.\n * .\n *\n * @see https://reactrouter.com/hooks/use-match\n */\nfunction useMatch(pattern) {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useMatch() may be used only in the context of a component.\") : UNSAFE_invariant(false) : void 0;\n let {\n pathname\n } = useLocation();\n return React.useMemo(() => matchPath(pattern, pathname), [pathname, pattern]);\n}\n\n/**\n * The interface for the navigate() function returned from useNavigate().\n */\n\nconst navigateEffectWarning = \"You should call navigate() in a React.useEffect(), not when \" + \"your component is first rendered.\";\n\n// Mute warnings for calls to useNavigate in SSR environments\nfunction useIsomorphicLayoutEffect(cb) {\n let isStatic = React.useContext(NavigationContext).static;\n if (!isStatic) {\n // We should be able to get rid of this once react 18.3 is released\n // See: https://github.com/facebook/react/pull/26395\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(cb);\n }\n}\n\n/**\n * Returns an imperative method for changing the location. Used by s, but\n * may also be used by other elements to change the location.\n *\n * @see https://reactrouter.com/hooks/use-navigate\n */\nfunction useNavigate() {\n let {\n isDataRoute\n } = React.useContext(RouteContext);\n // Conditional usage is OK here because the usage of a data router is static\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return isDataRoute ? useNavigateStable() : useNavigateUnstable();\n}\nfunction useNavigateUnstable() {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useNavigate() may be used only in the context of a component.\") : UNSAFE_invariant(false) : void 0;\n let dataRouterContext = React.useContext(DataRouterContext);\n let {\n basename,\n navigator\n } = React.useContext(NavigationContext);\n let {\n matches\n } = React.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let routePathnamesJson = JSON.stringify(UNSAFE_getPathContributingMatches(matches).map(match => match.pathnameBase));\n let activeRef = React.useRef(false);\n useIsomorphicLayoutEffect(() => {\n activeRef.current = true;\n });\n let navigate = React.useCallback(function (to, options) {\n if (options === void 0) {\n options = {};\n }\n process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(activeRef.current, navigateEffectWarning) : void 0;\n\n // Short circuit here since if this happens on first render the navigate\n // is useless because we haven't wired up our history listener yet\n if (!activeRef.current) return;\n if (typeof to === \"number\") {\n navigator.go(to);\n return;\n }\n let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === \"path\");\n\n // If we're operating within a basename, prepend it to the pathname prior\n // to handing off to history (but only if we're not in a data router,\n // otherwise it'll prepend the basename inside of the router).\n // If this is a root navigation, then we navigate to the raw basename\n // which allows the basename to have full control over the presence of a\n // trailing slash on root links\n if (dataRouterContext == null && basename !== \"/\") {\n path.pathname = path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n (!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);\n }, [basename, navigator, routePathnamesJson, locationPathname, dataRouterContext]);\n return navigate;\n}\nconst OutletContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Returns the context (if provided) for the child route at this level of the route\n * hierarchy.\n * @see https://reactrouter.com/hooks/use-outlet-context\n */\nfunction useOutletContext() {\n return React.useContext(OutletContext);\n}\n\n/**\n * Returns the element for the child route at this level of the route\n * hierarchy. Used internally by to render child routes.\n *\n * @see https://reactrouter.com/hooks/use-outlet\n */\nfunction useOutlet(context) {\n let outlet = React.useContext(RouteContext).outlet;\n if (outlet) {\n return /*#__PURE__*/React.createElement(OutletContext.Provider, {\n value: context\n }, outlet);\n }\n return outlet;\n}\n\n/**\n * Returns an object of key/value pairs of the dynamic params from the current\n * URL that were matched by the route path.\n *\n * @see https://reactrouter.com/hooks/use-params\n */\nfunction useParams() {\n let {\n matches\n } = React.useContext(RouteContext);\n let routeMatch = matches[matches.length - 1];\n return routeMatch ? routeMatch.params : {};\n}\n\n/**\n * Resolves the pathname of the given `to` value against the current location.\n *\n * @see https://reactrouter.com/hooks/use-resolved-path\n */\nfunction useResolvedPath(to, _temp2) {\n let {\n relative\n } = _temp2 === void 0 ? {} : _temp2;\n let {\n matches\n } = React.useContext(RouteContext);\n let {\n pathname: locationPathname\n } = useLocation();\n let routePathnamesJson = JSON.stringify(UNSAFE_getPathContributingMatches(matches).map(match => match.pathnameBase));\n return React.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === \"path\"), [to, routePathnamesJson, locationPathname, relative]);\n}\n\n/**\n * Returns the element of the route that matched the current location, prepared\n * with the correct context to render the remainder of the route tree. Route\n * elements in the tree must render an to render their child route's\n * element.\n *\n * @see https://reactrouter.com/hooks/use-routes\n */\nfunction useRoutes(routes, locationArg) {\n return useRoutesImpl(routes, locationArg);\n}\n\n// Internal implementation with accept optional param for RouterProvider usage\nfunction useRoutesImpl(routes, locationArg, dataRouterState) {\n !useInRouterContext() ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, // TODO: This error is probably because they somehow have 2 versions of the\n // router loaded. We can help them understand how to avoid that.\n \"useRoutes() may be used only in the context of a component.\") : UNSAFE_invariant(false) : void 0;\n let {\n navigator\n } = React.useContext(NavigationContext);\n let {\n matches: parentMatches\n } = React.useContext(RouteContext);\n let routeMatch = parentMatches[parentMatches.length - 1];\n let parentParams = routeMatch ? routeMatch.params : {};\n let parentPathname = routeMatch ? routeMatch.pathname : \"/\";\n let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : \"/\";\n let parentRoute = routeMatch && routeMatch.route;\n if (process.env.NODE_ENV !== \"production\") {\n // You won't get a warning about 2 different under a \n // without a trailing *, but this is a best-effort warning anyway since we\n // cannot even give the warning unless they land at the parent route.\n //\n // Example:\n //\n // \n // {/* This route path MUST end with /* because otherwise\n // it will never match /blog/post/123 */}\n // } />\n // } />\n // \n //\n // function Blog() {\n // return (\n // \n // } />\n // \n // );\n // }\n let parentPath = parentRoute && parentRoute.path || \"\";\n warningOnce(parentPathname, !parentRoute || parentPath.endsWith(\"*\"), \"You rendered descendant (or called `useRoutes()`) at \" + (\"\\\"\" + parentPathname + \"\\\" (under ) but the \") + \"parent route path has no trailing \\\"*\\\". This means if you navigate \" + \"deeper, the parent won't match anymore and therefore the child \" + \"routes will never render.\\n\\n\" + (\"Please change the parent to .\"));\n }\n let locationFromContext = useLocation();\n let location;\n if (locationArg) {\n var _parsedLocationArg$pa;\n let parsedLocationArg = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n !(parentPathnameBase === \"/\" || ((_parsedLocationArg$pa = parsedLocationArg.pathname) == null ? void 0 : _parsedLocationArg$pa.startsWith(parentPathnameBase))) ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"When overriding the location using `` or `useRoutes(routes, location)`, \" + \"the location pathname must begin with the portion of the URL pathname that was \" + (\"matched by all parent routes. The current pathname base is \\\"\" + parentPathnameBase + \"\\\" \") + (\"but pathname \\\"\" + parsedLocationArg.pathname + \"\\\" was given in the `location` prop.\")) : UNSAFE_invariant(false) : void 0;\n location = parsedLocationArg;\n } else {\n location = locationFromContext;\n }\n let pathname = location.pathname || \"/\";\n let remainingPathname = parentPathnameBase === \"/\" ? pathname : pathname.slice(parentPathnameBase.length) || \"/\";\n let matches = matchRoutes(routes, {\n pathname: remainingPathname\n });\n if (process.env.NODE_ENV !== \"production\") {\n process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(parentRoute || matches != null, \"No routes matched location \\\"\" + location.pathname + location.search + location.hash + \"\\\" \") : void 0;\n process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(matches == null || matches[matches.length - 1].route.element !== undefined || matches[matches.length - 1].route.Component !== undefined, \"Matched leaf route at location \\\"\" + location.pathname + location.search + location.hash + \"\\\" \" + \"does not have an element or Component. This means it will render an with a \" + \"null value by default resulting in an \\\"empty\\\" page.\") : void 0;\n }\n let renderedMatches = _renderMatches(matches && matches.map(match => Object.assign({}, match, {\n params: Object.assign({}, parentParams, match.params),\n pathname: joinPaths([parentPathnameBase,\n // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation ? navigator.encodeLocation(match.pathname).pathname : match.pathname]),\n pathnameBase: match.pathnameBase === \"/\" ? parentPathnameBase : joinPaths([parentPathnameBase,\n // Re-encode pathnames that were decoded inside matchRoutes\n navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase).pathname : match.pathnameBase])\n })), parentMatches, dataRouterState);\n\n // When a user passes in a `locationArg`, the associated routes need to\n // be wrapped in a new `LocationContext.Provider` in order for `useLocation`\n // to use the scoped location instead of the global location.\n if (locationArg && renderedMatches) {\n return /*#__PURE__*/React.createElement(LocationContext.Provider, {\n value: {\n location: _extends({\n pathname: \"/\",\n search: \"\",\n hash: \"\",\n state: null,\n key: \"default\"\n }, location),\n navigationType: Action.Pop\n }\n }, renderedMatches);\n }\n return renderedMatches;\n}\nfunction DefaultErrorComponent() {\n let error = useRouteError();\n let message = isRouteErrorResponse(error) ? error.status + \" \" + error.statusText : error instanceof Error ? error.message : JSON.stringify(error);\n let stack = error instanceof Error ? error.stack : null;\n let lightgrey = \"rgba(200,200,200, 0.5)\";\n let preStyles = {\n padding: \"0.5rem\",\n backgroundColor: lightgrey\n };\n let codeStyles = {\n padding: \"2px 4px\",\n backgroundColor: lightgrey\n };\n let devInfo = null;\n if (process.env.NODE_ENV !== \"production\") {\n console.error(\"Error handled by React Router default ErrorBoundary:\", error);\n devInfo = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"p\", null, \"\\uD83D\\uDCBF Hey developer \\uD83D\\uDC4B\"), /*#__PURE__*/React.createElement(\"p\", null, \"You can provide a way better UX than this when your app throws errors by providing your own \", /*#__PURE__*/React.createElement(\"code\", {\n style: codeStyles\n }, \"ErrorBoundary\"), \" or\", \" \", /*#__PURE__*/React.createElement(\"code\", {\n style: codeStyles\n }, \"errorElement\"), \" prop on your route.\"));\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"h2\", null, \"Unexpected Application Error!\"), /*#__PURE__*/React.createElement(\"h3\", {\n style: {\n fontStyle: \"italic\"\n }\n }, message), stack ? /*#__PURE__*/React.createElement(\"pre\", {\n style: preStyles\n }, stack) : null, devInfo);\n}\nconst defaultErrorElement = /*#__PURE__*/React.createElement(DefaultErrorComponent, null);\nclass RenderErrorBoundary extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n location: props.location,\n revalidation: props.revalidation,\n error: props.error\n };\n }\n static getDerivedStateFromError(error) {\n return {\n error: error\n };\n }\n static getDerivedStateFromProps(props, state) {\n // When we get into an error state, the user will likely click \"back\" to the\n // previous page that didn't have an error. Because this wraps the entire\n // application, that will have no effect--the error page continues to display.\n // This gives us a mechanism to recover from the error when the location changes.\n //\n // Whether we're in an error state or not, we update the location in state\n // so that when we are in an error state, it gets reset when a new location\n // comes in and the user recovers from the error.\n if (state.location !== props.location || state.revalidation !== \"idle\" && props.revalidation === \"idle\") {\n return {\n error: props.error,\n location: props.location,\n revalidation: props.revalidation\n };\n }\n\n // If we're not changing locations, preserve the location but still surface\n // any new errors that may come through. We retain the existing error, we do\n // this because the error provided from the app state may be cleared without\n // the location changing.\n return {\n error: props.error || state.error,\n location: state.location,\n revalidation: props.revalidation || state.revalidation\n };\n }\n componentDidCatch(error, errorInfo) {\n console.error(\"React Router caught the following error during render\", error, errorInfo);\n }\n render() {\n return this.state.error ? /*#__PURE__*/React.createElement(RouteContext.Provider, {\n value: this.props.routeContext\n }, /*#__PURE__*/React.createElement(RouteErrorContext.Provider, {\n value: this.state.error,\n children: this.props.component\n })) : this.props.children;\n }\n}\nfunction RenderedRoute(_ref) {\n let {\n routeContext,\n match,\n children\n } = _ref;\n let dataRouterContext = React.useContext(DataRouterContext);\n\n // Track how deep we got in our render pass to emulate SSR componentDidCatch\n // in a DataStaticRouter\n if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) {\n dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;\n }\n return /*#__PURE__*/React.createElement(RouteContext.Provider, {\n value: routeContext\n }, children);\n}\nfunction _renderMatches(matches, parentMatches, dataRouterState) {\n var _dataRouterState2;\n if (parentMatches === void 0) {\n parentMatches = [];\n }\n if (dataRouterState === void 0) {\n dataRouterState = null;\n }\n if (matches == null) {\n var _dataRouterState;\n if ((_dataRouterState = dataRouterState) != null && _dataRouterState.errors) {\n // Don't bail if we have data router errors so we can render them in the\n // boundary. Use the pre-matched (or shimmed) matches\n matches = dataRouterState.matches;\n } else {\n return null;\n }\n }\n let renderedMatches = matches;\n\n // If we have data errors, trim matches to the highest error boundary\n let errors = (_dataRouterState2 = dataRouterState) == null ? void 0 : _dataRouterState2.errors;\n if (errors != null) {\n let errorIndex = renderedMatches.findIndex(m => m.route.id && (errors == null ? void 0 : errors[m.route.id]));\n !(errorIndex >= 0) ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"Could not find a matching route for errors on route IDs: \" + Object.keys(errors).join(\",\")) : UNSAFE_invariant(false) : void 0;\n renderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1));\n }\n return renderedMatches.reduceRight((outlet, match, index) => {\n let error = match.route.id ? errors == null ? void 0 : errors[match.route.id] : null;\n // Only data routers handle errors\n let errorElement = null;\n if (dataRouterState) {\n errorElement = match.route.errorElement || defaultErrorElement;\n }\n let matches = parentMatches.concat(renderedMatches.slice(0, index + 1));\n let getChildren = () => {\n let children;\n if (error) {\n children = errorElement;\n } else if (match.route.Component) {\n // Note: This is a de-optimized path since React won't re-use the\n // ReactElement since it's identity changes with each new\n // React.createElement call. We keep this so folks can use\n // `` in `` but generally `Component`\n // usage is only advised in `RouterProvider` when we can convert it to\n // `element` ahead of time.\n children = /*#__PURE__*/React.createElement(match.route.Component, null);\n } else if (match.route.element) {\n children = match.route.element;\n } else {\n children = outlet;\n }\n return /*#__PURE__*/React.createElement(RenderedRoute, {\n match: match,\n routeContext: {\n outlet,\n matches,\n isDataRoute: dataRouterState != null\n },\n children: children\n });\n };\n // Only wrap in an error boundary within data router usages when we have an\n // ErrorBoundary/errorElement on this route. Otherwise let it bubble up to\n // an ancestor ErrorBoundary/errorElement\n return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /*#__PURE__*/React.createElement(RenderErrorBoundary, {\n location: dataRouterState.location,\n revalidation: dataRouterState.revalidation,\n component: errorElement,\n error: error,\n children: getChildren(),\n routeContext: {\n outlet: null,\n matches,\n isDataRoute: true\n }\n }) : getChildren();\n }, null);\n}\nvar DataRouterHook = /*#__PURE__*/function (DataRouterHook) {\n DataRouterHook[\"UseBlocker\"] = \"useBlocker\";\n DataRouterHook[\"UseRevalidator\"] = \"useRevalidator\";\n DataRouterHook[\"UseNavigateStable\"] = \"useNavigate\";\n return DataRouterHook;\n}(DataRouterHook || {});\nvar DataRouterStateHook = /*#__PURE__*/function (DataRouterStateHook) {\n DataRouterStateHook[\"UseBlocker\"] = \"useBlocker\";\n DataRouterStateHook[\"UseLoaderData\"] = \"useLoaderData\";\n DataRouterStateHook[\"UseActionData\"] = \"useActionData\";\n DataRouterStateHook[\"UseRouteError\"] = \"useRouteError\";\n DataRouterStateHook[\"UseNavigation\"] = \"useNavigation\";\n DataRouterStateHook[\"UseRouteLoaderData\"] = \"useRouteLoaderData\";\n DataRouterStateHook[\"UseMatches\"] = \"useMatches\";\n DataRouterStateHook[\"UseRevalidator\"] = \"useRevalidator\";\n DataRouterStateHook[\"UseNavigateStable\"] = \"useNavigate\";\n DataRouterStateHook[\"UseRouteId\"] = \"useRouteId\";\n return DataRouterStateHook;\n}(DataRouterStateHook || {});\nfunction getDataRouterConsoleError(hookName) {\n return hookName + \" must be used within a data router. See https://reactrouter.com/routers/picking-a-router.\";\n}\nfunction useDataRouterContext(hookName) {\n let ctx = React.useContext(DataRouterContext);\n !ctx ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, getDataRouterConsoleError(hookName)) : UNSAFE_invariant(false) : void 0;\n return ctx;\n}\nfunction useDataRouterState(hookName) {\n let state = React.useContext(DataRouterStateContext);\n !state ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, getDataRouterConsoleError(hookName)) : UNSAFE_invariant(false) : void 0;\n return state;\n}\nfunction useRouteContext(hookName) {\n let route = React.useContext(RouteContext);\n !route ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, getDataRouterConsoleError(hookName)) : UNSAFE_invariant(false) : void 0;\n return route;\n}\n\n// Internal version with hookName-aware debugging\nfunction useCurrentRouteId(hookName) {\n let route = useRouteContext(hookName);\n let thisRoute = route.matches[route.matches.length - 1];\n !thisRoute.route.id ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, hookName + \" can only be used on routes that contain a unique \\\"id\\\"\") : UNSAFE_invariant(false) : void 0;\n return thisRoute.route.id;\n}\n\n/**\n * Returns the ID for the nearest contextual route\n */\nfunction useRouteId() {\n return useCurrentRouteId(DataRouterStateHook.UseRouteId);\n}\n\n/**\n * Returns the current navigation, defaulting to an \"idle\" navigation when\n * no navigation is in progress\n */\nfunction useNavigation() {\n let state = useDataRouterState(DataRouterStateHook.UseNavigation);\n return state.navigation;\n}\n\n/**\n * Returns a revalidate function for manually triggering revalidation, as well\n * as the current state of any manual revalidations\n */\nfunction useRevalidator() {\n let dataRouterContext = useDataRouterContext(DataRouterHook.UseRevalidator);\n let state = useDataRouterState(DataRouterStateHook.UseRevalidator);\n return React.useMemo(() => ({\n revalidate: dataRouterContext.router.revalidate,\n state: state.revalidation\n }), [dataRouterContext.router.revalidate, state.revalidation]);\n}\n\n/**\n * Returns the active route matches, useful for accessing loaderData for\n * parent/child routes or the route \"handle\" property\n */\nfunction useMatches() {\n let {\n matches,\n loaderData\n } = useDataRouterState(DataRouterStateHook.UseMatches);\n return React.useMemo(() => matches.map(m => UNSAFE_convertRouteMatchToUiMatch(m, loaderData)), [matches, loaderData]);\n}\n\n/**\n * Returns the loader data for the nearest ancestor Route loader\n */\nfunction useLoaderData() {\n let state = useDataRouterState(DataRouterStateHook.UseLoaderData);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseLoaderData);\n if (state.errors && state.errors[routeId] != null) {\n console.error(\"You cannot `useLoaderData` in an errorElement (routeId: \" + routeId + \")\");\n return undefined;\n }\n return state.loaderData[routeId];\n}\n\n/**\n * Returns the loaderData for the given routeId\n */\nfunction useRouteLoaderData(routeId) {\n let state = useDataRouterState(DataRouterStateHook.UseRouteLoaderData);\n return state.loaderData[routeId];\n}\n\n/**\n * Returns the action data for the nearest ancestor Route action\n */\nfunction useActionData() {\n let state = useDataRouterState(DataRouterStateHook.UseActionData);\n let route = React.useContext(RouteContext);\n !route ? process.env.NODE_ENV !== \"production\" ? UNSAFE_invariant(false, \"useActionData must be used inside a RouteContext\") : UNSAFE_invariant(false) : void 0;\n return Object.values((state == null ? void 0 : state.actionData) || {})[0];\n}\n\n/**\n * Returns the nearest ancestor Route error, which could be a loader/action\n * error or a render error. This is intended to be called from your\n * ErrorBoundary/errorElement to display a proper error message.\n */\nfunction useRouteError() {\n var _state$errors;\n let error = React.useContext(RouteErrorContext);\n let state = useDataRouterState(DataRouterStateHook.UseRouteError);\n let routeId = useCurrentRouteId(DataRouterStateHook.UseRouteError);\n\n // If this was a render error, we put it in a RouteError context inside\n // of RenderErrorBoundary\n if (error) {\n return error;\n }\n\n // Otherwise look for errors from our data router state\n return (_state$errors = state.errors) == null ? void 0 : _state$errors[routeId];\n}\n\n/**\n * Returns the happy-path data from the nearest ancestor value\n */\nfunction useAsyncValue() {\n let value = React.useContext(AwaitContext);\n return value == null ? void 0 : value._data;\n}\n\n/**\n * Returns the error from the nearest ancestor value\n */\nfunction useAsyncError() {\n let value = React.useContext(AwaitContext);\n return value == null ? void 0 : value._error;\n}\nlet blockerId = 0;\n\n/**\n * Allow the application to block navigations within the SPA and present the\n * user a confirmation dialog to confirm the navigation. Mostly used to avoid\n * using half-filled form data. This does not handle hard-reloads or\n * cross-origin navigations.\n */\nfunction useBlocker(shouldBlock) {\n let {\n router,\n basename\n } = useDataRouterContext(DataRouterHook.UseBlocker);\n let state = useDataRouterState(DataRouterStateHook.UseBlocker);\n let [blockerKey, setBlockerKey] = React.useState(\"\");\n let blockerFunction = React.useCallback(arg => {\n if (typeof shouldBlock !== \"function\") {\n return !!shouldBlock;\n }\n if (basename === \"/\") {\n return shouldBlock(arg);\n }\n\n // If they provided us a function and we've got an active basename, strip\n // it from the locations we expose to the user to match the behavior of\n // useLocation\n let {\n currentLocation,\n nextLocation,\n historyAction\n } = arg;\n return shouldBlock({\n currentLocation: _extends({}, currentLocation, {\n pathname: stripBasename(currentLocation.pathname, basename) || currentLocation.pathname\n }),\n nextLocation: _extends({}, nextLocation, {\n pathname: stripBasename(nextLocation.pathname, basename) || nextLocation.pathname\n }),\n historyAction\n });\n }, [basename, shouldBlock]);\n\n // This effect is in charge of blocker key assignment and deletion (which is\n // tightly coupled to the key)\n React.useEffect(() => {\n let key = String(++blockerId);\n setBlockerKey(key);\n return () => router.deleteBlocker(key);\n }, [router]);\n\n // This effect handles assigning the blockerFunction. This is to handle\n // unstable blocker function identities, and happens only after the prior\n // effect so we don't get an orphaned blockerFunction in the router with a\n // key of \"\". Until then we just have the IDLE_BLOCKER.\n React.useEffect(() => {\n if (blockerKey !== \"\") {\n router.getBlocker(blockerKey, blockerFunction);\n }\n }, [router, blockerKey, blockerFunction]);\n\n // Prefer the blocker from `state` not `router.state` since DataRouterContext\n // is memoized so this ensures we update on blocker state updates\n return blockerKey && state.blockers.has(blockerKey) ? state.blockers.get(blockerKey) : IDLE_BLOCKER;\n}\n\n/**\n * Stable version of useNavigate that is used when we are in the context of\n * a RouterProvider.\n */\nfunction useNavigateStable() {\n let {\n router\n } = useDataRouterContext(DataRouterHook.UseNavigateStable);\n let id = useCurrentRouteId(DataRouterStateHook.UseNavigateStable);\n let activeRef = React.useRef(false);\n useIsomorphicLayoutEffect(() => {\n activeRef.current = true;\n });\n let navigate = React.useCallback(function (to, options) {\n if (options === void 0) {\n options = {};\n }\n process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(activeRef.current, navigateEffectWarning) : void 0;\n\n // Short circuit here since if this happens on first render the navigate\n // is useless because we haven't wired up our router subscriber yet\n if (!activeRef.current) return;\n if (typeof to === \"number\") {\n router.navigate(to);\n } else {\n router.navigate(to, _extends({\n fromRouteId: id\n }, options));\n }\n }, [router, id]);\n return navigate;\n}\nconst alreadyWarned = {};\nfunction warningOnce(key, cond, message) {\n if (!cond && !alreadyWarned[key]) {\n alreadyWarned[key] = true;\n process.env.NODE_ENV !== \"production\" ? UNSAFE_warning(false, message) : void 0;\n }\n}\n\n/**\n Webpack + React 17 fails to compile on any of the following because webpack\n complains that `startTransition` doesn't exist in `React`:\n * import { startTransition } from \"react\"\n * import * as React from from \"react\";\n \"startTransition\" in React ? React.startTransition(() => setState()) : setState()\n * import * as React from from \"react\";\n \"startTransition\" in React ? React[\"startTransition\"](() => setState()) : setState()\n\n Moving it to a constant such as the following solves the Webpack/React 17 issue:\n * import * as React from from \"react\";\n const START_TRANSITION = \"startTransition\";\n START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()\n\n However, that introduces webpack/terser minification issues in production builds\n in React 18 where minification/obfuscation ends up removing the call of\n React.startTransition entirely from the first half of the ternary. Grabbing\n this exported reference once up front resolves that issue.\n\n See https://github.com/remix-run/react-router/issues/10579\n*/\nconst START_TRANSITION = \"startTransition\";\nconst startTransitionImpl = React[START_TRANSITION];\n\n/**\n * Given a Remix Router instance, render the appropriate UI\n */\nfunction RouterProvider(_ref) {\n let {\n fallbackElement,\n router,\n future\n } = _ref;\n // Need to use a layout effect here so we are subscribed early enough to\n // pick up on any render-driven redirects/navigations (useEffect/)\n let [state, setStateImpl] = React.useState(router.state);\n let {\n v7_startTransition\n } = future || {};\n let setState = React.useCallback(newState => {\n v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);\n }, [setStateImpl, v7_startTransition]);\n React.useLayoutEffect(() => router.subscribe(setState), [router, setState]);\n let navigator = React.useMemo(() => {\n return {\n createHref: router.createHref,\n encodeLocation: router.encodeLocation,\n go: n => router.navigate(n),\n push: (to, state, opts) => router.navigate(to, {\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n }),\n replace: (to, state, opts) => router.navigate(to, {\n replace: true,\n state,\n preventScrollReset: opts == null ? void 0 : opts.preventScrollReset\n })\n };\n }, [router]);\n let basename = router.basename || \"/\";\n let dataRouterContext = React.useMemo(() => ({\n router,\n navigator,\n static: false,\n basename\n }), [router, navigator, basename]);\n\n // The fragment and {null} here are important! We need them to keep React 18's\n // useId happy when we are server-rendering since we may have a \",e=e.removeChild(e.firstChild)):typeof a.is==\"string\"?e=c.createElement(n,{is:a.is}):(e=c.createElement(n),n===\"select\"&&(c=e,a.multiple?c.multiple=!0:a.size&&(c.size=a.size))):e=c.createElementNS(e,n),e[xo]=t,e[Rh]=a,TF(e,t,!1,!1),t.stateNode=e;e:{switch(c=pO(n,a),n){case\"dialog\":Gt(\"cancel\",e),Gt(\"close\",e),o=a;break;case\"iframe\":case\"object\":case\"embed\":Gt(\"load\",e),o=a;break;case\"video\":case\"audio\":for(o=0;oZf&&(t.flags|=128,a=!0,eh(l,!1),t.lanes=4194304)}else{if(!a)if(e=Vb(c),e!==null){if(t.flags|=128,a=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),eh(l,!0),l.tail===null&&l.tailMode===\"hidden\"&&!c.alternate&&!tr)return Fn(t),null}else 2*xr()-l.renderingStartTime>Zf&&n!==1073741824&&(t.flags|=128,a=!0,eh(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(n=l.last,n!==null?n.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=xr(),t.sibling=null,n=ur.current,It(ur,a?n&1|2:n&1),t):(Fn(t),null);case 22:case 23:return MT(),a=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==a&&(t.flags|=8192),a&&t.mode&1?Fi&1073741824&&(Fn(t),t.subtreeFlags&6&&(t.flags|=8192)):Fn(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function aX(e,t){switch(fT(t),t.tag){case 1:return bi(t.type)&&Ub(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xf(),Qt(gi),Qt(qn),ST(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return bT(t),null;case 13:if(Qt(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));Qf()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qt(ur),null;case 4:return Xf(),null;case 10:return hT(t.type._context),null;case 22:case 23:return MT(),null;case 24:return null;default:return null}}var mb=!1,zn=!1,oX=typeof WeakSet==\"function\"?WeakSet:Set,Ee=null;function zf(e,t){var n=e.ref;if(n!==null)if(typeof n==\"function\")try{n(null)}catch(a){hr(e,t,a)}else n.current=null}function qO(e,t,n){try{n()}catch(a){hr(e,t,a)}}var F2=!1;function uX(e,t){if(xO=Db,e=NU(),sT(e)){if(\"selectionStart\"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var o=a.anchorOffset,l=a.focusNode;a=a.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var c=0,p=-1,v=-1,m=0,S=0,w=e,C=null;t:for(;;){for(var T;w!==n||o!==0&&w.nodeType!==3||(p=c+o),w!==l||a!==0&&w.nodeType!==3||(v=c+a),w.nodeType===3&&(c+=w.nodeValue.length),(T=w.firstChild)!==null;)C=w,w=T;for(;;){if(w===e)break t;if(C===n&&++m===o&&(p=c),C===l&&++S===a&&(v=c),(T=w.nextSibling)!==null)break;w=C,C=w.parentNode}w=T}n=p===-1||v===-1?null:{start:p,end:v}}else n=null}n=n||{start:0,end:0}}else n=null;for(EO={focusedElem:e,selectionRange:n},Db=!1,Ee=t;Ee!==null;)if(t=Ee,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ee=e;else for(;Ee!==null;){t=Ee;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var N=k.memoizedProps,I=k.memoizedState,_=t.stateNode,R=_.getSnapshotBeforeUpdate(t.elementType===t.type?N:La(t.type,N),I);_.__reactInternalSnapshotBeforeUpdate=R}break;case 3:var A=t.stateNode.containerInfo;A.nodeType===1?A.textContent=\"\":A.nodeType===9&&A.documentElement&&A.removeChild(A.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(163))}}catch(F){hr(t,t.return,F)}if(e=t.sibling,e!==null){e.return=t.return,Ee=e;break}Ee=t.return}return k=F2,F2=!1,k}function ph(e,t,n){var a=t.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var o=a=a.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&qO(t,n,l)}o=o.next}while(o!==a)}}function o0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var a=n.create;n.destroy=a()}n=n.next}while(n!==t)}}function IO(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==\"function\"?t(e):t.current=e}}function MF(e){var t=e.alternate;t!==null&&(e.alternate=null,MF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[xo],delete t[Rh],delete t[OO],delete t[BK],delete t[VK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function PF(e){return e.tag===5||e.tag===3||e.tag===4}function z2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||PF(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function HO(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Lb));else if(a!==4&&(e=e.child,e!==null))for(HO(e,t,n),e=e.sibling;e!==null;)HO(e,t,n),e=e.sibling}function BO(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(BO(e,t,n),e=e.sibling;e!==null;)BO(e,t,n),e=e.sibling}var _n=null,Ua=!1;function ul(e,t,n){for(n=n.child;n!==null;)DF(e,t,n),n=n.sibling}function DF(e,t,n){if(Eo&&typeof Eo.onCommitFiberUnmount==\"function\")try{Eo.onCommitFiberUnmount(Jb,n)}catch{}switch(n.tag){case 5:zn||zf(n,t);case 6:var a=_n,o=Ua;_n=null,ul(e,t,n),_n=a,Ua=o,_n!==null&&(Ua?(e=_n,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):_n.removeChild(n.stateNode));break;case 18:_n!==null&&(Ua?(e=_n,n=n.stateNode,e.nodeType===8?WR(e.parentNode,n):e.nodeType===1&&WR(e,n),_h(e)):WR(_n,n.stateNode));break;case 4:a=_n,o=Ua,_n=n.stateNode.containerInfo,Ua=!0,ul(e,t,n),_n=a,Ua=o;break;case 0:case 11:case 14:case 15:if(!zn&&(a=n.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){o=a=a.next;do{var l=o,c=l.destroy;l=l.tag,c!==void 0&&(l&2||l&4)&&qO(n,t,c),o=o.next}while(o!==a)}ul(e,t,n);break;case 1:if(!zn&&(zf(n,t),a=n.stateNode,typeof a.componentWillUnmount==\"function\"))try{a.props=n.memoizedProps,a.state=n.memoizedState,a.componentWillUnmount()}catch(p){hr(n,t,p)}ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:n.mode&1?(zn=(a=zn)||n.memoizedState!==null,ul(e,t,n),zn=a):ul(e,t,n);break;default:ul(e,t,n)}}function q2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new oX),t.forEach(function(a){var o=mX.bind(null,e,a);n.has(a)||(n.add(a),a.then(o,o))})}}function ja(e,t){var n=t.deletions;if(n!==null)for(var a=0;ao&&(o=c),a&=~l}if(a=o,a=xr()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*sX(a/1960))-a,10e?16:e,pl===null)var a=!1;else{if(e=pl,pl=null,Qb=0,St&6)throw Error(ie(331));var o=St;for(St|=4,Ee=e.current;Ee!==null;){var l=Ee,c=l.child;if(Ee.flags&16){var p=l.deletions;if(p!==null){for(var v=0;vxr()-kT?Vs(e,0):TT|=n),Si(e,t)}function IF(e,t){t===0&&(e.mode&1?(t=nb,nb<<=1,!(nb&130023424)&&(nb=4194304)):t=1);var n=ti();e=vu(e,t),e!==null&&(Dh(e,t,n),Si(e,n))}function hX(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),IF(e,n)}function mX(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(ie(314))}a!==null&&a.delete(t),IF(e,n)}var HF;HF=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||gi.current)yi=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return yi=!1,nX(e,t,n);yi=!!(e.flags&131072)}else yi=!1,tr&&t.flags&1048576&&$U(t,qb,t.index);switch(t.lanes=0,t.tag){case 2:var a=t.type;Eb(e,t),e=t.pendingProps;var o=Gf(t,qn.current);$f(t,n),o=wT(null,t,a,e,o,n);var l=xT();return t.flags|=1,typeof o==\"object\"&&o!==null&&typeof o.render==\"function\"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,bi(a)?(l=!0,Fb(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,yT(t),o.updater=i0,t.stateNode=o,o._reactInternals=t,DO(t,a,e,n),t=LO(null,t,a,!0,l,n)):(t.tag=0,tr&&l&&cT(t),ei(null,t,o,n),t=t.child),t;case 16:a=t.elementType;e:{switch(Eb(e,t),e=t.pendingProps,o=a._init,a=o(a._payload),t.type=a,o=t.tag=gX(a),e=La(a,e),o){case 0:t=jO(null,t,a,e,n);break e;case 1:t=j2(null,t,a,e,n);break e;case 11:t=D2(null,t,a,e,n);break e;case 14:t=N2(null,t,a,La(a.type,e),n);break e}throw Error(ie(306,a,\"\"))}return t;case 0:return a=t.type,o=t.pendingProps,o=t.elementType===a?o:La(a,o),jO(e,t,a,o,n);case 1:return a=t.type,o=t.pendingProps,o=t.elementType===a?o:La(a,o),j2(e,t,a,o,n);case 3:e:{if(CF(t),e===null)throw Error(ie(387));a=t.pendingProps,l=t.memoizedState,o=l.element,QU(e,t),Bb(t,a,null,n);var c=t.memoizedState;if(a=c.element,l.isDehydrated)if(l={element:a,isDehydrated:!1,cache:c.cache,pendingSuspenseBoundaries:c.pendingSuspenseBoundaries,transitions:c.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=Jf(Error(ie(423)),t),t=L2(e,t,a,n,o);break e}else if(a!==o){o=Jf(Error(ie(424)),t),t=L2(e,t,a,n,o);break e}else for(zi=yl(t.stateNode.containerInfo.firstChild),qi=t,tr=!0,Fa=null,n=ZU(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Qf(),a===o){t=hu(e,t,n);break e}ei(e,t,a,n)}t=t.child}return t;case 5:return eF(t),e===null&&AO(t),a=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,c=o.children,CO(a,o)?c=null:l!==null&&CO(a,l)&&(t.flags|=32),EF(e,t),ei(e,t,c,n),t.child;case 6:return e===null&&AO(t),null;case 13:return RF(e,t,n);case 4:return gT(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Kf(t,null,a,n):ei(e,t,a,n),t.child;case 11:return a=t.type,o=t.pendingProps,o=t.elementType===a?o:La(a,o),D2(e,t,a,o,n);case 7:return ei(e,t,t.pendingProps,n),t.child;case 8:return ei(e,t,t.pendingProps.children,n),t.child;case 12:return ei(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(a=t.type._context,o=t.pendingProps,l=t.memoizedProps,c=o.value,It(Ib,a._currentValue),a._currentValue=c,l!==null)if(Ia(l.value,c)){if(l.children===o.children&&!gi.current){t=hu(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var p=l.dependencies;if(p!==null){c=l.child;for(var v=p.firstContext;v!==null;){if(v.context===a){if(l.tag===1){v=fu(-1,n&-n),v.tag=2;var m=l.updateQueue;if(m!==null){m=m.shared;var S=m.pending;S===null?v.next=v:(v.next=S.next,S.next=v),m.pending=v}}l.lanes|=n,v=l.alternate,v!==null&&(v.lanes|=n),MO(l.return,n,t),p.lanes|=n;break}v=v.next}}else if(l.tag===10)c=l.type===t.type?null:l.child;else if(l.tag===18){if(c=l.return,c===null)throw Error(ie(341));c.lanes|=n,p=c.alternate,p!==null&&(p.lanes|=n),MO(c,n,t),c=l.sibling}else c=l.child;if(c!==null)c.return=l;else for(c=l;c!==null;){if(c===t){c=null;break}if(l=c.sibling,l!==null){l.return=c.return,c=l;break}c=c.return}l=c}ei(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,a=t.pendingProps.children,$f(t,n),o=sa(o),a=a(o),t.flags|=1,ei(e,t,a,n),t.child;case 14:return a=t.type,o=La(a,t.pendingProps),o=La(a.type,o),N2(e,t,a,o,n);case 15:return wF(e,t,t.type,t.pendingProps,n);case 17:return a=t.type,o=t.pendingProps,o=t.elementType===a?o:La(a,o),Eb(e,t),t.tag=1,bi(a)?(e=!0,Fb(t)):e=!1,$f(t,n),XU(t,a,o),DO(t,a,o,n),LO(null,t,a,!0,e,n);case 19:return OF(e,t,n);case 22:return xF(e,t,n)}throw Error(ie(156,t.tag))};function BF(e,t){return hU(e,t)}function yX(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ua(e,t,n,a){return new yX(e,t,n,a)}function DT(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gX(e){if(typeof e==\"function\")return DT(e)?1:0;if(e!=null){if(e=e.$$typeof,e===JO)return 11;if(e===ZO)return 14}return 2}function _l(e,t){var n=e.alternate;return n===null?(n=ua(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ob(e,t,n,a,o,l){var c=2;if(a=e,typeof e==\"function\")DT(e)&&(c=1);else if(typeof e==\"string\")c=5;else e:switch(e){case Af:return $s(n.children,o,l,t);case XO:c=8,o|=8;break;case nO:return e=ua(12,n,t,o|2),e.elementType=nO,e.lanes=l,e;case iO:return e=ua(13,n,t,o),e.elementType=iO,e.lanes=l,e;case aO:return e=ua(19,n,t,o),e.elementType=aO,e.lanes=l,e;case J2:return l0(n,o,l,t);default:if(typeof e==\"object\"&&e!==null)switch(e.$$typeof){case K2:c=10;break e;case X2:c=9;break e;case JO:c=11;break e;case ZO:c=14;break e;case ll:c=16,a=null;break e}throw Error(ie(130,e==null?e:typeof e,\"\"))}return t=ua(c,n,t,o),t.elementType=e,t.type=a,t.lanes=l,t}function $s(e,t,n,a){return e=ua(7,e,a,t),e.lanes=n,e}function l0(e,t,n,a){return e=ua(22,e,a,t),e.elementType=J2,e.lanes=n,e.stateNode={isHidden:!1},e}function eO(e,t,n){return e=ua(6,e,null,t),e.lanes=n,e}function tO(e,t,n){return t=ua(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bX(e,t,n,a,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=FR(0),this.expirationTimes=FR(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=FR(0),this.identifierPrefix=a,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function NT(e,t,n,a,o,l,c,p,v){return e=new bX(e,t,n,p,v),t===1?(t=1,l===!0&&(t|=8)):t=0,l=ua(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:a,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},yT(l),e}function SX(e,t,n){var a=3{\"use strict\";process.env.NODE_ENV!==\"production\"&&function(){\"use strict\";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<\"u\"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==\"function\"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=wr(),t=DR(),n=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,a=!1;function o(r){a=r}function l(r){if(!a){for(var i=arguments.length,u=new Array(i>1?i-1:0),s=1;s1?i-1:0),s=1;s2&&(r[0]===\"o\"||r[0]===\"O\")&&(r[1]===\"n\"||r[1]===\"N\")}function Se(r,i,u,s){if(u!==null&&u.type===Hn)return!1;switch(typeof i){case\"function\":case\"symbol\":return!0;case\"boolean\":{if(s)return!1;if(u!==null)return!u.acceptsBooleans;var f=r.toLowerCase().slice(0,5);return f!==\"data-\"&&f!==\"aria-\"}default:return!1}}function Me(r,i,u,s){if(i===null||typeof i>\"u\"||Se(r,i,u,s))return!0;if(s)return!1;if(u!==null)switch(u.type){case pr:return!i;case Bn:return i===!1;case Ti:return isNaN(i);case W:return isNaN(i)||i<1}return!1}function Ge(r){return We.hasOwnProperty(r)?We[r]:null}function Qe(r,i,u,s,f,d,h){this.acceptsBooleans=i===oi||i===pr||i===Bn,this.attributeName=s,this.attributeNamespace=f,this.mustUseProperty=u,this.propertyName=r,this.type=i,this.sanitizeURL=d,this.removeEmptyString=h}var We={},Ut=[\"children\",\"dangerouslySetInnerHTML\",\"defaultValue\",\"defaultChecked\",\"innerHTML\",\"suppressContentEditableWarning\",\"suppressHydrationWarning\",\"style\"];Ut.forEach(function(r){We[r]=new Qe(r,Hn,!1,r,null,!1,!1)}),[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(r){var i=r[0],u=r[1];We[i]=new Qe(i,Dr,!1,u,null,!1,!1)}),[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(r){We[r]=new Qe(r,oi,!1,r.toLowerCase(),null,!1,!1)}),[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(r){We[r]=new Qe(r,oi,!1,r,null,!1,!1)}),[\"allowFullScreen\",\"async\",\"autoFocus\",\"autoPlay\",\"controls\",\"default\",\"defer\",\"disabled\",\"disablePictureInPicture\",\"disableRemotePlayback\",\"formNoValidate\",\"hidden\",\"loop\",\"noModule\",\"noValidate\",\"open\",\"playsInline\",\"readOnly\",\"required\",\"reversed\",\"scoped\",\"seamless\",\"itemScope\"].forEach(function(r){We[r]=new Qe(r,pr,!1,r.toLowerCase(),null,!1,!1)}),[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(r){We[r]=new Qe(r,pr,!0,r,null,!1,!1)}),[\"capture\",\"download\"].forEach(function(r){We[r]=new Qe(r,Bn,!1,r,null,!1,!1)}),[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(r){We[r]=new Qe(r,W,!1,r,null,!1,!1)}),[\"rowSpan\",\"start\"].forEach(function(r){We[r]=new Qe(r,Ti,!1,r.toLowerCase(),null,!1,!1)});var Sr=/[\\-\\:]([a-z])/g,ki=function(r){return r[1].toUpperCase()};[\"accent-height\",\"alignment-baseline\",\"arabic-form\",\"baseline-shift\",\"cap-height\",\"clip-path\",\"clip-rule\",\"color-interpolation\",\"color-interpolation-filters\",\"color-profile\",\"color-rendering\",\"dominant-baseline\",\"enable-background\",\"fill-opacity\",\"fill-rule\",\"flood-color\",\"flood-opacity\",\"font-family\",\"font-size\",\"font-size-adjust\",\"font-stretch\",\"font-style\",\"font-variant\",\"font-weight\",\"glyph-name\",\"glyph-orientation-horizontal\",\"glyph-orientation-vertical\",\"horiz-adv-x\",\"horiz-origin-x\",\"image-rendering\",\"letter-spacing\",\"lighting-color\",\"marker-end\",\"marker-mid\",\"marker-start\",\"overline-position\",\"overline-thickness\",\"paint-order\",\"panose-1\",\"pointer-events\",\"rendering-intent\",\"shape-rendering\",\"stop-color\",\"stop-opacity\",\"strikethrough-position\",\"strikethrough-thickness\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-miterlimit\",\"stroke-opacity\",\"stroke-width\",\"text-anchor\",\"text-decoration\",\"text-rendering\",\"underline-position\",\"underline-thickness\",\"unicode-bidi\",\"unicode-range\",\"units-per-em\",\"v-alphabetic\",\"v-hanging\",\"v-ideographic\",\"v-mathematical\",\"vector-effect\",\"vert-adv-y\",\"vert-origin-x\",\"vert-origin-y\",\"word-spacing\",\"writing-mode\",\"xmlns:xlink\",\"x-height\"].forEach(function(r){var i=r.replace(Sr,ki);We[i]=new Qe(i,Dr,!1,r,null,!1,!1)}),[\"xlink:actuate\",\"xlink:arcrole\",\"xlink:role\",\"xlink:show\",\"xlink:title\",\"xlink:type\"].forEach(function(r){var i=r.replace(Sr,ki);We[i]=new Qe(i,Dr,!1,r,\"http://www.w3.org/1999/xlink\",!1,!1)}),[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(r){var i=r.replace(Sr,ki);We[i]=new Qe(i,Dr,!1,r,\"http://www.w3.org/XML/1998/namespace\",!1,!1)}),[\"tabIndex\",\"crossOrigin\"].forEach(function(r){We[r]=new Qe(r,Dr,!1,r.toLowerCase(),null,!1,!1)});var to=\"xlinkHref\";We[to]=new Qe(\"xlinkHref\",Dr,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1),[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(r){We[r]=new Qe(r,Dr,!1,r.toLowerCase(),null,!0,!0)});var ro=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i,Cr=!1;function ui(r){!Cr&&ro.test(r)&&(Cr=!0,c(\"A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.\",JSON.stringify(r)))}function no(r,i,u,s){if(s.mustUseProperty){var f=s.propertyName;return r[f]}else{ir(u,i),s.sanitizeURL&&ui(\"\"+u);var d=s.attributeName,h=null;if(s.type===Bn){if(r.hasAttribute(d)){var y=r.getAttribute(d);return y===\"\"?!0:Me(i,u,s,!1)?y:y===\"\"+u?u:y}}else if(r.hasAttribute(d)){if(Me(i,u,s,!1))return r.getAttribute(d);if(s.type===pr)return u;h=r.getAttribute(d)}return Me(i,u,s,!1)?h===null?u:h:h===\"\"+u?u:h}}function io(r,i,u,s){{if(!Ae(i))return;if(!r.hasAttribute(i))return u===void 0?void 0:null;var f=r.getAttribute(i);return ir(u,i),f===\"\"+u?u:f}}function Gi(r,i,u,s){var f=Ge(i);if(!ye(i,f,s)){if(Me(i,u,f,s)&&(u=null),s||f===null){if(Ae(i)){var d=i;u===null?r.removeAttribute(d):(ir(u,i),r.setAttribute(d,\"\"+u))}return}var h=f.mustUseProperty;if(h){var y=f.propertyName;if(u===null){var g=f.type;r[y]=g===pr?!1:\"\"}else r[y]=u;return}var E=f.attributeName,O=f.attributeNamespace;if(u===null)r.removeAttribute(E);else{var U=f.type,L;U===pr||U===Bn&&u===!0?L=\"\":(ir(u,E),L=\"\"+u,f.sanitizeURL&&ui(L.toString())),O?r.setAttributeNS(O,E,L):r.setAttribute(E,L)}}}var Vn=Symbol.for(\"react.element\"),vt=Symbol.for(\"react.portal\"),Zt=Symbol.for(\"react.fragment\"),$n=Symbol.for(\"react.strict_mode\"),P=Symbol.for(\"react.profiler\"),Q=Symbol.for(\"react.provider\"),le=Symbol.for(\"react.context\"),Ne=Symbol.for(\"react.forward_ref\"),Ze=Symbol.for(\"react.suspense\"),mt=Symbol.for(\"react.suspense_list\"),Xe=Symbol.for(\"react.memo\"),Le=Symbol.for(\"react.lazy\"),Nr=Symbol.for(\"react.scope\"),$t=Symbol.for(\"react.debug_trace_mode\"),Wt=Symbol.for(\"react.offscreen\"),kn=Symbol.for(\"react.legacy_hidden\"),ao=Symbol.for(\"react.cache\"),wc=Symbol.for(\"react.tracing_marker\"),li=Symbol.iterator,ox=\"@@iterator\";function Lo(r){if(r===null||typeof r!=\"object\")return null;var i=li&&r[li]||r[ox];return typeof i==\"function\"?i:null}var Je=Object.assign,ku=0,ip,ap,op,up,lp,sp,cp;function Dm(){}Dm.__reactDisabledLog=!0;function ux(){{if(ku===0){ip=console.log,ap=console.info,op=console.warn,up=console.error,lp=console.group,sp=console.groupCollapsed,cp=console.groupEnd;var r={configurable:!0,enumerable:!0,value:Dm,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}ku++}}function fp(){{if(ku--,ku===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Je({},r,{value:ip}),info:Je({},r,{value:ap}),warn:Je({},r,{value:op}),error:Je({},r,{value:up}),group:Je({},r,{value:lp}),groupCollapsed:Je({},r,{value:sp}),groupEnd:Je({},r,{value:cp})})}ku<0&&c(\"disabledDepth fell below zero. This is a bug in React. Please file an issue.\")}}var us=n.ReactCurrentDispatcher,Au;function Qi(r,i,u){{if(Au===void 0)try{throw Error()}catch(f){var s=f.stack.trim().match(/\\n( *(at )?)/);Au=s&&s[1]||\"\"}return`\n`+Au+r}}var Mu=!1,xc;{var Nm=typeof WeakMap==\"function\"?WeakMap:Map;xc=new Nm}function dp(r,i){if(!r||Mu)return\"\";{var u=xc.get(r);if(u!==void 0)return u}var s;Mu=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var d;d=us.current,us.current=null,ux();try{if(i){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,\"props\",{set:function(){throw Error()}}),typeof Reflect==\"object\"&&Reflect.construct){try{Reflect.construct(h,[])}catch(B){s=B}Reflect.construct(r,[],h)}else{try{h.call()}catch(B){s=B}r.call(h.prototype)}}else{try{throw Error()}catch(B){s=B}r()}}catch(B){if(B&&s&&typeof B.stack==\"string\"){for(var y=B.stack.split(`\n`),g=s.stack.split(`\n`),E=y.length-1,O=g.length-1;E>=1&&O>=0&&y[E]!==g[O];)O--;for(;E>=1&&O>=0;E--,O--)if(y[E]!==g[O]){if(E!==1||O!==1)do if(E--,O--,O<0||y[E]!==g[O]){var U=`\n`+y[E].replace(\" at new \",\" at \");return r.displayName&&U.includes(\"\")&&(U=U.replace(\"\",r.displayName)),typeof r==\"function\"&&xc.set(r,U),U}while(E>=1&&O>=0);break}}}finally{Mu=!1,us.current=d,fp(),Error.prepareStackTrace=f}var L=r?r.displayName||r.name:\"\",$=L?Qi(L):\"\";return typeof r==\"function\"&&xc.set(r,$),$}function lx(r,i,u){return dp(r,!0)}function Pu(r,i,u){return dp(r,!1)}function jm(r){var i=r.prototype;return!!(i&&i.isReactComponent)}function Ec(r,i,u){if(r==null)return\"\";if(typeof r==\"function\")return dp(r,jm(r));if(typeof r==\"string\")return Qi(r);switch(r){case Ze:return Qi(\"Suspense\");case mt:return Qi(\"SuspenseList\")}if(typeof r==\"object\")switch(r.$$typeof){case Ne:return Pu(r.render);case Xe:return Ec(r.type,i,u);case Le:{var s=r,f=s._payload,d=s._init;try{return Ec(d(f),i,u)}catch{}}}return\"\"}function Cc(r){var i=r._debugOwner?r._debugOwner.type:null,u=r._debugSource;switch(r.tag){case T:return Qi(r.type);case be:return Qi(\"Lazy\");case G:return Qi(\"Suspense\");case dt:return Qi(\"SuspenseList\");case v:case S:case re:return Pu(r.type);case A:return Pu(r.type.render);case m:return lx(r.type);default:return\"\"}}function Lm(r){try{var i=\"\",u=r;do i+=Cc(u),u=u.return;while(u);return i}catch(s){return`\nError generating stack: `+s.message+`\n`+s.stack}}function Du(r,i,u){var s=r.displayName;if(s)return s;var f=i.displayName||i.name||\"\";return f!==\"\"?u+\"(\"+f+\")\":u}function Rc(r){return r.displayName||\"Context\"}function Tt(r){if(r==null)return null;if(typeof r.tag==\"number\"&&c(\"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"),typeof r==\"function\")return r.displayName||r.name||null;if(typeof r==\"string\")return r;switch(r){case Zt:return\"Fragment\";case vt:return\"Portal\";case P:return\"Profiler\";case $n:return\"StrictMode\";case Ze:return\"Suspense\";case mt:return\"SuspenseList\"}if(typeof r==\"object\")switch(r.$$typeof){case le:var i=r;return Rc(i)+\".Consumer\";case Q:var u=r;return Rc(u._context)+\".Provider\";case Ne:return Du(r,r.render,\"ForwardRef\");case Xe:var s=r.displayName||null;return s!==null?s:Tt(r.type)||\"Memo\";case Le:{var f=r,d=f._payload,h=f._init;try{return Tt(h(d))}catch{return null}}}return null}function sx(r,i,u){var s=i.displayName||i.name||\"\";return r.displayName||(s!==\"\"?u+\"(\"+s+\")\":u)}function Um(r){return r.displayName||\"Context\"}function Ye(r){var i=r.tag,u=r.type;switch(i){case Re:return\"Cache\";case _:var s=u;return Um(s)+\".Consumer\";case R:var f=u;return Um(f._context)+\".Provider\";case De:return\"DehydratedFragment\";case A:return sx(u,u.render,\"ForwardRef\");case N:return\"Fragment\";case T:return u;case C:return\"Portal\";case w:return\"Root\";case k:return\"Text\";case be:return Tt(u);case I:return u===$n?\"StrictMode\":\"Mode\";case Pe:return\"Offscreen\";case F:return\"Profiler\";case rt:return\"Scope\";case G:return\"Suspense\";case dt:return\"SuspenseList\";case Mt:return\"TracingMarker\";case m:case v:case we:case S:case te:case re:if(typeof u==\"function\")return u.displayName||u.name||null;if(typeof u==\"string\")return u;break}return null}var Fm=n.ReactDebugCurrentFrame,An=null,Nu=!1;function ju(){{if(An===null)return null;var r=An._debugOwner;if(r!==null&&typeof r<\"u\")return Ye(r)}return null}function cx(){return An===null?\"\":Lm(An)}function Jr(){Fm.getCurrentStack=null,An=null,Nu=!1}function er(r){Fm.getCurrentStack=r===null?null:cx,An=r,Nu=!1}function fx(){return An}function Ki(r){Nu=r}function si(r){return\"\"+r}function ba(r){switch(typeof r){case\"boolean\":case\"number\":case\"string\":case\"undefined\":return r;case\"object\":return br(r),r;default:return\"\"}}var Oc={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function pp(r,i){Oc[i.type]||i.onChange||i.onInput||i.readOnly||i.disabled||i.value==null||c(\"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.\"),i.onChange||i.readOnly||i.disabled||i.checked==null||c(\"You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.\")}function Uo(r){var i=r.type,u=r.nodeName;return u&&u.toLowerCase()===\"input\"&&(i===\"checkbox\"||i===\"radio\")}function vp(r){return r._valueTracker}function dx(r){r._valueTracker=null}function Tc(r){var i=\"\";return r&&(Uo(r)?i=r.checked?\"true\":\"false\":i=r.value),i}function hp(r){var i=Uo(r)?\"checked\":\"value\",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);br(r[i]);var s=\"\"+r[i];if(!(r.hasOwnProperty(i)||typeof u>\"u\"||typeof u.get!=\"function\"||typeof u.set!=\"function\")){var f=u.get,d=u.set;Object.defineProperty(r,i,{configurable:!0,get:function(){return f.call(this)},set:function(y){br(y),s=\"\"+y,d.call(this,y)}}),Object.defineProperty(r,i,{enumerable:u.enumerable});var h={getValue:function(){return s},setValue:function(y){br(y),s=\"\"+y},stopTracking:function(){dx(r),delete r[i]}};return h}}function Lu(r){vp(r)||(r._valueTracker=hp(r))}function kc(r){if(!r)return!1;var i=vp(r);if(!i)return!0;var u=i.getValue(),s=Tc(r);return s!==u?(i.setValue(s),!0):!1}function Ac(r){if(r=r||(typeof document<\"u\"?document:void 0),typeof r>\"u\")return null;try{return r.activeElement||r.body}catch{return r.body}}var zm=!1,qm=!1,Im=!1,b=!1;function D(r){var i=r.type===\"checkbox\"||r.type===\"radio\";return i?r.checked!=null:r.value!=null}function V(r,i){var u=r,s=i.checked,f=Je({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??u._wrapperState.initialChecked});return f}function K(r,i){pp(\"input\",i),i.checked!==void 0&&i.defaultChecked!==void 0&&!qm&&(c(\"%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components\",ju()||\"A component\",i.type),qm=!0),i.value!==void 0&&i.defaultValue!==void 0&&!zm&&(c(\"%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components\",ju()||\"A component\",i.type),zm=!0);var u=r,s=i.defaultValue==null?\"\":i.defaultValue;u._wrapperState={initialChecked:i.checked!=null?i.checked:i.defaultChecked,initialValue:ba(i.value!=null?i.value:s),controlled:D(i)}}function oe(r,i){var u=r,s=i.checked;s!=null&&Gi(u,\"checked\",s,!1)}function Ue(r,i){var u=r;{var s=D(i);!u._wrapperState.controlled&&s&&!b&&(c(\"A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\"),b=!0),u._wrapperState.controlled&&!s&&!Im&&(c(\"A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components\"),Im=!0)}oe(r,i);var f=ba(i.value),d=i.type;if(f!=null)d===\"number\"?(f===0&&u.value===\"\"||u.value!=f)&&(u.value=si(f)):u.value!==si(f)&&(u.value=si(f));else if(d===\"submit\"||d===\"reset\"){u.removeAttribute(\"value\");return}i.hasOwnProperty(\"value\")?xt(u,i.type,f):i.hasOwnProperty(\"defaultValue\")&&xt(u,i.type,ba(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(u.defaultChecked=!!i.defaultChecked)}function Ce(r,i,u){var s=r;if(i.hasOwnProperty(\"value\")||i.hasOwnProperty(\"defaultValue\")){var f=i.type,d=f===\"submit\"||f===\"reset\";if(d&&(i.value===void 0||i.value===null))return;var h=si(s._wrapperState.initialValue);u||h!==s.value&&(s.value=h),s.defaultValue=h}var y=s.name;y!==\"\"&&(s.name=\"\"),s.defaultChecked=!s.defaultChecked,s.defaultChecked=!!s._wrapperState.initialChecked,y!==\"\"&&(s.name=y)}function $e(r,i){var u=r;Ue(u,i),ut(u,i)}function ut(r,i){var u=i.name;if(i.type===\"radio\"&&u!=null){for(var s=r;s.parentNode;)s=s.parentNode;ir(u,\"name\");for(var f=s.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+u)+'][type=\"radio\"]'),d=0;d.\")))}):i.dangerouslySetInnerHTML!=null&&(Ft||(Ft=!0,c(\"Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.\")))),i.selected!=null&&!Pt&&(c(\"Use the `defaultValue` or `value` props on must be a scalar value if `multiple` is false.%s\",u,Hm())}}}}function Fo(r,i,u,s){var f=r.options;if(i){for(var d=u,h={},y=0;y.\");var s=Je({},i,{value:void 0,defaultValue:void 0,children:si(u._wrapperState.initialValue)});return s}function sM(r,i){var u=r;pp(\"textarea\",i),i.value!==void 0&&i.defaultValue!==void 0&&!lM&&(c(\"%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components\",ju()||\"A component\"),lM=!0);var s=i.value;if(s==null){var f=i.children,d=i.defaultValue;if(f!=null){c(\"Use the `defaultValue` or `value` props instead of setting children on