@matchain/matchid-sdk-react 0.1.52 → 0.1.53-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/assets/icon/index.d.mts +1 -1
  2. package/dist/assets/icon/index.d.ts +1 -1
  3. package/dist/{chunk-OL4R4SZU.mjs → chunk-LRJDS2OK.mjs} +104 -91
  4. package/dist/chunk-LRJDS2OK.mjs.map +1 -0
  5. package/dist/{chunk-KJQKG6RI.mjs → chunk-YQHI5BIZ.mjs} +2 -2
  6. package/dist/components/index.d.mts +3 -3
  7. package/dist/components/index.d.ts +3 -3
  8. package/dist/components/index.js +60 -56
  9. package/dist/components/index.js.map +1 -1
  10. package/dist/components/index.mjs +2 -2
  11. package/dist/hooks/api/index.d.mts +2 -2
  12. package/dist/hooks/api/index.d.ts +2 -2
  13. package/dist/hooks/api/index.js +28 -25
  14. package/dist/hooks/api/index.js.map +1 -1
  15. package/dist/hooks/api/index.mjs +3 -3
  16. package/dist/hooks/index.d.mts +2 -2
  17. package/dist/hooks/index.d.ts +2 -2
  18. package/dist/hooks/index.js +20 -16
  19. package/dist/hooks/index.js.map +1 -1
  20. package/dist/hooks/index.mjs +2 -2
  21. package/dist/{index-XzSw1Bym.d.mts → index-0EM3dXJ4.d.mts} +2 -2
  22. package/dist/{index-k2Uf0F94.d.ts → index-BNNgBoTN.d.ts} +1 -1
  23. package/dist/{index-BUj9mOrS.d.ts → index-BlYHNOxm.d.ts} +1 -1
  24. package/dist/{index-DvM6x6e6.d.ts → index-BoIDCH41.d.ts} +1 -1
  25. package/dist/{index-B-QfwtE5.d.mts → index-Bsfb3Ysq.d.mts} +1 -1
  26. package/dist/{index-Bmir-Wor.d.mts → index-C29kl7io.d.mts} +1 -1
  27. package/dist/{index-X_fw5wX_.d.ts → index-C7InzeOC.d.ts} +1 -1
  28. package/dist/{index-B_o9HBS1.d.mts → index-CGx_yc95.d.mts} +1 -1
  29. package/dist/{index-DMUZQqNB.d.ts → index-CO1j3Cxc.d.ts} +2 -2
  30. package/dist/{index-BDoEk1EK.d.ts → index-Ce5JlNJv.d.ts} +2 -2
  31. package/dist/{index-D5OzNRfu.d.mts → index-CqO8nMTh.d.mts} +2 -2
  32. package/dist/{index-CDqIk5k2.d.mts → index-CteYYAoN.d.mts} +1 -1
  33. package/dist/index.css +1 -0
  34. package/dist/index.d.mts +7 -7
  35. package/dist/index.d.ts +7 -7
  36. package/dist/index.js +96 -83
  37. package/dist/index.js.map +1 -1
  38. package/dist/index.mjs +9 -9
  39. package/dist/types/index.d.mts +1 -1
  40. package/dist/types/index.d.ts +1 -1
  41. package/dist/{types-Dd_ExpLx.d.mts → types-Cv5UhCIP.d.mts} +1 -1
  42. package/dist/{types-Dd_ExpLx.d.ts → types-Cv5UhCIP.d.ts} +1 -1
  43. package/dist/ui/index.d.mts +3 -3
  44. package/dist/ui/index.d.ts +3 -3
  45. package/example/dist/assets/TransportWebHID-BwG9Tbw2.js +1 -0
  46. package/example/dist/assets/bignumber-FiRdtNkj.js +10 -0
  47. package/example/dist/assets/ccip-CJyR03AW.js +1 -0
  48. package/example/dist/assets/draggabilly-1Sl0icBA.js +14 -0
  49. package/example/dist/assets/index-BAfSBdWW.js +1 -0
  50. package/example/dist/assets/index-CYk2C9XJ.js +1 -0
  51. package/example/dist/assets/index-CcgesoWE.js +179 -0
  52. package/example/dist/assets/index-D5RU9xxK.js +3 -0
  53. package/example/dist/assets/index-D8N4Z5B5.js +1677 -0
  54. package/example/dist/assets/index-DATAk5xI.js +569 -0
  55. package/example/dist/assets/index-DN1wW-Mo.js +3 -0
  56. package/example/dist/assets/index-DxxLiL3_.js +303 -0
  57. package/example/dist/assets/index-Gy3FXGhr.css +1 -0
  58. package/example/dist/assets/index-RIWy1Hg7.js +1 -0
  59. package/example/dist/assets/inherits_browser-BlmhoU4v.js +1 -0
  60. package/example/dist/assets/solanaEmbed.esm-CNS-QKE2.js +38 -0
  61. package/example/dist/index.html +14 -0
  62. package/package.json +1 -1
  63. package/dist/chunk-OL4R4SZU.mjs.map +0 -1
  64. /package/dist/{chunk-KJQKG6RI.mjs.map → chunk-YQHI5BIZ.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -1,6 +1,12 @@
1
+ import {
2
+ chains_exports
3
+ } from "./chunk-HYQ3T6WW.mjs";
4
+ import {
5
+ types_exports
6
+ } from "./chunk-HBOS3RBL.mjs";
1
7
  import {
2
8
  api_exports
3
- } from "./chunk-KJQKG6RI.mjs";
9
+ } from "./chunk-YQHI5BIZ.mjs";
4
10
  import {
5
11
  MatchProvider,
6
12
  ModalProvider,
@@ -8,19 +14,13 @@ import {
8
14
  components_exports,
9
15
  hooks_exports,
10
16
  useMatch
11
- } from "./chunk-OL4R4SZU.mjs";
12
- import {
13
- types_exports
14
- } from "./chunk-HBOS3RBL.mjs";
17
+ } from "./chunk-LRJDS2OK.mjs";
15
18
  import "./chunk-UA6XHZHX.mjs";
19
+ import "./chunk-HLUFAIFV.mjs";
16
20
  import {
17
21
  ui_exports
18
22
  } from "./chunk-FB5MHLWX.mjs";
19
- import "./chunk-HLUFAIFV.mjs";
20
23
  import "./chunk-LHNKZISB.mjs";
21
- import {
22
- chains_exports
23
- } from "./chunk-HYQ3T6WW.mjs";
24
24
  import "./chunk-J5LGTIGS.mjs";
25
25
  export {
26
26
  api_exports as Api,
@@ -1,3 +1,3 @@
1
- export { A as Address, l as AnyObject, p as AppConfigType, q as AuthParams, r as BindInfoType, s as BindItemType, t as BindWalletParam, B as ButtonProps, C as CEXType, k as ChainType, D as DeepPartial, v as DrawerProps, E as EmailModalProps, w as EmbeddedWalletsParams, H as Hash, a as IEnvConfigType, x as IEnvName, y as ILoginWalletReq, I as IMatchEvents, h as ISocialLoginMethod, z as IconProps, F as InputProps, L as LocaleType, b as LoginBoxProps, j as LoginMethodType, f as LoginModalProps, e as LoginPanelProps, G as MessageType, J as MetaPageType, K as ModalProps, M as ModalWithHeaderProps, O as OtherLoginMethodType, i as OverviewInfo, N as PohItemType, Q as PohZkpassParams, P as PopoverPositionType, S as PopoverProps, d as PopoverTypeType, R as RecommendLoginMethodType, T as RecoveryType, V as ThemeType, X as UIProps, o as UserAssetToken, U as UserChainType, n as UserImportTokenType, Y as UserPopoverProps, Z as UserTransactionNextPageParams, _ as UserTransactionRecordType, m as UserTransactionType, g as WalletAssetMergeType, $ as WalletAssetType, a0 as WalletChainType, W as WalletConfigType, a1 as WalletNFTType, a2 as WalletPanelProps, a3 as WalletReceiveMessageType, c as WalletType, u as useMatchWalletAssetsProps } from '../types-Dd_ExpLx.mjs';
1
+ export { A as Address, e as AnyObject, p as AppConfigType, q as AuthParams, r as BindInfoType, s as BindItemType, t as BindWalletParam, B as ButtonProps, C as CEXType, d as ChainType, D as DeepPartial, v as DrawerProps, E as EmailModalProps, w as EmbeddedWalletsParams, H as Hash, a as IEnvConfigType, x as IEnvName, y as ILoginWalletReq, I as IMatchEvents, b as ISocialLoginMethod, z as IconProps, F as InputProps, L as LocaleType, j as LoginBoxProps, c as LoginMethodType, o as LoginModalProps, n as LoginPanelProps, G as MessageType, J as MetaPageType, K as ModalProps, M as ModalWithHeaderProps, k as OtherLoginMethodType, O as OverviewInfo, N as PohItemType, Q as PohZkpassParams, P as PopoverPositionType, S as PopoverProps, m as PopoverTypeType, R as RecommendLoginMethodType, T as RecoveryType, V as ThemeType, X as UIProps, h as UserAssetToken, U as UserChainType, g as UserImportTokenType, Y as UserPopoverProps, Z as UserTransactionNextPageParams, _ as UserTransactionRecordType, f as UserTransactionType, i as WalletAssetMergeType, $ as WalletAssetType, a0 as WalletChainType, W as WalletConfigType, a1 as WalletNFTType, a2 as WalletPanelProps, a3 as WalletReceiveMessageType, l as WalletType, u as useMatchWalletAssetsProps } from '../types-Cv5UhCIP.mjs';
2
2
  import 'react';
3
3
  import '@tanstack/react-query/src/types';
@@ -1,3 +1,3 @@
1
- export { A as Address, l as AnyObject, p as AppConfigType, q as AuthParams, r as BindInfoType, s as BindItemType, t as BindWalletParam, B as ButtonProps, C as CEXType, k as ChainType, D as DeepPartial, v as DrawerProps, E as EmailModalProps, w as EmbeddedWalletsParams, H as Hash, a as IEnvConfigType, x as IEnvName, y as ILoginWalletReq, I as IMatchEvents, h as ISocialLoginMethod, z as IconProps, F as InputProps, L as LocaleType, b as LoginBoxProps, j as LoginMethodType, f as LoginModalProps, e as LoginPanelProps, G as MessageType, J as MetaPageType, K as ModalProps, M as ModalWithHeaderProps, O as OtherLoginMethodType, i as OverviewInfo, N as PohItemType, Q as PohZkpassParams, P as PopoverPositionType, S as PopoverProps, d as PopoverTypeType, R as RecommendLoginMethodType, T as RecoveryType, V as ThemeType, X as UIProps, o as UserAssetToken, U as UserChainType, n as UserImportTokenType, Y as UserPopoverProps, Z as UserTransactionNextPageParams, _ as UserTransactionRecordType, m as UserTransactionType, g as WalletAssetMergeType, $ as WalletAssetType, a0 as WalletChainType, W as WalletConfigType, a1 as WalletNFTType, a2 as WalletPanelProps, a3 as WalletReceiveMessageType, c as WalletType, u as useMatchWalletAssetsProps } from '../types-Dd_ExpLx.js';
1
+ export { A as Address, e as AnyObject, p as AppConfigType, q as AuthParams, r as BindInfoType, s as BindItemType, t as BindWalletParam, B as ButtonProps, C as CEXType, d as ChainType, D as DeepPartial, v as DrawerProps, E as EmailModalProps, w as EmbeddedWalletsParams, H as Hash, a as IEnvConfigType, x as IEnvName, y as ILoginWalletReq, I as IMatchEvents, b as ISocialLoginMethod, z as IconProps, F as InputProps, L as LocaleType, j as LoginBoxProps, c as LoginMethodType, o as LoginModalProps, n as LoginPanelProps, G as MessageType, J as MetaPageType, K as ModalProps, M as ModalWithHeaderProps, k as OtherLoginMethodType, O as OverviewInfo, N as PohItemType, Q as PohZkpassParams, P as PopoverPositionType, S as PopoverProps, m as PopoverTypeType, R as RecommendLoginMethodType, T as RecoveryType, V as ThemeType, X as UIProps, h as UserAssetToken, U as UserChainType, g as UserImportTokenType, Y as UserPopoverProps, Z as UserTransactionNextPageParams, _ as UserTransactionRecordType, f as UserTransactionType, i as WalletAssetMergeType, $ as WalletAssetType, a0 as WalletChainType, W as WalletConfigType, a1 as WalletNFTType, a2 as WalletPanelProps, a3 as WalletReceiveMessageType, l as WalletType, u as useMatchWalletAssetsProps } from '../types-Cv5UhCIP.js';
2
2
  import 'react';
3
3
  import '@tanstack/react-query/src/types';
@@ -420,4 +420,4 @@ type useMatchWalletAssetsProps = {
420
420
  assetListOptions?: Partial<Omit<UseQueryOptions<UserAssetToken[]>, 'queryKey' | 'queryFn'>>;
421
421
  };
422
422
 
423
- export { type WalletAssetType as $, type Address as A, type ButtonProps as B, type CEXType as C, type DeepPartial as D, type EmailModalProps as E, type InputProps as F, type MessageType as G, type Hash as H, type IMatchEvents as I, type MetaPageType as J, type ModalProps as K, type LocaleType as L, type ModalWithHeaderProps as M, type PohItemType as N, type OtherLoginMethodType as O, type PopoverPositionType as P, type PohZkpassParams as Q, type RecommendLoginMethodType as R, type PopoverProps as S, RecoveryType as T, type UserChainType as U, type ThemeType as V, type WalletConfigType as W, type UIProps as X, type UserPopoverProps as Y, type UserTransactionNextPageParams as Z, type UserTransactionRecordType as _, type IEnvConfigType as a, type WalletChainType as a0, type WalletNFTType as a1, type WalletPanelProps as a2, type WalletReceiveMessageType as a3, type LoginBoxProps as b, type WalletType as c, type PopoverTypeType as d, type LoginPanelProps as e, type LoginModalProps as f, type WalletAssetMergeType as g, type ISocialLoginMethod as h, type OverviewInfo as i, type LoginMethodType as j, ChainType as k, type AnyObject as l, type UserTransactionType as m, type UserImportTokenType as n, type UserAssetToken as o, type AppConfigType as p, type AuthParams as q, type BindInfoType as r, type BindItemType as s, type BindWalletParam as t, type useMatchWalletAssetsProps as u, type DrawerProps as v, type EmbeddedWalletsParams as w, type IEnvName as x, type ILoginWalletReq as y, type IconProps as z };
423
+ export { type WalletAssetType as $, type Address as A, type ButtonProps as B, type CEXType as C, type DeepPartial as D, type EmailModalProps as E, type InputProps as F, type MessageType as G, type Hash as H, type IMatchEvents as I, type MetaPageType as J, type ModalProps as K, type LocaleType as L, type ModalWithHeaderProps as M, type PohItemType as N, type OverviewInfo as O, type PopoverPositionType as P, type PohZkpassParams as Q, type RecommendLoginMethodType as R, type PopoverProps as S, RecoveryType as T, type UserChainType as U, type ThemeType as V, type WalletConfigType as W, type UIProps as X, type UserPopoverProps as Y, type UserTransactionNextPageParams as Z, type UserTransactionRecordType as _, type IEnvConfigType as a, type WalletChainType as a0, type WalletNFTType as a1, type WalletPanelProps as a2, type WalletReceiveMessageType as a3, type ISocialLoginMethod as b, type LoginMethodType as c, ChainType as d, type AnyObject as e, type UserTransactionType as f, type UserImportTokenType as g, type UserAssetToken as h, type WalletAssetMergeType as i, type LoginBoxProps as j, type OtherLoginMethodType as k, type WalletType as l, type PopoverTypeType as m, type LoginPanelProps as n, type LoginModalProps as o, type AppConfigType as p, type AuthParams as q, type BindInfoType as r, type BindItemType as s, type BindWalletParam as t, type useMatchWalletAssetsProps as u, type DrawerProps as v, type EmbeddedWalletsParams as w, type IEnvName as x, type ILoginWalletReq as y, type IconProps as z };
@@ -420,4 +420,4 @@ type useMatchWalletAssetsProps = {
420
420
  assetListOptions?: Partial<Omit<UseQueryOptions<UserAssetToken[]>, 'queryKey' | 'queryFn'>>;
421
421
  };
422
422
 
423
- export { type WalletAssetType as $, type Address as A, type ButtonProps as B, type CEXType as C, type DeepPartial as D, type EmailModalProps as E, type InputProps as F, type MessageType as G, type Hash as H, type IMatchEvents as I, type MetaPageType as J, type ModalProps as K, type LocaleType as L, type ModalWithHeaderProps as M, type PohItemType as N, type OtherLoginMethodType as O, type PopoverPositionType as P, type PohZkpassParams as Q, type RecommendLoginMethodType as R, type PopoverProps as S, RecoveryType as T, type UserChainType as U, type ThemeType as V, type WalletConfigType as W, type UIProps as X, type UserPopoverProps as Y, type UserTransactionNextPageParams as Z, type UserTransactionRecordType as _, type IEnvConfigType as a, type WalletChainType as a0, type WalletNFTType as a1, type WalletPanelProps as a2, type WalletReceiveMessageType as a3, type LoginBoxProps as b, type WalletType as c, type PopoverTypeType as d, type LoginPanelProps as e, type LoginModalProps as f, type WalletAssetMergeType as g, type ISocialLoginMethod as h, type OverviewInfo as i, type LoginMethodType as j, ChainType as k, type AnyObject as l, type UserTransactionType as m, type UserImportTokenType as n, type UserAssetToken as o, type AppConfigType as p, type AuthParams as q, type BindInfoType as r, type BindItemType as s, type BindWalletParam as t, type useMatchWalletAssetsProps as u, type DrawerProps as v, type EmbeddedWalletsParams as w, type IEnvName as x, type ILoginWalletReq as y, type IconProps as z };
423
+ export { type WalletAssetType as $, type Address as A, type ButtonProps as B, type CEXType as C, type DeepPartial as D, type EmailModalProps as E, type InputProps as F, type MessageType as G, type Hash as H, type IMatchEvents as I, type MetaPageType as J, type ModalProps as K, type LocaleType as L, type ModalWithHeaderProps as M, type PohItemType as N, type OverviewInfo as O, type PopoverPositionType as P, type PohZkpassParams as Q, type RecommendLoginMethodType as R, type PopoverProps as S, RecoveryType as T, type UserChainType as U, type ThemeType as V, type WalletConfigType as W, type UIProps as X, type UserPopoverProps as Y, type UserTransactionNextPageParams as Z, type UserTransactionRecordType as _, type IEnvConfigType as a, type WalletChainType as a0, type WalletNFTType as a1, type WalletPanelProps as a2, type WalletReceiveMessageType as a3, type ISocialLoginMethod as b, type LoginMethodType as c, ChainType as d, type AnyObject as e, type UserTransactionType as f, type UserImportTokenType as g, type UserAssetToken as h, type WalletAssetMergeType as i, type LoginBoxProps as j, type OtherLoginMethodType as k, type WalletType as l, type PopoverTypeType as m, type LoginPanelProps as n, type LoginModalProps as o, type AppConfigType as p, type AuthParams as q, type BindInfoType as r, type BindItemType as s, type BindWalletParam as t, type useMatchWalletAssetsProps as u, type DrawerProps as v, type EmbeddedWalletsParams as w, type IEnvName as x, type ILoginWalletReq as y, type IconProps as z };
@@ -1,7 +1,7 @@
1
- export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from '../index-B_o9HBS1.mjs';
2
- export { A as AlphaAvatar, D as Drawer, e as HashPanel, M as ModalDrawer, R as Radio, S as Switch } from '../index-D5OzNRfu.mjs';
1
+ export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from '../index-CGx_yc95.mjs';
2
+ export { A as AlphaAvatar, D as Drawer, e as HashPanel, M as ModalDrawer, R as Radio, S as Switch } from '../index-CqO8nMTh.mjs';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
5
- import '../types-Dd_ExpLx.mjs';
5
+ import '../types-Cv5UhCIP.mjs';
6
6
  import '@tanstack/react-query/src/types';
7
7
  import 'viem';
@@ -1,7 +1,7 @@
1
- export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from '../index-BUj9mOrS.js';
2
- export { A as AlphaAvatar, D as Drawer, e as HashPanel, M as ModalDrawer, R as Radio, S as Switch } from '../index-DMUZQqNB.js';
1
+ export { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from '../index-BlYHNOxm.js';
2
+ export { A as AlphaAvatar, D as Drawer, e as HashPanel, M as ModalDrawer, R as Radio, S as Switch } from '../index-CO1j3Cxc.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
5
- import '../types-Dd_ExpLx.js';
5
+ import '../types-Cv5UhCIP.js';
6
6
  import '@tanstack/react-query/src/types';
7
7
  import 'viem';
@@ -0,0 +1 @@
1
+ import{g as R,z as j,e as A,D as X,A as L,B as H,C as V,F as $}from"./index-D8N4Z5B5.js";import{s as T}from"./index-BAfSBdWW.js";var C={};const W=R(j);(function(i){i.__esModule=!0;var t=W,e=5;function n(c){var l=Buffer.alloc(2);return l.writeUInt16BE(c,0),l}var o={data:Buffer.alloc(0),dataLength:0,sequence:0},r=function(c,l){return{makeBlocks:function(u){var a=Buffer.concat([n(u.length),u]),s=l-5,d=Math.ceil(a.length/s);a=Buffer.concat([a,Buffer.alloc(d*s-a.length+1).fill(0)]);for(var h=[],v=0;v<d;v++){var p=Buffer.alloc(5);p.writeUInt16BE(c,0),p.writeUInt8(e,2),p.writeUInt16BE(v,3);var b=a.slice(v*s,(v+1)*s);h.push(Buffer.concat([p,b]))}return h},reduceResponse:function(u,a){var s=u||o,d=s.data,h=s.dataLength,v=s.sequence;if(a.readUInt16BE(0)!==c)throw new t.TransportError("Invalid channel","InvalidChannel");if(a.readUInt8(2)!==e)throw new t.TransportError("Invalid tag","InvalidTag");if(a.readUInt16BE(3)!==v)throw new t.TransportError("Invalid sequence","InvalidSequence");u||(h=a.readUInt16BE(5)),v++;var p=a.slice(u?5:7);return d=Buffer.concat([d,p]),d.length>h&&(d=d.slice(0,h)),{data:d,dataLength:h,sequence:v}},getReducedResult:function(u){if(u&&u.dataLength===u.data.length)return u.data}}};i.default=r})(C);const G=A(C);var U=function(){return U=Object.assign||function(i){for(var t,e=1,n=arguments.length;e<n;e++){t=arguments[e];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o])}return i},U.apply(this,arguments)},y,f;(function(i){i.blue="blue",i.nanoS="nanoS",i.nanoSP="nanoSP",i.nanoX="nanoX",i.nanoFTS="nanoFTS"})(f||(f={}));var k=(y={},y[f.blue]={id:f.blue,productName:"Ledger Blue",productIdMM:0,legacyUsbProductId:0,usbOnly:!0,memorySize:480*1024,masks:[822083584,822149120],getBlockSize:function(i){return 4*1024}},y[f.nanoS]={id:f.nanoS,productName:"Ledger Nano S",productIdMM:16,legacyUsbProductId:1,usbOnly:!0,memorySize:320*1024,masks:[823132160],getBlockSize:function(i){var t;return T.lt((t=T.coerce(i))!==null&&t!==void 0?t:"","2.0.0")?4*1024:2*1024}},y[f.nanoSP]={id:f.nanoSP,productName:"Ledger Nano S Plus",productIdMM:80,legacyUsbProductId:5,usbOnly:!0,memorySize:1536*1024,masks:[856686592],getBlockSize:function(i){return 32}},y[f.nanoX]={id:f.nanoX,productName:"Ledger Nano X",productIdMM:64,legacyUsbProductId:4,usbOnly:!1,memorySize:2*1024*1024,masks:[855638016],getBlockSize:function(i){return 4*1024},bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}]},y[f.nanoFTS]={id:f.nanoFTS,productName:"Ledger Nano FTS",productIdMM:96,legacyUsbProductId:6,usbOnly:!1,memorySize:2*1024*1024,masks:[857735168],getBlockSize:function(i){return 4*1024},bluetoothSpec:[{serviceUuid:"13d63400-2c97-6004-0000-4c6564676572",notifyUuid:"13d63400-2c97-6004-0001-4c6564676572",writeUuid:"13d63400-2c97-6004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-6004-0003-4c6564676572"}]},y);f.blue,f.nanoS,f.nanoSP,f.nanoX,f.nanoFTS;var P=Object.values(k),F=11415,O=function(i){var t=P.find(function(o){return o.legacyUsbProductId===i});if(t)return t;var e=i>>8,n=P.find(function(o){return o.productIdMM===e});return n},K=[],M={};for(var J in k){var z=k[J],_=z.bluetoothSpec;if(_)for(var B=0;B<_.length;B++){var I=_[B];K.push(I.serviceUuid),M[I.serviceUuid]=M[I.serviceUuid.replace(/-/g,"")]=U({deviceModel:z},I)}}let Q=0;const w=[],N=(i,t,e)=>{const n={type:i,id:String(++Q),date:new Date};t&&(n.message=t),Z(n)},Y=i=>(w.push(i),()=>{const t=w.indexOf(i);t!==-1&&(w[t]=w[w.length-1],w.pop())});function Z(i){for(let t=0;t<w.length;t++)try{w[t](i)}catch(e){console.error(e)}}typeof window<"u"&&(window.__ledgerLogsListen=Y);var ee=function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}}(),g=function(i,t,e,n){function o(r){return r instanceof e?r:new e(function(c){c(r)})}return new(e||(e=Promise))(function(r,c){function l(s){try{a(n.next(s))}catch(d){c(d)}}function u(s){try{a(n.throw(s))}catch(d){c(d)}}function a(s){s.done?r(s.value):o(s.value).then(l,u)}a((n=n.apply(i,t||[])).next())})},m=function(i,t){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(a){return function(s){return u([a,s])}}function u(a){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,o&&(r=a[0]&2?o.return:a[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[a[0]&2,r.value]),a[0]){case 0:case 1:r=a;break;case 4:return e.label++,{value:a[1],done:!1};case 5:e.label++,o=a[1],a=[0];continue;case 7:a=e.ops.pop(),e.trys.pop();continue;default:if(r=e.trys,!(r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){e.label=a[1];break}if(a[0]===6&&e.label<r[1]){e.label=r[1],r=a;break}if(r&&e.label<r[2]){e.label=r[2],e.ops.push(a);break}r[2]&&e.ops.pop(),e.trys.pop();continue}a=t.call(i,e)}catch(s){a=[6,s],o=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ne=function(i,t){var e=typeof Symbol=="function"&&i[Symbol.iterator];if(!e)return i;var n=e.call(i),o,r=[],c;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)r.push(o.value)}catch(l){c={error:l}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(c)throw c.error}}return r},te=[{vendorId:F}],re=function(){return Promise.resolve(!!(window.navigator&&window.navigator.hid))},x=function(){var i=navigator.hid;if(!i)throw new V("navigator.hid is not supported","HIDNotSupported");return i};function q(){return g(this,void 0,void 0,function(){var i;return m(this,function(t){switch(t.label){case 0:return[4,x().requestDevice({filters:te})];case 1:return i=t.sent(),Array.isArray(i)?[2,i]:[2,[i]]}})})}function D(){return g(this,void 0,void 0,function(){var i;return m(this,function(t){switch(t.label){case 0:return[4,x().getDevices()];case 1:return i=t.sent(),[2,i.filter(function(e){return e.vendorId===F})]}})})}function ie(){return g(this,void 0,void 0,function(){var i,t;return m(this,function(e){switch(e.label){case 0:return[4,D()];case 1:return i=e.sent(),i.length>0?[2,i[0]]:[4,q()];case 2:return t=e.sent(),[2,t[0]]}})})}var ue=function(i){ee(t,i);function t(e){var n=i.call(this)||this;return n.channel=Math.floor(Math.random()*65535),n.packetSize=64,n.inputs=[],n.read=function(){return n.inputs.length?Promise.resolve(n.inputs.shift()):new Promise(function(o){n.inputCallback=o})},n.onInputReport=function(o){var r=Buffer.from(o.data.buffer);n.inputCallback?(n.inputCallback(r),n.inputCallback=null):n.inputs.push(r)},n._disconnectEmitted=!1,n._emitDisconnect=function(o){n._disconnectEmitted||(n._disconnectEmitted=!0,n.emit("disconnect",o))},n.exchange=function(o){return g(n,void 0,void 0,function(){var r,c=this;return m(this,function(l){switch(l.label){case 0:return[4,this.exchangeAtomicImpl(function(){return g(c,void 0,void 0,function(){var u,a,s,d,h,v,p,b,E;return m(this,function(S){switch(S.label){case 0:u=this,a=u.channel,s=u.packetSize,N("apdu","=> "+o.toString("hex")),d=G(a,s),h=d.makeBlocks(o),v=0,S.label=1;case 1:return v<h.length?[4,this.device.sendReport(0,h[v])]:[3,4];case 2:S.sent(),S.label=3;case 3:return v++,[3,1];case 4:return(p=d.getReducedResult(b))?[3,6]:[4,this.read()];case 5:return E=S.sent(),b=d.reduceResponse(b,E),[3,4];case 6:return N("apdu","<= "+p.toString("hex")),[2,p]}})})}).catch(function(u){throw u&&u.message&&u.message.includes("write")?(c._emitDisconnect(u),new X(u.message)):u})];case 1:return r=l.sent(),[2,r]}})})},n.device=e,n.deviceModel=typeof e.productId=="number"?O(e.productId):void 0,e.addEventListener("inputreport",n.onInputReport),n}return t.request=function(){return g(this,void 0,void 0,function(){var e,n;return m(this,function(o){switch(o.label){case 0:return[4,q()];case 1:return e=ne.apply(void 0,[o.sent(),1]),n=e[0],[2,t.open(n)]}})})},t.openConnected=function(){return g(this,void 0,void 0,function(){var e;return m(this,function(n){switch(n.label){case 0:return[4,D()];case 1:return e=n.sent(),e.length===0?[2,null]:[2,t.open(e[0])]}})})},t.open=function(e){return g(this,void 0,void 0,function(){var n,o;return m(this,function(r){switch(r.label){case 0:return[4,e.open()];case 1:return r.sent(),n=new t(e),o=function(c){e===c.device&&(x().removeEventListener("disconnect",o),n._emitDisconnect(new $))},x().addEventListener("disconnect",o),[2,n]}})})},t.prototype.close=function(){return g(this,void 0,void 0,function(){return m(this,function(e){switch(e.label){case 0:return[4,this.exchangeBusyPromise];case 1:return e.sent(),this.device.removeEventListener("inputreport",this.onInputReport),[4,this.device.close()];case 2:return e.sent(),[2]}})})},t.prototype.setScrambleKey=function(){},t.isSupported=re,t.list=D,t.listen=function(e){var n=!1;ie().then(function(r){if(!r)e.error(new L("Access denied to use Ledger device"));else if(!n){var c=typeof r.productId=="number"?O(r.productId):void 0;e.next({type:"add",descriptor:r,deviceModel:c}),e.complete()}},function(r){e.error(new L(r.message))});function o(){n=!0}return{unsubscribe:o}},t}(H);export{ue as default};
@@ -0,0 +1,10 @@
1
+ import{s as rt,c as Ur}from"./index-D8N4Z5B5.js";import{i as tt}from"./inherits_browser-BlmhoU4v.js";var Re={},sr;function En(){if(sr)return Re;sr=1;var o=rt.Buffer,g=o.isEncoding||function(d){switch(d=""+d,d&&d.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function S(d){if(!d)return"utf8";for(var s;;)switch(d){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return d;default:if(s)return;d=(""+d).toLowerCase(),s=!0}}function b(d){var s=S(d);if(typeof s!="string"&&(o.isEncoding===g||!g(d)))throw new Error("Unknown encoding: "+d);return s||d}Re.StringDecoder=y;function y(d){this.encoding=b(d);var s;switch(this.encoding){case"utf16le":this.text=T,this.end=_,s=4;break;case"utf8":this.fillLast=E,s=4;break;case"base64":this.text=X,this.end=V,s=3;break;default:this.write=z,this.end=U;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=o.allocUnsafe(s)}y.prototype.write=function(d){if(d.length===0)return"";var s,N;if(this.lastNeed){if(s=this.fillLast(d),s===void 0)return"";N=this.lastNeed,this.lastNeed=0}else N=0;return N<d.length?s?s+this.text(d,N):this.text(d,N):s||""},y.prototype.end=C,y.prototype.text=F,y.prototype.fillLast=function(d){if(this.lastNeed<=d.length)return d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,this.lastTotal-this.lastNeed,0,d.length),this.lastNeed-=d.length};function B(d){return d<=127?0:d>>5===6?2:d>>4===14?3:d>>3===30?4:d>>6===2?-1:-2}function P(d,s,N){var W=s.length-1;if(W<N)return 0;var H=B(s[W]);return H>=0?(H>0&&(d.lastNeed=H-1),H):--W<N||H===-2?0:(H=B(s[W]),H>=0?(H>0&&(d.lastNeed=H-2),H):--W<N||H===-2?0:(H=B(s[W]),H>=0?(H>0&&(H===2?H=0:d.lastNeed=H-3),H):0))}function O(d,s,N){if((s[0]&192)!==128)return d.lastNeed=0,"�";if(d.lastNeed>1&&s.length>1){if((s[1]&192)!==128)return d.lastNeed=1,"�";if(d.lastNeed>2&&s.length>2&&(s[2]&192)!==128)return d.lastNeed=2,"�"}}function E(d){var s=this.lastTotal-this.lastNeed,N=O(this,d);if(N!==void 0)return N;if(this.lastNeed<=d.length)return d.copy(this.lastChar,s,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);d.copy(this.lastChar,s,0,d.length),this.lastNeed-=d.length}function F(d,s){var N=P(this,d,s);if(!this.lastNeed)return d.toString("utf8",s);this.lastTotal=N;var W=d.length-(N-this.lastNeed);return d.copy(this.lastChar,0,W),d.toString("utf8",s,W)}function C(d){var s=d&&d.length?this.write(d):"";return this.lastNeed?s+"�":s}function T(d,s){if((d.length-s)%2===0){var N=d.toString("utf16le",s);if(N){var W=N.charCodeAt(N.length-1);if(W>=55296&&W<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1],N.slice(0,-1)}return N}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=d[d.length-1],d.toString("utf16le",s,d.length-1)}function _(d){var s=d&&d.length?this.write(d):"";if(this.lastNeed){var N=this.lastTotal-this.lastNeed;return s+this.lastChar.toString("utf16le",0,N)}return s}function X(d,s){var N=(d.length-s)%3;return N===0?d.toString("base64",s):(this.lastNeed=3-N,this.lastTotal=3,N===1?this.lastChar[0]=d[d.length-1]:(this.lastChar[0]=d[d.length-2],this.lastChar[1]=d[d.length-1]),d.toString("base64",s,d.length-N))}function V(d){var s=d&&d.length?this.write(d):"";return this.lastNeed?s+this.lastChar.toString("base64",0,3-this.lastNeed):s}function z(d){return d.toString(this.encoding)}function U(d){return d&&d.length?this.write(d):""}return Re}var Ce={},De={},Mr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var g={},S=Symbol("test"),b=Object(S);if(typeof S=="string"||Object.prototype.toString.call(S)!=="[object Symbol]"||Object.prototype.toString.call(b)!=="[object Symbol]")return!1;var y=42;g[S]=y;for(var B in g)return!1;if(typeof Object.keys=="function"&&Object.keys(g).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(g).length!==0)return!1;var P=Object.getOwnPropertySymbols(g);if(P.length!==1||P[0]!==S||!Object.prototype.propertyIsEnumerable.call(g,S))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var O=Object.getOwnPropertyDescriptor(g,S);if(O.value!==y||O.enumerable!==!0)return!1}return!0},_e,ur;function ir(){if(ur)return _e;ur=1;var o=Mr;return _e=function(){return o()&&!!Symbol.toStringTag},_e}var nt=Object,it=Error,ot=EvalError,at=RangeError,ft=ReferenceError,kr=SyntaxError,Ie=TypeError,st=URIError,ut=Math.abs,lt=Math.floor,ct=Math.max,pt=Math.min,yt=Math.pow,ht=Object.getOwnPropertyDescriptor,Ne=ht;if(Ne)try{Ne([],"length")}catch{Ne=null}var Ae=Ne,Be=Object.defineProperty||!1;if(Be)try{Be({},"a",{value:1})}catch{Be=!1}var Fe=Be,$e,lr;function gt(){if(lr)return $e;lr=1;var o=typeof Symbol<"u"&&Symbol,g=Mr;return $e=function(){return typeof o!="function"||typeof Symbol!="function"||typeof o("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:g()},$e}var Ue,cr;function dt(){if(cr)return Ue;cr=1;var o="Function.prototype.bind called on incompatible ",g=Object.prototype.toString,S=Math.max,b="[object Function]",y=function(E,F){for(var C=[],T=0;T<E.length;T+=1)C[T]=E[T];for(var _=0;_<F.length;_+=1)C[_+E.length]=F[_];return C},B=function(E,F){for(var C=[],T=F,_=0;T<E.length;T+=1,_+=1)C[_]=E[T];return C},P=function(O,E){for(var F="",C=0;C<O.length;C+=1)F+=O[C],C+1<O.length&&(F+=E);return F};return Ue=function(E){var F=this;if(typeof F!="function"||g.apply(F)!==b)throw new TypeError(o+F);for(var C=B(arguments,1),T,_=function(){if(this instanceof T){var d=F.apply(this,y(C,arguments));return Object(d)===d?d:this}return F.apply(E,y(C,arguments))},X=S(0,F.length-C.length),V=[],z=0;z<X;z++)V[z]="$"+z;if(T=Function("binder","return function ("+P(V,",")+"){ return binder.apply(this,arguments); }")(_),F.prototype){var U=function(){};U.prototype=F.prototype,T.prototype=new U,U.prototype=null}return T},Ue}var Me,pr;function we(){if(pr)return Me;pr=1;var o=dt();return Me=Function.prototype.bind||o,Me}var ke,yr;function or(){return yr||(yr=1,ke=Function.prototype.call),ke}var Ge,hr;function ar(){return hr||(hr=1,Ge=Function.prototype.apply),Ge}var vt=typeof Reflect<"u"&&Reflect&&Reflect.apply,mt=we(),At=ar(),wt=or(),St=vt,Gr=St||mt.call(wt,At),bt=we(),Ot=Ie,Et=or(),Pt=Gr,fr=function(g){if(g.length<1||typeof g[0]!="function")throw new Ot("a function is required");return Pt(bt,Et,g)},qe,gr;function Nt(){if(gr)return qe;gr=1;var o=fr,g=Ae,S;try{S=[].__proto__===Array.prototype}catch(P){if(!P||typeof P!="object"||!("code"in P)||P.code!=="ERR_PROTO_ACCESS")throw P}var b=!!S&&g&&g(Object.prototype,"__proto__"),y=Object,B=y.getPrototypeOf;return qe=b&&typeof b.get=="function"?o([b.get]):typeof B=="function"?function(O){return B(O==null?O:y(O))}:!1,qe}var Le,dr;function Bt(){if(dr)return Le;dr=1;var o=Function.prototype.call,g=Object.prototype.hasOwnProperty,S=we();return Le=S.call(o,g),Le}var L,qr=nt,Tt=it,jt=ot,It=at,Ft=ft,ve=kr,de=Ie,Rt=st,Ct=ut,Dt=lt,_t=ct,$t=pt,Ut=yt,Lr=Function,We=function(o){try{return Lr('"use strict"; return ('+o+").constructor;")()}catch{}},me=Ae,Mt=Fe,xe=function(){throw new de},kt=me?function(){try{return arguments.callee,xe}catch{try{return me(arguments,"callee").get}catch{return xe}}}():xe,ye=gt()(),Gt=Nt(),te=typeof Reflect=="function"&&Reflect.getPrototypeOf||qr.getPrototypeOf||Gt,Wr=ar(),Se=or(),ge={},qt=typeof Uint8Array>"u"||!te?L:te(Uint8Array),pe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?L:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?L:ArrayBuffer,"%ArrayIteratorPrototype%":ye&&te?te([][Symbol.iterator]()):L,"%AsyncFromSyncIteratorPrototype%":L,"%AsyncFunction%":ge,"%AsyncGenerator%":ge,"%AsyncGeneratorFunction%":ge,"%AsyncIteratorPrototype%":ge,"%Atomics%":typeof Atomics>"u"?L:Atomics,"%BigInt%":typeof BigInt>"u"?L:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?L:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?L:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?L:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Tt,"%eval%":eval,"%EvalError%":jt,"%Float32Array%":typeof Float32Array>"u"?L:Float32Array,"%Float64Array%":typeof Float64Array>"u"?L:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?L:FinalizationRegistry,"%Function%":Lr,"%GeneratorFunction%":ge,"%Int8Array%":typeof Int8Array>"u"?L:Int8Array,"%Int16Array%":typeof Int16Array>"u"?L:Int16Array,"%Int32Array%":typeof Int32Array>"u"?L:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ye&&te?te(te([][Symbol.iterator]())):L,"%JSON%":typeof JSON=="object"?JSON:L,"%Map%":typeof Map>"u"?L:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ye||!te?L:te(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":qr,"%Object.getOwnPropertyDescriptor%":me,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?L:Promise,"%Proxy%":typeof Proxy>"u"?L:Proxy,"%RangeError%":It,"%ReferenceError%":Ft,"%Reflect%":typeof Reflect>"u"?L:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?L:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ye||!te?L:te(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?L:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ye&&te?te(""[Symbol.iterator]()):L,"%Symbol%":ye?Symbol:L,"%SyntaxError%":ve,"%ThrowTypeError%":kt,"%TypedArray%":qt,"%TypeError%":de,"%Uint8Array%":typeof Uint8Array>"u"?L:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?L:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?L:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?L:Uint32Array,"%URIError%":Rt,"%WeakMap%":typeof WeakMap>"u"?L:WeakMap,"%WeakRef%":typeof WeakRef>"u"?L:WeakRef,"%WeakSet%":typeof WeakSet>"u"?L:WeakSet,"%Function.prototype.call%":Se,"%Function.prototype.apply%":Wr,"%Object.defineProperty%":Mt,"%Math.abs%":Ct,"%Math.floor%":Dt,"%Math.max%":_t,"%Math.min%":$t,"%Math.pow%":Ut};if(te)try{null.error}catch(o){var Lt=te(te(o));pe["%Error.prototype%"]=Lt}var Wt=function o(g){var S;if(g==="%AsyncFunction%")S=We("async function () {}");else if(g==="%GeneratorFunction%")S=We("function* () {}");else if(g==="%AsyncGeneratorFunction%")S=We("async function* () {}");else if(g==="%AsyncGenerator%"){var b=o("%AsyncGeneratorFunction%");b&&(S=b.prototype)}else if(g==="%AsyncIteratorPrototype%"){var y=o("%AsyncGenerator%");y&&te&&(S=te(y.prototype))}return pe[g]=S,S},vr={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},be=we(),Te=Bt(),xt=be.call(Se,Array.prototype.concat),zt=be.call(Wr,Array.prototype.splice),mr=be.call(Se,String.prototype.replace),je=be.call(Se,String.prototype.slice),Vt=be.call(Se,RegExp.prototype.exec),Ht=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Jt=/\\(\\)?/g,Xt=function(g){var S=je(g,0,1),b=je(g,-1);if(S==="%"&&b!=="%")throw new ve("invalid intrinsic syntax, expected closing `%`");if(b==="%"&&S!=="%")throw new ve("invalid intrinsic syntax, expected opening `%`");var y=[];return mr(g,Ht,function(B,P,O,E){y[y.length]=O?mr(E,Jt,"$1"):P||B}),y},Yt=function(g,S){var b=g,y;if(Te(vr,b)&&(y=vr[b],b="%"+y[0]+"%"),Te(pe,b)){var B=pe[b];if(B===ge&&(B=Wt(b)),typeof B>"u"&&!S)throw new de("intrinsic "+g+" exists, but is not available. Please file an issue!");return{alias:y,name:b,value:B}}throw new ve("intrinsic "+g+" does not exist!")},xr=function(g,S){if(typeof g!="string"||g.length===0)throw new de("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof S!="boolean")throw new de('"allowMissing" argument must be a boolean');if(Vt(/^%?[^%]*%?$/,g)===null)throw new ve("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var b=Xt(g),y=b.length>0?b[0]:"",B=Yt("%"+y+"%",S),P=B.name,O=B.value,E=!1,F=B.alias;F&&(y=F[0],zt(b,xt([0,1],F)));for(var C=1,T=!0;C<b.length;C+=1){var _=b[C],X=je(_,0,1),V=je(_,-1);if((X==='"'||X==="'"||X==="`"||V==='"'||V==="'"||V==="`")&&X!==V)throw new ve("property names with quotes must have matching quotes");if((_==="constructor"||!T)&&(E=!0),y+="."+_,P="%"+y+"%",Te(pe,P))O=pe[P];else if(O!=null){if(!(_ in O)){if(!S)throw new de("base intrinsic for "+g+" exists, but the property is not available.");return}if(me&&C+1>=b.length){var z=me(O,_);T=!!z,T&&"get"in z&&!("originalValue"in z.get)?O=z.get:O=O[_]}else T=Te(O,_),O=O[_];T&&!E&&(pe[P]=O)}}return O},zr=xr,Vr=fr,Zt=Vr([zr("%String.prototype.indexOf%")]),Hr=function(g,S){var b=zr(g,!!S);return typeof b=="function"&&Zt(g,".prototype.")>-1?Vr([b]):b},ze,Ar;function Qt(){if(Ar)return ze;Ar=1;var o=ir()(),g=Hr,S=g("Object.prototype.toString"),b=function(O){return o&&O&&typeof O=="object"&&Symbol.toStringTag in O?!1:S(O)==="[object Arguments]"},y=function(O){return b(O)?!0:O!==null&&typeof O=="object"&&"length"in O&&typeof O.length=="number"&&O.length>=0&&S(O)!=="[object Array]"&&"callee"in O&&S(O.callee)==="[object Function]"},B=function(){return b(arguments)}();return b.isLegacyArguments=y,ze=B?b:y,ze}var Ve,wr;function Kt(){if(wr)return Ve;wr=1;var o=Object.prototype.toString,g=Function.prototype.toString,S=/^\s*(?:function)?\*/,b=ir()(),y=Object.getPrototypeOf,B=function(){if(!b)return!1;try{return Function("return function*() {}")()}catch{}},P;return Ve=function(E){if(typeof E!="function")return!1;if(S.test(g.call(E)))return!0;if(!b){var F=o.call(E);return F==="[object GeneratorFunction]"}if(!y)return!1;if(typeof P>"u"){var C=B();P=C?y(C):!1}return y(E)===P},Ve}var He,Sr;function en(){if(Sr)return He;Sr=1;var o=Function.prototype.toString,g=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,S,b;if(typeof g=="function"&&typeof Object.defineProperty=="function")try{S=Object.defineProperty({},"length",{get:function(){throw b}}),b={},g(function(){throw 42},null,S)}catch(s){s!==b&&(g=null)}else g=null;var y=/^\s*class\b/,B=function(N){try{var W=o.call(N);return y.test(W)}catch{return!1}},P=function(N){try{return B(N)?!1:(o.call(N),!0)}catch{return!1}},O=Object.prototype.toString,E="[object Object]",F="[object Function]",C="[object GeneratorFunction]",T="[object HTMLAllCollection]",_="[object HTML document.all class]",X="[object HTMLCollection]",V=typeof Symbol=="function"&&!!Symbol.toStringTag,z=!(0 in[,]),U=function(){return!1};if(typeof document=="object"){var d=document.all;O.call(d)===O.call(document.all)&&(U=function(N){if((z||!N)&&(typeof N>"u"||typeof N=="object"))try{var W=O.call(N);return(W===T||W===_||W===X||W===E)&&N("")==null}catch{}return!1})}return He=g?function(N){if(U(N))return!0;if(!N||typeof N!="function"&&typeof N!="object")return!1;try{g(N,null,S)}catch(W){if(W!==b)return!1}return!B(N)&&P(N)}:function(N){if(U(N))return!0;if(!N||typeof N!="function"&&typeof N!="object")return!1;if(V)return P(N);if(B(N))return!1;var W=O.call(N);return W!==F&&W!==C&&!/^\[object HTML/.test(W)?!1:P(N)},He}var Je,br;function rn(){if(br)return Je;br=1;var o=en(),g=Object.prototype.toString,S=Object.prototype.hasOwnProperty,b=function(E,F,C){for(var T=0,_=E.length;T<_;T++)S.call(E,T)&&(C==null?F(E[T],T,E):F.call(C,E[T],T,E))},y=function(E,F,C){for(var T=0,_=E.length;T<_;T++)C==null?F(E.charAt(T),T,E):F.call(C,E.charAt(T),T,E)},B=function(E,F,C){for(var T in E)S.call(E,T)&&(C==null?F(E[T],T,E):F.call(C,E[T],T,E))},P=function(E,F,C){if(!o(F))throw new TypeError("iterator must be a function");var T;arguments.length>=3&&(T=C),g.call(E)==="[object Array]"?b(E,F,T):typeof E=="string"?y(E,F,T):B(E,F,T)};return Je=P,Je}var Xe,Or;function tn(){return Or||(Or=1,Xe=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Xe}var Ye,Er;function nn(){if(Er)return Ye;Er=1;var o=tn(),g=typeof globalThis>"u"?Ur:globalThis;return Ye=function(){for(var b=[],y=0;y<o.length;y++)typeof g[o[y]]=="function"&&(b[b.length]=o[y]);return b},Ye}var Jr={exports:{}},Pr=Fe,on=kr,he=Ie,Nr=Ae,an=function(g,S,b){if(!g||typeof g!="object"&&typeof g!="function")throw new he("`obj` must be an object or a function`");if(typeof S!="string"&&typeof S!="symbol")throw new he("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new he("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new he("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new he("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new he("`loose`, if provided, must be a boolean");var y=arguments.length>3?arguments[3]:null,B=arguments.length>4?arguments[4]:null,P=arguments.length>5?arguments[5]:null,O=arguments.length>6?arguments[6]:!1,E=!!Nr&&Nr(g,S);if(Pr)Pr(g,S,{configurable:P===null&&E?E.configurable:!P,enumerable:y===null&&E?E.enumerable:!y,value:b,writable:B===null&&E?E.writable:!B});else if(O||!y&&!B&&!P)g[S]=b;else throw new on("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},nr=Fe,Xr=function(){return!!nr};Xr.hasArrayLengthDefineBug=function(){if(!nr)return null;try{return nr([],"length",{value:1}).length!==1}catch{return!0}};var fn=Xr,sn=xr,Br=an,un=fn(),Tr=Ae,jr=Ie,ln=sn("%Math.floor%"),cn=function(g,S){if(typeof g!="function")throw new jr("`fn` is not a function");if(typeof S!="number"||S<0||S>4294967295||ln(S)!==S)throw new jr("`length` must be a positive 32-bit integer");var b=arguments.length>2&&!!arguments[2],y=!0,B=!0;if("length"in g&&Tr){var P=Tr(g,"length");P&&!P.configurable&&(y=!1),P&&!P.writable&&(B=!1)}return(y||B||!b)&&(un?Br(g,"length",S,!0,!0):Br(g,"length",S)),g},pn=we(),yn=ar(),hn=Gr,gn=function(){return hn(pn,yn,arguments)};(function(o){var g=cn,S=Fe,b=fr,y=gn;o.exports=function(P){var O=b(arguments),E=P.length-(arguments.length-1);return g(O,1+(E>0?E:0),!0)},S?S(o.exports,"apply",{value:y}):o.exports.apply=y})(Jr);var dn=Jr.exports,Ze,Ir;function Yr(){if(Ir)return Ze;Ir=1;var o=rn(),g=nn(),S=dn,b=Hr,y=Ae,B=b("Object.prototype.toString"),P=ir()(),O=typeof globalThis>"u"?Ur:globalThis,E=g(),F=b("String.prototype.slice"),C=Object.getPrototypeOf,T=b("Array.prototype.indexOf",!0)||function(U,d){for(var s=0;s<U.length;s+=1)if(U[s]===d)return s;return-1},_={__proto__:null};P&&y&&C?o(E,function(z){var U=new O[z];if(Symbol.toStringTag in U){var d=C(U),s=y(d,Symbol.toStringTag);if(!s){var N=C(d);s=y(N,Symbol.toStringTag)}_["$"+z]=S(s.get)}}):o(E,function(z){var U=new O[z],d=U.slice||U.set;d&&(_["$"+z]=S(d))});var X=function(U){var d=!1;return o(_,function(s,N){if(!d)try{"$"+s(U)===N&&(d=F(N,1))}catch{}}),d},V=function(U){var d=!1;return o(_,function(s,N){if(!d)try{s(U),d=F(N,1)}catch{}}),d};return Ze=function(U){if(!U||typeof U!="object")return!1;if(!P){var d=F(B(U),8,-1);return T(E,d)>-1?d:d!=="Object"?!1:V(U)}return y?X(U):null},Ze}var Qe,Fr;function vn(){if(Fr)return Qe;Fr=1;var o=Yr();return Qe=function(S){return!!o(S)},Qe}var Rr;function mn(){return Rr||(Rr=1,function(o){var g=Qt(),S=Kt(),b=Yr(),y=vn();function B(w){return w.call.bind(w)}var P=typeof BigInt<"u",O=typeof Symbol<"u",E=B(Object.prototype.toString),F=B(Number.prototype.valueOf),C=B(String.prototype.valueOf),T=B(Boolean.prototype.valueOf);if(P)var _=B(BigInt.prototype.valueOf);if(O)var X=B(Symbol.prototype.valueOf);function V(w,et){if(typeof w!="object")return!1;try{return et(w),!0}catch{return!1}}o.isArgumentsObject=g,o.isGeneratorFunction=S,o.isTypedArray=y;function z(w){return typeof Promise<"u"&&w instanceof Promise||w!==null&&typeof w=="object"&&typeof w.then=="function"&&typeof w.catch=="function"}o.isPromise=z;function U(w){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(w):y(w)||u(w)}o.isArrayBufferView=U;function d(w){return b(w)==="Uint8Array"}o.isUint8Array=d;function s(w){return b(w)==="Uint8ClampedArray"}o.isUint8ClampedArray=s;function N(w){return b(w)==="Uint16Array"}o.isUint16Array=N;function W(w){return b(w)==="Uint32Array"}o.isUint32Array=W;function H(w){return b(w)==="Int8Array"}o.isInt8Array=H;function ee(w){return b(w)==="Int16Array"}o.isInt16Array=ee;function ie(w){return b(w)==="Int32Array"}o.isInt32Array=ie;function e(w){return b(w)==="Float32Array"}o.isFloat32Array=e;function r(w){return b(w)==="Float64Array"}o.isFloat64Array=r;function t(w){return b(w)==="BigInt64Array"}o.isBigInt64Array=t;function c(w){return b(w)==="BigUint64Array"}o.isBigUint64Array=c;function i(w){return E(w)==="[object Map]"}i.working=typeof Map<"u"&&i(new Map);function f(w){return typeof Map>"u"?!1:i.working?i(w):w instanceof Map}o.isMap=f;function h(w){return E(w)==="[object Set]"}h.working=typeof Set<"u"&&h(new Set);function n(w){return typeof Set>"u"?!1:h.working?h(w):w instanceof Set}o.isSet=n;function a(w){return E(w)==="[object WeakMap]"}a.working=typeof WeakMap<"u"&&a(new WeakMap);function p(w){return typeof WeakMap>"u"?!1:a.working?a(w):w instanceof WeakMap}o.isWeakMap=p;function l(w){return E(w)==="[object WeakSet]"}l.working=typeof WeakSet<"u"&&l(new WeakSet);function A(w){return l(w)}o.isWeakSet=A;function j(w){return E(w)==="[object ArrayBuffer]"}j.working=typeof ArrayBuffer<"u"&&j(new ArrayBuffer);function R(w){return typeof ArrayBuffer>"u"?!1:j.working?j(w):w instanceof ArrayBuffer}o.isArrayBuffer=R;function k(w){return E(w)==="[object DataView]"}k.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&k(new DataView(new ArrayBuffer(1),0,1));function u(w){return typeof DataView>"u"?!1:k.working?k(w):w instanceof DataView}o.isDataView=u;var v=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function m(w){return E(w)==="[object SharedArrayBuffer]"}function I(w){return typeof v>"u"?!1:(typeof m.working>"u"&&(m.working=m(new v)),m.working?m(w):w instanceof v)}o.isSharedArrayBuffer=I;function D(w){return E(w)==="[object AsyncFunction]"}o.isAsyncFunction=D;function x(w){return E(w)==="[object Map Iterator]"}o.isMapIterator=x;function M(w){return E(w)==="[object Set Iterator]"}o.isSetIterator=M;function q(w){return E(w)==="[object Generator]"}o.isGeneratorObject=q;function G(w){return E(w)==="[object WebAssembly.Module]"}o.isWebAssemblyCompiledModule=G;function Z(w){return V(w,F)}o.isNumberObject=Z;function Q(w){return V(w,C)}o.isStringObject=Q;function K(w){return V(w,T)}o.isBooleanObject=K;function J(w){return P&&V(w,_)}o.isBigIntObject=J;function Oe(w){return O&&V(w,X)}o.isSymbolObject=Oe;function Qr(w){return Z(w)||Q(w)||K(w)||J(w)||Oe(w)}o.isBoxedPrimitive=Qr;function Kr(w){return typeof Uint8Array<"u"&&(R(w)||I(w))}o.isAnyArrayBuffer=Kr,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(w){Object.defineProperty(o,w,{enumerable:!1,value:function(){throw new Error(w+" is not supported in userland")}})})}(De)),De}var Ke,Cr;function An(){return Cr||(Cr=1,Ke=function(g){return g&&typeof g=="object"&&typeof g.copy=="function"&&typeof g.fill=="function"&&typeof g.readUInt8=="function"}),Ke}var Dr;function Pn(){return Dr||(Dr=1,function(o){var g={},S=Object.getOwnPropertyDescriptors||function(v){for(var m=Object.keys(v),I={},D=0;D<m.length;D++)I[m[D]]=Object.getOwnPropertyDescriptor(v,m[D]);return I},b=/%[sdj%]/g;o.format=function(u){if(!ee(u)){for(var v=[],m=0;m<arguments.length;m++)v.push(O(arguments[m]));return v.join(" ")}for(var m=1,I=arguments,D=I.length,x=String(u).replace(b,function(q){if(q==="%%")return"%";if(m>=D)return q;switch(q){case"%s":return String(I[m++]);case"%d":return Number(I[m++]);case"%j":try{return JSON.stringify(I[m++])}catch{return"[Circular]"}default:return q}}),M=I[m];m<D;M=I[++m])N(M)||!t(M)?x+=" "+M:x+=" "+O(M);return x},o.deprecate=function(u,v){if(typeof process<"u"&&process.noDeprecation===!0)return u;if(typeof process>"u")return function(){return o.deprecate(u,v).apply(this,arguments)};var m=!1;function I(){if(!m){if(process.throwDeprecation)throw new Error(v);process.traceDeprecation?console.trace(v):console.error(v),m=!0}return u.apply(this,arguments)}return I};var y={},B=/^$/;if(g.NODE_DEBUG){var P=g.NODE_DEBUG;P=P.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),B=new RegExp("^"+P+"$","i")}o.debuglog=function(u){if(u=u.toUpperCase(),!y[u])if(B.test(u)){var v=process.pid;y[u]=function(){var m=o.format.apply(o,arguments);console.error("%s %d: %s",u,v,m)}}else y[u]=function(){};return y[u]};function O(u,v){var m={seen:[],stylize:F};return arguments.length>=3&&(m.depth=arguments[2]),arguments.length>=4&&(m.colors=arguments[3]),s(v)?m.showHidden=v:v&&o._extend(m,v),e(m.showHidden)&&(m.showHidden=!1),e(m.depth)&&(m.depth=2),e(m.colors)&&(m.colors=!1),e(m.customInspect)&&(m.customInspect=!0),m.colors&&(m.stylize=E),T(m,u,m.depth)}o.inspect=O,O.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},O.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function E(u,v){var m=O.styles[v];return m?"\x1B["+O.colors[m][0]+"m"+u+"\x1B["+O.colors[m][1]+"m":u}function F(u,v){return u}function C(u){var v={};return u.forEach(function(m,I){v[m]=!0}),v}function T(u,v,m){if(u.customInspect&&v&&f(v.inspect)&&v.inspect!==o.inspect&&!(v.constructor&&v.constructor.prototype===v)){var I=v.inspect(m,u);return ee(I)||(I=T(u,I,m)),I}var D=_(u,v);if(D)return D;var x=Object.keys(v),M=C(x);if(u.showHidden&&(x=Object.getOwnPropertyNames(v)),i(v)&&(x.indexOf("message")>=0||x.indexOf("description")>=0))return X(v);if(x.length===0){if(f(v)){var q=v.name?": "+v.name:"";return u.stylize("[Function"+q+"]","special")}if(r(v))return u.stylize(RegExp.prototype.toString.call(v),"regexp");if(c(v))return u.stylize(Date.prototype.toString.call(v),"date");if(i(v))return X(v)}var G="",Z=!1,Q=["{","}"];if(d(v)&&(Z=!0,Q=["[","]"]),f(v)){var K=v.name?": "+v.name:"";G=" [Function"+K+"]"}if(r(v)&&(G=" "+RegExp.prototype.toString.call(v)),c(v)&&(G=" "+Date.prototype.toUTCString.call(v)),i(v)&&(G=" "+X(v)),x.length===0&&(!Z||v.length==0))return Q[0]+G+Q[1];if(m<0)return r(v)?u.stylize(RegExp.prototype.toString.call(v),"regexp"):u.stylize("[Object]","special");u.seen.push(v);var J;return Z?J=V(u,v,m,M,x):J=x.map(function(Oe){return z(u,v,m,M,Oe,Z)}),u.seen.pop(),U(J,G,Q)}function _(u,v){if(e(v))return u.stylize("undefined","undefined");if(ee(v)){var m="'"+JSON.stringify(v).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return u.stylize(m,"string")}if(H(v))return u.stylize(""+v,"number");if(s(v))return u.stylize(""+v,"boolean");if(N(v))return u.stylize("null","null")}function X(u){return"["+Error.prototype.toString.call(u)+"]"}function V(u,v,m,I,D){for(var x=[],M=0,q=v.length;M<q;++M)A(v,String(M))?x.push(z(u,v,m,I,String(M),!0)):x.push("");return D.forEach(function(G){G.match(/^\d+$/)||x.push(z(u,v,m,I,G,!0))}),x}function z(u,v,m,I,D,x){var M,q,G;if(G=Object.getOwnPropertyDescriptor(v,D)||{value:v[D]},G.get?G.set?q=u.stylize("[Getter/Setter]","special"):q=u.stylize("[Getter]","special"):G.set&&(q=u.stylize("[Setter]","special")),A(I,D)||(M="["+D+"]"),q||(u.seen.indexOf(G.value)<0?(N(m)?q=T(u,G.value,null):q=T(u,G.value,m-1),q.indexOf(`
2
+ `)>-1&&(x?q=q.split(`
3
+ `).map(function(Z){return" "+Z}).join(`
4
+ `).slice(2):q=`
5
+ `+q.split(`
6
+ `).map(function(Z){return" "+Z}).join(`
7
+ `))):q=u.stylize("[Circular]","special")),e(M)){if(x&&D.match(/^\d+$/))return q;M=JSON.stringify(""+D),M.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(M=M.slice(1,-1),M=u.stylize(M,"name")):(M=M.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),M=u.stylize(M,"string"))}return M+": "+q}function U(u,v,m){var I=u.reduce(function(D,x){return x.indexOf(`
8
+ `)>=0,D+x.replace(/\u001b\[\d\d?m/g,"").length+1},0);return I>60?m[0]+(v===""?"":v+`
9
+ `)+" "+u.join(`,
10
+ `)+" "+m[1]:m[0]+v+" "+u.join(", ")+" "+m[1]}o.types=mn();function d(u){return Array.isArray(u)}o.isArray=d;function s(u){return typeof u=="boolean"}o.isBoolean=s;function N(u){return u===null}o.isNull=N;function W(u){return u==null}o.isNullOrUndefined=W;function H(u){return typeof u=="number"}o.isNumber=H;function ee(u){return typeof u=="string"}o.isString=ee;function ie(u){return typeof u=="symbol"}o.isSymbol=ie;function e(u){return u===void 0}o.isUndefined=e;function r(u){return t(u)&&n(u)==="[object RegExp]"}o.isRegExp=r,o.types.isRegExp=r;function t(u){return typeof u=="object"&&u!==null}o.isObject=t;function c(u){return t(u)&&n(u)==="[object Date]"}o.isDate=c,o.types.isDate=c;function i(u){return t(u)&&(n(u)==="[object Error]"||u instanceof Error)}o.isError=i,o.types.isNativeError=i;function f(u){return typeof u=="function"}o.isFunction=f;function h(u){return u===null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||typeof u=="symbol"||typeof u>"u"}o.isPrimitive=h,o.isBuffer=An();function n(u){return Object.prototype.toString.call(u)}function a(u){return u<10?"0"+u.toString(10):u.toString(10)}var p=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function l(){var u=new Date,v=[a(u.getHours()),a(u.getMinutes()),a(u.getSeconds())].join(":");return[u.getDate(),p[u.getMonth()],v].join(" ")}o.log=function(){console.log("%s - %s",l(),o.format.apply(o,arguments))},o.inherits=tt,o._extend=function(u,v){if(!v||!t(v))return u;for(var m=Object.keys(v),I=m.length;I--;)u[m[I]]=v[m[I]];return u};function A(u,v){return Object.prototype.hasOwnProperty.call(u,v)}var j=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;o.promisify=function(v){if(typeof v!="function")throw new TypeError('The "original" argument must be of type Function');if(j&&v[j]){var m=v[j];if(typeof m!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(m,j,{value:m,enumerable:!1,writable:!1,configurable:!0}),m}function m(){for(var I,D,x=new Promise(function(G,Z){I=G,D=Z}),M=[],q=0;q<arguments.length;q++)M.push(arguments[q]);M.push(function(G,Z){G?D(G):I(Z)});try{v.apply(this,M)}catch(G){D(G)}return x}return Object.setPrototypeOf(m,Object.getPrototypeOf(v)),j&&Object.defineProperty(m,j,{value:m,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(m,S(v))},o.promisify.custom=j;function R(u,v){if(!u){var m=new Error("Promise was rejected with a falsy value");m.reason=u,u=m}return v(u)}function k(u){if(typeof u!="function")throw new TypeError('The "original" argument must be of type Function');function v(){for(var m=[],I=0;I<arguments.length;I++)m.push(arguments[I]);var D=m.pop();if(typeof D!="function")throw new TypeError("The last argument must be of type Function");var x=this,M=function(){return D.apply(x,arguments)};u.apply(this,m).then(function(q){process.nextTick(M.bind(null,null,q))},function(q){process.nextTick(R.bind(null,q,M))})}return Object.setPrototypeOf(v,Object.getPrototypeOf(u)),Object.defineProperties(v,S(u)),v}o.callbackify=k}(Ce)),Ce}var wn=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,er=Math.ceil,ae=Math.floor,ne="[BigNumber Error] ",_r=ne+"Number primitive has more than 15 significant digits: ",se=1e14,$=14,rr=9007199254740991,tr=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],le=1e7,re=1e9;function Zr(o){var g,S,b,y=s.prototype={constructor:s,toString:null,valueOf:null},B=new s(1),P=20,O=4,E=-7,F=21,C=-1e7,T=1e7,_=!1,X=1,V=0,z={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},U="0123456789abcdefghijklmnopqrstuvwxyz",d=!0;function s(e,r){var t,c,i,f,h,n,a,p,l=this;if(!(l instanceof s))return new s(e,r);if(r==null){if(e&&e._isBigNumber===!0){l.s=e.s,!e.c||e.e>T?l.c=l.e=null:e.e<C?l.c=[l.e=0]:(l.e=e.e,l.c=e.c.slice());return}if((n=typeof e=="number")&&e*0==0){if(l.s=1/e<0?(e=-e,-1):1,e===~~e){for(f=0,h=e;h>=10;h/=10,f++);f>T?l.c=l.e=null:(l.e=f,l.c=[e]);return}p=String(e)}else{if(!wn.test(p=String(e)))return b(l,p,n);l.s=p.charCodeAt(0)==45?(p=p.slice(1),-1):1}(f=p.indexOf("."))>-1&&(p=p.replace(".","")),(h=p.search(/e/i))>0?(f<0&&(f=h),f+=+p.slice(h+1),p=p.substring(0,h)):f<0&&(f=p.length)}else{if(Y(r,2,U.length,"Base"),r==10&&d)return l=new s(e),ee(l,P+l.e+1,O);if(p=String(e),n=typeof e=="number"){if(e*0!=0)return b(l,p,n,r);if(l.s=1/e<0?(p=p.slice(1),-1):1,s.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(_r+e)}else l.s=p.charCodeAt(0)===45?(p=p.slice(1),-1):1;for(t=U.slice(0,r),f=h=0,a=p.length;h<a;h++)if(t.indexOf(c=p.charAt(h))<0){if(c=="."){if(h>f){f=a;continue}}else if(!i&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){i=!0,h=-1,f=0;continue}return b(l,String(e),n,r)}n=!1,p=S(p,r,10,l.s),(f=p.indexOf("."))>-1?p=p.replace(".",""):f=p.length}for(h=0;p.charCodeAt(h)===48;h++);for(a=p.length;p.charCodeAt(--a)===48;);if(p=p.slice(h,++a)){if(a-=h,n&&s.DEBUG&&a>15&&(e>rr||e!==ae(e)))throw Error(_r+l.s*e);if((f=f-h-1)>T)l.c=l.e=null;else if(f<C)l.c=[l.e=0];else{if(l.e=f,l.c=[],h=(f+1)%$,f<0&&(h+=$),h<a){for(h&&l.c.push(+p.slice(0,h)),a-=$;h<a;)l.c.push(+p.slice(h,h+=$));h=$-(p=p.slice(h)).length}else h-=a;for(;h--;p+="0");l.c.push(+p)}}else l.c=[l.e=0]}s.clone=Zr,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=function(e){var r,t;if(e!=null)if(typeof e=="object"){if(e.hasOwnProperty(r="DECIMAL_PLACES")&&(t=e[r],Y(t,0,re,r),P=t),e.hasOwnProperty(r="ROUNDING_MODE")&&(t=e[r],Y(t,0,8,r),O=t),e.hasOwnProperty(r="EXPONENTIAL_AT")&&(t=e[r],t&&t.pop?(Y(t[0],-re,0,r),Y(t[1],0,re,r),E=t[0],F=t[1]):(Y(t,-re,re,r),E=-(F=t<0?-t:t))),e.hasOwnProperty(r="RANGE"))if(t=e[r],t&&t.pop)Y(t[0],-re,-1,r),Y(t[1],1,re,r),C=t[0],T=t[1];else if(Y(t,-re,re,r),t)C=-(T=t<0?-t:t);else throw Error(ne+r+" cannot be zero: "+t);if(e.hasOwnProperty(r="CRYPTO"))if(t=e[r],t===!!t)if(t)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))_=t;else throw _=!t,Error(ne+"crypto unavailable");else _=t;else throw Error(ne+r+" not true or false: "+t);if(e.hasOwnProperty(r="MODULO_MODE")&&(t=e[r],Y(t,0,9,r),X=t),e.hasOwnProperty(r="POW_PRECISION")&&(t=e[r],Y(t,0,re,r),V=t),e.hasOwnProperty(r="FORMAT"))if(t=e[r],typeof t=="object")z=t;else throw Error(ne+r+" not an object: "+t);if(e.hasOwnProperty(r="ALPHABET"))if(t=e[r],typeof t=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(t))d=t.slice(0,10)=="0123456789",U=t;else throw Error(ne+r+" invalid: "+t)}else throw Error(ne+"Object expected: "+e);return{DECIMAL_PLACES:P,ROUNDING_MODE:O,EXPONENTIAL_AT:[E,F],RANGE:[C,T],CRYPTO:_,MODULO_MODE:X,POW_PRECISION:V,FORMAT:z,ALPHABET:U}},s.isBigNumber=function(e){if(!e||e._isBigNumber!==!0)return!1;if(!s.DEBUG)return!0;var r,t,c=e.c,i=e.e,f=e.s;e:if({}.toString.call(c)=="[object Array]"){if((f===1||f===-1)&&i>=-re&&i<=re&&i===ae(i)){if(c[0]===0){if(i===0&&c.length===1)return!0;break e}if(r=(i+1)%$,r<1&&(r+=$),String(c[0]).length==r){for(r=0;r<c.length;r++)if(t=c[r],t<0||t>=se||t!==ae(t))break e;if(t!==0)return!0}}}else if(c===null&&i===null&&(f===null||f===1||f===-1))return!0;throw Error(ne+"Invalid BigNumber: "+e)},s.maximum=s.max=function(){return W(arguments,-1)},s.minimum=s.min=function(){return W(arguments,1)},s.random=function(){var e=9007199254740992,r=Math.random()*e&2097151?function(){return ae(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(t){var c,i,f,h,n,a=0,p=[],l=new s(B);if(t==null?t=P:Y(t,0,re),h=er(t/$),_)if(crypto.getRandomValues){for(c=crypto.getRandomValues(new Uint32Array(h*=2));a<h;)n=c[a]*131072+(c[a+1]>>>11),n>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),c[a]=i[0],c[a+1]=i[1]):(p.push(n%1e14),a+=2);a=h/2}else if(crypto.randomBytes){for(c=crypto.randomBytes(h*=7);a<h;)n=(c[a]&31)*281474976710656+c[a+1]*1099511627776+c[a+2]*4294967296+c[a+3]*16777216+(c[a+4]<<16)+(c[a+5]<<8)+c[a+6],n>=9e15?crypto.randomBytes(7).copy(c,a):(p.push(n%1e14),a+=7);a=h/7}else throw _=!1,Error(ne+"crypto unavailable");if(!_)for(;a<h;)n=r(),n<9e15&&(p[a++]=n%1e14);for(h=p[--a],t%=$,h&&t&&(n=tr[$-t],p[a]=ae(h/n)*n);p[a]===0;p.pop(),a--);if(a<0)p=[f=0];else{for(f=-1;p[0]===0;p.splice(0,1),f-=$);for(a=1,n=p[0];n>=10;n/=10,a++);a<$&&(f-=$-a)}return l.e=f,l.c=p,l}}(),s.sum=function(){for(var e=1,r=arguments,t=new s(r[0]);e<r.length;)t=t.plus(r[e++]);return t},S=function(){var e="0123456789";function r(t,c,i,f){for(var h,n=[0],a,p=0,l=t.length;p<l;){for(a=n.length;a--;n[a]*=c);for(n[0]+=f.indexOf(t.charAt(p++)),h=0;h<n.length;h++)n[h]>i-1&&(n[h+1]==null&&(n[h+1]=0),n[h+1]+=n[h]/i|0,n[h]%=i)}return n.reverse()}return function(t,c,i,f,h){var n,a,p,l,A,j,R,k,u=t.indexOf("."),v=P,m=O;for(u>=0&&(l=V,V=0,t=t.replace(".",""),k=new s(c),j=k.pow(t.length-u),V=l,k.c=r(ue(oe(j.c),j.e,"0"),10,i,e),k.e=k.c.length),R=r(t,c,i,h?(n=U,e):(n=e,U)),p=l=R.length;R[--l]==0;R.pop());if(!R[0])return n.charAt(0);if(u<0?--p:(j.c=R,j.e=p,j.s=f,j=g(j,k,v,m,i),R=j.c,A=j.r,p=j.e),a=p+v+1,u=R[a],l=i/2,A=A||a<0||R[a+1]!=null,A=m<4?(u!=null||A)&&(m==0||m==(j.s<0?3:2)):u>l||u==l&&(m==4||A||m==6&&R[a-1]&1||m==(j.s<0?8:7)),a<1||!R[0])t=A?ue(n.charAt(1),-v,n.charAt(0)):n.charAt(0);else{if(R.length=a,A)for(--i;++R[--a]>i;)R[a]=0,a||(++p,R=[1].concat(R));for(l=R.length;!R[--l];);for(u=0,t="";u<=l;t+=n.charAt(R[u++]));t=ue(t,p,n.charAt(0))}return t}}(),g=function(){function e(c,i,f){var h,n,a,p,l=0,A=c.length,j=i%le,R=i/le|0;for(c=c.slice();A--;)a=c[A]%le,p=c[A]/le|0,h=R*a+p*j,n=j*a+h%le*le+l,l=(n/f|0)+(h/le|0)+R*p,c[A]=n%f;return l&&(c=[l].concat(c)),c}function r(c,i,f,h){var n,a;if(f!=h)a=f>h?1:-1;else for(n=a=0;n<f;n++)if(c[n]!=i[n]){a=c[n]>i[n]?1:-1;break}return a}function t(c,i,f,h){for(var n=0;f--;)c[f]-=n,n=c[f]<i[f]?1:0,c[f]=n*h+c[f]-i[f];for(;!c[0]&&c.length>1;c.splice(0,1));}return function(c,i,f,h,n){var a,p,l,A,j,R,k,u,v,m,I,D,x,M,q,G,Z,Q=c.s==i.s?1:-1,K=c.c,J=i.c;if(!K||!K[0]||!J||!J[0])return new s(!c.s||!i.s||(K?J&&K[0]==J[0]:!J)?NaN:K&&K[0]==0||!J?Q*0:Q/0);for(u=new s(Q),v=u.c=[],p=c.e-i.e,Q=f+p+1,n||(n=se,p=fe(c.e/$)-fe(i.e/$),Q=Q/$|0),l=0;J[l]==(K[l]||0);l++);if(J[l]>(K[l]||0)&&p--,Q<0)v.push(1),A=!0;else{for(M=K.length,G=J.length,l=0,Q+=2,j=ae(n/(J[0]+1)),j>1&&(J=e(J,j,n),K=e(K,j,n),G=J.length,M=K.length),x=G,m=K.slice(0,G),I=m.length;I<G;m[I++]=0);Z=J.slice(),Z=[0].concat(Z),q=J[0],J[1]>=n/2&&q++;do{if(j=0,a=r(J,m,G,I),a<0){if(D=m[0],G!=I&&(D=D*n+(m[1]||0)),j=ae(D/q),j>1)for(j>=n&&(j=n-1),R=e(J,j,n),k=R.length,I=m.length;r(R,m,k,I)==1;)j--,t(R,G<k?Z:J,k,n),k=R.length,a=1;else j==0&&(a=j=1),R=J.slice(),k=R.length;if(k<I&&(R=[0].concat(R)),t(m,R,I,n),I=m.length,a==-1)for(;r(J,m,G,I)<1;)j++,t(m,G<I?Z:J,I,n),I=m.length}else a===0&&(j++,m=[0]);v[l++]=j,m[0]?m[I++]=K[x]||0:(m=[K[x]],I=1)}while((x++<M||m[0]!=null)&&Q--);A=m[0]!=null,v[0]||v.splice(0,1)}if(n==se){for(l=1,Q=v[0];Q>=10;Q/=10,l++);ee(u,f+(u.e=l+p*$-1)+1,h,A)}else u.e=p,u.r=+A;return u}}();function N(e,r,t,c){var i,f,h,n,a;if(t==null?t=O:Y(t,0,8),!e.c)return e.toString();if(i=e.c[0],h=e.e,r==null)a=oe(e.c),a=c==1||c==2&&(h<=E||h>=F)?Pe(a,h):ue(a,h,"0");else if(e=ee(new s(e),r,t),f=e.e,a=oe(e.c),n=a.length,c==1||c==2&&(r<=f||f<=E)){for(;n<r;a+="0",n++);a=Pe(a,f)}else if(r-=h,a=ue(a,f,"0"),f+1>n){if(--r>0)for(a+=".";r--;a+="0");}else if(r+=f-n,r>0)for(f+1==n&&(a+=".");r--;a+="0");return e.s<0&&i?"-"+a:a}function W(e,r){for(var t,c,i=1,f=new s(e[0]);i<e.length;i++)c=new s(e[i]),(!c.s||(t=ce(f,c))===r||t===0&&f.s===r)&&(f=c);return f}function H(e,r,t){for(var c=1,i=r.length;!r[--i];r.pop());for(i=r[0];i>=10;i/=10,c++);return(t=c+t*$-1)>T?e.c=e.e=null:t<C?e.c=[e.e=0]:(e.e=t,e.c=r),e}b=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,r=/^([^.]+)\.$/,t=/^\.([^.]+)$/,c=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(f,h,n,a){var p,l=n?h:h.replace(i,"");if(c.test(l))f.s=isNaN(l)?null:l<0?-1:1;else{if(!n&&(l=l.replace(e,function(A,j,R){return p=(R=R.toLowerCase())=="x"?16:R=="b"?2:8,!a||a==p?j:A}),a&&(p=a,l=l.replace(r,"$1").replace(t,"0.$1")),h!=l))return new s(l,p);if(s.DEBUG)throw Error(ne+"Not a"+(a?" base "+a:"")+" number: "+h);f.s=null}f.c=f.e=null}}();function ee(e,r,t,c){var i,f,h,n,a,p,l,A=e.c,j=tr;if(A){e:{for(i=1,n=A[0];n>=10;n/=10,i++);if(f=r-i,f<0)f+=$,h=r,a=A[p=0],l=ae(a/j[i-h-1]%10);else if(p=er((f+1)/$),p>=A.length)if(c){for(;A.length<=p;A.push(0));a=l=0,i=1,f%=$,h=f-$+1}else break e;else{for(a=n=A[p],i=1;n>=10;n/=10,i++);f%=$,h=f-$+i,l=h<0?0:ae(a/j[i-h-1]%10)}if(c=c||r<0||A[p+1]!=null||(h<0?a:a%j[i-h-1]),c=t<4?(l||c)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||c||t==6&&(f>0?h>0?a/j[i-h]:0:A[p-1])%10&1||t==(e.s<0?8:7)),r<1||!A[0])return A.length=0,c?(r-=e.e+1,A[0]=j[($-r%$)%$],e.e=-r||0):A[0]=e.e=0,e;if(f==0?(A.length=p,n=1,p--):(A.length=p+1,n=j[$-f],A[p]=h>0?ae(a/j[i-h]%j[h])*n:0),c)for(;;)if(p==0){for(f=1,h=A[0];h>=10;h/=10,f++);for(h=A[0]+=n,n=1;h>=10;h/=10,n++);f!=n&&(e.e++,A[0]==se&&(A[0]=1));break}else{if(A[p]+=n,A[p]!=se)break;A[p--]=0,n=1}for(f=A.length;A[--f]===0;A.pop());}e.e>T?e.c=e.e=null:e.e<C&&(e.c=[e.e=0])}return e}function ie(e){var r,t=e.e;return t===null?e.toString():(r=oe(e.c),r=t<=E||t>=F?Pe(r,t):ue(r,t,"0"),e.s<0?"-"+r:r)}return y.absoluteValue=y.abs=function(){var e=new s(this);return e.s<0&&(e.s=1),e},y.comparedTo=function(e,r){return ce(this,new s(e,r))},y.decimalPlaces=y.dp=function(e,r){var t,c,i,f=this;if(e!=null)return Y(e,0,re),r==null?r=O:Y(r,0,8),ee(new s(f),e+f.e+1,r);if(!(t=f.c))return null;if(c=((i=t.length-1)-fe(this.e/$))*$,i=t[i])for(;i%10==0;i/=10,c--);return c<0&&(c=0),c},y.dividedBy=y.div=function(e,r){return g(this,new s(e,r),P,O)},y.dividedToIntegerBy=y.idiv=function(e,r){return g(this,new s(e,r),0,1)},y.exponentiatedBy=y.pow=function(e,r){var t,c,i,f,h,n,a,p,l,A=this;if(e=new s(e),e.c&&!e.isInteger())throw Error(ne+"Exponent not an integer: "+ie(e));if(r!=null&&(r=new s(r)),n=e.e>14,!A.c||!A.c[0]||A.c[0]==1&&!A.e&&A.c.length==1||!e.c||!e.c[0])return l=new s(Math.pow(+ie(A),n?e.s*(2-Ee(e)):+ie(e))),r?l.mod(r):l;if(a=e.s<0,r){if(r.c?!r.c[0]:!r.s)return new s(NaN);c=!a&&A.isInteger()&&r.isInteger(),c&&(A=A.mod(r))}else{if(e.e>9&&(A.e>0||A.e<-1||(A.e==0?A.c[0]>1||n&&A.c[1]>=24e7:A.c[0]<8e13||n&&A.c[0]<=9999975e7)))return f=A.s<0&&Ee(e)?-0:0,A.e>-1&&(f=1/f),new s(a?1/f:f);V&&(f=er(V/$+2))}for(n?(t=new s(.5),a&&(e.s=1),p=Ee(e)):(i=Math.abs(+ie(e)),p=i%2),l=new s(B);;){if(p){if(l=l.times(A),!l.c)break;f?l.c.length>f&&(l.c.length=f):c&&(l=l.mod(r))}if(i){if(i=ae(i/2),i===0)break;p=i%2}else if(e=e.times(t),ee(e,e.e+1,1),e.e>14)p=Ee(e);else{if(i=+ie(e),i===0)break;p=i%2}A=A.times(A),f?A.c&&A.c.length>f&&(A.c.length=f):c&&(A=A.mod(r))}return c?l:(a&&(l=B.div(l)),r?l.mod(r):f?ee(l,V,O,h):l)},y.integerValue=function(e){var r=new s(this);return e==null?e=O:Y(e,0,8),ee(r,r.e+1,e)},y.isEqualTo=y.eq=function(e,r){return ce(this,new s(e,r))===0},y.isFinite=function(){return!!this.c},y.isGreaterThan=y.gt=function(e,r){return ce(this,new s(e,r))>0},y.isGreaterThanOrEqualTo=y.gte=function(e,r){return(r=ce(this,new s(e,r)))===1||r===0},y.isInteger=function(){return!!this.c&&fe(this.e/$)>this.c.length-2},y.isLessThan=y.lt=function(e,r){return ce(this,new s(e,r))<0},y.isLessThanOrEqualTo=y.lte=function(e,r){return(r=ce(this,new s(e,r)))===-1||r===0},y.isNaN=function(){return!this.s},y.isNegative=function(){return this.s<0},y.isPositive=function(){return this.s>0},y.isZero=function(){return!!this.c&&this.c[0]==0},y.minus=function(e,r){var t,c,i,f,h=this,n=h.s;if(e=new s(e,r),r=e.s,!n||!r)return new s(NaN);if(n!=r)return e.s=-r,h.plus(e);var a=h.e/$,p=e.e/$,l=h.c,A=e.c;if(!a||!p){if(!l||!A)return l?(e.s=-r,e):new s(A?h:NaN);if(!l[0]||!A[0])return A[0]?(e.s=-r,e):new s(l[0]?h:O==3?-0:0)}if(a=fe(a),p=fe(p),l=l.slice(),n=a-p){for((f=n<0)?(n=-n,i=l):(p=a,i=A),i.reverse(),r=n;r--;i.push(0));i.reverse()}else for(c=(f=(n=l.length)<(r=A.length))?n:r,n=r=0;r<c;r++)if(l[r]!=A[r]){f=l[r]<A[r];break}if(f&&(i=l,l=A,A=i,e.s=-e.s),r=(c=A.length)-(t=l.length),r>0)for(;r--;l[t++]=0);for(r=se-1;c>n;){if(l[--c]<A[c]){for(t=c;t&&!l[--t];l[t]=r);--l[t],l[c]+=se}l[c]-=A[c]}for(;l[0]==0;l.splice(0,1),--p);return l[0]?H(e,l,p):(e.s=O==3?-1:1,e.c=[e.e=0],e)},y.modulo=y.mod=function(e,r){var t,c,i=this;return e=new s(e,r),!i.c||!e.s||e.c&&!e.c[0]?new s(NaN):!e.c||i.c&&!i.c[0]?new s(i):(X==9?(c=e.s,e.s=1,t=g(i,e,0,3),e.s=c,t.s*=c):t=g(i,e,0,X),e=i.minus(t.times(e)),!e.c[0]&&X==1&&(e.s=i.s),e)},y.multipliedBy=y.times=function(e,r){var t,c,i,f,h,n,a,p,l,A,j,R,k,u,v,m=this,I=m.c,D=(e=new s(e,r)).c;if(!I||!D||!I[0]||!D[0])return!m.s||!e.s||I&&!I[0]&&!D||D&&!D[0]&&!I?e.c=e.e=e.s=null:(e.s*=m.s,!I||!D?e.c=e.e=null:(e.c=[0],e.e=0)),e;for(c=fe(m.e/$)+fe(e.e/$),e.s*=m.s,a=I.length,A=D.length,a<A&&(k=I,I=D,D=k,i=a,a=A,A=i),i=a+A,k=[];i--;k.push(0));for(u=se,v=le,i=A;--i>=0;){for(t=0,j=D[i]%v,R=D[i]/v|0,h=a,f=i+h;f>i;)p=I[--h]%v,l=I[h]/v|0,n=R*p+l*j,p=j*p+n%v*v+k[f]+t,t=(p/u|0)+(n/v|0)+R*l,k[f--]=p%u;k[f]=t}return t?++c:k.splice(0,1),H(e,k,c)},y.negated=function(){var e=new s(this);return e.s=-e.s||null,e},y.plus=function(e,r){var t,c=this,i=c.s;if(e=new s(e,r),r=e.s,!i||!r)return new s(NaN);if(i!=r)return e.s=-r,c.minus(e);var f=c.e/$,h=e.e/$,n=c.c,a=e.c;if(!f||!h){if(!n||!a)return new s(i/0);if(!n[0]||!a[0])return a[0]?e:new s(n[0]?c:i*0)}if(f=fe(f),h=fe(h),n=n.slice(),i=f-h){for(i>0?(h=f,t=a):(i=-i,t=n),t.reverse();i--;t.push(0));t.reverse()}for(i=n.length,r=a.length,i-r<0&&(t=a,a=n,n=t,r=i),i=0;r;)i=(n[--r]=n[r]+a[r]+i)/se|0,n[r]=se===n[r]?0:n[r]%se;return i&&(n=[i].concat(n),++h),H(e,n,h)},y.precision=y.sd=function(e,r){var t,c,i,f=this;if(e!=null&&e!==!!e)return Y(e,1,re),r==null?r=O:Y(r,0,8),ee(new s(f),e,r);if(!(t=f.c))return null;if(i=t.length-1,c=i*$+1,i=t[i]){for(;i%10==0;i/=10,c--);for(i=t[0];i>=10;i/=10,c++);}return e&&f.e+1>c&&(c=f.e+1),c},y.shiftedBy=function(e){return Y(e,-rr,rr),this.times("1e"+e)},y.squareRoot=y.sqrt=function(){var e,r,t,c,i,f=this,h=f.c,n=f.s,a=f.e,p=P+4,l=new s("0.5");if(n!==1||!h||!h[0])return new s(!n||n<0&&(!h||h[0])?NaN:h?f:1/0);if(n=Math.sqrt(+ie(f)),n==0||n==1/0?(r=oe(h),(r.length+a)%2==0&&(r+="0"),n=Math.sqrt(+r),a=fe((a+1)/2)-(a<0||a%2),n==1/0?r="5e"+a:(r=n.toExponential(),r=r.slice(0,r.indexOf("e")+1)+a),t=new s(r)):t=new s(n+""),t.c[0]){for(a=t.e,n=a+p,n<3&&(n=0);;)if(i=t,t=l.times(i.plus(g(f,i,p,1))),oe(i.c).slice(0,n)===(r=oe(t.c)).slice(0,n))if(t.e<a&&--n,r=r.slice(n-3,n+1),r=="9999"||!c&&r=="4999"){if(!c&&(ee(i,i.e+P+2,0),i.times(i).eq(f))){t=i;break}p+=4,n+=4,c=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(ee(t,t.e+P+2,1),e=!t.times(t).eq(f));break}}return ee(t,t.e+P+1,O,e)},y.toExponential=function(e,r){return e!=null&&(Y(e,0,re),e++),N(this,e,r,1)},y.toFixed=function(e,r){return e!=null&&(Y(e,0,re),e=e+this.e+1),N(this,e,r)},y.toFormat=function(e,r,t){var c,i=this;if(t==null)e!=null&&r&&typeof r=="object"?(t=r,r=null):e&&typeof e=="object"?(t=e,e=r=null):t=z;else if(typeof t!="object")throw Error(ne+"Argument not an object: "+t);if(c=i.toFixed(e,r),i.c){var f,h=c.split("."),n=+t.groupSize,a=+t.secondaryGroupSize,p=t.groupSeparator||"",l=h[0],A=h[1],j=i.s<0,R=j?l.slice(1):l,k=R.length;if(a&&(f=n,n=a,a=f,k-=f),n>0&&k>0){for(f=k%n||n,l=R.substr(0,f);f<k;f+=n)l+=p+R.substr(f,n);a>0&&(l+=p+R.slice(f)),j&&(l="-"+l)}c=A?l+(t.decimalSeparator||"")+((a=+t.fractionGroupSize)?A.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+(t.fractionGroupSeparator||"")):A):l}return(t.prefix||"")+c+(t.suffix||"")},y.toFraction=function(e){var r,t,c,i,f,h,n,a,p,l,A,j,R=this,k=R.c;if(e!=null&&(n=new s(e),!n.isInteger()&&(n.c||n.s!==1)||n.lt(B)))throw Error(ne+"Argument "+(n.isInteger()?"out of range: ":"not an integer: ")+ie(n));if(!k)return new s(R);for(r=new s(B),p=t=new s(B),c=a=new s(B),j=oe(k),f=r.e=j.length-R.e-1,r.c[0]=tr[(h=f%$)<0?$+h:h],e=!e||n.comparedTo(r)>0?f>0?r:p:n,h=T,T=1/0,n=new s(j),a.c[0]=0;l=g(n,r,0,1),i=t.plus(l.times(c)),i.comparedTo(e)!=1;)t=c,c=i,p=a.plus(l.times(i=p)),a=i,r=n.minus(l.times(i=r)),n=i;return i=g(e.minus(t),c,0,1),a=a.plus(i.times(p)),t=t.plus(i.times(c)),a.s=p.s=R.s,f=f*2,A=g(p,c,f,O).minus(R).abs().comparedTo(g(a,t,f,O).minus(R).abs())<1?[p,c]:[a,t],T=h,A},y.toNumber=function(){return+ie(this)},y.toPrecision=function(e,r){return e!=null&&Y(e,1,re),N(this,e,r,2)},y.toString=function(e){var r,t=this,c=t.s,i=t.e;return i===null?c?(r="Infinity",c<0&&(r="-"+r)):r="NaN":(e==null?r=i<=E||i>=F?Pe(oe(t.c),i):ue(oe(t.c),i,"0"):e===10&&d?(t=ee(new s(t),P+i+1,O),r=ue(oe(t.c),t.e,"0")):(Y(e,2,U.length,"Base"),r=S(ue(oe(t.c),i,"0"),10,e,c,!0)),c<0&&t.c[0]&&(r="-"+r)),r},y.valueOf=y.toJSON=function(){return ie(this)},y._isBigNumber=!0,y[Symbol.toStringTag]="BigNumber",y[Symbol.for("nodejs.util.inspect.custom")]=y.valueOf,o!=null&&s.set(o),s}function fe(o){var g=o|0;return o>0||o===g?g:g-1}function oe(o){for(var g,S,b=1,y=o.length,B=o[0]+"";b<y;){for(g=o[b++]+"",S=$-g.length;S--;g="0"+g);B+=g}for(y=B.length;B.charCodeAt(--y)===48;);return B.slice(0,y+1||1)}function ce(o,g){var S,b,y=o.c,B=g.c,P=o.s,O=g.s,E=o.e,F=g.e;if(!P||!O)return null;if(S=y&&!y[0],b=B&&!B[0],S||b)return S?b?0:-O:P;if(P!=O)return P;if(S=P<0,b=E==F,!y||!B)return b?0:!y^S?1:-1;if(!b)return E>F^S?1:-1;for(O=(E=y.length)<(F=B.length)?E:F,P=0;P<O;P++)if(y[P]!=B[P])return y[P]>B[P]^S?1:-1;return E==F?0:E>F^S?1:-1}function Y(o,g,S,b){if(o<g||o>S||o!==ae(o))throw Error(ne+(b||"Argument")+(typeof o=="number"?o<g||o>S?" out of range: ":" not an integer: ":" not a primitive number: ")+String(o))}function Ee(o){var g=o.c.length-1;return fe(o.e/$)==g&&o.c[g]%2!=0}function Pe(o,g){return(o.length>1?o.charAt(0)+"."+o.slice(1):o)+(g<0?"e":"e+")+g}function ue(o,g,S){var b,y;if(g<0){for(y=S+".";++g;y+=S);o=y+o}else if(b=o.length,++g>b){for(y=S,g-=b;--g;y+=S);o+=y}else g<b&&(o=o.slice(0,g)+"."+o.slice(g));return o}var $r=Zr();const Nn=Object.freeze(Object.defineProperty({__proto__:null,BigNumber:$r,default:$r},Symbol.toStringTag,{value:"Module"}));export{Pn as a,dn as b,Hr as c,an as d,nt as e,Nn as f,xr as g,fn as h,En as r,Mr as s};
@@ -0,0 +1 @@
1
+ import{K as p,L as m,M as y,N as g,O,Q as k,R as L,U as E,X as h,Y as x}from"./index-D8N4Z5B5.js";class M extends p{constructor({callbackSelector:s,cause:e,data:n,extraData:c,sender:u,urls:t}){var i;super(e.shortMessage||"An error occurred while fetching for an offchain result.",{cause:e,metaMessages:[...e.metaMessages||[],(i=e.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",t&&[" Gateway URL(s):",...t.map(f=>` ${m(f)}`)],` Sender: ${u}`,` Data: ${n}`,` Callback selector: ${s}`,` Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class R extends p{constructor({result:s,url:e}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${m(e)}`,`Response: ${y(s)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class $ extends p{constructor({sender:s,to:e}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${e}`,`OffchainLookup sender address: ${s}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}const j="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 v(o,{blockNumber:s,blockTag:e,data:n,to:c}){const{args:u}=g({data:n,abi:[S]}),[t,i,f,a,r]=u,{ccipRead:l}=o,b=l&&typeof(l==null?void 0:l.request)=="function"?l.request:q;try{if(!O(c,t))throw new $({sender:t,to:c});const d=await b({data:f,sender:t,urls:i}),{data:w}=await k(o,{blockNumber:s,blockTag:e,data:L([a,E([{type:"bytes"},{type:"bytes"}],[d,r])]),to:c});return w}catch(d){throw new M({callbackSelector:a,cause:d,data:n,extraData:r,sender:t,urls:i})}}async function q({data:o,sender:s,urls:e}){var c;let n=new Error("An unknown error occurred.");for(let u=0;u<e.length;u++){const t=e[u],i=t.includes("{data}")?"GET":"POST",f=i==="POST"?{data:o,sender:s}:void 0;try{const a=await fetch(t.replace("{sender}",s).replace("{data}",o),{body:JSON.stringify(f),method:i});let r;if((c=a.headers.get("Content-Type"))!=null&&c.startsWith("application/json")?r=(await a.json()).data:r=await a.text(),!a.ok){n=new h({body:f,details:r!=null&&r.error?y(r.error):a.statusText,headers:a.headers,status:a.status,url:t});continue}if(!x(r)){n=new R({result:r,url:t});continue}return r}catch(a){n=new h({body:f,details:a.message,url:t})}}throw n}export{q as ccipRequest,v as offchainLookup,S as offchainLookupAbiItem,j as offchainLookupSignature};
@@ -0,0 +1,14 @@
1
+ import{c as T,e as O}from"./index-D8N4Z5B5.js";function U(y,f){for(var h=0;h<f.length;h++){const l=f[h];if(typeof l!="string"&&!Array.isArray(l)){for(const d in l)if(d!=="default"&&!(d in y)){const e=Object.getOwnPropertyDescriptor(l,d);e&&Object.defineProperty(y,d,e.get?e:{enumerable:!0,get:()=>l[d]})}}}return Object.freeze(Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}))}var W={exports:{}},P={exports:{}};/*!
2
+ * Infinite Scroll v2.0.4
3
+ * measure size of elements
4
+ * MIT license
5
+ */var C;function I(){return C||(C=1,function(y){(function(f,h){y.exports?y.exports=h():f.getSize=h()})(window,function(){function h(s){let g=parseFloat(s);return s.indexOf("%")==-1&&!isNaN(g)&&g}let l=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];function d(){let s={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};return l.forEach(g=>{s[g]=0}),s}function e(s){if(typeof s=="string"&&(s=document.querySelector(s)),!(s&&typeof s=="object"&&s.nodeType))return;let r=getComputedStyle(s);if(r.display=="none")return d();let a={};a.width=s.offsetWidth,a.height=s.offsetHeight;let t=a.isBorderBox=r.boxSizing=="border-box";l.forEach(E=>{let v=r[E],b=parseFloat(v);a[E]=isNaN(b)?0:b});let n=a.paddingLeft+a.paddingRight,u=a.paddingTop+a.paddingBottom,x=a.marginLeft+a.marginRight,i=a.marginTop+a.marginBottom,o=a.borderLeftWidth+a.borderRightWidth,c=a.borderTopWidth+a.borderBottomWidth,p=h(r.width);p!==!1&&(a.width=p+(t?0:n+o));let m=h(r.height);return m!==!1&&(a.height=m+(t?0:u+c)),a.innerWidth=a.width-(n+o),a.innerHeight=a.height-(u+c),a.outerWidth=a.width+x,a.outerHeight=a.height+i,a}return e})}(P)),P.exports}var D={exports:{}},S={exports:{}},L;function j(){return L||(L=1,function(y){(function(f,h){y.exports?y.exports=h():f.EvEmitter=h()})(typeof window<"u"?window:T,function(){function f(){}let h=f.prototype;return h.on=function(l,d){if(!l||!d)return this;let e=this._events=this._events||{},s=e[l]=e[l]||[];return s.includes(d)||s.push(d),this},h.once=function(l,d){if(!l||!d)return this;this.on(l,d);let e=this._onceEvents=this._onceEvents||{},s=e[l]=e[l]||{};return s[d]=!0,this},h.off=function(l,d){let e=this._events&&this._events[l];if(!e||!e.length)return this;let s=e.indexOf(d);return s!=-1&&e.splice(s,1),this},h.emitEvent=function(l,d){let e=this._events&&this._events[l];if(!e||!e.length)return this;e=e.slice(0),d=d||[];let s=this._onceEvents&&this._onceEvents[l];for(let g of e)s&&s[g]&&(this.off(l,g),delete s[g]),g.apply(this,d);return this},h.allOff=function(){return delete this._events,delete this._onceEvents,this},f})}(S)),S.exports}/*!
6
+ * Unidragger v3.0.1
7
+ * Draggable base class
8
+ * MIT license
9
+ */var M;function k(){return M||(M=1,function(y){(function(f,h){y.exports?y.exports=h(f,j()):f.Unidragger=h(f,f.EvEmitter)})(typeof window<"u"?window:T,function(h,l){function d(){}let e=d.prototype=Object.create(l.prototype);e.handleEvent=function(t){let n="on"+t.type;this[n]&&this[n](t)};let s,g;"ontouchstart"in h?(s="touchstart",g=["touchmove","touchend","touchcancel"]):h.PointerEvent?(s="pointerdown",g=["pointermove","pointerup","pointercancel"]):(s="mousedown",g=["mousemove","mouseup"]),e.touchActionValue="none",e.bindHandles=function(){this._bindHandles("addEventListener",this.touchActionValue)},e.unbindHandles=function(){this._bindHandles("removeEventListener","")},e._bindHandles=function(t,n){this.handles.forEach(u=>{u[t](s,this),u[t]("click",this),h.PointerEvent&&(u.style.touchAction=n)})},e.bindActivePointerEvents=function(){g.forEach(t=>{h.addEventListener(t,this)})},e.unbindActivePointerEvents=function(){g.forEach(t=>{h.removeEventListener(t,this)})},e.withPointer=function(t,n){n.pointerId===this.pointerIdentifier&&this[t](n,n)},e.withTouch=function(t,n){let u;for(let x of n.changedTouches)x.identifier===this.pointerIdentifier&&(u=x);u&&this[t](n,u)},e.onmousedown=function(t){this.pointerDown(t,t)},e.ontouchstart=function(t){this.pointerDown(t,t.changedTouches[0])},e.onpointerdown=function(t){this.pointerDown(t,t)};const r=["TEXTAREA","INPUT","SELECT","OPTION"],a=["radio","checkbox","button","submit","image","file"];return e.pointerDown=function(t,n){let u=r.includes(t.target.nodeName),x=a.includes(t.target.type),i=!u||x;!this.isPointerDown&&!t.button&&i&&(this.isPointerDown=!0,this.pointerIdentifier=n.pointerId!==void 0?n.pointerId:n.identifier,this.pointerDownPointer={pageX:n.pageX,pageY:n.pageY},this.bindActivePointerEvents(),this.emitEvent("pointerDown",[t,n]))},e.onmousemove=function(t){this.pointerMove(t,t)},e.onpointermove=function(t){this.withPointer("pointerMove",t)},e.ontouchmove=function(t){this.withTouch("pointerMove",t)},e.pointerMove=function(t,n){let u={x:n.pageX-this.pointerDownPointer.pageX,y:n.pageY-this.pointerDownPointer.pageY};this.emitEvent("pointerMove",[t,n,u]),!this.isDragging&&this.hasDragStarted(u)&&this.dragStart(t,n),this.isDragging&&this.dragMove(t,n,u)},e.hasDragStarted=function(t){return Math.abs(t.x)>3||Math.abs(t.y)>3},e.dragStart=function(t,n){this.isDragging=!0,this.isPreventingClicks=!0,this.emitEvent("dragStart",[t,n])},e.dragMove=function(t,n,u){this.emitEvent("dragMove",[t,n,u])},e.onmouseup=function(t){this.pointerUp(t,t)},e.onpointerup=function(t){this.withPointer("pointerUp",t)},e.ontouchend=function(t){this.withTouch("pointerUp",t)},e.pointerUp=function(t,n){this.pointerDone(),this.emitEvent("pointerUp",[t,n]),this.isDragging?this.dragEnd(t,n):this.staticClick(t,n)},e.dragEnd=function(t,n){this.isDragging=!1,setTimeout(()=>delete this.isPreventingClicks),this.emitEvent("dragEnd",[t,n])},e.pointerDone=function(){this.isPointerDown=!1,delete this.pointerIdentifier,this.unbindActivePointerEvents(),this.emitEvent("pointerDone")},e.onpointercancel=function(t){this.withPointer("pointerCancel",t)},e.ontouchcancel=function(t){this.withTouch("pointerCancel",t)},e.pointerCancel=function(t,n){this.pointerDone(),this.emitEvent("pointerCancel",[t,n])},e.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},e.staticClick=function(t,n){let u=t.type==="mouseup";u&&this.isIgnoringMouseUp||(this.emitEvent("staticClick",[t,n]),u&&(this.isIgnoringMouseUp=!0,setTimeout(()=>{delete this.isIgnoringMouseUp},400)))},d})}(D)),D.exports}/*!
10
+ * Draggabilly v3.0.0
11
+ * Make that shiz draggable
12
+ * https://draggabilly.desandro.com
13
+ * MIT license
14
+ */(function(y){(function(f,h){y.exports?y.exports=h(f,I(),k()):f.Draggabilly=h(f,f.getSize,f.Unidragger)})(typeof window<"u"?window:T,function(h,l,d){function e(){}let s=h.jQuery;function g(i,o){this.element=typeof i=="string"?document.querySelector(i):i,s&&(this.$element=s(this.element)),this.options={},this.option(o),this._create()}let r=g.prototype=Object.create(d.prototype);r.option=function(i){this.options={...this.options,...i}};const a=["relative","absolute","fixed"];r._create=function(){this.position={},this._getPosition(),this.startPoint={x:0,y:0},this.dragPoint={x:0,y:0},this.startPosition={...this.position};let i=getComputedStyle(this.element);a.includes(i.position)||(this.element.style.position="relative"),this.on("pointerDown",this.handlePointerDown),this.on("pointerUp",this.handlePointerUp),this.on("dragStart",this.handleDragStart),this.on("dragMove",this.handleDragMove),this.on("dragEnd",this.handleDragEnd),this.setHandles(),this.enable()},r.setHandles=function(){let{handle:i}=this.options;typeof i=="string"?this.handles=this.element.querySelectorAll(i):typeof i=="object"&&i.length?this.handles=i:i instanceof HTMLElement?this.handles=[i]:this.handles=[this.element]};const t=["dragStart","dragMove","dragEnd"];let n=r.emitEvent;r.emitEvent=function(i,o){if(!this.isEnabled&&t.includes(i))return;n.call(this,i,o);let p=h.jQuery;if(!p||!this.$element)return;let m,E=o;o&&o[0]instanceof Event&&([m,...E]=o);let b=p.Event(m);b.type=i,this.$element.trigger(b,E)},r._getPosition=function(){let i=getComputedStyle(this.element),o=this._getPositionCoord(i.left,"width"),c=this._getPositionCoord(i.top,"height");this.position.x=isNaN(o)?0:o,this.position.y=isNaN(c)?0:c,this._addTransformPosition(i)},r._getPositionCoord=function(i,o){if(i.includes("%")){let c=l(this.element.parentNode);return c?parseFloat(i)/100*c[o]:0}return parseInt(i,10)},r._addTransformPosition=function(i){let o=i.transform;if(!o.startsWith("matrix"))return;let c=o.split(","),p=o.startsWith("matrix3d")?12:4,m=parseInt(c[p],10),E=parseInt(c[p+1],10);this.position.x+=m,this.position.y+=E},r.handlePointerDown=function(i,o){this.isEnabled&&(this.pointerDownPointer={pageX:o.pageX,pageY:o.pageY},i.preventDefault(),document.activeElement.blur(),this.bindActivePointerEvents(i),this.element.classList.add("is-pointer-down"))},r.handleDragStart=function(){this.isEnabled&&(this._getPosition(),this.measureContainment(),this.startPosition.x=this.position.x,this.startPosition.y=this.position.y,this.setLeftTop(),this.dragPoint.x=0,this.dragPoint.y=0,this.element.classList.add("is-dragging"),this.animate())},r.measureContainment=function(){let i=this.getContainer();if(!i)return;let o=l(this.element),c=l(i),{borderLeftWidth:p,borderRightWidth:m,borderTopWidth:E,borderBottomWidth:v}=c,b=this.element.getBoundingClientRect(),w=i.getBoundingClientRect(),z=p+m,A=E+v,_=this.relativeStartPosition={x:b.left-(w.left+p),y:b.top-(w.top+E)};this.containSize={width:c.width-z-_.x-o.width,height:c.height-A-_.y-o.height}},r.getContainer=function(){let i=this.options.containment;return i?i instanceof HTMLElement?i:typeof i=="string"?document.querySelector(i):this.element.parentNode:void 0},r.handleDragMove=function(i,o,c){if(!this.isEnabled)return;let p=c.x,m=c.y,E=this.options.grid,v=E&&E[0],b=E&&E[1];p=u(p,v),m=u(m,b),p=this.containDrag("x",p,v),m=this.containDrag("y",m,b),p=this.options.axis=="y"?0:p,m=this.options.axis=="x"?0:m,this.position.x=this.startPosition.x+p,this.position.y=this.startPosition.y+m,this.dragPoint.x=p,this.dragPoint.y=m};function u(i,o,c){return o?(c=c||"round",Math[c](i/o)*o):i}r.containDrag=function(i,o,c){if(!this.options.containment)return o;let p=i=="x"?"width":"height",m=this.relativeStartPosition[i],E=u(-m,c,"ceil"),v=this.containSize[p];return v=u(v,c,"floor"),Math.max(E,Math.min(v,o))},r.handlePointerUp=function(){this.element.classList.remove("is-pointer-down")},r.handleDragEnd=function(){this.isEnabled&&(this.element.style.transform="",this.setLeftTop(),this.element.classList.remove("is-dragging"))},r.animate=function(){this.isDragging&&(this.positionDrag(),requestAnimationFrame(()=>this.animate()))},r.setLeftTop=function(){let{x:i,y:o}=this.position;this.element.style.left=`${i}px`,this.element.style.top=`${o}px`},r.positionDrag=function(){let{x:i,y:o}=this.dragPoint;this.element.style.transform=`translate3d(${i}px, ${o}px, 0)`},r.setPosition=function(i,o){this.position.x=i,this.position.y=o,this.setLeftTop()},r.enable=function(){this.isEnabled||(this.isEnabled=!0,this.bindHandles())},r.disable=function(){this.isEnabled&&(this.isEnabled=!1,this.isDragging&&this.dragEnd(),this.unbindHandles())};const x=["transform","left","top","position"];return r.destroy=function(){this.disable(),x.forEach(i=>{this.element.style[i]=""}),this.unbindHandles(),this.$element&&this.$element.removeData("draggabilly")},r._init=e,s&&s.bridget&&s.bridget("draggabilly",g),g})})(W);var H=W.exports;const R=O(H),B=U({__proto__:null,default:R},[H]);export{B as d};
@@ -0,0 +1 @@
1
+ import{e as ze}from"./index-D8N4Z5B5.js";var te={exports:{}};const Ke="2.0.0",_e=256,Ze=Number.MAX_SAFE_INTEGER||9007199254740991,Je=16,Qe=_e-6,er=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var q={MAX_LENGTH:_e,MAX_SAFE_COMPONENT_LENGTH:Je,MAX_SAFE_BUILD_LENGTH:Qe,MAX_SAFE_INTEGER:Ze,RELEASE_TYPES:er,SEMVER_SPEC_VERSION:Ke,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},K={};const rr=typeof process=="object"&&K&&K.NODE_DEBUG&&/\bsemver\b/i.test(K.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var Y=rr;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:a}=q,l=Y;e=t.exports={};const c=e.re=[],N=e.safeRe=[],n=e.src=[],i=e.t={};let f=0;const $="[a-zA-Z0-9-]",S=[["\\s",1],["\\d",a],[$,s]],p=G=>{for(const[P,y]of S)G=G.split(`${P}*`).join(`${P}{0,${y}}`).split(`${P}+`).join(`${P}{1,${y}}`);return G},R=(G,P,y)=>{const z=p(P),A=f++;l(G,A,P),i[G]=A,n[A]=P,c[A]=new RegExp(P,y?"g":void 0),N[A]=new RegExp(z,y?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*"),R("NUMERICIDENTIFIERLOOSE","\\d+"),R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${$}*`),R("MAINVERSION",`(${n[i.NUMERICIDENTIFIER]})\\.(${n[i.NUMERICIDENTIFIER]})\\.(${n[i.NUMERICIDENTIFIER]})`),R("MAINVERSIONLOOSE",`(${n[i.NUMERICIDENTIFIERLOOSE]})\\.(${n[i.NUMERICIDENTIFIERLOOSE]})\\.(${n[i.NUMERICIDENTIFIERLOOSE]})`),R("PRERELEASEIDENTIFIER",`(?:${n[i.NUMERICIDENTIFIER]}|${n[i.NONNUMERICIDENTIFIER]})`),R("PRERELEASEIDENTIFIERLOOSE",`(?:${n[i.NUMERICIDENTIFIERLOOSE]}|${n[i.NONNUMERICIDENTIFIER]})`),R("PRERELEASE",`(?:-(${n[i.PRERELEASEIDENTIFIER]}(?:\\.${n[i.PRERELEASEIDENTIFIER]})*))`),R("PRERELEASELOOSE",`(?:-?(${n[i.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[i.PRERELEASEIDENTIFIERLOOSE]})*))`),R("BUILDIDENTIFIER",`${$}+`),R("BUILD",`(?:\\+(${n[i.BUILDIDENTIFIER]}(?:\\.${n[i.BUILDIDENTIFIER]})*))`),R("FULLPLAIN",`v?${n[i.MAINVERSION]}${n[i.PRERELEASE]}?${n[i.BUILD]}?`),R("FULL",`^${n[i.FULLPLAIN]}$`),R("LOOSEPLAIN",`[v=\\s]*${n[i.MAINVERSIONLOOSE]}${n[i.PRERELEASELOOSE]}?${n[i.BUILD]}?`),R("LOOSE",`^${n[i.LOOSEPLAIN]}$`),R("GTLT","((?:<|>)?=?)"),R("XRANGEIDENTIFIERLOOSE",`${n[i.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),R("XRANGEIDENTIFIER",`${n[i.NUMERICIDENTIFIER]}|x|X|\\*`),R("XRANGEPLAIN",`[v=\\s]*(${n[i.XRANGEIDENTIFIER]})(?:\\.(${n[i.XRANGEIDENTIFIER]})(?:\\.(${n[i.XRANGEIDENTIFIER]})(?:${n[i.PRERELEASE]})?${n[i.BUILD]}?)?)?`),R("XRANGEPLAINLOOSE",`[v=\\s]*(${n[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[i.XRANGEIDENTIFIERLOOSE]})(?:${n[i.PRERELEASELOOSE]})?${n[i.BUILD]}?)?)?`),R("XRANGE",`^${n[i.GTLT]}\\s*${n[i.XRANGEPLAIN]}$`),R("XRANGELOOSE",`^${n[i.GTLT]}\\s*${n[i.XRANGEPLAINLOOSE]}$`),R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),R("COERCE",`${n[i.COERCEPLAIN]}(?:$|[^\\d])`),R("COERCEFULL",n[i.COERCEPLAIN]+`(?:${n[i.PRERELEASE]})?(?:${n[i.BUILD]})?(?:$|[^\\d])`),R("COERCERTL",n[i.COERCE],!0),R("COERCERTLFULL",n[i.COERCEFULL],!0),R("LONETILDE","(?:~>?)"),R("TILDETRIM",`(\\s*)${n[i.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",R("TILDE",`^${n[i.LONETILDE]}${n[i.XRANGEPLAIN]}$`),R("TILDELOOSE",`^${n[i.LONETILDE]}${n[i.XRANGEPLAINLOOSE]}$`),R("LONECARET","(?:\\^)"),R("CARETTRIM",`(\\s*)${n[i.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",R("CARET",`^${n[i.LONECARET]}${n[i.XRANGEPLAIN]}$`),R("CARETLOOSE",`^${n[i.LONECARET]}${n[i.XRANGEPLAINLOOSE]}$`),R("COMPARATORLOOSE",`^${n[i.GTLT]}\\s*(${n[i.LOOSEPLAIN]})$|^$`),R("COMPARATOR",`^${n[i.GTLT]}\\s*(${n[i.FULLPLAIN]})$|^$`),R("COMPARATORTRIM",`(\\s*)${n[i.GTLT]}\\s*(${n[i.LOOSEPLAIN]}|${n[i.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",R("HYPHENRANGE",`^\\s*(${n[i.XRANGEPLAIN]})\\s+-\\s+(${n[i.XRANGEPLAIN]})\\s*$`),R("HYPHENRANGELOOSE",`^\\s*(${n[i.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[i.XRANGEPLAINLOOSE]})\\s*$`),R("STAR","(<|>)?=?\\s*\\*"),R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(te,te.exports);var V=te.exports;const tr=Object.freeze({loose:!0}),sr=Object.freeze({}),nr=t=>t?typeof t!="object"?tr:t:sr;var se=nr;const ue=/^[0-9]+$/,Ge=(t,e)=>{const r=ue.test(t),s=ue.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},ir=(t,e)=>Ge(e,t);var ye={compareIdentifiers:Ge,rcompareIdentifiers:ir};const x=Y,{MAX_LENGTH:Ee,MAX_SAFE_INTEGER:b}=q,{safeRe:he,t:$e}=V,ar=se,{compareIdentifiers:F}=ye;let or=class _{constructor(e,r){if(r=ar(r),e instanceof _){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Ee)throw new TypeError(`version is longer than ${Ee} characters`);x("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const s=e.trim().match(r.loose?he[$e.LOOSE]:he[$e.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>b||this.major<0)throw new TypeError("Invalid major version");if(this.minor>b||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>b||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){const l=+a;if(l>=0&&l<b)return l}return a}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(x("SemVer.compare",this.version,this.options,e),!(e instanceof _)){if(typeof e=="string"&&e===this.version)return 0;e=new _(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof _||(e=new _(e,this.options)),F(this.major,e.major)||F(this.minor,e.minor)||F(this.patch,e.patch)}comparePre(e){if(e instanceof _||(e=new _(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{const s=this.prerelease[r],a=e.prerelease[r];if(x("prerelease compare",r,s,a),s===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(s===void 0)return-1;if(s===a)continue;return F(s,a)}while(++r)}compareBuild(e){e instanceof _||(e=new _(e,this.options));let r=0;do{const s=this.build[r],a=e.build[r];if(x("build compare",r,s,a),s===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(s===void 0)return-1;if(s===a)continue;return F(s,a)}while(++r)}inc(e,r,s){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const a=Number(s)?1:0;if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(r){let l=[r,a];s===!1&&(l=[r]),F(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=l):this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var g=or;const pe=g,lr=(t,e,r=!1)=>{if(t instanceof pe)return t;try{return new pe(t,e)}catch(s){if(!r)return null;throw s}};var j=lr;const cr=j,fr=(t,e)=>{const r=cr(t,e);return r?r.version:null};var ur=fr;const Er=j,hr=(t,e)=>{const r=Er(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var $r=hr;const me=g,pr=(t,e,r,s,a)=>{typeof r=="string"&&(a=s,s=r,r=void 0);try{return new me(t instanceof me?t.version:t,r).inc(e,s,a).version}catch{return null}};var mr=pr;const Re=j,Rr=(t,e)=>{const r=Re(t,null,!0),s=Re(e,null,!0),a=r.compare(s);if(a===0)return null;const l=a>0,c=l?r:s,N=l?s:r,n=!!c.prerelease.length;if(!!N.prerelease.length&&!n)return!N.patch&&!N.minor?"major":c.patch?"patch":c.minor?"minor":"major";const f=n?"pre":"";return r.major!==s.major?f+"major":r.minor!==s.minor?f+"minor":r.patch!==s.patch?f+"patch":"prerelease"};var Ir=Rr;const Lr=g,Nr=(t,e)=>new Lr(t,e).major;var dr=Nr;const Or=g,Sr=(t,e)=>new Or(t,e).minor;var vr=Sr;const Ar=g,Tr=(t,e)=>new Ar(t,e).patch;var gr=Tr;const wr=j,Pr=(t,e)=>{const r=wr(t,e);return r&&r.prerelease.length?r.prerelease:null};var Cr=Pr;const Ie=g,Dr=(t,e,r)=>new Ie(t,r).compare(new Ie(e,r));var C=Dr;const _r=C,Gr=(t,e,r)=>_r(e,t,r);var yr=Gr;const Fr=C,jr=(t,e)=>Fr(t,e,!0);var Ur=jr;const Le=g,Xr=(t,e,r)=>{const s=new Le(t,r),a=new Le(e,r);return s.compare(a)||s.compareBuild(a)};var ne=Xr;const Vr=ne,xr=(t,e)=>t.sort((r,s)=>Vr(r,s,e));var br=xr;const Hr=ne,kr=(t,e)=>t.sort((r,s)=>Hr(s,r,e));var qr=kr;const Yr=C,Mr=(t,e,r)=>Yr(t,e,r)>0;var M=Mr;const Br=C,Wr=(t,e,r)=>Br(t,e,r)<0;var ie=Wr;const zr=C,Kr=(t,e,r)=>zr(t,e,r)===0;var Fe=Kr;const Zr=C,Jr=(t,e,r)=>Zr(t,e,r)!==0;var je=Jr;const Qr=C,et=(t,e,r)=>Qr(t,e,r)>=0;var ae=et;const rt=C,tt=(t,e,r)=>rt(t,e,r)<=0;var oe=tt;const st=Fe,nt=je,it=M,at=ae,ot=ie,lt=oe,ct=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return st(t,r,s);case"!=":return nt(t,r,s);case">":return it(t,r,s);case">=":return at(t,r,s);case"<":return ot(t,r,s);case"<=":return lt(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};var Ue=ct;const ft=g,ut=j,{safeRe:H,t:k}=V,Et=(t,e)=>{if(t instanceof ft)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?H[k.COERCEFULL]:H[k.COERCE]);else{const n=e.includePrerelease?H[k.COERCERTLFULL]:H[k.COERCERTL];let i;for(;(i=n.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||i.index+i[0].length!==r.index+r[0].length)&&(r=i),n.lastIndex=i.index+i[1].length+i[2].length;n.lastIndex=-1}if(r===null)return null;const s=r[2],a=r[3]||"0",l=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",N=e.includePrerelease&&r[6]?`+${r[6]}`:"";return ut(`${s}.${a}.${l}${c}${N}`,e)};var ht=Et;class $t{constructor(){this.max=1e3,this.map=new Map}get(e){const r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){const a=this.map.keys().next().value;this.delete(a)}this.map.set(e,r)}return this}}var pt=$t,Z,Ne;function D(){if(Ne)return Z;Ne=1;const t=/\s+/g;class e{constructor(o,m){if(m=a(m),o instanceof e)return o.loose===!!m.loose&&o.includePrerelease===!!m.includePrerelease?o:new e(o.raw,m);if(o instanceof l)return this.raw=o.value,this.set=[[o]],this.formatted=void 0,this;if(this.options=m,this.loose=!!m.loose,this.includePrerelease=!!m.includePrerelease,this.raw=o.trim().replace(t," "),this.set=this.raw.split("||").map(E=>this.parseRange(E.trim())).filter(E=>E.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const E=this.set[0];if(this.set=this.set.filter(I=>!G(I[0])),this.set.length===0)this.set=[E];else if(this.set.length>1){for(const I of this.set)if(I.length===1&&P(I[0])){this.set=[I];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let o=0;o<this.set.length;o++){o>0&&(this.formatted+="||");const m=this.set[o];for(let E=0;E<m.length;E++)E>0&&(this.formatted+=" "),this.formatted+=m[E].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(o){const E=((this.options.includePrerelease&&p)|(this.options.loose&&R))+":"+o,I=s.get(E);if(I)return I;const h=this.options.loose,L=h?n[i.HYPHENRANGELOOSE]:n[i.HYPHENRANGE];o=o.replace(L,Be(this.options.includePrerelease)),c("hyphen replace",o),o=o.replace(n[i.COMPARATORTRIM],f),c("comparator trim",o),o=o.replace(n[i.TILDETRIM],$),c("tilde trim",o),o=o.replace(n[i.CARETTRIM],S),c("caret trim",o);let O=o.split(" ").map(T=>z(T,this.options)).join(" ").split(/\s+/).map(T=>Me(T,this.options));h&&(O=O.filter(T=>(c("loose invalid filter",T,this.options),!!T.match(n[i.COMPARATORLOOSE])))),c("range list",O);const d=new Map,v=O.map(T=>new l(T,this.options));for(const T of v){if(G(T))return[T];d.set(T.value,T)}d.size>1&&d.has("")&&d.delete("");const w=[...d.values()];return s.set(E,w),w}intersects(o,m){if(!(o instanceof e))throw new TypeError("a Range is required");return this.set.some(E=>y(E,m)&&o.set.some(I=>y(I,m)&&E.every(h=>I.every(L=>h.intersects(L,m)))))}test(o){if(!o)return!1;if(typeof o=="string")try{o=new N(o,this.options)}catch{return!1}for(let m=0;m<this.set.length;m++)if(We(this.set[m],o,this.options))return!0;return!1}}Z=e;const r=pt,s=new r,a=se,l=B(),c=Y,N=g,{safeRe:n,t:i,comparatorTrimReplace:f,tildeTrimReplace:$,caretTrimReplace:S}=V,{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:R}=q,G=u=>u.value==="<0.0.0-0",P=u=>u.value==="",y=(u,o)=>{let m=!0;const E=u.slice();let I=E.pop();for(;m&&E.length;)m=E.every(h=>I.intersects(h,o)),I=E.pop();return m},z=(u,o)=>(c("comp",u,o),u=be(u,o),c("caret",u),u=Ve(u,o),c("tildes",u),u=ke(u,o),c("xrange",u),u=Ye(u,o),c("stars",u),u),A=u=>!u||u.toLowerCase()==="x"||u==="*",Ve=(u,o)=>u.trim().split(/\s+/).map(m=>xe(m,o)).join(" "),xe=(u,o)=>{const m=o.loose?n[i.TILDELOOSE]:n[i.TILDE];return u.replace(m,(E,I,h,L,O)=>{c("tilde",u,E,I,h,L,O);let d;return A(I)?d="":A(h)?d=`>=${I}.0.0 <${+I+1}.0.0-0`:A(L)?d=`>=${I}.${h}.0 <${I}.${+h+1}.0-0`:O?(c("replaceTilde pr",O),d=`>=${I}.${h}.${L}-${O} <${I}.${+h+1}.0-0`):d=`>=${I}.${h}.${L} <${I}.${+h+1}.0-0`,c("tilde return",d),d})},be=(u,o)=>u.trim().split(/\s+/).map(m=>He(m,o)).join(" "),He=(u,o)=>{c("caret",u,o);const m=o.loose?n[i.CARETLOOSE]:n[i.CARET],E=o.includePrerelease?"-0":"";return u.replace(m,(I,h,L,O,d)=>{c("caret",u,I,h,L,O,d);let v;return A(h)?v="":A(L)?v=`>=${h}.0.0${E} <${+h+1}.0.0-0`:A(O)?h==="0"?v=`>=${h}.${L}.0${E} <${h}.${+L+1}.0-0`:v=`>=${h}.${L}.0${E} <${+h+1}.0.0-0`:d?(c("replaceCaret pr",d),h==="0"?L==="0"?v=`>=${h}.${L}.${O}-${d} <${h}.${L}.${+O+1}-0`:v=`>=${h}.${L}.${O}-${d} <${h}.${+L+1}.0-0`:v=`>=${h}.${L}.${O}-${d} <${+h+1}.0.0-0`):(c("no pr"),h==="0"?L==="0"?v=`>=${h}.${L}.${O}${E} <${h}.${L}.${+O+1}-0`:v=`>=${h}.${L}.${O}${E} <${h}.${+L+1}.0-0`:v=`>=${h}.${L}.${O} <${+h+1}.0.0-0`),c("caret return",v),v})},ke=(u,o)=>(c("replaceXRanges",u,o),u.split(/\s+/).map(m=>qe(m,o)).join(" ")),qe=(u,o)=>{u=u.trim();const m=o.loose?n[i.XRANGELOOSE]:n[i.XRANGE];return u.replace(m,(E,I,h,L,O,d)=>{c("xRange",u,E,I,h,L,O,d);const v=A(h),w=v||A(L),T=w||A(O),U=T;return I==="="&&U&&(I=""),d=o.includePrerelease?"-0":"",v?I===">"||I==="<"?E="<0.0.0-0":E="*":I&&U?(w&&(L=0),O=0,I===">"?(I=">=",w?(h=+h+1,L=0,O=0):(L=+L+1,O=0)):I==="<="&&(I="<",w?h=+h+1:L=+L+1),I==="<"&&(d="-0"),E=`${I+h}.${L}.${O}${d}`):w?E=`>=${h}.0.0${d} <${+h+1}.0.0-0`:T&&(E=`>=${h}.${L}.0${d} <${h}.${+L+1}.0-0`),c("xRange return",E),E})},Ye=(u,o)=>(c("replaceStars",u,o),u.trim().replace(n[i.STAR],"")),Me=(u,o)=>(c("replaceGTE0",u,o),u.trim().replace(n[o.includePrerelease?i.GTE0PRE:i.GTE0],"")),Be=u=>(o,m,E,I,h,L,O,d,v,w,T,U)=>(A(E)?m="":A(I)?m=`>=${E}.0.0${u?"-0":""}`:A(h)?m=`>=${E}.${I}.0${u?"-0":""}`:L?m=`>=${m}`:m=`>=${m}${u?"-0":""}`,A(v)?d="":A(w)?d=`<${+v+1}.0.0-0`:A(T)?d=`<${v}.${+w+1}.0-0`:U?d=`<=${v}.${w}.${T}-${U}`:u?d=`<${v}.${w}.${+T+1}-0`:d=`<=${d}`,`${m} ${d}`.trim()),We=(u,o,m)=>{for(let E=0;E<u.length;E++)if(!u[E].test(o))return!1;if(o.prerelease.length&&!m.includePrerelease){for(let E=0;E<u.length;E++)if(c(u[E].semver),u[E].semver!==l.ANY&&u[E].semver.prerelease.length>0){const I=u[E].semver;if(I.major===o.major&&I.minor===o.minor&&I.patch===o.patch)return!0}return!1}return!0};return Z}var J,de;function B(){if(de)return J;de=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(f,$){if($=r($),f instanceof e){if(f.loose===!!$.loose)return f;f=f.value}f=f.trim().split(/\s+/).join(" "),c("comparator",f,$),this.options=$,this.loose=!!$.loose,this.parse(f),this.semver===t?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(f){const $=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],S=f.match($);if(!S)throw new TypeError(`Invalid comparator: ${f}`);this.operator=S[1]!==void 0?S[1]:"",this.operator==="="&&(this.operator=""),S[2]?this.semver=new N(S[2],this.options.loose):this.semver=t}toString(){return this.value}test(f){if(c("Comparator.test",f,this.options.loose),this.semver===t||f===t)return!0;if(typeof f=="string")try{f=new N(f,this.options)}catch{return!1}return l(f,this.operator,this.semver,this.options)}intersects(f,$){if(!(f instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new n(f.value,$).test(this.value):f.operator===""?f.value===""?!0:new n(this.value,$).test(f.semver):($=r($),$.includePrerelease&&(this.value==="<0.0.0-0"||f.value==="<0.0.0-0")||!$.includePrerelease&&(this.value.startsWith("<0.0.0")||f.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&f.operator.startsWith(">")||this.operator.startsWith("<")&&f.operator.startsWith("<")||this.semver.version===f.semver.version&&this.operator.includes("=")&&f.operator.includes("=")||l(this.semver,"<",f.semver,$)&&this.operator.startsWith(">")&&f.operator.startsWith("<")||l(this.semver,">",f.semver,$)&&this.operator.startsWith("<")&&f.operator.startsWith(">")))}}J=e;const r=se,{safeRe:s,t:a}=V,l=Ue,c=Y,N=g,n=D();return J}const mt=D(),Rt=(t,e,r)=>{try{e=new mt(e,r)}catch{return!1}return e.test(t)};var W=Rt;const It=D(),Lt=(t,e)=>new It(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));var Nt=Lt;const dt=g,Ot=D(),St=(t,e,r)=>{let s=null,a=null,l=null;try{l=new Ot(e,r)}catch{return null}return t.forEach(c=>{l.test(c)&&(!s||a.compare(c)===-1)&&(s=c,a=new dt(s,r))}),s};var vt=St;const At=g,Tt=D(),gt=(t,e,r)=>{let s=null,a=null,l=null;try{l=new Tt(e,r)}catch{return null}return t.forEach(c=>{l.test(c)&&(!s||a.compare(c)===1)&&(s=c,a=new At(s,r))}),s};var wt=gt;const Q=g,Pt=D(),Oe=M,Ct=(t,e)=>{t=new Pt(t,e);let r=new Q("0.0.0");if(t.test(r)||(r=new Q("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){const a=t.set[s];let l=null;a.forEach(c=>{const N=new Q(c.semver.version);switch(c.operator){case">":N.prerelease.length===0?N.patch++:N.prerelease.push(0),N.raw=N.format();case"":case">=":(!l||Oe(N,l))&&(l=N);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!r||Oe(r,l))&&(r=l)}return r&&t.test(r)?r:null};var Dt=Ct;const _t=D(),Gt=(t,e)=>{try{return new _t(t,e).range||"*"}catch{return null}};var yt=Gt;const Ft=g,Xe=B(),{ANY:jt}=Xe,Ut=D(),Xt=W,Se=M,ve=ie,Vt=oe,xt=ae,bt=(t,e,r,s)=>{t=new Ft(t,s),e=new Ut(e,s);let a,l,c,N,n;switch(r){case">":a=Se,l=Vt,c=ve,N=">",n=">=";break;case"<":a=ve,l=xt,c=Se,N="<",n="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Xt(t,e,s))return!1;for(let i=0;i<e.set.length;++i){const f=e.set[i];let $=null,S=null;if(f.forEach(p=>{p.semver===jt&&(p=new Xe(">=0.0.0")),$=$||p,S=S||p,a(p.semver,$.semver,s)?$=p:c(p.semver,S.semver,s)&&(S=p)}),$.operator===N||$.operator===n||(!S.operator||S.operator===N)&&l(t,S.semver))return!1;if(S.operator===n&&c(t,S.semver))return!1}return!0};var le=bt;const Ht=le,kt=(t,e,r)=>Ht(t,e,">",r);var qt=kt;const Yt=le,Mt=(t,e,r)=>Yt(t,e,"<",r);var Bt=Mt;const Ae=D(),Wt=(t,e,r)=>(t=new Ae(t,r),e=new Ae(e,r),t.intersects(e,r));var zt=Wt;const Kt=W,Zt=C;var Jt=(t,e,r)=>{const s=[];let a=null,l=null;const c=t.sort((f,$)=>Zt(f,$,r));for(const f of c)Kt(f,e,r)?(l=f,a||(a=f)):(l&&s.push([a,l]),l=null,a=null);a&&s.push([a,null]);const N=[];for(const[f,$]of s)f===$?N.push(f):!$&&f===c[0]?N.push("*"):$?f===c[0]?N.push(`<=${$}`):N.push(`${f} - ${$}`):N.push(`>=${f}`);const n=N.join(" || "),i=typeof e.raw=="string"?e.raw:String(e);return n.length<i.length?n:e};const Te=D(),ce=B(),{ANY:ee}=ce,X=W,fe=C,Qt=(t,e,r={})=>{if(t===e)return!0;t=new Te(t,r),e=new Te(e,r);let s=!1;e:for(const a of t.set){for(const l of e.set){const c=rs(a,l,r);if(s=s||c!==null,c)continue e}if(s)return!1}return!0},es=[new ce(">=0.0.0-0")],ge=[new ce(">=0.0.0")],rs=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===ee){if(e.length===1&&e[0].semver===ee)return!0;r.includePrerelease?t=es:t=ge}if(e.length===1&&e[0].semver===ee){if(r.includePrerelease)return!0;e=ge}const s=new Set;let a,l;for(const p of t)p.operator===">"||p.operator===">="?a=we(a,p,r):p.operator==="<"||p.operator==="<="?l=Pe(l,p,r):s.add(p.semver);if(s.size>1)return null;let c;if(a&&l){if(c=fe(a.semver,l.semver,r),c>0)return null;if(c===0&&(a.operator!==">="||l.operator!=="<="))return null}for(const p of s){if(a&&!X(p,String(a),r)||l&&!X(p,String(l),r))return null;for(const R of e)if(!X(p,String(R),r))return!1;return!0}let N,n,i,f,$=l&&!r.includePrerelease&&l.semver.prerelease.length?l.semver:!1,S=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1;$&&$.prerelease.length===1&&l.operator==="<"&&$.prerelease[0]===0&&($=!1);for(const p of e){if(f=f||p.operator===">"||p.operator===">=",i=i||p.operator==="<"||p.operator==="<=",a){if(S&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===S.major&&p.semver.minor===S.minor&&p.semver.patch===S.patch&&(S=!1),p.operator===">"||p.operator===">="){if(N=we(a,p,r),N===p&&N!==a)return!1}else if(a.operator===">="&&!X(a.semver,String(p),r))return!1}if(l){if($&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===$.major&&p.semver.minor===$.minor&&p.semver.patch===$.patch&&($=!1),p.operator==="<"||p.operator==="<="){if(n=Pe(l,p,r),n===p&&n!==l)return!1}else if(l.operator==="<="&&!X(l.semver,String(p),r))return!1}if(!p.operator&&(l||a)&&c!==0)return!1}return!(a&&i&&!l&&c!==0||l&&f&&!a&&c!==0||S||$)},we=(t,e,r)=>{if(!t)return e;const s=fe(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},Pe=(t,e,r)=>{if(!t)return e;const s=fe(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};var ts=Qt;const re=V,Ce=q,ss=g,De=ye,ns=j,is=ur,as=$r,os=mr,ls=Ir,cs=dr,fs=vr,us=gr,Es=Cr,hs=C,$s=yr,ps=Ur,ms=ne,Rs=br,Is=qr,Ls=M,Ns=ie,ds=Fe,Os=je,Ss=ae,vs=oe,As=Ue,Ts=ht,gs=B(),ws=D(),Ps=W,Cs=Nt,Ds=vt,_s=wt,Gs=Dt,ys=yt,Fs=le,js=qt,Us=Bt,Xs=zt,Vs=Jt,xs=ts;var bs={parse:ns,valid:is,clean:as,inc:os,diff:ls,major:cs,minor:fs,patch:us,prerelease:Es,compare:hs,rcompare:$s,compareLoose:ps,compareBuild:ms,sort:Rs,rsort:Is,gt:Ls,lt:Ns,eq:ds,neq:Os,gte:Ss,lte:vs,cmp:As,coerce:Ts,Comparator:gs,Range:ws,satisfies:Ps,toComparators:Cs,maxSatisfying:Ds,minSatisfying:_s,minVersion:Gs,validRange:ys,outside:Fs,gtr:js,ltr:Us,intersects:Xs,simplifyRange:Vs,subset:xs,SemVer:ss,re:re.re,src:re.src,tokens:re.t,SEMVER_SPEC_VERSION:Ce.SEMVER_SPEC_VERSION,RELEASE_TYPES:Ce.RELEASE_TYPES,compareIdentifiers:De.compareIdentifiers,rcompareIdentifiers:De.rcompareIdentifiers};const ks=ze(bs);export{bs as a,ks as s};
@@ -0,0 +1 @@
1
+ import{P,W as w,l as E,m as M,n as p,o as L,p as O,T as U,b as R}from"./index-D8N4Z5B5.js";var a;(function(n){n.PROJECT_APPROVED="PROJECT_APPROVED",n.HANDSHAKE="HANDSHAKE",n.HANDSHAKE_ACK="HANDSHAKE_ACK",n.SIGNED_TRANSACTION="SIGNED_TRANSACTION",n.SIGNED_PARTIAL_TRANSACTION="SIGNED_PARTIAL_TRANSACTION",n.FAILED_TO_SIGN_TRANSACTION="FAILED_TO_SIGN_TRANSACTION",n.TRANSACTION_DENIED="TRANSACTION_DENIED",n.SOLANA_WALLET_ADAPTER_APPROVED="SOLANA_WALLET_ADAPTER_APPROVED",n.SOLANA_WALLET_ADAPTER_DENIED="SOLANA_WALLET_ADAPTER_DENIED",n.POPUP_CLOSED="POPUP_CLOSED",n.TRANSACTION_SIGNATURE_NEEDED="TRANSACTION_SIGNATURE_NEEDED",n.TRANSACTION_SIGNATURE_NEEDED_RESPONSE="TRANSACTION_SIGNATURE_NEEDED_RESPONSE",n.AUTH_LOADED="AUTH_LOADED",n.MESSAGE_SIGNATURE_NEEDED="MESSAGE_SIGNATURE_NEEDED",n.MESSAGE_SIGNATURE_NEEDED_RESPONSE="MESSAGE_SIGNATURE_NEEDED_RESPONSE",n.ONRAMP_FULFILLMENT_COMPLETE="ONRAMP_FULFILLMENT_COMPLETE",n.ONRAMP_REJECTED="ONRAMP_REJECTED"})(a||(a={}));var g;(function(n){n.UNKNOWN="UNKNOWN",n.REACT_SDK="REACT_SDK",n.SOLANA_WALLET_ADAPTER="SOLANA_WALLET_ADAPTER"})(g||(g={}));class W{constructor(t,e){this.validatedOrigin=t,this.targetWindow=e,this.handlers=new Map}off(t,e){const s=this.handlers.get(t);s==null||s.delete(e)}on(t,e){var s;const r=(s=this.handlers.get(t))!==null&&s!==void 0?s:new Set;r.add(e),this.handlers.set(t,r)}send({event:t,payload:e}){this.targetWindow.postMessage({event:t,payload:e},this.validatedOrigin)}runHandlersForEvent(t,e){const s=this.handlers.get(t);if(s)for(const r of s)r(e)}resetHandlers(){this.handlers.clear()}export(){return{off:this.off.bind(this),on:this.on.bind(this),send:this.send.bind(this),validatedOrigin:this.validatedOrigin}}}const v="https://fractal.is",y="https://www.fractal.is",b=400,h=600;function m(n){return n===y||n===v}const G="fractal:approval:popup",K=["resizable","scrollbars=1","status=1"];function H({left:n=0,scope:t=window,top:e=0,width:s=h,height:r=h,url:c}){return t.open(c,G,$({height:r,left:n,top:e,width:s}))}function $({height:n,left:t,top:e,width:s}){return["popup",`left=${t}`,`top=${e}`,`width=${s}`,`height=${n}`,...K].join(",")}class F{constructor(t){this.platform=t,this.connection=null,this.popupWindow=null,this.handleMessage=e=>{var s,r;if(!m(e.origin))return;const c=e.origin;if(this.popupWindow){if(e.data.event===a.HANDSHAKE&&!this.connection){if(!this.verifyAndResetNonce((s=e.data.payload)===null||s===void 0?void 0:s.nonce))return;this.popupWindow.postMessage({event:a.HANDSHAKE_ACK,payload:{platform:this.platform}},c),this.connection=new W(c,this.popupWindow),(r=this.connectionUpdatedCallback)===null||r===void 0||r.call(this,this.connection)}this.connection&&(this.connection.runHandlersForEvent(e.data.event,e.data.payload),e.data.event===a.POPUP_CLOSED&&this.connection&&(this.resetConnection(),this.popupWindow=null))}}}initialize(){return window.addEventListener("message",this.handleMessage),this}tearDown(){return window.removeEventListener("message",this.handleMessage),this.resetConnection(),this}async open({url:t,widthPx:e=b,heightPx:s=h,nonce:r}){var c;if(!((c=this.popupWindow)===null||c===void 0)&&c.closed&&this.resetConnectionAndPopupWindow(),this.popupWindow)return;this.initialize(),r&&(this.nonce=r);const d=window.screenX+(window.innerWidth-e)/2,A=window.screenY+(window.innerHeight-s)/2;this.popupWindow=H({height:s,left:d,top:A,url:typeof t=="string"?t:void 0,width:e}),t instanceof Promise&&this.setUrl(await t)}close(){this.popupWindow&&(this.popupWindow.close(),this.resetConnectionAndPopupWindow())}onConnectionUpdated(t){return this.connectionUpdatedCallback=t,this}getConnection(){return this.connection}setUrl(t){this.popupWindow&&(this.popupWindow.location=t)}resetConnectionAndPopupWindow(){this.resetConnection(),this.popupWindow=null}resetConnection(){var t,e;(t=this.connection)===null||t===void 0||t.resetHandlers(),this.connection=null,(e=this.connectionUpdatedCallback)===null||e===void 0||e.call(this,this.connection)}verifyAndResetNonce(t){if(!this.nonce)return!0;const e=t===this.nonce;return e&&(this.nonce=void 0),e}}function f(n){return!(n===null||typeof n!="object")}function x(n){return!(!f(n)||!("solanaPublicKey"in n)||typeof n.solanaPublicKey!="string")}function k(n){return!f(n)||!("signedB58Transactions"in n)||!Array.isArray(n.signedB58Transactions)?!1:n.signedB58Transactions.every(t=>typeof t=="string")}function B(n){return!f(n)||!("decodedSignature"in n)?!1:typeof n.decodedSignature=="string"}function _(){return`${T()}${T()}${T()}`}function T(){return(Math.random()+1).toString(36).substring(7)}const N="Unknown Error",D="https://fractal.is",J=`${D}/wallet-adapter/approve`,j=`${D}/wallet-adapter/sign`,V=`${D}/wallet-adapter/sign/message`,I=h,C=850,S="RdxqNYxF";class z{constructor(){this.popupManager=new F(g.SOLANA_WALLET_ADAPTER),this.publicKey=null,this.connecting=!1}getPublicKey(){return this.publicKey}async connect(){let t,e;const s=window.localStorage.getItem(S);if(s)return this.publicKey=new P(s),Promise.resolve();const r=_();this.popupManager.open({nonce:r,url:`${J}/${r}`});const c=i=>{if(!x(i)){e(new p(`Malformed payload when setting up connection. Expected { solanaPublicKey: string } but received ${JSON.stringify(i)}`)),this.popupManager.close();return}try{this.publicKey=new P(i.solanaPublicKey),window.localStorage.setItem(S,i.solanaPublicKey),t()}catch(o){const l=new L(o instanceof Error?o.message:N,o);e(l)}this.popupManager.close()},d=()=>{e(new p("The user denied the connection.")),this.popupManager.close()},A=()=>{e(new p("The user denied the connection.")),this.popupManager.close()};return this.popupManager.onConnectionUpdated(i=>{i&&(i.on(a.SOLANA_WALLET_ADAPTER_APPROVED,c),i.on(a.SOLANA_WALLET_ADAPTER_DENIED,d),i.on(a.POPUP_CLOSED,A))}),new Promise((i,o)=>{t=i,e=o})}async disconnect(){this.popupManager.tearDown(),this.publicKey=null,window.localStorage.removeItem(S)}async signTransaction(t){try{return this.checkWalletReadiness(),(await this.signTransactions([t]))[0]}catch(e){let s=e;throw e instanceof w||(s=new E(e instanceof Error?e.message:N,e)),s}}async signAllTransactions(t){try{return this.checkWalletReadiness(),await this.signTransactions(t)}catch(e){let s=e;throw e instanceof w||(s=new E(e instanceof Error?e.message:N,e)),s}}async signMessage(t){const e=new TextDecoder().decode(t);let s,r;const c=o=>{if(!B(o)){const u=new O(`Malformed payload when signing message. Expected { decodedSignature: string } but received ${JSON.stringify(o)}`);r(u),this.popupManager.close();return}const l=Uint8Array.from(o.decodedSignature.split(",").map(u=>Number(u)));s(l),this.popupManager.close()},d=()=>{r(new O("The user did not approve the message")),this.popupManager.close()},A=()=>{var o;const l={decodedMessage:e};(o=this.popupManager.getConnection())===null||o===void 0||o.send({event:a.MESSAGE_SIGNATURE_NEEDED,payload:l})},i=_();return this.popupManager.open({heightPx:Math.max(I,Math.floor(window.innerHeight*.8)),nonce:i,url:`${V}/${i}`,widthPx:Math.min(C,Math.floor(window.innerWidth*.8))}),this.popupManager.onConnectionUpdated(o=>{o&&(o.on(a.MESSAGE_SIGNATURE_NEEDED_RESPONSE,c),o.on(a.TRANSACTION_DENIED,d),o.on(a.POPUP_CLOSED,d),o.on(a.AUTH_LOADED,A))}),new Promise((o,l)=>{s=o,r=l})}async signTransactions(t){let e,s;const r=i=>{if(!k(i)){const l=new E(`Malformed payload when signing transactions. Expected { signedB58Transactions: string[] } but received ${JSON.stringify(i)}`);s(l),this.popupManager.close();return}const o=i.signedB58Transactions.map(l=>U.from(R.decode(l)));e(o),this.popupManager.close()},c=()=>{s(new E("The user did not approve the transaction")),this.popupManager.close()},d=()=>{var i;const o={unsignedB58Transactions:t.map(l=>R.encode(l.serializeMessage()))};(i=this.popupManager.getConnection())===null||i===void 0||i.send({event:a.TRANSACTION_SIGNATURE_NEEDED,payload:o})},A=_();return this.popupManager.open({heightPx:Math.max(I,Math.floor(window.innerHeight*.8)),nonce:A,url:`${j}/${A}`,widthPx:Math.min(C,Math.floor(window.innerWidth*.8))}),this.popupManager.onConnectionUpdated(i=>{i&&(i.on(a.TRANSACTION_SIGNATURE_NEEDED_RESPONSE,r),i.on(a.TRANSACTION_DENIED,c),i.on(a.POPUP_CLOSED,c),i.on(a.AUTH_LOADED,d))}),new Promise((i,o)=>{e=i,s=o})}checkWalletReadiness(){if(this.publicKey===null)throw new M("`publicKey` is null. Did you forget to call `.connect()`?")}}export{z as FractalWalletAdapterImpl};